summaryrefslogtreecommitdiffstats
path: root/share/man/man4
diff options
context:
space:
mode:
Diffstat (limited to 'share/man/man4')
-rw-r--r--share/man/man4/Makefile864
-rw-r--r--share/man/man4/aac.4302
-rw-r--r--share/man/man4/aacraid.4138
-rw-r--r--share/man/man4/acpi.4638
-rw-r--r--share/man/man4/acpi_asus.4187
-rw-r--r--share/man/man4/acpi_asus_wmi.490
-rw-r--r--share/man/man4/acpi_dock.462
-rw-r--r--share/man/man4/acpi_fujitsu.4175
-rw-r--r--share/man/man4/acpi_hp.4287
-rw-r--r--share/man/man4/acpi_ibm.4485
-rw-r--r--share/man/man4/acpi_panasonic.4178
-rw-r--r--share/man/man4/acpi_rapidstart.484
-rw-r--r--share/man/man4/acpi_sony.482
-rw-r--r--share/man/man4/acpi_thermal.4149
-rw-r--r--share/man/man4/acpi_toshiba.4128
-rw-r--r--share/man/man4/acpi_video.489
-rw-r--r--share/man/man4/acpi_wmi.496
-rw-r--r--share/man/man4/ada.4157
-rw-r--r--share/man/man4/adv.4240
-rw-r--r--share/man/man4/adw.4104
-rw-r--r--share/man/man4/ae.4152
-rw-r--r--share/man/man4/aesni.494
-rw-r--r--share/man/man4/age.4187
-rw-r--r--share/man/man4/agp.4177
-rw-r--r--share/man/man4/aha.4136
-rw-r--r--share/man/man4/ahb.492
-rw-r--r--share/man/man4/ahc.4446
-rw-r--r--share/man/man4/ahci.4184
-rw-r--r--share/man/man4/ahd.4180
-rw-r--r--share/man/man4/aibs.4207
-rw-r--r--share/man/man4/aio.468
-rw-r--r--share/man/man4/alc.4168
-rw-r--r--share/man/man4/ale.4162
-rw-r--r--share/man/man4/alpm.462
-rw-r--r--share/man/man4/altera_atse.4100
-rw-r--r--share/man/man4/altera_avgen.4155
-rw-r--r--share/man/man4/altera_jtag_uart.4121
-rw-r--r--share/man/man4/altera_sdcard.4118
-rw-r--r--share/man/man4/altq.4193
-rw-r--r--share/man/man4/amdpm.472
-rw-r--r--share/man/man4/amdsbwd.474
-rw-r--r--share/man/man4/amdsmb.454
-rw-r--r--share/man/man4/amdtemp.4111
-rw-r--r--share/man/man4/amr.4241
-rw-r--r--share/man/man4/an.4144
-rw-r--r--share/man/man4/aout.4146
-rw-r--r--share/man/man4/apic.477
-rw-r--r--share/man/man4/arcmsr.4170
-rw-r--r--share/man/man4/asmc.4163
-rw-r--r--share/man/man4/asr.4115
-rw-r--r--share/man/man4/ata.4273
-rw-r--r--share/man/man4/ath.4302
-rw-r--r--share/man/man4/ath_ahb.460
-rw-r--r--share/man/man4/ath_hal.4145
-rw-r--r--share/man/man4/ath_pci.457
-rw-r--r--share/man/man4/atkbd.4230
-rw-r--r--share/man/man4/atkbdc.4119
-rw-r--r--share/man/man4/atp.4157
-rw-r--r--share/man/man4/atrtc.457
-rw-r--r--share/man/man4/attimer.487
-rw-r--r--share/man/man4/audit.4140
-rw-r--r--share/man/man4/auditpipe.4256
-rw-r--r--share/man/man4/aue.4205
-rw-r--r--share/man/man4/axe.4258
-rw-r--r--share/man/man4/axge.4150
-rw-r--r--share/man/man4/bce.4432
-rw-r--r--share/man/man4/bfe.4109
-rw-r--r--share/man/man4/bge.4264
-rw-r--r--share/man/man4/bhyve.468
-rw-r--r--share/man/man4/bktr.4266
-rw-r--r--share/man/man4/blackhole.484
-rw-r--r--share/man/man4/bpf.41112
-rw-r--r--share/man/man4/bridge.4521
-rw-r--r--share/man/man4/bt.4203
-rw-r--r--share/man/man4/bwi.4148
-rw-r--r--share/man/man4/bwn.4156
-rw-r--r--share/man/man4/bxe.4344
-rw-r--r--share/man/man4/capsicum.4131
-rw-r--r--share/man/man4/cardbus.459
-rw-r--r--share/man/man4/carp.4323
-rw-r--r--share/man/man4/cas.4159
-rw-r--r--share/man/man4/cc_cdg.4155
-rw-r--r--share/man/man4/cc_chd.4128
-rw-r--r--share/man/man4/cc_cubic.4114
-rw-r--r--share/man/man4/cc_hd.4120
-rw-r--r--share/man/man4/cc_htcp.4136
-rw-r--r--share/man/man4/cc_newreno.482
-rw-r--r--share/man/man4/cc_vegas.4136
-rw-r--r--share/man/man4/ccd.4287
-rw-r--r--share/man/man4/cd.4372
-rw-r--r--share/man/man4/cdce.4155
-rw-r--r--share/man/man4/ch.4352
-rw-r--r--share/man/man4/ciss.4190
-rw-r--r--share/man/man4/cm.4173
-rw-r--r--share/man/man4/cmx.4120
-rw-r--r--share/man/man4/coretemp.474
-rw-r--r--share/man/man4/cpuctl.4193
-rw-r--r--share/man/man4/cpufreq.4308
-rw-r--r--share/man/man4/crypto.4125
-rw-r--r--share/man/man4/ctl.493
-rw-r--r--share/man/man4/cue.4113
-rw-r--r--share/man/man4/cxgb.4134
-rw-r--r--share/man/man4/cxgbe.4317
-rw-r--r--share/man/man4/cy.4257
-rw-r--r--share/man/man4/da.4217
-rw-r--r--share/man/man4/dc.4450
-rw-r--r--share/man/man4/dcons.4125
-rw-r--r--share/man/man4/dcons_crom.461
-rw-r--r--share/man/man4/ddb.41468
-rw-r--r--share/man/man4/de.4149
-rw-r--r--share/man/man4/devctl.4128
-rw-r--r--share/man/man4/digi.4377
-rw-r--r--share/man/man4/disc.476
-rw-r--r--share/man/man4/divert.4192
-rw-r--r--share/man/man4/dpms.457
-rw-r--r--share/man/man4/dpt.4115
-rw-r--r--share/man/man4/dummynet.479
-rw-r--r--share/man/man4/ed.4448
-rw-r--r--share/man/man4/edsc.4107
-rw-r--r--share/man/man4/ehci.4101
-rw-r--r--share/man/man4/em.4289
-rw-r--r--share/man/man4/en.478
-rw-r--r--share/man/man4/enc.4133
-rw-r--r--share/man/man4/epair.4119
-rw-r--r--share/man/man4/esp.4115
-rw-r--r--share/man/man4/est.4120
-rw-r--r--share/man/man4/et.4186
-rw-r--r--share/man/man4/eventtimers.4153
-rw-r--r--share/man/man4/exca.440
-rw-r--r--share/man/man4/faith.4133
-rw-r--r--share/man/man4/fatm.4115
-rw-r--r--share/man/man4/fd.4101
-rw-r--r--share/man/man4/fdc.4343
-rw-r--r--share/man/man4/fdt.4186
-rw-r--r--share/man/man4/fdtbus.488
-rw-r--r--share/man/man4/ffclock.4129
-rw-r--r--share/man/man4/filemon.4174
-rw-r--r--share/man/man4/firewire.4127
-rw-r--r--share/man/man4/fpa.458
-rw-r--r--share/man/man4/full.447
-rw-r--r--share/man/man4/fwe.496
-rw-r--r--share/man/man4/fwip.495
-rw-r--r--share/man/man4/fwohci.4158
-rw-r--r--share/man/man4/fxp.4220
-rw-r--r--share/man/man4/gbde.4304
-rw-r--r--share/man/man4/gdb.4603
-rw-r--r--share/man/man4/gem.4148
-rw-r--r--share/man/man4/geom.4484
-rw-r--r--share/man/man4/geom_fox.4214
-rw-r--r--share/man/man4/geom_linux_lvm.488
-rw-r--r--share/man/man4/geom_map.4211
-rw-r--r--share/man/man4/geom_uncompress.4107
-rw-r--r--share/man/man4/geom_uzip.4105
-rw-r--r--share/man/man4/gif.4287
-rw-r--r--share/man/man4/gpib.4100
-rw-r--r--share/man/man4/gpio.4145
-rw-r--r--share/man/man4/gpioiic.4171
-rw-r--r--share/man/man4/gpioled.4156
-rw-r--r--share/man/man4/gre.4336
-rw-r--r--share/man/man4/h_ertt.4143
-rw-r--r--share/man/man4/hatm.4282
-rw-r--r--share/man/man4/hifn.4134
-rw-r--r--share/man/man4/hme.4151
-rw-r--r--share/man/man4/hpet.4108
-rw-r--r--share/man/man4/hpt27xx.4101
-rw-r--r--share/man/man4/hptiop.4138
-rw-r--r--share/man/man4/hptmv.4101
-rw-r--r--share/man/man4/hptnr.492
-rw-r--r--share/man/man4/hptrr.4141
-rw-r--r--share/man/man4/hv_ata_pci_disengage.490
-rw-r--r--share/man/man4/hv_kvp.496
-rw-r--r--share/man/man4/hv_netvsc.483
-rw-r--r--share/man/man4/hv_storvsc.489
-rw-r--r--share/man/man4/hv_utils.485
-rw-r--r--share/man/man4/hv_vmbus.493
-rw-r--r--share/man/man4/hwpmc.4833
-rw-r--r--share/man/man4/ichsmb.457
-rw-r--r--share/man/man4/ichwd.490
-rw-r--r--share/man/man4/icmp.4250
-rw-r--r--share/man/man4/icmp6.4265
-rw-r--r--share/man/man4/ida.484
-rw-r--r--share/man/man4/ifmib.4190
-rw-r--r--share/man/man4/igb.4228
-rw-r--r--share/man/man4/igmp.4138
-rw-r--r--share/man/man4/iic.4201
-rw-r--r--share/man/man4/iicbb.458
-rw-r--r--share/man/man4/iicbus.4120
-rw-r--r--share/man/man4/iicsmb.456
-rw-r--r--share/man/man4/iir.477
-rw-r--r--share/man/man4/inet.4305
-rw-r--r--share/man/man4/inet6.4457
-rw-r--r--share/man/man4/intpm.463
-rw-r--r--share/man/man4/intro.4178
-rw-r--r--share/man/man4/io.4130
-rw-r--r--share/man/man4/ip.4893
-rw-r--r--share/man/man4/ip6.4702
-rw-r--r--share/man/man4/ipfirewall.489
-rw-r--r--share/man/man4/ipmi.4201
-rw-r--r--share/man/man4/ips.4204
-rw-r--r--share/man/man4/ipsec.4415
-rw-r--r--share/man/man4/ipw.4155
-rw-r--r--share/man/man4/ipwfw.475
-rw-r--r--share/man/man4/isci.4113
-rw-r--r--share/man/man4/iscsi_initiator.4108
-rw-r--r--share/man/man4/ismt.459
-rw-r--r--share/man/man4/isp.4238
-rw-r--r--share/man/man4/ispfw.459
-rw-r--r--share/man/man4/iwi.4160
-rw-r--r--share/man/man4/iwifw.475
-rw-r--r--share/man/man4/iwn.4195
-rw-r--r--share/man/man4/iwnfw.478
-rw-r--r--share/man/man4/ixgb.4125
-rw-r--r--share/man/man4/ixgbe.4126
-rw-r--r--share/man/man4/jme.4197
-rw-r--r--share/man/man4/joy.4119
-rw-r--r--share/man/man4/kbdmux.456
-rw-r--r--share/man/man4/keyboard.4170
-rw-r--r--share/man/man4/kld.4175
-rw-r--r--share/man/man4/ksyms.4154
-rw-r--r--share/man/man4/ktr.4211
-rw-r--r--share/man/man4/kue.4142
-rw-r--r--share/man/man4/lagg.4202
-rw-r--r--share/man/man4/le.4476
-rw-r--r--share/man/man4/led.4193
-rw-r--r--share/man/man4/lge.4157
-rw-r--r--share/man/man4/linux.4145
-rw-r--r--share/man/man4/lm75.4191
-rw-r--r--share/man/man4/lmc.4764
-rw-r--r--share/man/man4/lo.490
-rw-r--r--share/man/man4/lp.4241
-rw-r--r--share/man/man4/lpbb.479
-rw-r--r--share/man/man4/lpt.498
-rw-r--r--share/man/man4/mac.4254
-rw-r--r--share/man/man4/mac_biba.4236
-rw-r--r--share/man/man4/mac_bsdextended.4149
-rw-r--r--share/man/man4/mac_ifoff.4133
-rw-r--r--share/man/man4/mac_lomac.4221
-rw-r--r--share/man/man4/mac_mls.4251
-rw-r--r--share/man/man4/mac_none.4113
-rw-r--r--share/man/man4/mac_partition.4133
-rw-r--r--share/man/man4/mac_portacl.4217
-rw-r--r--share/man/man4/mac_seeotheruids.4131
-rw-r--r--share/man/man4/mac_stub.4116
-rw-r--r--share/man/man4/mac_test.4117
-rw-r--r--share/man/man4/malo.4127
-rw-r--r--share/man/man4/man4.arm/Makefile13
-rw-r--r--share/man/man4/man4.arm/devcfg.495
-rw-r--r--share/man/man4/man4.arm/mge.4158
-rw-r--r--share/man/man4/man4.arm/npe.4163
-rw-r--r--share/man/man4/man4.arm/ti_adc.4128
-rw-r--r--share/man/man4/man4.i386/CPU_ELAN.4159
-rw-r--r--share/man/man4/man4.i386/Makefile41
-rw-r--r--share/man/man4/man4.i386/aic.484
-rw-r--r--share/man/man4/man4.i386/apm.4158
-rw-r--r--share/man/man4/man4.i386/ce.4111
-rw-r--r--share/man/man4/man4.i386/cp.4113
-rw-r--r--share/man/man4/man4.i386/cs.4152
-rw-r--r--share/man/man4/man4.i386/ct.4162
-rw-r--r--share/man/man4/man4.i386/ctau.4119
-rw-r--r--share/man/man4/man4.i386/cx.4139
-rw-r--r--share/man/man4/man4.i386/ep.4212
-rw-r--r--share/man/man4/man4.i386/ex.4119
-rw-r--r--share/man/man4/man4.i386/fe.4318
-rw-r--r--share/man/man4/man4.i386/glxiic.4106
-rw-r--r--share/man/man4/man4.i386/glxsb.497
-rw-r--r--share/man/man4/man4.i386/ie.4143
-rw-r--r--share/man/man4/man4.i386/longrun.467
-rw-r--r--share/man/man4/man4.i386/mse.4385
-rw-r--r--share/man/man4/man4.i386/npx.4111
-rw-r--r--share/man/man4/man4.i386/pae.4127
-rw-r--r--share/man/man4/man4.i386/pbio.4187
-rw-r--r--share/man/man4/man4.i386/perfmon.4213
-rw-r--r--share/man/man4/man4.i386/pnp.485
-rw-r--r--share/man/man4/man4.i386/pnpbios.485
-rw-r--r--share/man/man4/man4.i386/sbni.4132
-rw-r--r--share/man/man4/man4.i386/smapi.4153
-rw-r--r--share/man/man4/man4.i386/snc.4142
-rw-r--r--share/man/man4/man4.i386/streams.485
-rw-r--r--share/man/man4/man4.i386/svr4.4225
-rw-r--r--share/man/man4/man4.i386/vpd.490
-rw-r--r--share/man/man4/man4.i386/vx.4140
-rw-r--r--share/man/man4/man4.i386/wl.4191
-rw-r--r--share/man/man4/man4.powerpc/Makefile18
-rw-r--r--share/man/man4/man4.powerpc/abtn.4115
-rw-r--r--share/man/man4/man4.powerpc/adb.470
-rw-r--r--share/man/man4/man4.powerpc/akbd.4105
-rw-r--r--share/man/man4/man4.powerpc/ams.487
-rw-r--r--share/man/man4/man4.powerpc/bm.487
-rw-r--r--share/man/man4/man4.powerpc/cuda.479
-rw-r--r--share/man/man4/man4.powerpc/pmu.4116
-rw-r--r--share/man/man4/man4.powerpc/powermac_nvram.465
-rw-r--r--share/man/man4/man4.powerpc/smu.4125
-rw-r--r--share/man/man4/man4.powerpc/snd_ai2s.488
-rw-r--r--share/man/man4/man4.powerpc/snd_davbus.481
-rw-r--r--share/man/man4/man4.powerpc/tsec.4154
-rw-r--r--share/man/man4/man4.sparc64/Makefile22
-rw-r--r--share/man/man4/man4.sparc64/auxio.480
-rw-r--r--share/man/man4/man4.sparc64/central.460
-rw-r--r--share/man/man4/man4.sparc64/clkbrd.488
-rw-r--r--share/man/man4/man4.sparc64/creator.488
-rw-r--r--share/man/man4/man4.sparc64/ebus.4122
-rw-r--r--share/man/man4/man4.sparc64/eeprom.4130
-rw-r--r--share/man/man4/man4.sparc64/fhc.482
-rw-r--r--share/man/man4/man4.sparc64/machfb.4180
-rw-r--r--share/man/man4/man4.sparc64/ofw_console.4126
-rw-r--r--share/man/man4/man4.sparc64/openfirm.4300
-rw-r--r--share/man/man4/man4.sparc64/openprom.4240
-rw-r--r--share/man/man4/man4.sparc64/rtc.488
-rw-r--r--share/man/man4/man4.sparc64/sbus.479
-rw-r--r--share/man/man4/man4.sparc64/snd_audiocs.488
-rw-r--r--share/man/man4/mcd.4169
-rw-r--r--share/man/man4/md.4114
-rw-r--r--share/man/man4/mem.4207
-rw-r--r--share/man/man4/meteor.4873
-rw-r--r--share/man/man4/mfi.4148
-rw-r--r--share/man/man4/miibus.4188
-rw-r--r--share/man/man4/mk48txx.4228
-rw-r--r--share/man/man4/mld.4102
-rw-r--r--share/man/man4/mlx.4256
-rw-r--r--share/man/man4/mly.4272
-rw-r--r--share/man/man4/mmc.460
-rw-r--r--share/man/man4/mmcsd.448
-rw-r--r--share/man/man4/mn.455
-rw-r--r--share/man/man4/mod_cc.4117
-rw-r--r--share/man/man4/mos.497
-rw-r--r--share/man/man4/mouse.4403
-rw-r--r--share/man/man4/mpr.4229
-rw-r--r--share/man/man4/mps.4226
-rw-r--r--share/man/man4/mpt.4186
-rw-r--r--share/man/man4/mrsas.4403
-rw-r--r--share/man/man4/msk.4256
-rw-r--r--share/man/man4/mtio.4303
-rw-r--r--share/man/man4/multicast.41011
-rw-r--r--share/man/man4/mvs.4178
-rw-r--r--share/man/man4/mwl.4193
-rw-r--r--share/man/man4/mwlfw.452
-rw-r--r--share/man/man4/mxge.4185
-rw-r--r--share/man/man4/my.490
-rw-r--r--share/man/man4/nand.4140
-rw-r--r--share/man/man4/nandsim.492
-rw-r--r--share/man/man4/natm.4102
-rw-r--r--share/man/man4/natmip.4248
-rw-r--r--share/man/man4/ncr.491
-rw-r--r--share/man/man4/ncv.4133
-rw-r--r--share/man/man4/ndis.4153
-rw-r--r--share/man/man4/net80211.41318
-rw-r--r--share/man/man4/netfpga10g_nf10bmac.470
-rw-r--r--share/man/man4/netgraph.41484
-rw-r--r--share/man/man4/netintro.4438
-rw-r--r--share/man/man4/netmap.41075
-rw-r--r--share/man/man4/nfe.4203
-rw-r--r--share/man/man4/nfsmb.454
-rw-r--r--share/man/man4/ng_UI.493
-rw-r--r--share/man/man4/ng_async.4172
-rw-r--r--share/man/man4/ng_atm.4406
-rw-r--r--share/man/man4/ng_atmllc.496
-rw-r--r--share/man/man4/ng_bluetooth.4112
-rw-r--r--share/man/man4/ng_bpf.4191
-rw-r--r--share/man/man4/ng_bridge.4212
-rw-r--r--share/man/man4/ng_bt3c.4129
-rw-r--r--share/man/man4/ng_btsocket.4354
-rw-r--r--share/man/man4/ng_car.4214
-rw-r--r--share/man/man4/ng_ccatm.4323
-rw-r--r--share/man/man4/ng_cisco.4184
-rw-r--r--share/man/man4/ng_deflate.4158
-rw-r--r--share/man/man4/ng_device.496
-rw-r--r--share/man/man4/ng_echo.473
-rw-r--r--share/man/man4/ng_eiface.4122
-rw-r--r--share/man/man4/ng_etf.4154
-rw-r--r--share/man/man4/ng_ether.4241
-rw-r--r--share/man/man4/ng_ether_echo.477
-rw-r--r--share/man/man4/ng_frame_relay.499
-rw-r--r--share/man/man4/ng_gif.4126
-rw-r--r--share/man/man4/ng_gif_demux.4107
-rw-r--r--share/man/man4/ng_h4.4123
-rw-r--r--share/man/man4/ng_hci.4387
-rw-r--r--share/man/man4/ng_hole.491
-rw-r--r--share/man/man4/ng_hub.475
-rw-r--r--share/man/man4/ng_iface.4166
-rw-r--r--share/man/man4/ng_ip_input.4102
-rw-r--r--share/man/man4/ng_ipfw.4117
-rw-r--r--share/man/man4/ng_ksocket.4242
-rw-r--r--share/man/man4/ng_l2cap.4422
-rw-r--r--share/man/man4/ng_l2tp.4329
-rw-r--r--share/man/man4/ng_lmi.4138
-rw-r--r--share/man/man4/ng_mppc.4193
-rw-r--r--share/man/man4/ng_nat.4350
-rw-r--r--share/man/man4/ng_netflow.4356
-rw-r--r--share/man/man4/ng_one2many.4278
-rw-r--r--share/man/man4/ng_patch.4235
-rw-r--r--share/man/man4/ng_ppp.4460
-rw-r--r--share/man/man4/ng_pppoe.4507
-rw-r--r--share/man/man4/ng_pptpgre.4177
-rw-r--r--share/man/man4/ng_pred1.4145
-rw-r--r--share/man/man4/ng_rfc1490.4141
-rw-r--r--share/man/man4/ng_socket.4190
-rw-r--r--share/man/man4/ng_source.4349
-rw-r--r--share/man/man4/ng_split.488
-rw-r--r--share/man/man4/ng_sppp.4172
-rw-r--r--share/man/man4/ng_sscfu.4161
-rw-r--r--share/man/man4/ng_sscop.4403
-rw-r--r--share/man/man4/ng_tag.4338
-rw-r--r--share/man/man4/ng_tcpmss.4125
-rw-r--r--share/man/man4/ng_tee.4134
-rw-r--r--share/man/man4/ng_tty.4129
-rw-r--r--share/man/man4/ng_ubt.4125
-rw-r--r--share/man/man4/ng_uni.4420
-rw-r--r--share/man/man4/ng_vjc.4238
-rw-r--r--share/man/man4/ng_vlan.4145
-rw-r--r--share/man/man4/ngatmbase.4134
-rw-r--r--share/man/man4/nge.4227
-rw-r--r--share/man/man4/nmdm.485
-rw-r--r--share/man/man4/nsp.498
-rw-r--r--share/man/man4/ntb.4114
-rw-r--r--share/man/man4/null.457
-rw-r--r--share/man/man4/nvd.497
-rw-r--r--share/man/man4/nvme.4171
-rw-r--r--share/man/man4/nvram.493
-rw-r--r--share/man/man4/nvram2env.4118
-rw-r--r--share/man/man4/nxge.497
-rw-r--r--share/man/man4/oce.4135
-rw-r--r--share/man/man4/ohci.478
-rw-r--r--share/man/man4/orm.447
-rw-r--r--share/man/man4/padlock.497
-rw-r--r--share/man/man4/pass.4120
-rw-r--r--share/man/man4/patm.4192
-rw-r--r--share/man/man4/pccard.478
-rw-r--r--share/man/man4/pccbb.4183
-rw-r--r--share/man/man4/pcf.472
-rw-r--r--share/man/man4/pci.4343
-rw-r--r--share/man/man4/pcib.449
-rw-r--r--share/man/man4/pcic.4103
-rw-r--r--share/man/man4/pcii.497
-rw-r--r--share/man/man4/pcm.4796
-rw-r--r--share/man/man4/pcn.4191
-rw-r--r--share/man/man4/pf.41188
-rw-r--r--share/man/man4/pflog.4107
-rw-r--r--share/man/man4/pfsync.4229
-rw-r--r--share/man/man4/pim.4201
-rw-r--r--share/man/man4/polling.4222
-rw-r--r--share/man/man4/ppbus.4363
-rw-r--r--share/man/man4/ppc.4136
-rw-r--r--share/man/man4/ppi.4107
-rw-r--r--share/man/man4/procdesc.491
-rw-r--r--share/man/man4/proto.4135
-rw-r--r--share/man/man4/psm.4874
-rw-r--r--share/man/man4/pst.476
-rw-r--r--share/man/man4/pt.491
-rw-r--r--share/man/man4/pts.4158
-rw-r--r--share/man/man4/pty.497
-rw-r--r--share/man/man4/puc.457
-rw-r--r--share/man/man4/qlxgb.493
-rw-r--r--share/man/man4/qlxgbe.491
-rw-r--r--share/man/man4/qlxge.491
-rw-r--r--share/man/man4/ral.4295
-rw-r--r--share/man/man4/random.4330
-rw-r--r--share/man/man4/rc.4125
-rw-r--r--share/man/man4/re.4285
-rw-r--r--share/man/man4/rgephy.496
-rw-r--r--share/man/man4/rights.4674
-rw-r--r--share/man/man4/rl.4312
-rw-r--r--share/man/man4/rndtest.472
-rw-r--r--share/man/man4/route.4329
-rw-r--r--share/man/man4/rp.4195
-rw-r--r--share/man/man4/rsu.4181
-rw-r--r--share/man/man4/rsufw.446
-rw-r--r--share/man/man4/rue.4154
-rw-r--r--share/man/man4/rum.4187
-rw-r--r--share/man/man4/run.4252
-rw-r--r--share/man/man4/runfw.450
-rw-r--r--share/man/man4/sa.4311
-rw-r--r--share/man/man4/safe.4129
-rw-r--r--share/man/man4/sbp.497
-rw-r--r--share/man/man4/sbp_targ.498
-rw-r--r--share/man/man4/scc.475
-rw-r--r--share/man/man4/scd.474
-rw-r--r--share/man/man4/sched_4bsd.474
-rw-r--r--share/man/man4/sched_ule.476
-rw-r--r--share/man/man4/screen.4241
-rw-r--r--share/man/man4/scsi.4354
-rw-r--r--share/man/man4/sctp.4421
-rw-r--r--share/man/man4/sdhci.488
-rw-r--r--share/man/man4/sem.481
-rw-r--r--share/man/man4/send.4214
-rw-r--r--share/man/man4/ses.4134
-rw-r--r--share/man/man4/sf.4209
-rw-r--r--share/man/man4/sfxge.496
-rw-r--r--share/man/man4/sge.4121
-rw-r--r--share/man/man4/si.4181
-rw-r--r--share/man/man4/siba.490
-rw-r--r--share/man/man4/siftr.4761
-rw-r--r--share/man/man4/siis.4141
-rw-r--r--share/man/man4/simplebus.482
-rw-r--r--share/man/man4/sio.4410
-rw-r--r--share/man/man4/sis.4226
-rw-r--r--share/man/man4/sk.4241
-rw-r--r--share/man/man4/smb.4204
-rw-r--r--share/man/man4/smbus.480
-rw-r--r--share/man/man4/smp.4163
-rw-r--r--share/man/man4/sn.4109
-rw-r--r--share/man/man4/snd_ad1816.481
-rw-r--r--share/man/man4/snd_als4000.470
-rw-r--r--share/man/man4/snd_atiixp.4100
-rw-r--r--share/man/man4/snd_cmi.476
-rw-r--r--share/man/man4/snd_cs4281.470
-rw-r--r--share/man/man4/snd_csa.498
-rw-r--r--share/man/man4/snd_ds1.472
-rw-r--r--share/man/man4/snd_emu10k1.482
-rw-r--r--share/man/man4/snd_emu10kx.4296
-rw-r--r--share/man/man4/snd_envy24.484
-rw-r--r--share/man/man4/snd_envy24ht.4107
-rw-r--r--share/man/man4/snd_es137x.4117
-rw-r--r--share/man/man4/snd_ess.472
-rw-r--r--share/man/man4/snd_fm801.478
-rw-r--r--share/man/man4/snd_gusc.497
-rw-r--r--share/man/man4/snd_hda.4635
-rw-r--r--share/man/man4/snd_hdspe.476
-rw-r--r--share/man/man4/snd_ich.4111
-rw-r--r--share/man/man4/snd_maestro.478
-rw-r--r--share/man/man4/snd_maestro3.494
-rw-r--r--share/man/man4/snd_mss.4116
-rw-r--r--share/man/man4/snd_neomagic.474
-rw-r--r--share/man/man4/snd_sbc.4132
-rw-r--r--share/man/man4/snd_solo.466
-rw-r--r--share/man/man4/snd_spicds.489
-rw-r--r--share/man/man4/snd_t4dwave.477
-rw-r--r--share/man/man4/snd_uaudio.4102
-rw-r--r--share/man/man4/snd_via8233.4105
-rw-r--r--share/man/man4/snd_via82c686.471
-rw-r--r--share/man/man4/snd_vibes.471
-rw-r--r--share/man/man4/snp.499
-rw-r--r--share/man/man4/spic.461
-rw-r--r--share/man/man4/spkr.4249
-rw-r--r--share/man/man4/splash.4292
-rw-r--r--share/man/man4/sppp.4240
-rw-r--r--share/man/man4/ste.4204
-rw-r--r--share/man/man4/stf.4283
-rw-r--r--share/man/man4/stg.4110
-rw-r--r--share/man/man4/stge.4202
-rw-r--r--share/man/man4/sym.4382
-rw-r--r--share/man/man4/syncache.4215
-rw-r--r--share/man/man4/syncer.492
-rw-r--r--share/man/man4/syscons.4565
-rw-r--r--share/man/man4/sysmouse.4472
-rw-r--r--share/man/man4/tap.4317
-rw-r--r--share/man/man4/targ.4152
-rw-r--r--share/man/man4/tcp.4597
-rw-r--r--share/man/man4/tdfx.493
-rw-r--r--share/man/man4/terasic_mtl.4131
-rw-r--r--share/man/man4/termios.41583
-rw-r--r--share/man/man4/textdump.4196
-rw-r--r--share/man/man4/ti.4425
-rw-r--r--share/man/man4/timecounters.4107
-rw-r--r--share/man/man4/tl.4185
-rw-r--r--share/man/man4/tnt4882.455
-rw-r--r--share/man/man4/tpm.486
-rw-r--r--share/man/man4/trm.4107
-rw-r--r--share/man/man4/tty.4366
-rw-r--r--share/man/man4/tun.4313
-rw-r--r--share/man/man4/twa.4135
-rw-r--r--share/man/man4/twe.4278
-rw-r--r--share/man/man4/tws.4118
-rw-r--r--share/man/man4/tx.4120
-rw-r--r--share/man/man4/txp.4140
-rw-r--r--share/man/man4/u3g.4127
-rw-r--r--share/man/man4/uark.485
-rw-r--r--share/man/man4/uart.4181
-rw-r--r--share/man/man4/uath.4187
-rw-r--r--share/man/man4/ubsa.4109
-rw-r--r--share/man/man4/ubsec.4123
-rw-r--r--share/man/man4/ubser.469
-rw-r--r--share/man/man4/ubtbcmfw.4108
-rw-r--r--share/man/man4/uchcom.488
-rw-r--r--share/man/man4/ucom.4106
-rw-r--r--share/man/man4/ucycom.487
-rw-r--r--share/man/man4/udav.4101
-rw-r--r--share/man/man4/udbp.4124
-rw-r--r--share/man/man4/udp.4166
-rw-r--r--share/man/man4/udplite.496
-rw-r--r--share/man/man4/uep.479
-rw-r--r--share/man/man4/ufm.485
-rw-r--r--share/man/man4/ufoma.4141
-rw-r--r--share/man/man4/uftdi.4200
-rw-r--r--share/man/man4/ugen.4311
-rw-r--r--share/man/man4/uhci.468
-rw-r--r--share/man/man4/uhid.4147
-rw-r--r--share/man/man4/uhso.4142
-rw-r--r--share/man/man4/uipaq.498
-rw-r--r--share/man/man4/ukbd.4171
-rw-r--r--share/man/man4/ulpt.4110
-rw-r--r--share/man/man4/umass.4262
-rw-r--r--share/man/man4/umcs.4101
-rw-r--r--share/man/man4/umct.4101
-rw-r--r--share/man/man4/umodem.4115
-rw-r--r--share/man/man4/umoscom.466
-rw-r--r--share/man/man4/ums.4113
-rw-r--r--share/man/man4/unix.4300
-rw-r--r--share/man/man4/upgt.4222
-rw-r--r--share/man/man4/uplcom.4197
-rw-r--r--share/man/man4/ural.4165
-rw-r--r--share/man/man4/urio.4130
-rw-r--r--share/man/man4/urndis.497
-rw-r--r--share/man/man4/urtw.4126
-rw-r--r--share/man/man4/urtwn.4158
-rw-r--r--share/man/man4/urtwnfw.477
-rw-r--r--share/man/man4/usb.4182
-rw-r--r--share/man/man4/usb_quirk.4196
-rw-r--r--share/man/man4/usb_template.483
-rw-r--r--share/man/man4/usfs.462
-rw-r--r--share/man/man4/uslcom.4212
-rw-r--r--share/man/man4/utopia.4196
-rw-r--r--share/man/man4/uvisor.4142
-rw-r--r--share/man/man4/uvscom.495
-rw-r--r--share/man/man4/vale.4131
-rw-r--r--share/man/man4/vga.4185
-rw-r--r--share/man/man4/vge.4225
-rw-r--r--share/man/man4/viapm.472
-rw-r--r--share/man/man4/viawd.479
-rw-r--r--share/man/man4/virtio.497
-rw-r--r--share/man/man4/virtio_balloon.464
-rw-r--r--share/man/man4/virtio_blk.492
-rw-r--r--share/man/man4/virtio_random.461
-rw-r--r--share/man/man4/virtio_scsi.492
-rw-r--r--share/man/man4/vkbd.4153
-rw-r--r--share/man/man4/vlan.4207
-rw-r--r--share/man/man4/vmx.4155
-rw-r--r--share/man/man4/vpo.4105
-rw-r--r--share/man/man4/vr.4217
-rw-r--r--share/man/man4/vt.4230
-rw-r--r--share/man/man4/vte.4152
-rw-r--r--share/man/man4/vtnet.4115
-rw-r--r--share/man/man4/vxge.4110
-rw-r--r--share/man/man4/watchdog.4148
-rw-r--r--share/man/man4/wb.4196
-rw-r--r--share/man/man4/wbwd.4113
-rw-r--r--share/man/man4/wi.4377
-rw-r--r--share/man/man4/witness.4147
-rw-r--r--share/man/man4/wlan.4219
-rw-r--r--share/man/man4/wlan_acl.457
-rw-r--r--share/man/man4/wlan_amrr.459
-rw-r--r--share/man/man4/wlan_ccmp.466
-rw-r--r--share/man/man4/wlan_tkip.466
-rw-r--r--share/man/man4/wlan_wep.463
-rw-r--r--share/man/man4/wlan_xauth.461
-rw-r--r--share/man/man4/wpi.4144
-rw-r--r--share/man/man4/wsp.490
-rw-r--r--share/man/man4/xe.4168
-rw-r--r--share/man/man4/xen.4185
-rw-r--r--share/man/man4/xhci.468
-rw-r--r--share/man/man4/xl.4270
-rw-r--r--share/man/man4/xnb.4143
-rw-r--r--share/man/man4/xpt.4108
-rw-r--r--share/man/man4/zero.458
-rw-r--r--share/man/man4/zyd.4187
654 files changed, 120923 insertions, 0 deletions
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
new file mode 100644
index 0000000..ac2cabb
--- /dev/null
+++ b/share/man/man4/Makefile
@@ -0,0 +1,864 @@
+# @(#)Makefile 8.1 (Berkeley) 6/18/93
+# $FreeBSD$
+
+.include <src.opts.mk>
+
+MAN= aac.4 \
+ aacraid.4 \
+ acpi.4 \
+ ${_acpi_asus.4} \
+ ${_acpi_asus_wmi.4} \
+ ${_acpi_dock.4} \
+ ${_acpi_fujitsu.4} \
+ ${_acpi_hp.4} \
+ ${_acpi_ibm.4} \
+ ${_acpi_panasonic.4} \
+ ${_acpi_rapidstart.4} \
+ ${_acpi_sony.4} \
+ acpi_thermal.4 \
+ ${_acpi_toshiba.4} \
+ acpi_video.4 \
+ ${_acpi_wmi.4} \
+ ada.4 \
+ adv.4 \
+ adw.4 \
+ ae.4 \
+ ${_aesni.4} \
+ age.4 \
+ agp.4 \
+ aha.4 \
+ ahb.4 \
+ ahc.4 \
+ ahci.4 \
+ ahd.4 \
+ ${_aibs.4} \
+ aio.4 \
+ alc.4 \
+ ale.4 \
+ alpm.4 \
+ altera_atse.4 \
+ altera_avgen.4 \
+ altera_jtag_uart.4 \
+ altera_sdcard.4 \
+ altq.4 \
+ amdpm.4 \
+ ${_amdsbwd.4} \
+ ${_amdsmb.4} \
+ ${_amdtemp.4} \
+ ${_bxe.4} \
+ amr.4 \
+ an.4 \
+ ${_aout.4} \
+ ${_apic.4} \
+ arcmsr.4 \
+ ${_asmc.4} \
+ asr.4 \
+ ata.4 \
+ ath.4 \
+ ath_ahb.4 \
+ ath_hal.4 \
+ ath_pci.4 \
+ atkbd.4 \
+ atkbdc.4 \
+ atp.4 \
+ ${_atf_test_case.4} \
+ ${_atrtc.4} \
+ ${_attimer.4} \
+ audit.4 \
+ auditpipe.4 \
+ aue.4 \
+ axe.4 \
+ axge.4 \
+ bce.4 \
+ bfe.4 \
+ bge.4 \
+ ${_bhyve.4} \
+ bktr.4 \
+ blackhole.4 \
+ bpf.4 \
+ bridge.4 \
+ bt.4 \
+ bwi.4 \
+ bwn.4 \
+ capsicum.4 \
+ cardbus.4 \
+ carp.4 \
+ cas.4 \
+ cc_cdg.4 \
+ cc_chd.4 \
+ cc_cubic.4 \
+ cc_hd.4 \
+ cc_htcp.4 \
+ cc_newreno.4 \
+ cc_vegas.4 \
+ ccd.4 \
+ cd.4 \
+ cdce.4 \
+ ch.4 \
+ ciss.4 \
+ cm.4 \
+ cmx.4 \
+ ${_coretemp.4} \
+ ${_cpuctl.4} \
+ cpufreq.4 \
+ crypto.4 \
+ ctl.4 \
+ cue.4 \
+ cxgb.4 \
+ cxgbe.4 \
+ cy.4 \
+ da.4 \
+ dc.4 \
+ dcons.4 \
+ dcons_crom.4 \
+ ddb.4 \
+ de.4 \
+ devctl.4 \
+ digi.4 \
+ disc.4 \
+ divert.4 \
+ ${_dpms.4} \
+ dpt.4 \
+ dummynet.4 \
+ ed.4 \
+ edsc.4 \
+ ehci.4 \
+ em.4 \
+ en.4 \
+ enc.4 \
+ epair.4 \
+ esp.4 \
+ est.4 \
+ et.4 \
+ eventtimers.4 \
+ exca.4 \
+ faith.4 \
+ fatm.4 \
+ fd.4 \
+ fdc.4 \
+ fdt.4 \
+ fdtbus.4 \
+ ffclock.4 \
+ filemon.4 \
+ firewire.4 \
+ fpa.4 \
+ full.4 \
+ fwe.4 \
+ fwip.4 \
+ fwohci.4 \
+ fxp.4 \
+ gbde.4 \
+ gdb.4 \
+ gem.4 \
+ geom.4 \
+ geom_fox.4 \
+ geom_linux_lvm.4 \
+ geom_map.4 \
+ geom_uncompress.4 \
+ geom_uzip.4 \
+ gif.4 \
+ gpib.4 \
+ gpio.4 \
+ gpioiic.4 \
+ gpioled.4 \
+ gre.4 \
+ h_ertt.4 \
+ hatm.4 \
+ hifn.4 \
+ hme.4 \
+ hpet.4 \
+ ${_hpt27xx.4} \
+ ${_hptiop.4} \
+ ${_hptmv.4} \
+ ${_hptnr.4} \
+ ${_hptrr.4} \
+ hv_ata_pci_disengage.4 \
+ hv_kvp.4 \
+ hv_netvsc.4 \
+ hv_storvsc.4 \
+ hv_utils.4 \
+ hv_vmbus.4 \
+ hwpmc.4 \
+ ichsmb.4 \
+ ${_ichwd.4} \
+ icmp.4 \
+ icmp6.4 \
+ ida.4 \
+ ifmib.4 \
+ igb.4 \
+ igmp.4 \
+ iic.4 \
+ iicbb.4 \
+ iicbus.4 \
+ iicsmb.4 \
+ iir.4 \
+ inet.4 \
+ inet6.4 \
+ intpm.4 \
+ intro.4 \
+ ${_io.4} \
+ ip.4 \
+ ip6.4 \
+ ipfirewall.4 \
+ ${_ipmi.4} \
+ ips.4 \
+ ipsec.4 \
+ ipw.4 \
+ ipwfw.4 \
+ isci.4 \
+ iscsi_initiator.4 \
+ ismt.4 \
+ isp.4 \
+ ispfw.4 \
+ iwi.4 \
+ iwifw.4 \
+ iwn.4 \
+ iwnfw.4 \
+ ixgb.4 \
+ ixgbe.4 \
+ jme.4 \
+ joy.4 \
+ kbdmux.4 \
+ keyboard.4 \
+ kld.4 \
+ ksyms.4 \
+ ktr.4 \
+ kue.4 \
+ lagg.4 \
+ le.4 \
+ led.4 \
+ lge.4 \
+ ${_linux.4} \
+ lm75.4 \
+ lmc.4 \
+ lo.4 \
+ lp.4 \
+ lpbb.4 \
+ lpt.4 \
+ mac.4 \
+ mac_biba.4 \
+ mac_bsdextended.4 \
+ mac_ifoff.4 \
+ mac_lomac.4 \
+ mac_mls.4 \
+ mac_none.4 \
+ mac_partition.4 \
+ mac_portacl.4 \
+ mac_seeotheruids.4 \
+ mac_stub.4 \
+ mac_test.4 \
+ malo.4 \
+ mcd.4 \
+ md.4 \
+ mem.4 \
+ meteor.4 \
+ mfi.4 \
+ miibus.4 \
+ mk48txx.4 \
+ mld.4 \
+ mlx.4 \
+ mly.4 \
+ mmc.4 \
+ mmcsd.4 \
+ mn.4 \
+ mod_cc.4 \
+ mos.4 \
+ mouse.4 \
+ mpr.4 \
+ mps.4 \
+ mpt.4 \
+ mrsas.4 \
+ msk.4 \
+ mtio.4 \
+ multicast.4 \
+ mvs.4 \
+ mwl.4 \
+ mwlfw.4 \
+ mxge.4 \
+ my.4 \
+ nand.4 \
+ nandsim.4 \
+ natm.4 \
+ natmip.4 \
+ ncr.4 \
+ ncv.4 \
+ ${_ndis.4} \
+ net80211.4 \
+ netfpga10g_nf10bmac.4 \
+ netgraph.4 \
+ netintro.4 \
+ netmap.4 \
+ ${_nfe.4} \
+ ${_nfsmb.4} \
+ ng_async.4 \
+ ng_atm.4 \
+ ngatmbase.4 \
+ ng_atmllc.4 \
+ ng_bluetooth.4 \
+ ng_bpf.4 \
+ ng_bridge.4 \
+ ng_bt3c.4 \
+ ng_btsocket.4 \
+ ng_car.4 \
+ ng_ccatm.4 \
+ ng_cisco.4 \
+ ng_deflate.4 \
+ ng_device.4 \
+ nge.4 \
+ ng_echo.4 \
+ ng_eiface.4 \
+ ng_etf.4 \
+ ng_ether.4 \
+ ng_ether_echo.4 \
+ ng_frame_relay.4 \
+ ng_gif.4 \
+ ng_gif_demux.4 \
+ ng_h4.4 \
+ ng_hci.4 \
+ ng_hole.4 \
+ ng_hub.4 \
+ ng_iface.4 \
+ ng_ipfw.4 \
+ ng_ip_input.4 \
+ ng_ksocket.4 \
+ ng_l2cap.4 \
+ ng_l2tp.4 \
+ ng_lmi.4 \
+ ng_mppc.4 \
+ ng_nat.4 \
+ ng_netflow.4 \
+ ng_one2many.4 \
+ ng_patch.4 \
+ ng_ppp.4 \
+ ng_pppoe.4 \
+ ng_pptpgre.4 \
+ ng_pred1.4 \
+ ng_rfc1490.4 \
+ ng_socket.4 \
+ ng_source.4 \
+ ng_split.4 \
+ ng_sppp.4 \
+ ng_sscfu.4 \
+ ng_sscop.4 \
+ ng_tag.4 \
+ ng_tcpmss.4 \
+ ng_tee.4 \
+ ng_tty.4 \
+ ng_ubt.4 \
+ ng_UI.4 \
+ ng_uni.4 \
+ ng_vjc.4 \
+ ng_vlan.4 \
+ nmdm.4 \
+ nsp.4 \
+ ${_ntb.4} \
+ null.4 \
+ ${_nvd.4} \
+ ${_nvme.4} \
+ ${_nvram.4} \
+ ${_nvram2env.4} \
+ ${_nxge.4} \
+ oce.4 \
+ ohci.4 \
+ orm.4 \
+ ${_padlock.4} \
+ pass.4 \
+ patm.4 \
+ pccard.4 \
+ pccbb.4 \
+ pcf.4 \
+ pci.4 \
+ pcib.4 \
+ pcic.4 \
+ pcii.4 \
+ pcm.4 \
+ pcn.4 \
+ ${_pf.4} \
+ ${_pflog.4} \
+ ${_pfsync.4} \
+ pim.4 \
+ polling.4 \
+ ppbus.4 \
+ ppc.4 \
+ ppi.4 \
+ procdesc.4 \
+ proto.4 \
+ psm.4 \
+ pst.4 \
+ pt.4 \
+ pts.4 \
+ pty.4 \
+ puc.4 \
+ ${_qlxge.4} \
+ ${_qlxgb.4} \
+ ${_qlxgbe.4} \
+ ral.4 \
+ random.4 \
+ rc.4 \
+ re.4 \
+ rgephy.4 \
+ rights.4 \
+ rl.4 \
+ rndtest.4 \
+ route.4 \
+ rp.4 \
+ rsu.4 \
+ rsufw.4 \
+ rue.4 \
+ rum.4 \
+ run.4 \
+ runfw.4 \
+ sa.4 \
+ safe.4 \
+ sbp.4 \
+ sbp_targ.4 \
+ scc.4 \
+ scd.4 \
+ sched_4bsd.4 \
+ sched_ule.4 \
+ screen.4 \
+ scsi.4 \
+ sctp.4 \
+ sdhci.4 \
+ sem.4 \
+ send.4 \
+ ses.4 \
+ sf.4 \
+ ${_sfxge.4} \
+ sge.4 \
+ si.4 \
+ siba.4 \
+ siftr.4 \
+ siis.4 \
+ simplebus.4 \
+ sio.4 \
+ sis.4 \
+ sk.4 \
+ smb.4 \
+ smbus.4 \
+ smp.4 \
+ sn.4 \
+ snd_ad1816.4 \
+ snd_als4000.4 \
+ snd_atiixp.4 \
+ snd_cmi.4 \
+ snd_cs4281.4 \
+ snd_csa.4 \
+ snd_ds1.4 \
+ snd_emu10k1.4 \
+ snd_emu10kx.4 \
+ snd_envy24.4 \
+ snd_envy24ht.4 \
+ snd_es137x.4 \
+ snd_ess.4 \
+ snd_fm801.4 \
+ snd_gusc.4 \
+ snd_hda.4 \
+ snd_hdspe.4 \
+ snd_ich.4 \
+ snd_maestro3.4 \
+ snd_maestro.4 \
+ snd_mss.4 \
+ snd_neomagic.4 \
+ snd_sbc.4 \
+ snd_solo.4 \
+ snd_spicds.4 \
+ snd_t4dwave.4 \
+ snd_uaudio.4 \
+ snd_via8233.4 \
+ snd_via82c686.4 \
+ snd_vibes.4 \
+ snp.4 \
+ spic.4 \
+ ${_spkr.4} \
+ splash.4 \
+ sppp.4 \
+ ste.4 \
+ stf.4 \
+ stg.4 \
+ stge.4 \
+ sym.4 \
+ syncache.4 \
+ syncer.4 \
+ syscons.4 \
+ sysmouse.4 \
+ tap.4 \
+ targ.4 \
+ tcp.4 \
+ tdfx.4 \
+ terasic_mtl.4 \
+ termios.4 \
+ textdump.4 \
+ ti.4 \
+ timecounters.4 \
+ tl.4 \
+ tnt4882.4 \
+ ${_tpm.4} \
+ trm.4 \
+ tty.4 \
+ tun.4 \
+ twa.4 \
+ twe.4 \
+ tws.4 \
+ tx.4 \
+ txp.4 \
+ u3g.4 \
+ uark.4 \
+ uart.4 \
+ uath.4 \
+ ubsa.4 \
+ ubsec.4 \
+ ubser.4 \
+ ubtbcmfw.4 \
+ uchcom.4 \
+ ucom.4 \
+ ucycom.4 \
+ udav.4 \
+ udbp.4 \
+ udp.4 \
+ udplite.4 \
+ uep.4 \
+ ufm.4 \
+ ufoma.4 \
+ uftdi.4 \
+ ugen.4 \
+ uhci.4 \
+ uhid.4 \
+ uhso.4 \
+ uipaq.4 \
+ ukbd.4 \
+ ulpt.4 \
+ umass.4 \
+ umcs.4 \
+ umct.4 \
+ umodem.4 \
+ umoscom.4 \
+ ums.4 \
+ unix.4 \
+ upgt.4 \
+ uplcom.4 \
+ ural.4 \
+ urio.4 \
+ urndis.4 \
+ ${_urtw.4} \
+ urtwn.4 \
+ urtwnfw.4 \
+ usb.4 \
+ usb_template.4 \
+ usb_quirk.4 \
+ uslcom.4 \
+ usfs.4 \
+ utopia.4 \
+ uvisor.4 \
+ uvscom.4 \
+ vale.4 \
+ vga.4 \
+ vge.4 \
+ viapm.4 \
+ ${_viawd.4} \
+ ${_virtio.4} \
+ ${_virtio_balloon.4} \
+ ${_virtio_blk.4} \
+ ${_virtio_random.4} \
+ ${_virtio_scsi.4} \
+ vkbd.4 \
+ vlan.4 \
+ ${_vmx.4} \
+ vpo.4 \
+ vr.4 \
+ vt.4 \
+ vte.4 \
+ ${_vtnet.4} \
+ ${_vxge.4} \
+ watchdog.4 \
+ wb.4 \
+ ${_wbwd.4} \
+ wi.4 \
+ witness.4 \
+ wlan.4 \
+ wlan_acl.4 \
+ wlan_amrr.4 \
+ wlan_ccmp.4 \
+ wlan_tkip.4 \
+ wlan_wep.4 \
+ wlan_xauth.4 \
+ ${_wpi.4} \
+ wsp.4 \
+ xe.4 \
+ ${_xen.4} \
+ xhci.4 \
+ xl.4 \
+ ${_xnb.4} \
+ xpt.4 \
+ zero.4 \
+ zyd.4
+
+MLINKS= ae.4 if_ae.4
+MLINKS+=age.4 if_age.4
+MLINKS+=agp.4 agpgart.4
+MLINKS+=alc.4 if_alc.4
+MLINKS+=ale.4 if_ale.4
+MLINKS+=altera_atse.4 atse.4
+MLINKS+=altera_sdcard.4 altera_sdcardc.4
+MLINKS+=altq.4 ALTQ.4
+MLINKS+=ath.4 if_ath.4
+MLINKS+=ath_pci.4 if_ath_pci.4
+MLINKS+=an.4 if_an.4
+MLINKS+=aue.4 if_aue.4
+MLINKS+=axe.4 if_axe.4
+MLINKS+=bce.4 if_bce.4
+MLINKS+=bfe.4 if_bfe.4
+MLINKS+=bge.4 if_bge.4
+MLINKS+=bktr.4 brooktree.4
+MLINKS+=bridge.4 if_bridge.4
+MLINKS+=bwi.4 if_bwi.4
+MLINKS+=bwn.4 if_bwn.4
+MLINKS+=${_bxe.4} ${_if_bxe.4}
+MLINKS+=cas.4 if_cas.4
+MLINKS+=cdce.4 if_cdce.4
+MLINKS+=crypto.4 cryptodev.4
+MLINKS+=cue.4 if_cue.4
+MLINKS+=cxgb.4 if_cxgb.4
+MLINKS+=cxgbe.4 if_cxgbe.4
+MLINKS+=dc.4 if_dc.4
+MLINKS+=de.4 if_de.4
+MLINKS+=disc.4 if_disc.4
+MLINKS+=ed.4 if_ed.4
+MLINKS+=edsc.4 if_edsc.4
+MLINKS+=em.4 if_em.4
+MLINKS+=en.4 if_en.4
+MLINKS+=enc.4 if_enc.4
+MLINKS+=epair.4 if_epair.4
+MLINKS+=et.4 if_et.4
+MLINKS+=faith.4 if_faith.4
+MLINKS+=fatm.4 if_fatm.4
+MLINKS+=fd.4 stderr.4 \
+ fd.4 stdin.4 \
+ fd.4 stdout.4
+MLINKS+=fdt.4 FDT.4
+MLINKS+=firewire.4 ieee1394.4
+MLINKS+=fpa.4 fea.4
+MLINKS+=fwe.4 if_fwe.4
+MLINKS+=fwip.4 if_fwip.4
+MLINKS+=fxp.4 if_fxp.4
+MLINKS+=gem.4 if_gem.4
+MLINKS+=geom.4 GEOM.4
+MLINKS+=gif.4 if_gif.4
+MLINKS+=gpio.4 gpiobus.4
+MLINKS+=gre.4 if_gre.4
+MLINKS+=hatm.4 if_hatm.4
+MLINKS+=hme.4 if_hme.4
+MLINKS+=hpet.4 acpi_hpet.4
+MLINKS+=${_hptrr.4} ${_rr232x.4}
+MLINKS+=${_attimer.4} ${_i8254.4}
+MLINKS+=igb.4 if_igb.4
+MLINKS+=ip.4 rawip.4
+MLINKS+=ipfirewall.4 ipaccounting.4 \
+ ipfirewall.4 ipacct.4 \
+ ipfirewall.4 ipfw.4
+MLINKS+=ipw.4 if_ipw.4
+MLINKS+=iwi.4 if_iwi.4
+MLINKS+=iwn.4 if_iwn.4
+MLINKS+=ixgb.4 if_ixgb.4
+MLINKS+=ixgbe.4 ix.4
+MLINKS+=ixgbe.4 if_ix.4
+MLINKS+=ixgbe.4 if_ixgbe.4
+MLINKS+=jme.4 if_jme.4
+MLINKS+=kue.4 if_kue.4
+MLINKS+=lagg.4 trunk.4
+MLINKS+=lagg.4 if_lagg.4
+MLINKS+=le.4 if_le.4
+MLINKS+=lge.4 if_lge.4
+MLINKS+=lmc.4 if_lmc.4
+MLINKS+=lo.4 loop.4
+MLINKS+=lp.4 plip.4
+MLINKS+=malo.4 if_malo.4
+MLINKS+=md.4 vn.4
+MLINKS+=mem.4 kmem.4
+MLINKS+=mn.4 if_mn.4
+MLINKS+=mos.4 if_mos.4
+MLINKS+=msk.4 if_msk.4
+MLINKS+=mwl.4 if_mwl.4
+MLINKS+=mxge.4 if_mxge.4
+MLINKS+=my.4 if_my.4
+MLINKS+=${_ndis.4} ${_if_ndis.4}
+MLINKS+=netfpga10g_nf10bmac.4 if_nf10bmac.4
+MLINKS+=netintro.4 net.4 \
+ netintro.4 networking.4
+MLINKS+=${_nfe.4} ${_if_nfe.4}
+MLINKS+=nge.4 if_nge.4
+MLINKS+=${_ntb.4} ${_if_ntb.4} \
+ ${_ntb.4} ${_ntb_hw.4}
+MLINKS+=${_nxge.4} ${_if_nxge.4}
+MLINKS+=patm.4 if_patm.4
+MLINKS+=pccbb.4 cbb.4
+MLINKS+=pcm.4 snd.4 \
+ pcm.4 sound.4
+MLINKS+=pcn.4 if_pcn.4
+MLINKS+=ral.4 if_ral.4
+MLINKS+=re.4 if_re.4
+MLINKS+=rl.4 if_rl.4
+MLINKS+=rue.4 if_rue.4
+MLINKS+=rum.4 if_rum.4
+MLINKS+=run.4 if_run.4
+MLINKS+=scsi.4 CAM.4 \
+ scsi.4 cam.4 \
+ scsi.4 scbus.4 \
+ scsi.4 SCSI.4
+MLINKS+=sf.4 if_sf.4
+MLINKS+=sge.4 if_sge.4
+MLINKS+=sis.4 if_sis.4
+MLINKS+=sk.4 if_sk.4
+MLINKS+=smp.4 SMP.4
+MLINKS+=sn.4 if_sn.4
+MLINKS+=snd_envy24.4 snd_ak452x.4
+MLINKS+=snd_sbc.4 snd_sb16.4 \
+ snd_sbc.4 snd_sb8.4
+MLINKS+=${_spkr.4} ${_speaker.4}
+MLINKS+=splash.4 screensaver.4
+MLINKS+=ste.4 if_ste.4
+MLINKS+=stf.4 if_stf.4
+MLINKS+=stge.4 if_stge.4
+MLINKS+=syncache.4 syncookies.4
+MLINKS+=syscons.4 sc.4
+MLINKS+=tap.4 if_tap.4
+MLINKS+=tdfx.4 tdfx_linux.4
+MLINKS+=ti.4 if_ti.4
+MLINKS+=tl.4 if_tl.4
+MLINKS+=tun.4 if_tun.4
+MLINKS+=tx.4 if_tx.4
+MLINKS+=txp.4 if_txp.4
+MLINKS+=u3g.4 u3gstub.4
+MLINKS+=uath.4 if_uath.4
+MLINKS+=udav.4 if_udav.4
+MLINKS+=upgt.4 if_upgt.4
+MLINKS+=ural.4 if_ural.4
+MLINKS+=urndis.4 if_urndis.4
+MLINKS+=${_urtw.4} ${_if_urtw.4}
+MLINKS+=vge.4 if_vge.4
+MLINKS+=vlan.4 if_vlan.4
+MLINKS+=${_vmx.4} ${_if_vmx.4}
+MLINKS+=vpo.4 imm.4
+MLINKS+=vr.4 if_vr.4
+MLINKS+=vte.4 if_vte.4
+MLINKS+=${_vtnet.4} ${_if_vtnet.4}
+MLINKS+=${_vxge.4} ${_if_vxge.4}
+MLINKS+=watchdog.4 SW_WATCHDOG.4
+MLINKS+=wb.4 if_wb.4
+MLINKS+=wi.4 if_wi.4
+MLINKS+=${_wpi.4} ${_if_wpi.4}
+MLINKS+=xe.4 if_xe.4
+MLINKS+=xl.4 if_xl.4
+MLINKS+=zyd.4 if_zyd.4
+
+.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
+_acpi_asus.4= acpi_asus.4
+_acpi_asus_wmi.4= acpi_asus_wmi.4
+_acpi_dock.4= acpi_dock.4
+_acpi_fujitsu.4=acpi_fujitsu.4
+_acpi_hp.4= acpi_hp.4
+_acpi_ibm.4= acpi_ibm.4
+_acpi_panasonic.4=acpi_panasonic.4
+_acpi_rapidstart.4=acpi_rapidstart.4
+_acpi_sony.4= acpi_sony.4
+_acpi_toshiba.4=acpi_toshiba.4
+_acpi_wmi.4= acpi_wmi.4
+_aesni.4= aesni.4
+_aout.4= aout.4
+_apic.4= apic.4
+_atrtc.4= atrtc.4
+_attimer.4= attimer.4
+_aibs.4= aibs.4
+_amdsbwd.4= amdsbwd.4
+_amdsmb.4= amdsmb.4
+_amdtemp.4= amdtemp.4
+_asmc.4= asmc.4
+_bxe.4= bxe.4
+_coretemp.4= coretemp.4
+_cpuctl.4= cpuctl.4
+_dpms.4= dpms.4
+_hpt27xx.4= hpt27xx.4
+_hptiop.4= hptiop.4
+_hptmv.4= hptmv.4
+_hptnr.4= hptnr.4
+_hptrr.4= hptrr.4
+_i8254.4= i8254.4
+_ichwd.4= ichwd.4
+_if_bxe.4= if_bxe.4
+_if_ndis.4= if_ndis.4
+_if_nfe.4= if_nfe.4
+_if_nxge.4= if_nxge.4
+_if_urtw.4= if_urtw.4
+_if_vmx.4= if_vmx.4
+_if_vtnet.4= if_vtnet.4
+_if_vxge.4= if_vxge.4
+_if_wpi.4= if_wpi.4
+_ipmi.4= ipmi.4
+_io.4= io.4
+_linux.4= linux.4
+_ndis.4= ndis.4
+_nfe.4= nfe.4
+_nfsmb.4= nfsmb.4
+_nvd.4= nvd.4
+_nvme.4= nvme.4
+_nvram.4= nvram.4
+_nxge.4= nxge.4
+_virtio.4= virtio.4
+_virtio_balloon.4=virtio_balloon.4
+_virtio_blk.4= virtio_blk.4
+_virtio_random.4= virtio_random.4
+_virtio_scsi.4= virtio_scsi.4
+_vmx.4= vmx.4
+_vtnet.4= vtnet.4
+_vxge.4= vxge.4
+_padlock.4= padlock.4
+_rr232x.4= rr232x.4
+_speaker.4= speaker.4
+_spkr.4= spkr.4
+_tpm.4= tpm.4
+_urtw.4= urtw.4
+_viawd.4= viawd.4
+_wbwd.4= wbwd.4
+_wpi.4= wpi.4
+_xen.4= xen.4
+_xnb.4= xnb.4
+
+.endif
+
+.if ${MACHINE_CPUARCH} == "amd64"
+_bhyve.4= bhyve.4
+_if_ntb.4= if_ntb.4
+_ntb.4= ntb.4
+_ntb_hw.4= ntb_hw.4
+_qlxge.4= qlxge.4
+_qlxgb.4= qlxgb.4
+_qlxgbe.4= qlxgbe.4
+_sfxge.4= sfxge.4
+
+MLINKS+=qlxge.4 if_qlxge.4
+MLINKS+=qlxgb.4 if_qlxgb.4
+MLINKS+=qlxgbe.4 if_qlxgbe.4
+MLINKS+=sfxge.4 if_sfxge.4
+.endif
+
+.if ${MACHINE_CPUARCH} == "mips"
+_nvram2env.4= nvram2env.4
+.endif
+
+.if exists(${.CURDIR}/man4.${MACHINE_CPUARCH})
+SUBDIR= man4.${MACHINE_CPUARCH}
+.endif
+
+.if ${MK_TESTS} != "no"
+ATF= ${.CURDIR}/../../../contrib/atf
+.PATH: ${ATF}/doc
+_atf_test_case.4= atf-test-case.4
+.endif
+
+.if ${MK_PF} != "no"
+_pf.4= pf.4
+_pflog.4= pflog.4
+_pfsync.4= pfsync.4
+.endif
+
+.include <bsd.prog.mk>
diff --git a/share/man/man4/aac.4 b/share/man/man4/aac.4
new file mode 100644
index 0000000..d0f3701
--- /dev/null
+++ b/share/man/man4/aac.4
@@ -0,0 +1,302 @@
+.\" Copyright (c) 2000 Scott Long
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.Dd July 10, 2009
+.Dt AAC 4
+.Os
+.Sh NAME
+.Nm aac
+.Nd Adaptec AdvancedRAID Controller driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd device pci
+.Cd device aac
+.Cd device aacp
+.Pp
+To compile in debugging code:
+.Cd options AAC_DEBUG=N
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+aac_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Adaptec AAC family of SCSI Ultra2, Ultra160,
+and Ultra320, SATA and SAS RAID controllers.
+.Pp
+Access to RAID containers is available via the
+.Pa /dev/aacd?
+device nodes.
+The
+.Nm aacp
+device enables the SCSI pass-thru interface and allows devices connected
+to the card such as CD-ROMs to be available via the CAM
+.Xr scsi 4
+subsystem.
+Note that not all cards allow this interface to be enabled.
+.Pp
+The
+.Pa /dev/aac?
+device nodes provide access to the management interface of the controller.
+One node exists per installed card.
+The aliases
+.Pa /dev/afa?
+and
+.Pa /dev/hpn?
+exist for compatibility with the Dell and HP versions of management tools,
+respectively.
+If the kernel is compiled with the
+.Dv COMPAT_LINUX
+option, or the
+.Pa aac_linux.ko
+and
+.Pa linux.ko
+modules are loaded, the
+Linux-compatible
+.Xr ioctl 2
+interface for the management device will be enabled and will allow
+Linux-based management applications to control the card.
+.Sh HARDWARE
+Controllers supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Adaptec AAC-364
+.It
+Adaptec RAID 2045
+.It
+Adaptec RAID 2405
+.It
+Adaptec RAID 2445
+.It
+Adaptec RAID 2805
+.It
+Adaptec RAID 3085
+.It
+Adaptec RAID 31205
+.It
+Adaptec RAID 31605
+.It
+Adaptec RAID 5085
+.It
+Adaptec RAID 51205
+.It
+Adaptec RAID 51245
+.It
+Adaptec RAID 51605
+.It
+Adaptec RAID 51645
+.It
+Adaptec RAID 52445
+.It
+Adaptec RAID 5405
+.It
+Adaptec RAID 5445
+.It
+Adaptec RAID 5805
+.It
+Adaptec SAS RAID 3405
+.It
+Adaptec SAS RAID 3805
+.It
+Adaptec SAS RAID 4000SAS
+.It
+Adaptec SAS RAID 4005SAS
+.It
+Adaptec SAS RAID 4800SAS
+.It
+Adaptec SAS RAID 4805SAS
+.It
+Adaptec SATA RAID 2020SA ZCR
+.It
+Adaptec SATA RAID 2025SA ZCR
+.It
+Adaptec SATA RAID 2026ZCR
+.It
+Adaptec SATA RAID 2410SA
+.It
+Adaptec SATA RAID 2420SA
+.It
+Adaptec SATA RAID 2610SA
+.It
+Adaptec SATA RAID 2620SA
+.It
+Adaptec SATA RAID 2810SA
+.It
+Adaptec SATA RAID 2820SA
+.It
+Adaptec SATA RAID 21610SA
+.It
+Adaptec SCSI RAID 2020ZCR
+.It
+Adaptec SCSI RAID 2025ZCR
+.It
+Adaptec SCSI RAID 2120S
+.It
+Adaptec SCSI RAID 2130S
+.It
+Adaptec SCSI RAID 2130SLP
+.It
+Adaptec SCSI RAID 2230SLP
+.It
+Adaptec SCSI RAID 2200S
+.It
+Adaptec SCSI RAID 2240S
+.It
+Adaptec SCSI RAID 3230S
+.It
+Adaptec SCSI RAID 3240S
+.It
+Adaptec SCSI RAID 5400S
+.It
+Dell CERC SATA RAID 2
+.It
+Dell PERC 2/Si
+.It
+Dell PERC 2/QC
+.It
+Dell PERC 3/Si
+.It
+Dell PERC 3/Di
+.It
+Dell PERC 320/DC
+.It
+HP ML110 G2 (Adaptec SATA RAID 2610SA)
+.It
+HP NetRAID 4M
+.It
+IBM ServeRAID 8i
+.It
+IBM ServeRAID 8k
+.It
+IBM ServeRAID 8s
+.It
+ICP RAID ICP5045BL
+.It
+ICP RAID ICP5085BL
+.It
+ICP RAID ICP5085SL
+.It
+ICP RAID ICP5125BR
+.It
+ICP RAID ICP5125SL
+.It
+ICP RAID ICP5165BR
+.It
+ICP RAID ICP5165SL
+.It
+ICP RAID ICP5445SL
+.It
+ICP RAID ICP5805BL
+.It
+ICP RAID ICP5805SL
+.It
+ICP ICP5085BR SAS RAID
+.It
+ICP ICP9085LI SAS RAID
+.It
+ICP ICP9047MA SATA RAID
+.It
+ICP ICP9067MA SATA RAID
+.It
+ICP ICP9087MA SATA RAID
+.It
+ICP ICP9014RO SCSI RAID
+.It
+ICP ICP9024RO SCSI RAID
+.It
+Legend S220
+.It
+Legend S230
+.It
+Sun STK RAID REM
+.It
+Sun STK RAID EM
+.It
+SG-XPCIESAS-R-IN
+.It
+SG-XPCIESAS-R-EX
+.It
+AOC-USAS-S4i
+.It
+AOC-USAS-S8i
+.It
+AOC-USAS-S4iR
+.It
+AOC-USAS-S8iR
+.It
+AOC-USAS-S8i-LP
+.It
+AOC-USAS-S8iR-LP
+.El
+.Sh FILES
+.Bl -tag -width /boot/kernel/aac.ko -compact
+.It Pa /dev/aac?
+aac management interface
+.It Pa /dev/aacd?
+disk/container interface
+.El
+.Sh DIAGNOSTICS
+Compiling with
+.Dv AAC_DEBUG
+set to a number between 0 and 3
+will enable increasingly verbose debug messages.
+.Pp
+The adapter can send status and alert messages asynchronously
+to the driver.
+These messages are printed on the system console,
+and are also queued for retrieval by a management application.
+.Sh SEE ALSO
+.Xr kld 4 ,
+.Xr linux 4 ,
+.Xr scsi 4 ,
+.Xr kldload 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.3 .
+.Sh AUTHORS
+.An Mike Smith
+.Aq msmith@FreeBSD.org
+.An Scott Long
+.Aq scottl@FreeBSD.org
+.Sh BUGS
+This driver is not compatible with Dell controllers that have version 1.x
+firmware.
+The firmware version is the same as the kernel version printed in the BIOS
+POST and driver attach messages.
+.Pp
+The controller is not actually paused on suspend/resume.
diff --git a/share/man/man4/aacraid.4 b/share/man/man4/aacraid.4
new file mode 100644
index 0000000..5d22ac2
--- /dev/null
+++ b/share/man/man4/aacraid.4
@@ -0,0 +1,138 @@
+.\" Copyright (c) 2013 Achim Leubner
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.Dd April 09, 2013
+.Dt AACRAID 4
+.Os
+.Sh NAME
+.Nm aacraid
+.Nd Adaptec AACRAID Controller driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd device pci
+.Cd device aacraid
+.Pp
+To compile in debugging code:
+.Cd options AACRAID_DEBUG=N
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+aacraid_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Adaptec by PMC RAID controllers,
+including Series 6/7/8 and upcoming families.
+.Pp
+The RAID containers are handled via the
+.Nm aacraidp0
+bus.
+The physical buses are represented by the
+.Nm aacraidp?
+devices (beginning with aacraidp1). These devices enable the
+SCSI pass-thru interface and allows devices connected
+to the card such as CD-ROMs to be available via the CAM
+.Xr scsi 4
+subsystem.
+Note that not all cards allow this interface to be enabled.
+.Pp
+The
+.Pa /dev/aacraid?
+device nodes provide access to the management interface of the controller.
+One node exists per installed card.
+If the kernel is compiled with the
+.Dv COMPAT_LINUX
+option, or the
+.Pa aacraid_linux.ko
+and
+.Pa linux.ko
+modules are loaded, the
+Linux-compatible
+.Xr ioctl 2
+interface for the management device will be enabled and will allow
+Linux-based management applications to control the card.
+.Sh HARDWARE
+Controllers supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Adaptec ASR-6405(T|E)
+.It
+Adaptec ASR-6445
+.It
+Adaptec ASR-6805(T|E|Q|TQ)
+.It
+Adaptec ASR-7085
+.It
+Adaptec ASR-7805(Q)
+.It
+Adaptec ASR-70165
+.It
+Adaptec ASR-71605(E|Q)
+.It
+Adaptec ASR-71685
+.It
+Adaptec ASR-72405
+.It
+Adaptec Series 8 cards
+.El
+.Sh FILES
+.Bl -tag -width /boot/kernel/aacraid.ko -compact
+.It Pa /dev/aacraid?
+aacraid management interface
+.El
+.Sh DIAGNOSTICS
+Compiling with
+.Dv AACRAID_DEBUG
+set to a number between 0 and 3
+will enable increasingly verbose debug messages.
+.Pp
+The adapter can send status and alert messages asynchronously
+to the driver.
+These messages are printed on the system console,
+and are also queued for retrieval by a management application.
+.Sh SEE ALSO
+.Xr kld 4 ,
+.Xr linux 4 ,
+.Xr scsi 4 ,
+.Xr kldload 8
+.Sh AUTHORS
+.An Achim Leubner
+.Aq achim@FreeBSD.org
+.An Ed Maste
+.Aq emaste@FreeBSD.org
+.An Scott Long
+.Aq scottl@FreeBSD.org
+.Sh BUGS
+The controller is not actually paused on suspend/resume.
diff --git a/share/man/man4/acpi.4 b/share/man/man4/acpi.4
new file mode 100644
index 0000000..04ccbfb
--- /dev/null
+++ b/share/man/man4/acpi.4
@@ -0,0 +1,638 @@
+.\"
+.\" Copyright (c) 2001 Michael Smith
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 23, 2014
+.Dt ACPI 4
+.Os
+.Sh NAME
+.Nm acpi
+.Nd Advanced Configuration and Power Management support
+.Sh SYNOPSIS
+.Cd "device acpi"
+.Pp
+.Cd "options ACPI_DEBUG"
+.Cd "options DDB"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Intel/Microsoft/Compaq/Toshiba ACPI
+standard.
+This support includes platform hardware discovery (superseding the
+PnP and PCI BIOS), as well as power management (superseding APM) and
+other features.
+ACPI core support is provided by the ACPI CA reference implementation
+from Intel.
+.Pp
+Note that the
+.Nm
+driver is automatically loaded by the
+.Xr loader 8 ,
+and should only be
+compiled into the kernel on platforms where ACPI is mandatory.
+.Sh SYSCTL VARIABLES
+The
+.Nm
+driver is intended to provide power management without user intervention.
+If the default settings are not optimal, the following sysctls can be
+used to modify or monitor
+.Nm
+behavior.
+Note that some variables will be available only if the given hardware supports
+them (such as
+.Va hw.acpi.acline ) .
+.Bl -tag -width indent
+.It Va debug.acpi.enable_debug_objects
+Enable dumping Debug objects without
+.Cd "options ACPI_DEBUG" .
+Default is 0, ignore Debug objects.
+.It Va hw.acpi.acline
+AC line state (1 means online, 0 means on battery power).
+.It Va hw.acpi.cpu.cx_usage
+Debugging information listing the percent of total usage for each sleep state.
+The values are reset when
+.Va hw.acpi.cpu.cx_lowest
+is modified.
+.It Va hw.acpi.cpu.cx_lowest
+Lowest Cx state to use for idling the CPU.
+A scheduling algorithm will select states between
+.Li C1
+and this setting
+as system load dictates.
+To enable ACPI CPU idling control,
+.Va machdep.idle
+should be set to
+.Li acpi
+if it is listed in
+.Va machdep.idle_available .
+.It Va hw.acpi.cpu.cx_supported
+List of supported CPU idle states and their transition latency
+in microseconds.
+Each state has a type (e.g.,
+.Li C2 ) .
+.Li C1
+is equivalent to the ia32
+.Li HLT
+instruction,
+.Li C2
+provides a deeper
+sleep with the same semantics, and
+.Li C3
+provides the deepest sleep
+but additionally requires bus mastering to be disabled.
+States greater than
+.Li C3
+provide even more power savings with the same
+semantics as the
+.Li C3
+state.
+Deeper sleeps provide more power savings but increased transition
+latency when an interrupt occurs.
+.It Va hw.acpi.disable_on_reboot
+Disable ACPI during the reboot process.
+Most systems reboot fine with ACPI still enabled, but some require
+exiting to legacy mode first.
+Default is 0, leave ACPI enabled.
+.It Va hw.acpi.handle_reboot
+Use the ACPI Reset Register capability to reboot the system.
+Some newer systems require use of this register, while some only work
+with legacy rebooting support.
+.It Va hw.acpi.lid_switch_state
+Suspend state
+.Pq Li S1 Ns \[en] Ns Li S5
+to enter when the lid switch (i.e., a notebook screen) is closed.
+Default is
+.Dq Li NONE
+(do nothing).
+.It Va hw.acpi.power_button_state
+Suspend state
+.Pq Li S1 Ns \[en] Ns Li S5
+to enter when the power button is pressed.
+Default is
+.Li S5
+(power-off nicely).
+.It Va hw.acpi.reset_video
+Reset the video adapter from real mode during the resume path.
+Some systems need this help, others have display problems if it is enabled.
+Default is 0 (disabled).
+.It Va hw.acpi.s4bios
+Indicate whether the system supports
+.Li S4BIOS .
+This means that the BIOS can handle all the functions of suspending the
+system to disk.
+Otherwise, the OS is responsible for suspending to disk
+.Pq Li S4OS .
+Most current systems do not support
+.Li S4BIOS .
+.It Va hw.acpi.sleep_button_state
+Suspend state
+.Pq Li S1 Ns \[en] Ns Li S5
+to enter when the sleep button is pressed.
+This is usually a special function button on the keyboard.
+Default is
+.Li S3
+(suspend-to-RAM).
+.It Va hw.acpi.sleep_delay
+Wait this number of seconds between preparing the system to suspend and
+actually entering the suspend state.
+Default is 1 second.
+.It Va hw.acpi.supported_sleep_state
+Suspend states
+.Pq Li S1 Ns \[en] Ns Li S5
+supported by the BIOS.
+.Bl -tag -width indent
+.It Li S1
+Quick suspend to RAM.
+The CPU enters a lower power state, but most peripherals are left running.
+.It Li S2
+Lower power state than
+.Li S1 ,
+but with the same basic characteristics.
+Not supported by many systems.
+.It Li S3
+Suspend to RAM.
+Most devices are powered off, and the system stops running except for
+memory refresh.
+.It Li S4
+Suspend to disk.
+All devices are powered off, and the system stops running.
+When resuming, the system starts as if from a cold power on.
+Not yet supported by
+.Fx
+unless
+.Li S4BIOS
+is available.
+.It Li S5
+System shuts down cleanly and powers off.
+.El
+.It Va hw.acpi.verbose
+Enable verbose printing from the various ACPI subsystems.
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Pa /boot/loader.conf .
+Many of these tunables also have a matching
+.Xr sysctl 8
+entry for access after boot.
+.Bl -tag -width indent
+.It Va acpi_dsdt_load
+Enables loading of a custom ACPI DSDT.
+.It Va acpi_dsdt_name
+Name of the DSDT table to load, if loading is enabled.
+.It Va debug.acpi.cpu_unordered
+Do not use the MADT to match ACPI Processor objects to CPUs.
+This is needed on a few systems with a buggy BIOS that does not use
+consistent processor IDs.
+Default is 0 (disabled).
+.It Va debug.acpi.disabled
+Selectively disables portions of ACPI for debugging purposes.
+.It Va debug.acpi.interpreter_slack
+Enable less strict ACPI implementations.
+Default is 1, ignore common BIOS mistakes.
+.It Va debug.acpi.max_threads
+Specify the number of task threads that are started on boot.
+Limiting this to 1 may help work around various BIOSes that cannot
+handle parallel requests.
+The default value is 3.
+.It Va debug.acpi.quirks
+Override any automatic quirks completely.
+.It Va debug.acpi.resume_beep
+Beep the PC speaker on resume.
+This can help diagnose suspend/resume problems.
+Default is 0 (disabled).
+.It Va hint.acpi.0.disabled
+Set this to 1 to disable all of ACPI.
+If ACPI has been disabled on your system due to a blacklist entry for your
+BIOS, you can set this to 0 to re-enable ACPI for testing.
+.It Va hw.acpi.ec.poll_timeout
+Delay in milliseconds to wait for the EC to respond.
+Try increasing this number if you get the error
+.Qq Li AE_NO_HARDWARE_RESPONSE .
+.It Va hw.acpi.host_mem_start
+Override the assumed memory starting address for PCI host bridges.
+.It Va hw.acpi.install_interface , hw.acpi.remove_interface
+Install or remove OS interface(s) to control return value of
+.Ql _OSI
+query method. When an OS interface is specified in
+.Va hw.acpi.install_interface ,
+.Li _OSI
+query for the interface returns it is
+.Em supported .
+Conversely, when an OS interface is specified in
+.Va hw.acpi.remove_interface ,
+.Li _OSI
+query returns it is
+.Em not supported .
+Multiple interfaces can be specified in a comma-separated list and
+any leading white spaces will be ignored. For example,
+.Qq Li FreeBSD, Linux
+is a valid list of two interfaces
+.Qq Li FreeBSD
+and
+.Qq Li Linux .
+.It Va hw.acpi.reset_video
+Enables calling the VESA reset BIOS vector on the resume path.
+This can fix some graphics cards that have problems such as LCD white-out
+after resume.
+Default is 0 (disabled).
+.It Va hw.acpi.serialize_methods
+Allow override of whether methods execute in parallel or not.
+Enable this for serial behavior, which fixes
+.Qq Li AE_ALREADY_EXISTS
+errors for
+AML that really cannot handle parallel method execution.
+It is off by default since this breaks recursive methods and some IBMs use
+such code.
+.It Va hw.acpi.verbose
+Turn on verbose debugging information about what ACPI is doing.
+.It Va hw.pci.link.%s.%d.irq
+Override the interrupt to use for this link and index.
+This capability should be used carefully, and only if a device is not
+working with
+.Nm
+enabled.
+.Qq %s
+is the name of the link (e.g., LNKA).
+.Qq %d
+is the resource index when the link supports multiple IRQs.
+Most PCI links only have one IRQ resource, so the below form should be used.
+.It Va hw.pci.link.%s.irq
+Override the interrupt to use.
+This capability should be used carefully, and only if a device is not
+working with
+.Nm
+enabled.
+.Qq %s
+is the name of the link (e.g., LNKA).
+.El
+.Sh DISABLING ACPI
+Since ACPI support on different platforms varies greatly, there are many
+debugging and tuning options available.
+.Pp
+For machines known not to work with
+.Nm
+enabled, there is a BIOS blacklist.
+Currently, the blacklist only controls whether
+.Nm
+should be disabled or not.
+In the future, it will have more granularity to control features (the
+infrastructure for that is already there).
+.Pp
+To enable
+.Nm
+(for debugging purposes, etc.) on machines that are on the blacklist, set the
+kernel environment variable
+.Va hint.acpi.0.disabled
+to 0.
+Before trying this, consider updating your BIOS to a more recent version that
+may be compatible with ACPI.
+.Pp
+To disable the
+.Nm
+driver completely, set the kernel environment variable
+.Va hint.acpi.0.disabled
+to 1.
+.Pp
+Some i386 machines totally fail to operate with some or all of ACPI disabled.
+Other i386 machines fail with ACPI enabled.
+Disabling all or part of ACPI on non-i386 platforms (i.e., platforms where
+ACPI support is mandatory) may result in a non-functional system.
+.Pp
+The
+.Nm
+driver comprises a set of drivers, which may be selectively disabled
+in case of problems.
+To disable a sub-driver, list it in the kernel
+environment variable
+.Va debug.acpi.disabled .
+Multiple entries can be listed, separated by a space.
+.Pp
+ACPI sub-devices and features that can be disabled:
+.Bl -tag -width ".Li sysresource"
+.It Li all
+Disable all ACPI features and devices.
+.It Li acad
+.Pq Vt device
+Supports AC adapter.
+.It Li bus
+.Pq Vt feature
+Probes and attaches subdevices.
+Disabling will avoid scanning the ACPI namespace entirely.
+.It Li children
+.Pq Vt feature
+Attaches standard ACPI sub-drivers and devices enumerated in the
+ACPI namespace.
+Disabling this has a similar effect to disabling
+.Dq Li bus ,
+except that the
+ACPI namespace will still be scanned.
+.It Li button
+.Pq Vt device
+Supports ACPI button devices (typically power and sleep buttons).
+.It Li cmbat
+.Pq Vt device
+Control-method batteries device.
+.It Li cpu
+.Pq Vt device
+Supports CPU power-saving and speed-setting functions.
+.It Li ec
+.Pq Vt device
+Supports the ACPI Embedded Controller interface, used to communicate
+with embedded platform controllers.
+.It Li isa
+.Pq Vt device
+Supports an ISA bus bridge defined in the ACPI namespace,
+typically as a child of a PCI bus.
+.It Li lid
+.Pq Vt device
+Supports an ACPI laptop lid switch, which typically puts a
+system to sleep.
+.It Li quirks
+.Pq Vt feature
+Do not honor quirks.
+Quirks automatically disable ACPI functionality based on the XSDT table's
+OEM vendor name and revision date.
+.It Li pci
+.Pq Vt device
+Supports Host to PCI bridges.
+.It Li pci_link
+.Pq Vt feature
+Performs PCI interrupt routing.
+.It Li sysresource
+.Pq Vt device
+Pseudo-devices containing resources which ACPI claims.
+.It Li thermal
+.Pq Vt device
+Supports system cooling and heat management.
+.It Li timer
+.Pq Vt device
+Implements a timecounter using the ACPI fixed-frequency timer.
+.It Li video
+.Pq Vt device
+Supports
+.Xr acpi_video 4
+which may conflict with
+.Xr agp 4
+device.
+.El
+.Pp
+It is also possible to avoid portions of the ACPI namespace which
+may be causing problems, by listing the full path of the root of
+the region to be avoided in the kernel environment variable
+.Va debug.acpi.avoid .
+The object and all of its children will be ignored during the
+bus/children scan of the namespace.
+The ACPI CA code will still know about the avoided region.
+.Sh DEBUGGING OUTPUT
+To enable debugging output,
+.Nm
+must be compiled with
+.Cd "options ACPI_DEBUG" .
+Debugging output is separated between layers and levels, where a layer is
+a component of the ACPI subsystem, and a level is a particular kind
+of debugging output.
+.Pp
+Both layers and levels are specified as a whitespace-separated list of
+tokens, with layers listed in
+.Va debug.acpi.layer
+and levels in
+.Va debug.acpi.level .
+.Pp
+The first set of layers is for ACPI-CA components, and the second is for
+.Fx
+drivers.
+The ACPI-CA layer descriptions include the prefix for the files they
+refer to.
+The supported layers are:
+.Pp
+.Bl -tag -compact -width ".Li ACPI_CA_DISASSEMBLER"
+.It Li ACPI_UTILITIES
+Utility ("ut") functions
+.It Li ACPI_HARDWARE
+Hardware access ("hw")
+.It Li ACPI_EVENTS
+Event and GPE ("ev")
+.It Li ACPI_TABLES
+Table access ("tb")
+.It Li ACPI_NAMESPACE
+Namespace evaluation ("ns")
+.It Li ACPI_PARSER
+AML parser ("ps")
+.It Li ACPI_DISPATCHER
+Internal representation of interpreter state ("ds")
+.It Li ACPI_EXECUTER
+Execute AML methods ("ex")
+.It Li ACPI_RESOURCES
+Resource parsing ("rs")
+.It Li ACPI_CA_DEBUGGER
+Debugger implementation ("db", "dm")
+.It Li ACPI_OS_SERVICES
+Usermode support routines ("os")
+.It Li ACPI_CA_DISASSEMBLER
+Disassembler implementation (unused)
+.It Li ACPI_ALL_COMPONENTS
+All the above ACPI-CA components
+.It Li ACPI_AC_ADAPTER
+AC adapter driver
+.It Li ACPI_BATTERY
+Control-method battery driver
+.It Li ACPI_BUS
+ACPI, ISA, and PCI bus drivers
+.It Li ACPI_BUTTON
+Power and sleep button driver
+.It Li ACPI_EC
+Embedded controller driver
+.It Li ACPI_FAN
+Fan driver
+.It Li ACPI_OEM
+Platform-specific driver for hotkeys, LED, etc.
+.It Li ACPI_POWER
+Power resource driver
+.It Li ACPI_PROCESSOR
+CPU driver
+.It Li ACPI_THERMAL
+Thermal zone driver
+.It Li ACPI_TIMER
+Timer driver
+.It Li ACPI_ALL_DRIVERS
+All the above
+.Fx
+ACPI drivers
+.El
+.Pp
+The supported levels are:
+.Pp
+.Bl -tag -compact -width ".Li ACPI_LV_AML_DISASSEMBLE"
+.It Li ACPI_LV_INIT
+Initialization progress
+.It Li ACPI_LV_DEBUG_OBJECT
+Stores to objects
+.It Li ACPI_LV_INFO
+General information and progress
+.It Li ACPI_LV_REPAIR
+Repair a common problem with predefined methods
+.It Li ACPI_LV_ALL_EXCEPTIONS
+All the previous levels
+.It Li ACPI_LV_PARSE
+.It Li ACPI_LV_DISPATCH
+.It Li ACPI_LV_EXEC
+.It Li ACPI_LV_NAMES
+.It Li ACPI_LV_OPREGION
+.It Li ACPI_LV_BFIELD
+.It Li ACPI_LV_TABLES
+.It Li ACPI_LV_VALUES
+.It Li ACPI_LV_OBJECTS
+.It Li ACPI_LV_RESOURCES
+.It Li ACPI_LV_USER_REQUESTS
+.It Li ACPI_LV_PACKAGE
+.It Li ACPI_LV_VERBOSITY1
+All the previous levels
+.It Li ACPI_LV_ALLOCATIONS
+.It Li ACPI_LV_FUNCTIONS
+.It Li ACPI_LV_OPTIMIZATIONS
+.It Li ACPI_LV_VERBOSITY2
+All the previous levels
+.It Li ACPI_LV_ALL
+Synonym for
+.Qq Li ACPI_LV_VERBOSITY2
+.It Li ACPI_LV_MUTEX
+.It Li ACPI_LV_THREADS
+.It Li ACPI_LV_IO
+.It Li ACPI_LV_INTERRUPTS
+.It Li ACPI_LV_VERBOSITY3
+All the previous levels
+.It Li ACPI_LV_AML_DISASSEMBLE
+.It Li ACPI_LV_VERBOSE_INFO
+.It Li ACPI_LV_FULL_TABLES
+.It Li ACPI_LV_EVENTS
+.It Li ACPI_LV_VERBOSE
+All levels after
+.Qq Li ACPI_LV_VERBOSITY3
+.It Li ACPI_LV_INIT_NAMES
+.It Li ACPI_LV_LOAD
+.El
+.Pp
+Selection of the appropriate layer and level values is important
+to avoid massive amounts of debugging output.
+For example, the following configuration is a good way to gather initial
+information.
+It enables debug output for both ACPI-CA and the
+.Nm
+driver, printing basic information about errors, warnings, and progress.
+.Bd -literal -offset indent
+debug.acpi.layer="ACPI_ALL_COMPONENTS ACPI_ALL_DRIVERS"
+debug.acpi.level="ACPI_LV_ALL_EXCEPTIONS"
+.Ed
+.Pp
+Debugging output by the ACPI CA subsystem is prefixed with the
+module name in lowercase, followed by a source line number.
+Output from the
+.Fx Ns -local
+code follows the same format, but
+the module name is uppercased.
+.Sh OVERRIDING YOUR BIOS BYTECODE
+ACPI interprets bytecode named AML
+(ACPI Machine Language)
+provided by the BIOS vendor as a memory image at boot time.
+Sometimes, the AML code contains a bug that does not appear when parsed
+by the Microsoft implementation.
+.Fx
+provides a way to override it with your own AML code to work around
+or debug such problems.
+Note that all AML in your DSDT and any SSDT tables is overridden.
+.Pp
+In order to load your AML code, you must edit
+.Pa /boot/loader.conf
+and include the following lines.
+.Bd -literal -offset indent
+acpi_dsdt_load="YES"
+acpi_dsdt_name="/boot/acpi_dsdt.aml" # You may change this name.
+.Ed
+.Pp
+In order to prepare your AML code, you will need the
+.Xr acpidump 8
+and
+.Xr iasl 8
+utilities and some ACPI knowledge.
+.Sh COMPATIBILITY
+ACPI is only found and supported on i386/ia32, ia64, and amd64.
+.Sh SEE ALSO
+.Xr kenv 1 ,
+.Xr acpi_thermal 4 ,
+.Xr device.hints 5 ,
+.Xr loader.conf 5 ,
+.Xr acpiconf 8 ,
+.Xr acpidump 8 ,
+.Xr config 8 ,
+.Xr iasl 8
+.Rs
+.%A "Compaq Computer Corporation"
+.%A "Intel Corporation"
+.%A "Microsoft Corporation"
+.%A "Phoenix Technologies Ltd."
+.%A "Toshiba Corporation"
+.%D August 25, 2003
+.%T "Advanced Configuration and Power Interface Specification"
+.%U http://acpi.info/spec.htm
+.Re
+.Sh AUTHORS
+.An -nosplit
+The ACPI CA subsystem is developed and maintained by
+Intel Architecture Labs.
+.Pp
+The following people made notable contributions to the ACPI subsystem
+in
+.Fx :
+.An Michael Smith ,
+.An Takanori Watanabe Aq takawata@jp.FreeBSD.org ,
+.An Mitsuru IWASAKI Aq iwasaki@jp.FreeBSD.org ,
+.An Munehiro Matsuda ,
+.An Nate Lawson ,
+the ACPI-jp mailing list at
+.Aq acpi-jp@jp.FreeBSD.org ,
+and many other contributors.
+.Pp
+This manual page was written by
+.An Michael Smith Aq msmith@FreeBSD.org .
+.Sh BUGS
+Many BIOS versions have serious bugs that may cause system instability,
+break suspend/resume, or prevent devices from operating properly due to
+IRQ routing problems.
+Upgrade your BIOS to the latest version available from the vendor before
+deciding it is a problem with
+.Nm .
+.Pp
+The
+.Nm
+CPU idle power management drive conflicts with the local APIC (LAPIC)
+timer.
+Disable the local APIC timer with
+.Va hint.apic.0.clock=0
+or do not use the
+.Li C3
+and deeper states if the local APIC timer is enabled.
diff --git a/share/man/man4/acpi_asus.4 b/share/man/man4/acpi_asus.4
new file mode 100644
index 0000000..1921adc
--- /dev/null
+++ b/share/man/man4/acpi_asus.4
@@ -0,0 +1,187 @@
+.\"
+.\" Copyright (c) 2004 Philip Paeps <philip@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 8, 2010
+.Dt ACPI_ASUS 4
+.Os
+.Sh NAME
+.Nm acpi_asus
+.Nd Asus Laptop Extras
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi_asus"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+acpi_asus_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the extra ACPI-controlled gadgets, such as hotkeys
+and leds, found on recent Asus (and Medion) laptops.
+It allows one to use the
+.Xr sysctl 8
+interface to manipulate the brightness of the LCD panel and the display output
+state.
+Hotkey events are passed to
+.Xr devd 8
+for easy handling in userspace with the default configuration in
+.Pa /etc/devd/asus.conf .
+.Pp
+Currently, the following Asus laptops are fully supported:
+.Pp
+.Bl -item -offset indent -compact
+.It
+xxN
+.It
+A1x
+.It
+A2x
+.It
+A3N
+.It
+A4D
+.It
+A6VM
+.It
+D1x
+.It
+J1x
+.It
+L2B
+.It
+L2D
+.It
+L2E
+.It
+L3C
+.It
+L3D
+.It
+L3H
+.It
+L4E
+.It
+L4R
+.It
+L5x
+.It
+L8x
+.It
+M1A
+.It
+M2E
+.It
+M6N
+.It
+M6R
+.It
+S1x
+.It
+S2x
+.It
+V6V
+.It
+W5A
+.It
+Eee PC
+.El
+.Pp
+Additionally,
+.Nm
+also supports the Asus-compatible
+.Em ATK0100
+interface found in
+.Em Samsung P30/P35
+laptops.
+.Sh SYSCTL VARIABLES
+The following sysctls are currently implemented:
+.Bl -tag -width indent
+.It Va hw.acpi.asus.lcd_brightness
+Makes the LCD backlight brighter or dimmer (higher values are brighter).
+.It Va hw.acpi.asus.lcd_backlight
+Turns the LCD backlight on or off.
+.It Va hw.acpi.asus.video_output
+Sets the active display to use according to a bitwise OR of the following:
+.Pp
+.Bl -tag -width indent -compact
+.It Li 0
+No display
+.It Li 1
+LCD
+.It Li 2
+CRT
+.It Li 4
+TV-Out
+.El
+.Pp
+Some models also support video switching via the generic
+.Xr acpi_video 4
+driver.
+Most models do not, however.
+.El
+.Pp
+Defaults for these variables can be set in
+.Xr sysctl.conf 5 ,
+which is parsed at boot-time.
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr acpi_asus_wmi 4 ,
+.Xr acpi_video 4 ,
+.Xr sysctl.conf 5 ,
+.Xr sysctl 8
+.Rs
+.%T The acpi4asus Project
+.%U http://sourceforge.net/projects/acpi4asus/
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver and this manual page were written by
+.An Philip Paeps Aq philip@FreeBSD.org .
+.Pp
+Inspiration came from the
+.Em acpi4asus project
+started by
+.An Julien Lerouge
+which maintains a driver implementing this
+functionality in the
+.Tn Linux
+kernel.
diff --git a/share/man/man4/acpi_asus_wmi.4 b/share/man/man4/acpi_asus_wmi.4
new file mode 100644
index 0000000..129894b
--- /dev/null
+++ b/share/man/man4/acpi_asus_wmi.4
@@ -0,0 +1,90 @@
+.\"
+.\" Copyright (c) 2012 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 2, 2012
+.Dt ACPI_ASUS_WMI 4
+.Os
+.Sh NAME
+.Nm acpi_asus_wmi
+.Nd Asus Laptop WMI Extras
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi_asus_wmi"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+acpi_asus_wmi_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the extra WMI-controlled gadgets, such as hotkeys
+and leds, found on Asus laptops.
+It allows one to use the
+.Xr sysctl 8
+interface to manipulate the brightness of the LCD panel and keyboard backlight,
+power on/off different internal components, such as WiFi, Bluetooth, camera,
+cardreader, etc, read some sensors.
+Hotkey events are passed to
+.Xr devd 8
+for easy handling in userspace with the default configuration in
+.Pa /etc/devd/asus.conf .
+Some hotkey events, such as keyboard backlight and touchpad control, are
+handled inside the driver.
+.Sh SYSCTL VARIABLES
+The following sysctls are currently implemented:
+.Bl -tag -width indent
+.It Va dev.acpi_asus_wmi.0.handle_keys
+Specifies whether driver should handle some harwdare keys, such as keyboard
+backlight, internally.
+.El
+.Pp
+Number of other variables under the same sysctl branch are model-specific.
+.Pp
+Defaults for these variables can be set in
+.Xr sysctl.conf 5 ,
+which is parsed at boot-time.
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr acpi_asus 4 ,
+.Xr acpi_video 4 ,
+.Xr sysctl.conf 5 ,
+.Xr devd 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An Alexander Motin Aq mav@FreeBSD.org .
diff --git a/share/man/man4/acpi_dock.4 b/share/man/man4/acpi_dock.4
new file mode 100644
index 0000000..1fda11d
--- /dev/null
+++ b/share/man/man4/acpi_dock.4
@@ -0,0 +1,62 @@
+.\" Copyright (c) 2006 Christian Brueffer
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 20, 2006
+.Dt ACPI_DOCK 4
+.Os
+.Sh NAME
+.Nm acpi_dock
+.Nd "Laptop Docking Station device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi_dock"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+acpi_dock_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for laptop docking stations.
+.Sh SEE ALSO
+.Xr acpi 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 7.0 .
+.Sh AUTHORS
+The
+.Nm
+device driver was written by
+.An Mitsuru IWASAKI Aq iwasaki@FreeBSD.org .
diff --git a/share/man/man4/acpi_fujitsu.4 b/share/man/man4/acpi_fujitsu.4
new file mode 100644
index 0000000..ef72fee
--- /dev/null
+++ b/share/man/man4/acpi_fujitsu.4
@@ -0,0 +1,175 @@
+.\"
+.\" Copyright (c) 2005 Philip Paeps <philip@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 8, 2010
+.Dt ACPI_FUJITSU 4
+.Os
+.Sh NAME
+.Nm acpi_fujitsu
+.Nd Fujitsu Laptop Extras
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi_fujitsu"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+acpi_fujitsu_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver enables the ACPI-controlled buttons on Fujitsu notebooks.
+The button events are sent to userspace via
+.Xr devd 8 ,
+and a
+.Xr sysctl 8
+interface is provided to simulate the hardware events.
+.Pp
+Using this driver, one can control the brightness of the display, the volume
+of the speakers, and the internal (eraserhead) mouse pointer.
+.Sh SYSCTL VARIABLES
+These sysctls are currently implemented:
+.Bl -tag -width indent
+.It Va hw.acpi.fujitsu.lcd_brightness
+Makes the LCD backlight brighter or dimmer.
+.It Va hw.acpi.fujitsu.pointer_enable
+Enables or disables the internal mouse pointer.
+.It Va hw.acpi.fujitsu.volume
+Controls the speaker volume.
+.It Va hw.acpi.fujitsu.mute
+Mutes the speakers.
+.El
+.Pp
+Defaults for these sysctls can be set in
+.Xr sysctl.conf 5 .
+.Sh EXAMPLES
+The following can be added to
+.Xr devd.conf 5
+in order to pass button events to a
+.Pa /usr/local/sbin/acpi_oem_exec.sh
+script:
+.Bd -literal -offset indent
+notify 10 {
+ match "system" "ACPI";
+ match "subsystem" "FUJITSU";
+ action "/usr/local/sbin/acpi_oem_exec.sh $notify fujitsu";
+};
+.Ed
+.Pp
+A possible
+.Pa /usr/local/sbin/acpi_oem_exec.sh
+script might look like:
+.Bd -literal -offset indent
+#!/bin/sh
+#
+if [ "$1" = "" -o "$2" = "" ]
+then
+ echo "usage: $0 notify oem_name"
+ exit 1
+fi
+NOTIFY=`echo $1`
+LOGGER="logger"
+CALC="bc"
+BC_PRECOMMANDS="scale=2"
+ECHO="echo"
+CUT="cut"
+MAX_LCD_BRIGHTNESS=7
+MAX_VOLUME=16
+OEM=$2
+DISPLAY_PIPE=/tmp/acpi_${OEM}_display
+
+case ${NOTIFY} in
+ 0x00)
+ LEVEL=`sysctl -n hw.acpi.${OEM}.mute`
+ if [ "$LEVEL" = "1" ]
+ then
+ MESSAGE="volume muted"
+ else
+ MESSAGE="volume unmuted"
+ fi
+ ;;
+ 0x01)
+ LEVEL=`sysctl -n hw.acpi.${OEM}.pointer_enable`
+ if [ "$LEVEL" = "1" ]
+ then
+ MESSAGE="pointer enabled"
+ else
+ MESSAGE="pointer disabled"
+ fi
+ ;;
+ 0x02)
+ LEVEL=`sysctl -n hw.acpi.${OEM}.lcd_brightness`
+ PERCENT=`${ECHO} "${BC_PRECOMMANDS} ; \\
+ ${LEVEL} / ${MAX_LCD_BRIGHTNESS} * 100" |\\
+ ${CALC} | ${CUT} -d . -f 1`
+ MESSAGE="brightness level ${PERCENT}%"
+ ;;
+ 0x03)
+ LEVEL=`sysctl -n hw.acpi.${OEM}.volume`
+ PERCENT=`${ECHO} "${BC_PRECOMMANDS} ; \\
+ ${LEVEL} / ${MAX_VOLUME} * 100" | \\
+ ${CALC} | ${CUT} -d . -f 1`
+ MESSAGE="volume level ${PERCENT}%"
+ ;;
+ *)
+ ;;
+ esac
+ ${LOGGER} ${MESSAGE}
+ if [ -p ${DISPLAY_PIPE} ]
+ then
+ ${ECHO} ${MESSAGE} >> ${DISPLAY_PIPE} &
+ fi
+exit 0
+.Ed
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr sysctl.conf 5 ,
+.Xr devd 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.4 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Sean Bullington Aq shegget@gmail.com ,
+.An Anish Mistry Aq mistry.7@osu.edu ,
+and
+.An Marc Santcroos Aq marks@ripe.net .
+.Pp
+This manual page was written by
+.An Philip Paeps Aq philip@FreeBSD.org .
diff --git a/share/man/man4/acpi_hp.4 b/share/man/man4/acpi_hp.4
new file mode 100644
index 0000000..028d19a
--- /dev/null
+++ b/share/man/man4/acpi_hp.4
@@ -0,0 +1,287 @@
+.\" Copyright (c) 2009 Michael Gmelin
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 8, 2010
+.Dt ACPI_HP 4
+.Os
+.Sh NAME
+.Nm acpi_hp
+.Nd "ACPI extras driver for HP laptops"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi_hp"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+acpi_hp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for ACPI-controlled features found on HP laptops
+that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p).
+.Pp
+The main purpose of this driver is to provide an interface,
+accessible via
+.Xr sysctl 8 ,
+.Xr devd 8 and
+.Xr devfs 8 ,
+through which applications can determine and change the status of
+various laptop components and BIOS settings.
+.Pp
+.Ss Xr devd 8 Ss Events
+Devd events received by
+.Xr devd 8
+provide the following information:
+.Pp
+.Bl -tag -width "subsystem" -offset indent -compact
+.It system
+.Qq Li ACPI
+.It subsystem
+.Qq Li HP
+.It type
+The source of the event in the ACPI namespace.
+The value depends on the model.
+.It notify
+Event code (see below).
+.El
+.Pp
+Event codes:
+.Pp
+.Bl -tag -width "0xc0" -offset indent -compact
+.It Li 0xc0
+WLAN on air status changed to 0 (not on air)
+.It Li 0xc1
+WLAN on air status changed to 1 (on air)
+.It Li 0xd0
+Bluetooth on air status changed to 0 (not on air)
+.It Li 0xd1
+Bluetooth on air status changed to 1 (on air)
+.It Li 0xe0
+WWAN on air status changed to 0 (not on air)
+.It Li 0xe1
+WWAN on air status changed to 1 (on air)
+.El
+.Ss Xr devfs 8 Ss Device
+You can read /dev/hpcmi to see your current BIOS settings.
+The detail level can be adjusted by setting the sysctl
+.Va cmi_detail
+as described below.
+.Sh SYSCTL VARIABLES
+The following sysctls are currently implemented:
+.Ss WLAN:
+.Bl -tag -width indent
+.It Va dev.acpi_hp.0.wlan_enabled
+Toggle WLAN chip activity.
+.It Va dev.acpi_hp.0.wlan_radio
+(read-only)
+WLAN radio status (controlled by hardware switch)
+.It Va dev.acpi_hp.0.wlan_on_air
+(read-only)
+WLAN on air (chip enabled, hardware switch enabled + enabled in BIOS)
+.It Va dev.acpi_hp.0.wlan_enabled_if_radio_on
+If set to 1, the WLAN chip will be enabled if the radio is turned on
+.It Va dev.acpi_hp.0.wlan_disable_if_radio_off
+If set to 1, the WLAN chip will be disabled if the radio is turned off
+.El
+.Ss Bluetooth:
+.Bl -tag -width indent
+.It Va dev.acpi_hp.0.bt_enabled
+Toggle Bluetooth chip activity.
+.It Va dev.acpi_hp.0.bt_radio
+(read-only)
+Bluetooth radio status (controlled by hardware switch)
+.It Va dev.acpi_hp.0.bt_on_air
+(read-only)
+Bluetooth on air (chip enabled, hardware switch enabled + enabled in BIOS)
+.It Va dev.acpi_hp.0.bt_enabled_if_radio_on
+If set to 1, the Bluetooth chip will be enabled if the radio is turned on
+.It Va dev.acpi_hp.0.bt_disable_if_radio_off
+If set to 1, the Bluetooth chip will be disabled if the radio is turned off
+.El
+.Ss WWAN:
+.Bl -tag -width indent
+.It Va dev.acpi_hp.0.wwan_enabled
+Toggle WWAN chip activity.
+.It Va dev.acpi_hp.0.wwan_radio
+(read-only)
+WWAN radio status (controlled by hardware switch)
+.It Va dev.acpi_hp.0.wwan_on_air
+(read-only)
+WWAN on air (chip enabled, hardware switch enabled + enabled in BIOS)
+.It Va dev.acpi_hp.0.wwan_enabled_if_radio_on
+If set to 1, the WWAN chip will be enabled if the radio is turned on
+.It Va dev.acpi_hp.0.wwan_disable_if_radio_off
+If set to 1, the WWAN chip will be disabled if the radio is turned off
+.El
+.Ss Misc:
+.Bl -tag -width indent
+.It Va dev.acpi_hp.0.als_enabled
+Toggle ambient light sensor (ALS)
+.It Va dev.acpi_hp.0.display
+(read-only)
+Display status (bitmask)
+.It Va dev.acpi_hp.0.hdd_temperature
+(read-only)
+HDD temperature
+.It Va dev.acpi_hp.0.is_docked
+(read-only)
+Docking station status (1 if docked)
+.It Va dev.acpi_hp.0.cmi_detail
+Bitmask to control detail level in /dev/hpcmi output (values can be ORed).
+.Bl -tag -width "0x01" -offset indent -compact
+.It Li 0x01
+Show path component of BIOS setting
+.It Li 0x02
+Show a list of valid options for the BIOS setting
+.It Li 0x04
+Show additional flags of BIOS setting (ReadOnly etc.)
+.It Li 0x08
+Query highest BIOS entry instance.
+This is broken on many HP models and therefore disabled by default.
+.El
+.It Va dev.acpi_hp.0.verbose
+(read-only)
+Set verbosity level
+.El
+.Pp
+Defaults for these sysctls can be set in
+.Xr sysctl.conf 5 .
+.Sh HARDWARE
+The
+.Nm
+driver has been reported to support the following hardware:
+.Pp
+.Bl -bullet -compact
+.It
+HP Compaq 8510p
+.It
+HP Compaq nx7300
+.El
+.Pp
+It should work on most HP laptops that feature a WMI enabled BIOS.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/hpcmi"
+.It Pa /dev/hpcmi
+Interface to read BIOS settings
+.El
+.Sh EXAMPLES
+The following can be added to
+.Xr devd.conf 5
+in order disable the LAN interface when WLAN on air and reenable if it's
+not:
+.Bd -literal -offset indent
+notify 0 {
+ match "system" "ACPI";
+ match "subsystem" "HP";
+ match "notify" "0xc0";
+ action "ifconfig em0 up";
+};
+
+notify 0 {
+ match "system" "ACPI";
+ match "subsystem" "HP";
+ match "notify" "0xc1";
+ action "ifconfig em0 down";
+};
+.Ed
+.Pp
+Enable the ambient light sensor:
+.Bd -literal -offset indent
+sysctl dev.acpi_hp.0.als_enabled=1
+.Ed
+.Pp
+Enable Bluetooth:
+.Bd -literal -offset indent
+sysctl dev.acpi_hp.0.bt_enabled=1
+.Ed
+.Pp
+Get BIOS settings:
+.Bd -literal -offset indent
+cat /dev/hpcmi
+
+Serial Port Disable
+Infrared Port Enable
+Parallel Port Disable
+Flash Media Reader Disable
+USB Ports including Express Card slot Enable
+1394 Port Enable
+Cardbus Slot Disable
+Express Card Slot Disable
+(...)
+.Ed
+.Pp
+Set maximum detail level for /dev/hpcmi output:
+.Bd -literal -offset indent
+sysctl dev.acpi_hp.0.cmi_detail=7
+.Ed
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr acpi_wmi 4 ,
+.Xr sysctl.conf 5 ,
+.Xr devd 8 ,
+.Xr devfs 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Michael Gmelin Aq freebsd@grem.de .
+.Pp
+It has been inspired by hp-wmi driver, which implements a subset of these
+features (hotkeys) on Linux.
+.Bl -tag -width indent
+.It HP CMI whitepaper:
+http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf
+.It wmi-hp for Linux:
+http://www.kernel.org
+.It WMI and ACPI:
+http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx
+.El
+.Pp
+This manual page was written by
+.An Michael Gmelin Aq freebsd@grem.de .
+.Sh BUGS
+This driver is experimental and has only been tested on i386 on an
+HP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN).
+Expect undefined results when operating on different hardware.
+.Pp
+Loading the driver is slow. Reading from /dev/hpcmi is even slower.
+.Pp
+Additional features like HP specific sensor readings or writing BIOS
+settings are not supported.
diff --git a/share/man/man4/acpi_ibm.4 b/share/man/man4/acpi_ibm.4
new file mode 100644
index 0000000..4aa6d9f
--- /dev/null
+++ b/share/man/man4/acpi_ibm.4
@@ -0,0 +1,485 @@
+.\" Copyright (c) 2005 Christian Brueffer
+.\" Copyright (c) 2005 Markus Brueffer
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 24, 2012
+.Dt ACPI_IBM 4
+.Os
+.Sh NAME
+.Nm acpi_ibm
+.Nd "ACPI extras driver for IBM laptops"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi_ibm"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+acpi_ibm_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for hotkeys and other components of IBM laptops.
+The main purpose of this driver is to provide an interface,
+accessible via
+.Xr sysctl 8
+and
+.Xr devd 8 ,
+through which applications can determine the status of
+various laptop components.
+.Pp
+While the
+.Xr sysctl 8
+interface is enabled automatically after loading the driver, the
+.Xr devd 8
+interface has to be enabled explicitly, as it may alter the default action of
+certain keys.
+This is done by setting the
+.Va events
+sysctl as described below.
+Specifying which keys should generate events is done by setting a bitmask,
+whereas each bit represents one key or key combination.
+This bitmask, accessible via the
+.Va eventmask
+sysctl, is set to
+.Va availmask
+by default, a value representing all possible keypress events on the specific
+ThinkPad model.
+.Ss Xr devd 8 Ss Events
+Hotkey events received by
+.Xr devd 8
+provide the following information:
+.Pp
+.Bl -tag -width "subsystem" -offset indent -compact
+.It system
+.Qq Li ACPI
+.It subsystem
+.Qq Li IBM
+.It type
+The source of the event in the ACPI namespace.
+The value depends on the model.
+.It notify
+Event code (see below).
+.El
+.Pp
+Depending on the ThinkPad model, event codes may vary.
+On a ThinkPad T41p these are as follows:
+.Pp
+.Bl -tag -width "subsystem" -offset indent -compact
+.It Li 0x01
+Fn + F1
+.It Li 0x02
+Fn + F2
+.It Li 0x03
+Fn + F3 (LCD backlight)
+.It Li 0x04
+Fn + F4 (Suspend to RAM)
+.It Li 0x05
+Fn + F5 (Bluetooth)
+.It Li 0x06
+Fn + F6
+.It Li 0x07
+Fn + F7 (Screen expand)
+.It Li 0x08
+Fn + F8
+.It Li 0x09
+Fn + F9
+.It Li 0x0a
+Fn + F10
+.It Li 0x0b
+Fn + F11
+.It Li 0x0c
+Fn + F12 (Suspend to disk)
+.It Li 0x0d
+Fn + Backspace
+.It Li 0x0e
+Fn + Insert
+.It Li 0x0f
+Fn + Delete
+.It Li 0x10
+Fn + Home (Brightness up)
+.It Li 0x11
+Fn + End (Brightness down)
+.It Li 0x12
+Fn + PageUp (ThinkLight)
+.It Li 0x13
+Fn + PageDown
+.It Li 0x14
+Fn + Space (Zoom)
+.It Li 0x15
+Volume Up
+.It Li 0x16
+Volume Down
+.It Li 0x17
+Mute
+.It Li 0x18
+Access IBM Button
+.El
+.Ss Xr led 4 Ss Interface
+The
+.Nm
+driver provides a
+.Xr led 4
+interface for the ThinkLight.
+The ThinkLight can be made to blink by writing
+.Tn ASCII
+strings to the
+.Pa /dev/led/thinklight
+device.
+.Sh SYSCTL VARIABLES
+The following sysctls are currently implemented:
+.Bl -tag -width indent
+.It Va dev.acpi_ibm.0.initialmask
+(read-only)
+Bitmask of ACPI events before the
+.Nm
+driver was loaded.
+.It Va dev.acpi_ibm.0.availmask
+(read-only)
+Bitmask of all supported ACPI events.
+.It Va dev.acpi_ibm.0.events
+Enable ACPI events and set the
+.Va eventmask
+to
+.Va availmask .
+Without the
+.Nm
+driver being loaded, only the Fn+F4 button generates an ACPI event.
+.It Va dev.acpi_ibm.0.eventmask
+Sets the ACPI events which are reported to
+.Xr devd 8 .
+Fn+F3, Fn+F4 and Fn+F12 always generate ACPI events, regardless which value
+.Va eventmask
+has.
+Depending on the ThinkPad model, the meaning of different bits in the
+.Va eventmask
+may vary.
+On a ThinkPad T41p this is a bitwise OR of the following:
+.Pp
+.Bl -tag -width indent-two -compact
+.It Li 1
+Fn + F1
+.It Li 2
+Fn + F2
+.It Li 4
+Fn + F3 (LCD backlight)
+.It Li 8
+Fn + F4 (Suspend to RAM)
+.It Li 16
+Fn + F5 (Bluetooth)
+.It Li 32
+Fn + F6
+.It Li 64
+Fn + F7 (Screen expand)
+.It Li 128
+Fn + F8
+.It Li 256
+Fn + F9
+.It Li 512
+Fn + F10
+.It Li 1024
+Fn + F11
+.It Li 2048
+Fn + F12 (Suspend to disk)
+.It Li 4096
+Fn + Backspace
+.It Li 8192
+Fn + Insert
+.It Li 16384
+Fn + Delete
+.It Li 32768
+Fn + Home (Brightness up)
+.It Li 65536
+Fn + End (Brightness down)
+.It Li 131072
+Fn + PageUp (ThinkLight)
+.It Li 262144
+Fn + PageDown
+.It Li 524288
+Fn + Space (Zoom)
+.It Li 1048576
+Volume Up
+.It Li 2097152
+Volume Down
+.It Li 4194304
+Mute
+.It Li 8388608
+Access IBM Button
+.El
+.It Va dev.acpi_ibm.0.hotkey
+(read-only)
+Status of several buttons.
+Every time a button is pressed, the respecting bit is toggled.
+It is a bitwise OR of the following:
+.Pp
+.Bl -tag -width indent-two -compact
+.It Li 1
+Home Button
+.It Li 2
+Search Button
+.It Li 4
+Mail Button
+.It Li 8
+Access IBM Button
+.It Li 16
+Zoom
+.It Li 32
+Wireless LAN Button
+.It Li 64
+Video Button
+.It Li 128
+Hibernate Button
+.It Li 256
+ThinkLight Button
+.It Li 512
+Screen Expand
+.It Li 1024
+Brightness Up/Down Button
+.It Li 2048
+Volume Up/Down/Mute Button
+.El
+.It Va dev.acpi_ibm.0.lcd_brightness
+Current brightness level of the display.
+.It Va dev.acpi_ibm.0.volume
+Speaker volume.
+.It Va dev.acpi_ibm.0.mute
+Indicates, whether the speakers are muted or not.
+.It Va dev.acpi_ibm.0.thinklight
+Indicates, whether the ThinkLight keyboard light is activated or not.
+.It Va dev.acpi_ibm.0.bluetooth
+Toggle Bluetooth chip activity.
+.It Va dev.acpi_ibm.0.wlan
+(read-only)
+Indicates whether the WLAN chip is active or not.
+.It Va dev.acpi_ibm.0.fan
+Indicates whether the fan is in automatic (1) or manual (0) mode.
+Default is automatic mode.
+This sysctl should be used with extreme precaution, since disabling automatic
+fan control might overheat the ThinkPad and lead to permanent damage if the
+.Va fan_level
+is not set accordingly.
+.It Va dev.acpi_ibm.0.fan_level
+Indicates at what speed the fan should run when being in manual mode.
+Values are ranging from 0 (off) to 7 (max).
+The resulting speed differs from model to model.
+On a T41p this is as follows:
+.Pp
+.Bl -tag -width indent-two -compact
+.It Li 0
+off
+.It Li 1, 2
+~3000 RPM
+.It Li 3, 4, 5
+~3600 RPM
+.It Li 6, 7
+~4300 RPM
+.El
+.It Va dev.acpi_ibm.0.fan_speed
+(read-only)
+Fan speed in rounds per minute.
+A few older ThinkPads report the fan speed in levels ranging from 0 (off)
+to 7 (max).
+.It Va dev.acpi_ibm.0.thermal
+(read-only)
+Shows the readings of up to eight different temperature sensors.
+Most ThinkPads include six or more temperature sensors but
+only expose the CPU temperature through
+.Xr acpi_thermal 4 .
+Some ThinkPads have the below sensor layout which might vary depending on the
+specific model:
+.Pp
+.Bl -enum -compact
+.It
+CPU
+.It
+Mini PCI Module
+.It
+HDD
+.It
+GPU
+.It
+Built-in battery
+.It
+UltraBay battery
+.It
+Built-in battery
+.It
+UltraBay battery
+.El
+.It Va dev.acpi_ibm.0.handlerevents
+.Xr devd 8
+events handled by
+.Nm
+when
+.Va events
+is set to 1.
+Events are specified as a whitespace-separated list of event code in
+hexadecimal or decimal form.
+Note that the event maybe handled twice (eg. Brightness up/down) if ACPI BIOS
+already handled the event.
+.El
+.Pp
+Defaults for these sysctls can be set in
+.Xr sysctl.conf 5 .
+.Sh FILES
+.Bl -tag -width ".Pa /dev/led/thinklight"
+.It Pa /dev/led/thinklight
+ThinkLight
+.Xr led 4
+device node
+.El
+.Sh EXAMPLES
+The following can be added to
+.Xr devd.conf 5
+in order to pass button events to a
+.Pa /usr/local/sbin/acpi_oem_exec.sh
+script:
+.Bd -literal -offset indent
+notify 10 {
+ match "system" "ACPI";
+ match "subsystem" "IBM";
+ action "/usr/local/sbin/acpi_oem_exec.sh $notify ibm";
+};
+.Ed
+.Pp
+A possible
+.Pa /usr/local/sbin/acpi_oem_exec.sh
+script might look like:
+.Bd -literal -offset indent
+#!/bin/sh
+#
+if [ "$1" = "" -o "$2" = "" ]
+then
+ echo "usage: $0 notify oem_name"
+ exit 1
+fi
+NOTIFY=`echo $1`
+LOGGER="logger"
+CALC="bc"
+BC_PRECOMMANDS="scale=2"
+ECHO="echo"
+CUT="cut"
+MAX_LCD_BRIGHTNESS=7
+MAX_VOLUME=14
+OEM=$2
+DISPLAY_PIPE=/tmp/acpi_${OEM}_display
+
+case ${NOTIFY} in
+ 0x05)
+ LEVEL=`sysctl -n dev.acpi_${OEM}.0.bluetooth`
+ if [ "$LEVEL" = "1" ]
+ then
+ sysctl dev.acpi_${OEM}.0.bluetooth=0
+ MESSAGE="bluetooth disabled"
+ else
+ sysctl dev.acpi_${OEM}.0.bluetooth=1
+ MESSAGE="bluetooth enabled"
+ fi
+ ;;
+ 0x10|0x11)
+ LEVEL=`sysctl -n dev.acpi_${OEM}.0.lcd_brightness`
+ PERCENT=`${ECHO} "${BC_PRECOMMANDS} ; \\
+ ${LEVEL} / ${MAX_LCD_BRIGHTNESS} * 100" |\\
+ ${CALC} | ${CUT} -d . -f 1`
+ MESSAGE="brightness level ${PERCENT}%"
+ ;;
+ 0x12)
+ LEVEL=`sysctl -n dev.acpi_${OEM}.0.thinklight`
+ if [ "$LEVEL" = "1" ]
+ then
+ MESSAGE="thinklight enabled"
+ else
+ MESSAGE="thinklight disabled"
+ fi
+ ;;
+ 0x15|0x16)
+ LEVEL=`sysctl -n dev.acpi_${OEM}.0.volume`
+ PERCENT=`${ECHO} "${BC_PRECOMMANDS} ; \\
+ ${LEVEL} / ${MAX_VOLUME} * 100" | \\
+ ${CALC} | ${CUT} -d . -f 1`
+ MESSAGE="volume level ${PERCENT}%"
+ ;;
+ 0x17)
+ LEVEL=`sysctl -n dev.acpi_${OEM}.0.mute`
+ if [ "$LEVEL" = "1" ]
+ then
+ MESSAGE="volume muted"
+ else
+ MESSAGE="volume unmuted"
+ fi
+ ;;
+ *)
+ ;;
+esac
+${LOGGER} ${MESSAGE}
+if [ -p ${DISPLAY_PIPE} ]
+then
+ ${ECHO} ${MESSAGE} >> ${DISPLAY_PIPE} &
+fi
+exit 0
+.Ed
+.Pp
+The following example specify that event code 0x04 (Suspend to RAM),
+0x10 (Brightness up) and 0x11 (Brightness down) are handled by
+.Nm .
+.Bd -literal -offset indent
+sysctl dev.acpi_ibm.0.handlerevents='0x04 0x10 0x11'
+.Ed
+.Pp
+in
+.Xr sysctl.conf 5 :
+.Bd -literal -offset indent
+dev.acpi_ibm.0.handlerevents=0x04\\ 0x10\\ 0x11
+.Ed
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr led 4 ,
+.Xr sysctl.conf 5 ,
+.Xr devd 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 6.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Takanori Watanabe Aq takawata@FreeBSD.org
+and later mostly rewritten by
+.An Markus Brueffer Aq markus@FreeBSD.org .
+This manual page was written by
+.An Christian Brueffer Aq brueffer@FreeBSD.org
+and
+.An Markus Brueffer Aq markus@FreeBSD.org .
diff --git a/share/man/man4/acpi_panasonic.4 b/share/man/man4/acpi_panasonic.4
new file mode 100644
index 0000000..5458a31
--- /dev/null
+++ b/share/man/man4/acpi_panasonic.4
@@ -0,0 +1,178 @@
+.\"
+.\" Copyright (c) 2004 OGAWA Takaya <t-ogawa@triaez.kaisei.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 25, 2012
+.Dt ACPI_PANASONIC 4
+.Os
+.Sh NAME
+.Nm acpi_panasonic
+.Nd "ACPI hotkey driver for Panasonic laptops"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi_panasonic"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+acpi_panasonic_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver enables such hotkey facilities of various Panasonic laptops as
+changing LCD brightness, controlling mixer volumes, entering sleep or
+suspended state and so on.
+On the following models it is reported to work: Let's note (or
+Toughbook, outside Japan) CF-R1N, CF-R2A and CF-R3.
+It may also work on other models as well.
+.Pp
+The driver consists of three functionalities.
+The first is to detect hotkey events and take corresponding actions,
+which include changing LCD luminance and speaker mute state.
+The second role is to notify occurrences of the event by way of
+.Xr devctl 4
+and eventually to
+.Xr devd 8 .
+The third and last is to provide a way to adjust LCD brightness and
+sound mute state via
+.Xr sysctl 8 .
+.Ss Hotkeys
+There are 9 hotkeys available on the supported hardware:
+.Pp
+.Bl -tag -width 10n -compact -offset indent
+.It Sy Fn+F1
+Make LCD backlight darker.
+.It Sy Fn+F2
+Make LCD backlight brighter.
+.It Sy Fn+F3
+Switch video output between LCD and CRT.
+Not supported by the
+.Nm
+driver.
+.It Sy Fn+F4
+Toggle muting the speaker.
+.It Sy Fn+F5
+Turn the mixer volume down.
+.It Sy Fn+F6
+Turn the mixer volume up.
+.It Sy Fn+F7
+Enter suspend-to-RAM state.
+.It Sy Fn+F9
+Show battery status.
+.It Sy Fn+F10
+Enter suspend-to-disk state.
+.El
+.Pp
+Actions are automatically taken within the driver for
+.Sy Fn+F1 , Fn+F2
+and
+.Sy Fn+F4 .
+For the other events such as
+mixer control and showing battery status,
+.Xr devd 8
+should take the role as described below.
+.Ss Xr devd 8 Ss Events
+When notified to
+.Xr devd 8 ,
+the hotkey event provides the following information:
+.Pp
+.Bl -tag -width 10n -compact -offset indent
+.It system
+.Qq Li ACPI
+.It subsystem
+.Qq Li Panasonic
+.It type
+The source of the event in ACPI namespace.
+The value depends on the model but typically
+.Qq Li \e_SB_.HKEY .
+.It notify
+Event code (see below).
+.El
+.Pp
+Event codes to be generated are assigned as follows:
+.Bl -tag -width 10n -offset indent
+.It 0x81-0x86, 0x89
+.Sy Fn+F<n>
+pressed.
+0x81 corresponds to
+.Sy Fn+F1 ,
+0x82 corresponds to
+.Sy Fn+F2 ,
+and so on.
+.It 0x01-0x07, 0x09, 0x1a
+.Sy Fn+F<n>
+released.
+0x01 corresponds to
+.Sy Fn+F1 ,
+0x02 corresponds to
+.Sy Fn+F2 ,
+and so on.
+.El
+.Sh SYSCTL VARIABLES
+The following MIBs are available:
+.Bl -tag -width indent
+.It Va hw.acpi.panasonic.lcd_brightness_max
+The maximum level of brightness.
+The value is read only and
+automatically set according to hardware model.
+.It Va hw.acpi.panasonic.lcd_brightness_min
+The minimum level of brightness.
+The value is read only and
+automatically set according to hardware model.
+.It Va hw.acpi.panasonic.lcd_brightness
+Current brightness level of the LCD (read-write).
+The value ranges from
+.Va hw.acpi.panasonic.lcd_brightness_min
+to
+.Va hw.acpi.panasonic.lcd_brightness_max .
+.It Va hw.acpi.panasonic.sound_mute
+A read-write boolean flag to control whether to mute the speaker.
+The value 1 means to mute and 0 not.
+.El
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr devd.conf 5 ,
+.Xr devd 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver and this manual page were written by
+.An OGAWA Takaya Aq t\-ogawa@triaez.kaisei.org
+and
+.An TAKAHASHI Yoshihiro Aq nyan@FreeBSD.org .
diff --git a/share/man/man4/acpi_rapidstart.4 b/share/man/man4/acpi_rapidstart.4
new file mode 100644
index 0000000..fa246f6
--- /dev/null
+++ b/share/man/man4/acpi_rapidstart.4
@@ -0,0 +1,84 @@
+.\" Copyright (c) 2013 Takanori Watanabe
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 8, 2013
+.Dt ACPI_RAPIDSTART 4
+.Os
+.Sh NAME
+.Nm acpi_rapidstart
+.Nd "Intel rapid start technology ACPI driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi_rapidstart"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+acpi_rapidstart_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Intel Rapid Start technology ACPI device interface.
+Note that this is only for the ACPI device interface.
+This has _CID PNP0C02 so it should be loaded at boot time to avoid attaching
+to the acpi_sysresource driver.
+.Sh SYSCTLS
+The following
+.Xr sysctl 8
+nodes are currently implemented:
+.Bl -tag -width indent
+.It Va dev.acpi_rapidstart.0.ffs
+Rapid start flag.
+It is a bitwise OR of the following:
+.Pp
+.Bl -tag -width indent-two -compact
+.It Li 1
+Enter Fast Flash Standby in RTC wake.
+.It Li 2
+Enter Fast Flash Standby in Critical Battery Wake enable
+.El
+.It Va dev.acpi_rapidstart.0.ftv
+Fast Flash Standby timer value in minutes.
+.El
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Takanori Watanabe Aq takawata@FreeBSD.org .
diff --git a/share/man/man4/acpi_sony.4 b/share/man/man4/acpi_sony.4
new file mode 100644
index 0000000..f0fb0e0
--- /dev/null
+++ b/share/man/man4/acpi_sony.4
@@ -0,0 +1,82 @@
+.\" Copyright (c) 2005 Christian Brueffer
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 8, 2010
+.Dt ACPI_SONY 4
+.Os
+.Sh NAME
+.Nm acpi_sony
+.Nd "ACPI notebook controller driver for Sony laptops"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi_sony"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+acpi_sony_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the notebook controller in Sony laptops.
+Note that not all features will work on all laptop models.
+.Sh SYSCTLS
+The following sysctl nodes are currently implemented:
+.Bl -tag -width indent
+.It Va dev.acpi_sony.0.brightness
+Current brightness level of the display.
+.It Va dev.acpi_sony.0.brightness_default
+Default brightness level of the display (survives reboot).
+.It Va dev.acpi_sony.0.contrast
+Current contrast level of the display.
+.It Va dev.acpi_sony.0.bass_gain
+Enable or disable the Bass Gain feature.
+.It Va dev.acpi_sony.0.cdp
+Turns the CD power on or off.
+.It Va dev.acpi_sony.0.azp
+Turns the audio power on or off.
+.It Va dev.acpi_sony.0.lnp
+Turns the wired network interface power on or off.
+.El
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Takanori Watanabe Aq takawata@FreeBSD.org .
diff --git a/share/man/man4/acpi_thermal.4 b/share/man/man4/acpi_thermal.4
new file mode 100644
index 0000000..d1cf8ee
--- /dev/null
+++ b/share/man/man4/acpi_thermal.4
@@ -0,0 +1,149 @@
+.\" Copyright (c) 2003 Takanori Watanabe.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 17, 2007
+.Dt ACPI_THERMAL 4
+.Os
+.Sh NAME
+.Nm acpi_thermal
+.Nd ACPI thermal management subsystem
+.Sh SYNOPSIS
+.Cd "device acpi"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides the thermal management features of the ACPI module.
+This driver has a
+.Xr sysctl 8
+interface and a
+.Xr devd 8
+notification interface.
+The sysctls export properties of each ACPI thermal zone object.
+.Pp
+There can be multiple thermal zones in a system.
+For example, each CPU and the enclosure could all be separate thermal
+zones, each with its own setpoints and cooling devices.
+Thermal zones are numbered sequentially in the order they appear in
+the AML.
+.Pp
+The
+.Nm
+driver also activates the active cooling system according to
+each thermal zone's setpoints.
+.Sh SYSCTL VARIABLES
+.Bl -tag -width indent
+.It Va hw.acpi.thermal.min_runtime
+Number of seconds to continue active cooling once started.
+A new active cooling level will not be selected until this interval expires.
+.It Va hw.acpi.thermal.polling_rate
+Number of seconds between polling the current temperature.
+.It Va hw.acpi.thermal.user_override
+If set to 1, allow user override of various setpoints (below).
+The original values for these settings are obtained from the BIOS and
+system overheating and possible damage could occur if changed.
+Default is 0 (no override).
+.It Va hw.acpi.thermal.tz%d.active
+Current active cooling system state.
+If this is non-negative, the appropriate _AC%d object is running.
+Set this value to the desired active cooling level to force
+the corresponding fan object to the appropriate level.
+.It Va hw.acpi.thermal.tz%d.passive_cooling
+If set to 1, passive cooling is enabled.
+It does cooling without fans using
+.Xr cpufreq 4
+as the mechanism for controlling CPU speed.
+Default is enabled for tz0 where it is available.
+.It Va hw.acpi.thermal.tz%d.thermal_flags
+Current thermal zone status.
+These are bit-masked values.
+.It Va hw.acpi.thermal.tz%d.temperature
+Current temperature for this zone.
+.It Va hw.acpi.thermal.tz%d._PSV
+Temperature to start passive cooling by throttling down CPU, etc.
+This value can be overridden by the user.
+.It Va hw.acpi.thermal.tz%d._HOT
+Temperature to start critical suspend to disk (S4).
+This value can be overridden by the user.
+.It Va hw.acpi.thermal.tz%d._CRT
+Temperature to start critical shutdown (S5).
+This value can be overridden by the user.
+.It Va hw.acpi.thermal.tz%d._ACx
+Temperatures at which to switch to the corresponding active cooling
+level.
+The lower the _ACx value, the higher the cooling power.
+.El
+.Pp
+All temperatures are printed in Celsius.
+Values can be set in Celsius (by providing a trailing
+.Qq C )
+or Kelvin (by leaving off any trailing letter).
+When setting a value by
+.Xr sysctl 8 ,
+do not specify a trailing decimal (i.e., 90C instead of 90.0C).
+.Sh NOTIFIES
+Notifies are passed to userland via
+.Xr devd 8 .
+See
+.Pa /etc/devd.conf
+and
+.Xr devd.conf 5
+for examples.
+The
+.Nm
+driver sends events with the following attributes:
+.Pp
+.Bl -tag -width "subsystem" -compact
+.It system
+.Li ACPI
+.It subsystem
+.Li Thermal
+.It type
+The fully qualified thermal zone object path as in the ASL.
+.It notify
+An integer designating the event:
+.Pp
+.Bl -tag -width indent -compact
+.It Li 0x80
+Current temperature has changed.
+.It Li 0x81
+One or more trip points (_ACx, _PSV) have changed.
+.It Li 0x82
+One or more device lists (_ALx, _PSL, _TZD) have changed.
+.It Li 0xcc
+Non-standard notify that the system will shutdown if the temperature
+stays above _CRT or _HOT for one more poll cycle.
+.El
+.El
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr cpufreq 4 ,
+.Xr acpidump 8
+.Sh AUTHORS
+.An -nosplit
+.An Michael Smith
+.Pp
+This manual page was written by
+.An Takanori Watanabe .
diff --git a/share/man/man4/acpi_toshiba.4 b/share/man/man4/acpi_toshiba.4
new file mode 100644
index 0000000..134ecc8
--- /dev/null
+++ b/share/man/man4/acpi_toshiba.4
@@ -0,0 +1,128 @@
+.\"
+.\" Copyright (c) 2003 Philip Paeps <philip@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 8, 2010
+.Dt ACPI_TOSHIBA 4
+.Os
+.Sh NAME
+.Nm acpi_toshiba
+.Nd Toshiba HCI interface
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi_toshiba"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+acpi_toshiba_load="YES"
+.Ed
+.Sh DESCRIPTION
+HCI is Toshiba's
+.Em "Hardware Control Interface"
+which is somewhat uniform across their models.
+The
+.Nm
+driver allows the user to manipulate HCI-controlled hardware using a number of
+.Xr sysctl 8
+variables.
+.Sh SYSCTL VARIABLES
+The following sysctls are currently implemented:
+.Bl -tag -width indent
+.It Va hw.acpi.toshiba.force_fan
+Causes active cooling to be forcibly enabled
+.Pq Ql 1
+or disabled
+.Pq Ql 0
+regardless of the current temperature.
+.It Va hw.acpi.toshiba.video_output
+Sets the active display to use according to a bitwise OR of the following:
+.Pp
+.Bl -tag -width indent -compact
+.It Li 0
+No display
+.It Li 1
+LCD
+.It Li 2
+CRT
+.It Li 4
+TV-Out
+.El
+.Pp
+Only some systems (i.e., the Libretto L5) support video switching via
+this hardware-specific driver.
+Use the
+.Xr acpi_video 4
+driver for generic video output support.
+.It Va hw.acpi.toshiba.lcd_brightness
+Makes the LCD backlight brighter or dimmer (higher values are brighter).
+.It Va hw.acpi.toshiba.lcd_backlight
+Turns the LCD backlight on and off.
+.It Va hw.acpi.toshiba.cpu_speed
+Sets the CPU speed to the specified speed.
+This provides functionality similar to the
+.Va hw.acpi.cpu.throttle_state
+variable.
+Higher sysctl values mean lower CPU speeds.
+.El
+.Pp
+Defaults for these variables can be set in
+.Xr sysctl.conf 5 ,
+which is parsed at boot-time.
+.Sh LOADER TUNABLES
+The
+.Va hw.acpi.toshiba.enable_fn_keys
+tunable enables or disables the function keys on the keyboard.
+Function keys are enabled by default.
+.Pp
+This behaviour can be changed at the
+.Xr loader 8
+prompt or in
+.Xr loader.conf 5 .
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr acpi_video 4 ,
+.Xr loader.conf 5 ,
+.Xr sysctl.conf 5 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Hiroyuki Aizu Aq aizu@navi.org .
+This manual page was written by
+.An Philip Paeps Aq philip@FreeBSD.org .
diff --git a/share/man/man4/acpi_video.4 b/share/man/man4/acpi_video.4
new file mode 100644
index 0000000..c286784
--- /dev/null
+++ b/share/man/man4/acpi_video.4
@@ -0,0 +1,89 @@
+.\"
+.\" Copyright (c) 2004 Mark Santcroos <marks@ripe.net>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 8, 2004
+.Dt ACPI_VIDEO 4
+.Os
+.Sh NAME
+.Nm acpi_video
+.Nd ACPI Video Extensions driver
+.Sh SYNOPSIS
+.Cd "device acpi_video"
+.Sh DESCRIPTION
+This driver uses the ACPI Video Extensions to control display switching and
+backlight brightness.
+The availability of the
+.Xr sysctl 8
+variables depends on the functions offered by the host's ACPI implementation.
+.Sh SYSCTL VARIABLES
+The following sysctls are currently implemented,
+where
+.Aq Ar device
+is
+.Va crt , lcd ,
+or
+.Va tv :
+.Bl -tag -width indent
+.It Va hw.acpi.video. Ns Ao Ar device Ac Ns Va .active
+Current state of the output device.
+.It Va hw.acpi.video. Ns Ao Ar device Ac Ns Va .levels
+List of supported brightness levels.
+.It Va hw.acpi.video. Ns Ao Ar device Ac Ns Va .brightness
+Current brightness level of the device.
+.It Va hw.acpi.video. Ns Ao Ar device Ac Ns Va .fullpower
+Preset brightness level to be used in full power mode.
+.It Va hw.acpi.video. Ns Ao Ar device Ac Ns Va .economy
+Preset brightness level to be used in economy mode.
+.El
+.Pp
+Defaults for these variables can be set in
+.Xr sysctl.conf 5 ,
+which is parsed at boot-time.
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr loader.conf 5 ,
+.Xr sysctl.conf 5 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Taku YAMAMOTO Aq taku@cent.saitama-u.ac.jp .
+This manual page was written by
+.An Mark Santcroos Aq marks@ripe.net .
+.Sh BUGS
+Some systems only perform output switching via SMM even though they export
+the proper information via ACPI.
+On such systems, the proper hotkeys or OEM driver (for example,
+.Xr acpi_toshiba 4 )
+must be used instead.
diff --git a/share/man/man4/acpi_wmi.4 b/share/man/man4/acpi_wmi.4
new file mode 100644
index 0000000..28bd0da
--- /dev/null
+++ b/share/man/man4/acpi_wmi.4
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2009 Michael Gmelin
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 22, 2011
+.Dt ACPI_WMI 4
+.Os
+.Sh NAME
+.Nm acpi_wmi
+.Nd "ACPI to WMI mapping driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi_wmi"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+acpi_wmi_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides an interface for vendor specific WMI implementations
+(e.g. HP and Acer laptops).
+It creates /dev/wmistat%d, which can be read to get
+information about GUIDs found in the system.
+.Sh FILES
+.Bl -tag -width /dev/wmistat%d -compact
+.It Pa /dev/wmistat%d
+WMI status device.
+.El
+.Sh EXAMPLES
+.Bd -literal
+# cat /dev/wmistat0
+GUID INST EXPE METH STR EVENT OID
+{5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NO AA
+{95F24279-4D7B-4334-9387-ACCDC67EF61C} 1 NO NO NO 0x80+ -
+{2B814318-4BE8-4707-9D84-A190A859B5D0} 1 NO NO NO 0xA0 -
+{05901221-D566-11D1-B2F0-00A0C9062910} 1 NO NO NO NO AB
+{1F4C91EB-DC5C-460B-951D-C7CB9B4B8D5E} 1 NO WMBA NO NO BA
+{2D114B49-2DFB-4130-B8FE-4A3C09E75133} 57 NO NO NO NO BC
+{988D08E3-68F4-4C35-AF3E-6A1B8106F83C} 20 NO NO NO NO BD
+{14EA9746-CE1F-4098-A0E0-7045CB4DA745} 1 NO NO NO NO BE
+{322F2028-0F84-4901-988E-015176049E2D} 2 NO NO NO NO BF
+{8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG
+{8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH
+{8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI
+.Ed
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Michael Gmelin Aq freebsd@grem.de .
+.Pp
+Work has been inspired by the Linux acpi-wmi driver written by Carlos Corbacho.
+.Pp
+See http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx for
+the specification of ACPI-WMI.
+.Pp
+This manual page was written by
+.An Michael Gmelin Aq freebsd@grem.de .
diff --git a/share/man/man4/ada.4 b/share/man/man4/ada.4
new file mode 100644
index 0000000..760fa66
--- /dev/null
+++ b/share/man/man4/ada.4
@@ -0,0 +1,157 @@
+.\" Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 21, 2014
+.Dt ADA 4
+.Os
+.Sh NAME
+.Nm ada
+.Nd ATA Direct Access device driver
+.Sh SYNOPSIS
+.Cd device ada
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for direct access devices, implementing the
+.Tn ATA
+command protocol, that are attached to the system through a host adapter
+supported by the CAM subsystem.
+.Pp
+The host adapter must also be separately configured into the system before an
+.Tn ATA
+direct access device can be configured.
+.Sh COMMAND QUEUING
+Command queueing allows the device to process multiple transactions
+concurrently, often re-ordering them to reduce the number and length of
+seeks.
+.Tn ATA
+defines two types of queueing:
+.Tn TCQ (Tagged Command Queueing, PATA legacy)
+and
+.Tn NCQ (Native Command Queueing, SATA) .
+The
+.Nm
+device driver takes full advantage of NCQ, when supported.
+To ensure that transactions to distant parts of the media,
+which may be deferred indefinitely by servicing requests closer to the current
+head position, are completed in a timely fashion, an ordered
+transaction is sent every 7 seconds during continuous device operation.
+.Sh CACHE EFFECTS
+Many direct access devices are equipped with read and/or write caches.
+Parameters affecting the device's cache are reported in device IDENTIFY data
+and can be examined and modified via the
+.Xr camcontrol 8
+utility.
+.Pp
+The read cache is used to store data from device-initiated read ahead
+operations as well as frequently used data.
+The read cache is transparent
+to the user and can be enabled without any adverse effect.
+Most devices
+with a read cache come from the factory with it enabled.
+.Pp
+The write cache can greatly decrease the latency of write operations
+and allows the device to reorganize writes to increase efficiency and
+performance.
+This performance gain comes at a price.
+Should the device
+lose power while its cache contains uncommitted write operations, these
+writes will be lost.
+The effect of a loss of write transactions on
+a file system is non-deterministic and can cause corruption.
+Most
+devices age write transactions to limit the vulnerability to a few transactions
+recently reported as complete, but it is nonetheless recommended that
+systems with write cache enabled devices reside on an Uninterruptible
+Power Supply (UPS).
+The
+.Nm
+device driver ensures that the cache and media are synchronized upon
+final close of the device or an unexpected shutdown (panic) event.
+This ensures that it is safe to disconnect power once the operating system
+has reported that it has halted.
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width 12
+.It Va kern.cam.ada.retry_count
+.Pp
+This variable determines how many times the
+.Nm
+driver will retry a READ or WRITE command.
+This does not affect the number of retries used during probe time or for
+the
+.Nm
+driver dump routine.
+This value currently defaults to 4.
+.It Va kern.cam.ada.default_timeout
+.Pp
+This variable determines how long the
+.Nm
+driver will wait before timing out an outstanding command.
+The units for this value are seconds, and the default is currently 30
+seconds.
+.It Va kern.cam.ada.spindown_shutdown
+.Pp
+This variable determines whether to spin-down disks when shutting down.
+Set to 1 to enable spin-down, 0 to disable.
+The default is currently enabled.
+.It Va kern.cam.ada.write_cache
+.It Va kern.cam.ada. Ns Ar X Ns Va .write_cache
+.Pp
+These variables determine whether device write cache should be enabled
+globally or per-device or disabled.
+Set to 1 to enable write cache, 0 to disable, -1 to leave it as-is.
+Values modified at runtime take effect only after device reset
+.Pq using the reset subcommand of Xr camcontrol 8 .
+Because of that, this setting should be changed in
+.Pa /boot/loader.conf
+instead of
+.Pa /etc/sysctl.conf .
+The global default is currently 1.
+The per-device default is to leave it as-is (follow global setting).
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/ada*" -compact
+.It Pa /dev/ada*
+ATA device nodes
+.El
+.Sh SEE ALSO
+.Xr ahci 4 ,
+.Xr cam 4 ,
+.Xr da 4 ,
+.Xr siis 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An Alexander Motin Aq mav@FreeBSD.org
diff --git a/share/man/man4/adv.4 b/share/man/man4/adv.4
new file mode 100644
index 0000000..366441d
--- /dev/null
+++ b/share/man/man4/adv.4
@@ -0,0 +1,240 @@
+.\"
+.\" Copyright (c) 1998, 2000
+.\" Justin T. Gibbs. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 8, 2004
+.Dt ADV 4
+.Os
+.Sh NAME
+.Nm adv
+.Nd Advansys ISA/VL/EISA/PCI 8bit SCSI Host adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device adv"
+.Pp
+For one or more EISA cards:
+.Cd "device eisa"
+.Pp
+For one or more VL/ISA cards:
+.Cd "device isa"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.adv.0.at="isa"
+.Pp
+For one or more PCI cards:
+.Cd "device pci"
+.Ed
+.Sh DESCRIPTION
+This driver provides access to the 8bit
+.Tn SCSI
+bus connected to the Advanced Systems Products, Inc.
+.Tn ASC900 ,
+.Tn ASC1000 ,
+.Tn ASC1090 ,
+.Tn ASC1200 ,
+.Tn ASC3030 ,
+.Tn ASC3050 ,
+and
+.Tn ASC3150
+host adapter chips.
+The following tables list the AdvanSys products using these chips,
+their bus attachment type, maximum sync rate, and the maximum number of
+commands that can be handled by the adapter concurrently.
+.Bd -ragged -offset indent
+Connectivity Products:
+.Bl -column "ABP510/5150 " "ISA PnP " "Floppy " "MaxSync " "Commands " "Footnotes "
+.Em "Adapter" Ta Em "Bus" Ta Em "Floppy" Ta Em "MaxSync" Ta Em "Commands" Ta Em "Footnotes"
+.It "ABP510/5150" Ta "ISA" Ta "\&No" Ta "10MHz" Ta "240" Ta "1"
+.It "ABP5140" Ta "ISA PnP" Ta "\&No" Ta "10MHz" Ta "16" Ta "1, 3"
+.It "ABP5142" Ta "ISA PnP" Ta "Yes" Ta "10MHz" Ta "16" Ta "4"
+.It "ABP[3]902" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta ""
+.It "ABP3905" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta ""
+.It "ABP915" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta ""
+.It "ABP920" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta ""
+.It "ABP3922" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta ""
+.It "ABP3925" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta ""
+.It "ABP930" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta "5"
+.It "ABP930U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "16" Ta ""
+.It "ABP930UA" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "16" Ta ""
+.It "ABP960" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "16" Ta ""
+.It "ABP960U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "16" Ta ""
+.El
+.Pp
+Footnotes:
+.Bl -enum -compact
+.It
+This board has been shipped by HP with the 4020i CD-R drive.
+The board has no BIOS so it cannot control a boot device, but
+it can control any secondary SCSI device.
+.It
+This board has been sold by Iomega as a Jaz Jet PCI adapter.
+.It
+This board has been sold by SIIG as the i540 SpeedMaster.
+.It
+This board has been sold by SIIG as the i542 SpeedMaster.
+.It
+This board has been sold by SIIG as the Fast SCSI Pro PCI.
+.El
+.Ed
+.Bd -ragged -offset indent
+Single Channel Products:
+.Bl -column "ABPX3X940UA " "EISA " "Floppy " "MaxSync " "Commands"
+.Em "Adapter" Ta Em "Bus" Ta Em "Floppy" Ta Em "MaxSync" Ta Em "Commands"
+.It "ABP542" Ta "ISA" Ta "Yes" Ta "10MHz" Ta "240"
+.It "ABP742" Ta "EISA" Ta "Yes" Ta "10MHz" Ta "240"
+.It "ABP842" Ta "VL" Ta "Yes" Ta "10MHz" Ta "240"
+.It "ABP940" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "240"
+.It "ABP[3]940UA" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240"
+.It "ABP940U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240"
+.It "ABP3960UA" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240"
+.It "ABP970" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "240"
+.It "ABP970U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240"
+.El
+.Ed
+.Bd -ragged -offset indent
+Multi Channel Products (Commands are per-channel):
+.Bl -column "ABPX3X980UA " "EISA " "Floppy " "MaxSync " "Commands " "Channels"
+.Em "Adapter" Ta Em "Bus" Ta Em "Floppy" Ta Em "MaxSync" Ta Em "Commands" Ta Em "Channels"
+.It "ABP752" Ta "EISA" Ta "Yes" Ta "10MHz" Ta "240" Ta "2"
+.It "ABP852" Ta "VL" Ta "Yes" Ta "10MHz" Ta "240" Ta "2"
+.It "ABP950" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "240" Ta "2"
+.It "ABP980" Ta "PCI" Ta "\&No" Ta "10MHz" Ta "240" Ta "4"
+.It "ABP980U" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "240" Ta "4"
+.It "ABP[3]980UA" Ta "PCI" Ta "\&No" Ta "20MHz" Ta "16" Ta "4"
+.El
+.Ed
+.Pp
+.\" For ISA or Vesa Local Bus adapters, one kernel config entry is required
+.\" for every card to be attached by the system. Specific values for the port
+.\" address, irq, and drq may be specified. If wildcard values are used, the
+.\" driver will query the device for its current settings and use those. If
+.\" the port address is a wildcard, the driver consults an internal table of
+.\" possible port address locations and attaches to the first unattached card
+.\" it finds. The possible port addresses for these card are 0x110, 0x130,
+.\" 0x150, 0x190, 0x210, 0x230, 0x250, and 0x330.
+.\" .Pp
+Per target configuration performed in the
+.Tn AdvanceWare
+menu, which is accessible at boot,
+is honored by this driver.
+This includes synchronous/asynchronous transfers,
+maximum synchronous negotiation rate, disconnection, tagged queueing,
+and the host adapter's SCSI ID.
+The global setting for the maximum number of tagged transactions allowed
+per target is not honored as the CAM SCSI system will automatically determine
+the maximum number of tags a device can receive as well as guarantee fair
+resource allocation among devices.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following SCSI controllers:
+.Pp
+.Bl -bullet -compact
+.It
+AdvanSys ABP510/5150
+.It
+AdvanSys ABP5140
+.It
+AdvanSys ABP5142
+.It
+AdvanSys ABP902/3902
+.It
+AdvanSys ABP3905
+.It
+AdvanSys ABP915
+.It
+AdvanSys ABP920
+.It
+AdvanSys ABP3922
+.It
+AdvanSys ABP3925
+.It
+AdvanSys ABP930, ABP930U, ABP930UA
+.It
+AdvanSys ABP960, ABP960U
+.It
+AdvanSys ABP542
+.It
+AdvanSys ABP742
+.It
+AdvanSys ABP842
+.It
+AdvanSys ABP940
+.It
+AdvanSys ABP940UA/3940UA
+.It
+AdvanSys ABP940U
+.It
+AdvanSys ABP3960UA
+.It
+AdvanSys ABP970, ABP970U
+.It
+AdvanSys ABP752
+.It
+AdvanSys ABP852
+.It
+AdvanSys ABP950
+.It
+AdvanSys ABP980, ABP980U
+.It
+AdvanSys ABP980UA/3980UA
+.It
+MELCO IFC-USP (PC-98)
+.It
+RATOC REX-PCI30 (PC-98)
+.It
+@Nifty FNECHARD IFC-USUP-TX (PC-98)
+.El
+.Sh SEE ALSO
+.Xr adw 4 ,
+.Xr aha 4 ,
+.Xr ahb 4 ,
+.Xr ahc 4 ,
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.Sh HISTORY
+The
+.Nm
+driver appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was ported by
+.An Justin T. Gibbs
+from the Linux driver
+written by
+.An Bob Frey
+of Advanced System Products, Inc.
+Many thanks to AdvanSys for providing the original driver under a suitable
+license for use in
+.Fx .
diff --git a/share/man/man4/adw.4 b/share/man/man4/adw.4
new file mode 100644
index 0000000..eae4a77
--- /dev/null
+++ b/share/man/man4/adw.4
@@ -0,0 +1,104 @@
+.\"
+.\" Copyright (c) 1998, 2000
+.\" Justin T. Gibbs. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 14, 2004
+.Dt ADW 4
+.Os
+.Sh NAME
+.Nm adw
+.Nd Advansys PCI 16bit SCSI Host adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device scbus"
+.Cd "device adw"
+.Ed
+.Sh DESCRIPTION
+This driver provides access to the 16bit
+.Tn SCSI
+bus connected to the Advanced Systems Products, Inc.
+.Tn ASC3550 Ultra ,
+and
+.Tn ASC38C0800 Ultra2 ,
+SCSI Host Adapter chips.
+Both chips support, synchronous transfers
+(20MHz and 40MHz max respectively),
+16bit transfers, tagged queueing,
+and up to 253 concurrent SCSI transactions.
+.Pp
+Per target configuration performed in the
+.Tn AdvanceWare
+menu, which is accessible at boot,
+is honored by this driver.
+This includes synchronous/asynchronous transfers,
+maximum synchronous negotiation rate, wide transfers, disconnection,
+tagged queueing, and the host adapter's SCSI ID.
+The global setting for the maximum number of tagged transactions allowed
+per target is not honored as the CAM SCSI system will automatically determine
+the maximum number of tags a device can receive as well as guarantee fair
+resource allocation among devices.
+.Sh HARDWARE
+The
+.Nm
+driver supports SCSI controllers including:
+.Pp
+.Bl -bullet -compact
+.It
+AdvanSys ABP940UW/ABP3940UW
+.It
+AdvanSys ABP950UW
+.It
+AdvanSys ABP970UW
+.It
+AdvanSys ABP3940U2W
+.It
+AdvanSys ABP3950U2W
+.El
+.Sh SEE ALSO
+.Xr adv 4 ,
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.Sh HISTORY
+The
+.Nm
+driver appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was ported by
+.An Justin T. Gibbs
+from the Linux driver written by
+.An Bob Frey
+of Advanced System Products, Inc.
+Many thanks to AdvanSys for providing the original driver
+under a suitable license for use in
+.Fx .
diff --git a/share/man/man4/ae.4 b/share/man/man4/ae.4
new file mode 100644
index 0000000..6bfe9d6
--- /dev/null
+++ b/share/man/man4/ae.4
@@ -0,0 +1,152 @@
+.\" Copyright (c) 2008 Stanislav Sedov <stas@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 4, 2008
+.Dt AE 4
+.Os
+.Sh NAME
+.Nm ae
+.Nd "Attansic/Atheros L2 FastEthernet controller driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device ae"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ae_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for Attansic/Atheros L2 PCIe FastEthernet
+controllers.
+.Pp
+The controller supports hardware Ethernet checksum processing, hardware
+VLAN tag stripping/insertion and an interrupt moderation mechanism.
+Attansic L2 also features a 64-bit multicast hash filter.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override the autoselected mode by
+adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Select 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (FastEthernet) operation.
+.El
+.Pp
+The
+.Nm
+driver provides support for the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Attansic/Atheros L2 PCIe FastEthernet controllers, and
+is known to support the following hardware:
+.Pp
+.Bl -bullet -compact
+.It
+ASUS EeePC 701
+.It
+ASUS EeePC 900
+.El
+.Pp
+Other hardware may or may not work with this driver.
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "xxxxxx"
+.It Va hw.ae.msi_disable
+This tunable disables MSI support on the Ethernet hardware.
+The default value is 0.
+.El
+.Sh SYSCTL VARIABLES
+The
+.Nm
+driver collects a number of useful MAC counter during the work.
+The statistics is available via the
+.Va dev.ae.%d.stats
+.Xr sysctl 8
+tree, where %d corresponds to the controller number.
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ae%d: watchdog timeout."
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.It "ae%d: reset timeout."
+The card reset operation has been timed out.
+.It "ae%d: Generating random ethernet address."
+No valid Ethernet address was found in the controller NVRAM and registers.
+Random locally administered address with ASUS OUI identifier will be used
+instead.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver and this manual page was written by
+.An Stanislav Sedov
+.Aq stas@FreeBSD.org .
+It first appeared in
+.Fx 7.1 .
+.Sh BUGS
+The Attansic L2 FastEthernet controller supports DMA but does not use a
+descriptor based transfer mechanism via scatter-gather DMA.
+Thus the data should be copied to/from the controller memory on each
+transmit/receive.
+Furthermore, a lot of data alignment restrictions apply.
+This may introduce a high CPU load on systems with heavy network activity.
+Luckily enough this should not be a problem on modern hardware as L2 does
+not support speeds faster than 100Mbps.
diff --git a/share/man/man4/aesni.4 b/share/man/man4/aesni.4
new file mode 100644
index 0000000..0001ca2
--- /dev/null
+++ b/share/man/man4/aesni.4
@@ -0,0 +1,94 @@
+.\" Copyright (c) 2010 Konstantin Belousov <kib@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 6, 2010
+.Dt AESNI 4
+.Os
+.Sh NAME
+.Nm aesni
+.Nd "driver for the AES accelerator on Intel CPUs"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device crypto"
+.Cd "device aesni"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+aesni_load="YES"
+.Ed
+.Sh DESCRIPTION
+Starting with some models of Core i5/i7, Intel processors implement
+a new set of instructions called AESNI.
+The set of six instructions accelerates the calculation of the key
+schedule for key lengths of 128, 192, and 256 of the Advanced
+Encryption Standard (AES) symmetric cipher, and provides a hardware
+implementation of the regular and the last encryption and decryption
+rounds.
+.Pp
+The processor capability is reported as AESNI in the Features2 line at boot.
+The
+.Nm
+driver does not attach on systems that lack the required CPU capability.
+.Pp
+The
+.Nm
+driver registers itself to accelerate AES operations for
+.Xr crypto 4 .
+Besides speed, the advantage of using the
+.Nm
+driver is that the AESNI operation
+is data-independent, thus eliminating some attack vectors based on
+measuring cache use and timings typically present in table-driven
+implementations.
+.Sh SEE ALSO
+.Xr crypt 3 ,
+.Xr crypto 4 ,
+.Xr intro 4 ,
+.Xr ipsec 4 ,
+.Xr padlock 4 ,
+.Xr random 4 ,
+.Xr crypto 9
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 9.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Konstantin Belousov Aq kib@FreeBSD.org .
+The key schedule calculation code was adopted from the sample provided
+by Intel and used in the analogous
+.Ox
+driver.
diff --git a/share/man/man4/age.4 b/share/man/man4/age.4
new file mode 100644
index 0000000..28e52c2
--- /dev/null
+++ b/share/man/man4/age.4
@@ -0,0 +1,187 @@
+.\" Copyright (c) 2008 Pyun YongHyeon
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 18, 2008
+.Dt AGE 4
+.Os
+.Sh NAME
+.Nm age
+.Nd Attansic/Atheros L1 Gigabit Ethernet driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device age"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_age_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for Attansic/Atheros L1 PCI Express
+Gigabit Ethernet controllers.
+.Pp
+All LOMs supported by the
+.Nm
+driver have TCP/UDP/IP checksum offload for both transmit and
+receive, TCP segmentation offload (TSO), hardware VLAN tag
+stripping/insertion features and an interrupt moderation mechanism
+as well as a 64-bit multicast hash filter.
+.Pp
+The L1 also supports Jumbo Frames (up to 10240 bytes), which can be
+configured via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+.It Cm 1000baseTX
+Set 1000baseTX operation over twisted pair.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver provides support for LOMs based on
+Attansic/Atheros L1 Gigabit Ethernet controller chips, including:
+.Pp
+.Bl -bullet -compact
+.It
+ASUS M2N8-VMX
+.It
+ASUS M2V
+.It
+ASUS M3A
+.It
+ASUS P2-M2A590G
+.It
+ASUS P5B-E
+.It
+ASUS P5B-MX/WIFI-AP
+.It
+ASUS P5B-VMSE
+.It
+ASUS P5K
+.It
+ASUS P5KC
+.It
+ASUS P5KPL-C
+.It
+ASUS P5KPL-VM
+.It
+ASUS P5K-SE
+.It
+ASUS P5K-V
+.It
+ASUS P5L-MX
+.It
+ASUS P5DL2-VM
+.It
+ASUS P5L-VM 1394
+.It
+ASUS G2S
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "xxxxxx"
+.It Va hw.age.msi_disable
+This tunable disables MSI support on the Ethernet hardware.
+The default value is 0.
+.It Va hw.age.msix_disable
+This tunable disables MSI-X support on the Ethernet hardware.
+The default value is 0.
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width "xxxxxx"
+.It Va dev.age.%d.int_mod
+Maximum amount of time to delay interrupt processing in units of
+2us.
+The accepted range is 0 to 65000, the default is 50 (100us).
+Value 0 completely disables the interrupt moderation.
+.It Va dev.age.%d.process_limit
+Maximum amount of Rx events to be processed in the event loop before
+rescheduling a taskqueue.
+The accepted range is 30 to 255, the default value is 128 events.
+The interface does not need to be brought down and up again before
+a change takes effect.
+.It Va dev.age.%d.stats
+Display lots of useful MAC counters maintained in the driver.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver was written by
+.An Pyun YongHyeon
+.Aq yongari@FreeBSD.org .
+It first appeared in
+.Fx 7.1 .
diff --git a/share/man/man4/agp.4 b/share/man/man4/agp.4
new file mode 100644
index 0000000..8af97d6
--- /dev/null
+++ b/share/man/man4/agp.4
@@ -0,0 +1,177 @@
+.\" Copyright (c) 2001 Yar Tikhiy
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 28, 2007
+.Dt AGP 4
+.Os
+.Sh NAME
+.Nm agp
+.Nd "generic interface to the Accelerated Graphics Port (AGP)"
+.Sh SYNOPSIS
+.Cd "device agp"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides uniform, abstract methods for controlling
+the following devices:
+.Pp
+.Bl -tag -width "NVIDIA:" -compact
+.It Ali:
+M1541, M1621 and M1671 host to AGP bridges
+.It AMD:
+751, 761 and 762 host to AGP bridges
+.It ATI:
+RS100, RS200, RS250 and RS300 AGP bridges
+.It Intel:
+i820, i840, i845, i850, and i860 host to AGP bridges
+.It Intel:
+i810, i810-DC100, i810E, i815, 830M, 845G, 845M, 852GM, 852GME, 855GM, 855GME, 865G, 915G and 915GM SVGA controllers
+.It Intel:
+82443BX, 82443GX, 82443LX, 82815, 82820, 82830, 82840, 82845, 82845G, 82850, 82855, 82855GM, 82860, 82865, 82875P, E7205 and E7505 host to AGP bridges
+.It NVIDIA:
+nForce and nForce2 AGP controllers
+.It SiS:
+530, 540, 550, 620, 630, 645, 645DX, 648, 650, 651, 655, 661, 730, 735, 740, 741, 745, 746, 760 and 5591 host to AGP bridges
+.It VIA:
+3296, 82C597, 82C598, 82C691, 82C694X, 82C8363, 8235, 8237, 8361, 8367, 8371, 8377, 8501, 8601, 862x, 8633, 8653, 8703, 8753, 8754, 8763, 8783, KT880, PM800, PM880, PN800, PN880, PT880, XM266 and XN266 host to PCI bridges
+.El
+.Pp
+The most common application of
+.Nm
+is for running
+.Xr X 7
+on the Intel i81x controllers.
+.Sh IOCTLS
+The following
+.Xr ioctl 2
+operations can be performed on
+.Pa /dev/agpgart ,
+which are defined in
+.In sys/agpio.h :
+.Bl -tag -width indent
+.It Dv AGPIOC_INFO
+Returns state of the
+.Nm
+system.
+The result is a pointer to the following structure:
+.Bd -literal
+typedef struct _agp_info {
+ agp_version version; /* version of the driver */
+ uint32_t bridge_id; /* bridge vendor/device */
+ uint32_t agp_mode; /* mode info of bridge */
+ off_t aper_base; /* base of aperture */
+ size_t aper_size; /* size of aperture */
+ size_t pg_total; /* max pages (swap + system) */
+ size_t pg_system; /* max pages (system) */
+ size_t pg_used; /* current pages used */
+} agp_info;
+.Ed
+.It Dv AGPIOC_ACQUIRE
+Acquire control of the AGP chipset for use by this client.
+Returns
+.Er EBUSY
+if the AGP chipset is already acquired by another client.
+.It Dv AGPIOC_RELEASE
+Release control of the AGP chipset.
+This does not unbind or free any allocated memory, which is the
+responsibility of the client to handle if necessary.
+.It Dv AGPIOC_SETUP
+Enable the AGP hardware with the relevant mode.
+This
+.Xr ioctl 2
+takes the following structure:
+.Bd -literal
+typedef struct _agp_setup {
+ uint32_t agp_mode; /* mode info of bridge */
+} agp_setup;
+.Ed
+.Pp
+The mode bits are defined in
+.In sys/agpio.h .
+.It Dv AGPIOC_ALLOCATE
+Allocate physical memory suitable for mapping into the AGP aperture.
+This
+.Xr ioctl 2
+takes the following structure:
+.Bd -literal
+typedef struct _agp_allocate {
+ int key; /* tag of allocation */
+ size_t pg_count; /* number of pages */
+ uint32_t type; /* 0 == normal, other devspec */
+ uint32_t physical; /* device specific (some devices
+ * need a phys address of the
+ * actual page behind the gatt
+ * table) */
+} agp_allocate;
+.Ed
+.Pp
+Returns a handle to the allocated memory.
+.It Dv AGPIOC_DEALLOCATE
+Free the previously allocated memory associated with the handle passed.
+.It Dv AGPIOC_BIND
+Bind the allocated memory at given offset with the AGP aperture.
+Returns
+.Er EINVAL
+if the memory is already bound or the offset is not at AGP page boundary.
+This
+.Xr ioctl 2
+takes the following structure:
+.Bd -literal
+typedef struct _agp_bind {
+ int key; /* tag of allocation */
+ off_t pg_start; /* starting page to populate */
+} agp_bind;
+.Ed
+.Pp
+The tag of allocation is the handle returned by
+.Dv AGPIOC_ALLOCATE .
+.It Dv AGPIOC_UNBIND
+Unbind memory from the AGP aperture.
+Returns
+.Er EINVAL
+if the memory is not bound.
+This
+.Xr ioctl 2
+takes the following structure:
+.Bd -literal
+typedef struct _agp_unbind {
+ int key; /* tag of allocation */
+ uint32_t priority; /* priority for paging out */
+} agp_unbind;
+.Ed
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/agpgart" -compact
+.It Pa /dev/agpgart
+AGP device node.
+.El
+.Sh SEE ALSO
+.Xr X 7 Pq Pa ports/x11/xorg
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.1 .
diff --git a/share/man/man4/aha.4 b/share/man/man4/aha.4
new file mode 100644
index 0000000..f0f8aca
--- /dev/null
+++ b/share/man/man4/aha.4
@@ -0,0 +1,136 @@
+.\"
+.\" Copyright (c) 1994 Wilko Bulte
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 4, 2004
+.Dt AHA 4
+.Os
+.Sh NAME
+.Nm aha
+.Nd Adaptec SCSI host adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device aha"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+aha_load="YES"
+.Ed
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.aha.0.at="isa"
+.Sh DESCRIPTION
+This driver provides access to the
+.Tn SCSI
+bus connected to the Adaptec AHA-154x and AHA-1640 SCSI host adapters.
+x is 0 for controllers without a floppy drive and 2 for controllers
+that have them.
+For optimum
+performance, Adaptec AHA-174x controllers should be configured in
+enhanced mode and attached via the
+.Xr ahb 4
+driver.
+.Pp
+One device hint entry for every card to be attached by the system is
+required.
+Specific values for the port address, IRQ, and DRQ may be specified.
+If wildcard values are used, the driver will query the device for its
+current settings and use those.
+If the port address
+is a wildcard, the driver consults an internal table of possible port address
+locations and attaches to the first unattached card it finds.
+The possible
+port addresses for this card are 0x330, 0x334, 0x230, 0x234, 0x130, and
+0x134.
+.Pp
+The AHA-1640 is an MCA bus card.
+Since the MCA bus is a self-identifying bus, no setting of hints is
+required.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following SCSI host adapters:
+.Pp
+.Bl -bullet -compact
+.It
+Adaptec AHA-154xB
+.It
+Adaptec AHA-154xC
+.It
+Adaptec AHA-154xCF
+.It
+Adaptec AHA-154xCP
+.It
+Adaptec AHA-1640
+.It
+Adaptec AHA-174x in 154x emulation mode
+.It
+DTC 3290 SCSI controller in 1542 emulation mode
+.It
+Tekram SCSI controllers in 154x emulation mode
+.El
+.Sh SEE ALSO
+.Xr ahb 4 ,
+.Xr ahc 4 ,
+.Xr aic 4 ,
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.\"
+.\" .Sh DIAGNOSTICS
+.\"
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was ported by
+.An M. Warner Losh
+from the
+.Nm bt
+driver written by
+.An Justin T. Gibbs .
+.Sh BUGS
+The AHA-154xA card does not support residuals on data transfers.
+As a result, this card is no longer supported.
+.Pp
+There have been some reports that the AHA-154xB does not work well
+under heavy load.
+.Pp
+The AHA-154xCP is a plug and play controller.
+However, its resources are set using the on-board BIOS and cannot be
+moved.
+Failures to attached for this card are often caused when the resources
+set in the BIOS conflict.
diff --git a/share/man/man4/ahb.4 b/share/man/man4/ahb.4
new file mode 100644
index 0000000..fab6fec
--- /dev/null
+++ b/share/man/man4/ahb.4
@@ -0,0 +1,92 @@
+.\"
+.\" Copyright (c) 1994 Wilko Bulte
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 4, 2004
+.Dt AHB 4
+.Os
+.Sh NAME
+.Nm ahb
+.Nd Adaptec EISA SCSI host adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device ahb"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ahb_load="YES"
+.Ed
+.Sh DESCRIPTION
+This driver provides access to the
+.Tn SCSI
+bus connected to an Adaptec
+AHA-174X host adapters in
+.Dq Em enhanced
+mode.
+Tagged queueing and synchronous SCSI transfers are supported.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following SCSI host adapters:
+.Pp
+.Bl -bullet -compact
+.It
+Adaptec AHA-1740
+.It
+Adaptec AHA-1742
+.It
+Adaptec AHA-1740A
+.It
+Adaptec AHA-1742A
+.El
+.Sh SEE ALSO
+.Xr aha 4 ,
+.Xr ahc 4 ,
+.Xr aic 4 ,
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Justin T. Gibbs .
+.Sh CAVEATS
+The Adaptec 174X is very sensitive to SCSI bus termination and cable
+length.
+It may also have difficulties operating with some modern devices
+that, due to their speed, expose timing problems in the controller.
+There are no known mechanisms for working around device incompatibilities of
+this nature.
diff --git a/share/man/man4/ahc.4 b/share/man/man4/ahc.4
new file mode 100644
index 0000000..3e47a8b
--- /dev/null
+++ b/share/man/man4/ahc.4
@@ -0,0 +1,446 @@
+.\"
+.\" Copyright (c) 1995, 1996, 1997, 1998, 2000
+.\" Justin T. Gibbs. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 13, 2008
+.Dt AHC 4
+.Os
+.Sh NAME
+.Nm ahc
+.Nd Adaptec VL/EISA/PCI SCSI host adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device ahc"
+.Pp
+For one or more VL/EISA cards:
+.Cd "device eisa"
+.Pp
+For one or more PCI cards:
+.Cd "device pci"
+.Pp
+To allow PCI adapters to use memory mapped I/O if enabled:
+.Cd options AHC_ALLOW_MEMIO
+.Pp
+To configure one or more controllers to assume the target role:
+.Cd options AHC_TMODE_ENABLE <bitmask of units>
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ahc_load="YES"
+ahc_eisa_load="YES"
+ahc_isa_load="YES"
+ahc_pci_load="YES"
+.Ed
+.Sh DESCRIPTION
+This driver provides access to the
+.Tn SCSI
+bus(es) connected to the Adaptec AIC77xx and AIC78xx
+host adapter chips.
+.Pp
+Driver features include support for twin and wide busses,
+fast, ultra or ultra2 synchronous transfers depending on controller type,
+tagged queueing, SCB paging, and target mode.
+.Pp
+Memory mapped I/O can be enabled for PCI devices with the
+.Dq Dv AHC_ALLOW_MEMIO
+configuration option.
+Memory mapped I/O is more efficient than the alternative, programmed I/O.
+Most PCI BIOSes will map devices so that either technique for communicating
+with the card is available.
+In some cases,
+usually when the PCI device is sitting behind a PCI->PCI bridge,
+the BIOS may fail to properly initialize the chip for memory mapped I/O.
+The typical symptom of this problem is a system hang if memory mapped I/O
+is attempted.
+Most modern motherboards perform the initialization correctly and work fine
+with this option enabled.
+.Pp
+Individual controllers may be configured to operate in the target role
+through the
+.Dq Dv AHC_TMODE_ENABLE
+configuration option.
+The value assigned to this option should be a bitmap
+of all units where target mode is desired.
+For example, a value of 0x25, would enable target mode on units 0, 2, and 5.
+A value of 0x8a enables it for units 1, 3, and 7.
+.Pp
+Per target configuration performed in the
+.Tn SCSI-Select
+menu, accessible at boot
+in
+.No non- Ns Tn EISA
+models,
+or through an
+.Tn EISA
+configuration utility for
+.Tn EISA
+models,
+is honored by this driver.
+This includes synchronous/asynchronous transfers,
+maximum synchronous negotiation rate,
+wide transfers,
+disconnection,
+the host adapter's SCSI ID,
+and,
+in the case of
+.Tn EISA
+Twin Channel controllers,
+the primary channel selection.
+For systems that store non-volatile settings in a system specific manner
+rather than a serial eeprom directly connected to the aic7xxx controller,
+the
+.Tn BIOS
+must be enabled for the driver to access this information.
+This restriction applies to all
+.Tn EISA
+and many motherboard configurations.
+.Pp
+Note that I/O addresses are determined automatically by the probe routines,
+but care should be taken when using a 284x
+.Pq Tn VESA No local bus controller
+in an
+.Tn EISA
+system.
+The jumpers setting the I/O area for the 284x should match the
+.Tn EISA
+slot into which the card is inserted to prevent conflicts with other
+.Tn EISA
+cards.
+.Pp
+Performance and feature sets vary throughout the aic7xxx product line.
+The following table provides a comparison of the different chips supported
+by the
+.Nm
+driver.
+Note that wide and twin channel features, although always supported
+by a particular chip, may be disabled in a particular motherboard or card
+design.
+.Bd -ragged -offset indent
+.Bl -column "aic7895CX" "MIPSX" "EISA/VLX" "MaxSyncX" "MaxWidthX" "SCBsX" "2 3 4 5 6 7 8X"
+.It Em "Chip" Ta "MIPS" Ta "Bus" Ta "MaxSync" Ta "MaxWidth" Ta "SCBs" Ta "Features"
+.It "aic7770" Ta "10" Ta "EISA/VL" Ta "10MHz" Ta "16Bit" Ta "4" Ta "1"
+.It "aic7850" Ta "10" Ta "PCI/32" Ta "10MHz" Ta "8Bit" Ta "3" Ta ""
+.It "aic7860" Ta "10" Ta "PCI/32" Ta "20MHz" Ta "8Bit" Ta "3" Ta ""
+.It "aic7870" Ta "10" Ta "PCI/32" Ta "10MHz" Ta "16Bit" Ta "16" Ta ""
+.It "aic7880" Ta "10" Ta "PCI/32" Ta "20MHz" Ta "16Bit" Ta "16" Ta ""
+.It "aic7890" Ta "20" Ta "PCI/32" Ta "40MHz" Ta "16Bit" Ta "16" Ta "3 4 5 6 7 8"
+.It "aic7891" Ta "20" Ta "PCI/64" Ta "40MHz" Ta "16Bit" Ta "16" Ta "3 4 5 6 7 8"
+.It "aic7892" Ta "20" Ta "PCI/64" Ta "80MHz" Ta "16Bit" Ta "16" Ta "3 4 5 6 7 8"
+.It "aic7895" Ta "15" Ta "PCI/32" Ta "20MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5"
+.It "aic7895C" Ta "15" Ta "PCI/32" Ta "20MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5 8"
+.It "aic7896" Ta "20" Ta "PCI/32" Ta "40MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5 6 7 8"
+.It "aic7897" Ta "20" Ta "PCI/64" Ta "40MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5 6 7 8"
+.It "aic7899" Ta "20" Ta "PCI/64" Ta "80MHz" Ta "16Bit" Ta "16" Ta "2 3 4 5 6 7 8"
+.El
+.Pp
+.Bl -enum -compact
+.It
+Multiplexed Twin Channel Device - One controller servicing two busses.
+.It
+Multi-function Twin Channel Device - Two controllers on one chip.
+.It
+Command Channel Secondary DMA Engine - Allows scatter gather list and
+SCB prefetch.
+.It
+64 Byte SCB Support - SCSI CDB is embedded in the SCB to eliminate an extra DMA.
+.It
+Block Move Instruction Support - Doubles the speed of certain sequencer
+operations.
+.It
+.Sq Bayonet
+style Scatter Gather Engine - Improves S/G prefetch performance.
+.It
+Queuing Registers - Allows queueing of new transactions without pausing the
+sequencer.
+.It
+Multiple Target IDs - Allows the controller to respond to selection as a
+target on multiple SCSI IDs.
+.El
+.Ed
+.Sh HARDWARE
+The
+.Nm
+driver supports the following
+.Tn SCSI
+host adapter chips and
+.Tn SCSI
+controller cards:
+.Pp
+.Bl -bullet -compact
+.It
+Adaptec
+.Tn AIC7770
+host adapter chip
+.It
+Adaptec
+.Tn AIC7850
+host adapter chip
+.It
+Adaptec
+.Tn AIC7860
+host adapter chip
+.It
+Adaptec
+.Tn AIC7870
+host adapter chip
+.It
+Adaptec
+.Tn AIC7880
+host adapter chip
+.It
+Adaptec
+.Tn AIC7890
+host adapter chip
+.It
+Adaptec
+.Tn AIC7891
+host adapter chip
+.It
+Adaptec
+.Tn AIC7892
+host adapter chip
+.It
+Adaptec
+.Tn AIC7895
+host adapter chip
+.It
+Adaptec
+.Tn AIC7896
+host adapter chip
+.It
+Adaptec
+.Tn AIC7897
+host adapter chip
+.It
+Adaptec
+.Tn AIC7899
+host adapter chip
+.It
+Adaptec
+.Tn 274X(W)
+.It
+Adaptec
+.Tn 274X(T)
+.It
+Adaptec
+.Tn 284X
+.It
+Adaptec
+.Tn 2910
+.It
+Adaptec
+.Tn 2915
+.It
+Adaptec
+.Tn 2920C
+.It
+Adaptec
+.Tn 2930C
+.It
+Adaptec
+.Tn 2930U2
+.It
+Adaptec
+.Tn 2940
+.It
+Adaptec
+.Tn 2940J
+.It
+Adaptec
+.Tn 2940N
+.It
+Adaptec
+.Tn 2940U
+.It
+Adaptec
+.Tn 2940AU
+.It
+Adaptec
+.Tn 2940UW
+.It
+Adaptec
+.Tn 2940UW Dual
+.It
+Adaptec
+.Tn 2940UW Pro
+.It
+Adaptec
+.Tn 2940U2W
+.It
+Adaptec
+.Tn 2940U2B
+.It
+Adaptec
+.Tn 2950U2W
+.It
+Adaptec
+.Tn 2950U2B
+.It
+Adaptec
+.Tn 19160B
+.It
+Adaptec
+.Tn 29160B
+.It
+Adaptec
+.Tn 29160N
+.It
+Adaptec
+.Tn 3940
+.It
+Adaptec
+.Tn 3940U
+.It
+Adaptec
+.Tn 3940AU
+.It
+Adaptec
+.Tn 3940UW
+.It
+Adaptec
+.Tn 3940AUW
+.It
+Adaptec
+.Tn 3940U2W
+.It
+Adaptec
+.Tn 3950U2
+.It
+Adaptec
+.Tn 3960
+.It
+Adaptec
+.Tn 39160
+.It
+Adaptec
+.Tn 3985
+.It
+Adaptec
+.Tn 4944UW
+.It
+NEC PC-9821Xt13 (PC-98)
+.It
+NEC RvII26 (PC-98)
+.It
+NEC PC-9821X-B02L/B09 (PC-98)
+.It
+NEC SV-98/2-B03 (PC-98)
+.It
+Many motherboards with on-board
+.Tn SCSI
+support
+.El
+.Sh SCSI CONTROL BLOCKS (SCBs)
+Every transaction sent to a device on the SCSI bus is assigned a
+.Sq SCSI Control Block
+(SCB).
+The SCB contains all of the information required by the
+controller to process a transaction.
+The chip feature table lists
+the number of SCBs that can be stored in on-chip memory.
+All chips
+with model numbers greater than or equal to 7870 allow for the on chip
+SCB space to be augmented with external SRAM up to a maximum of 255 SCBs.
+Very few Adaptec controller configurations have external SRAM.
+.Pp
+If external SRAM is not available, SCBs are a limited resource.
+Using the SCBs in a straight forward manner would only allow the driver to
+handle as many concurrent transactions as there are physical SCBs.
+To fully utilize the SCSI bus and the devices on it,
+requires much more concurrency.
+The solution to this problem is
+.Em SCB Paging ,
+a concept similar to memory paging.
+SCB paging takes advantage of
+the fact that devices usually disconnect from the SCSI bus for long
+periods of time without talking to the controller.
+The SCBs for disconnected transactions are only of use to the controller
+when the transfer is resumed.
+When the host queues another transaction
+for the controller to execute, the controller firmware will use a
+free SCB if one is available.
+Otherwise, the state of the most recently
+disconnected (and therefore most likely to stay disconnected) SCB is
+saved, via dma, to host memory, and the local SCB reused to start
+the new transaction.
+This allows the controller to queue up to
+255 transactions regardless of the amount of SCB space.
+Since the
+local SCB space serves as a cache for disconnected transactions, the
+more SCB space available, the less host bus traffic consumed saving
+and restoring SCB data.
+.Sh SEE ALSO
+.Xr aha 4 ,
+.Xr ahb 4 ,
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.Sh HISTORY
+The
+.Nm
+driver appeared in
+.Fx 2.0 .
+.Sh AUTHORS
+The
+.Nm
+driver, the
+.Tn AIC7xxx
+sequencer-code assembler,
+and the firmware running on the aic7xxx chips was written by
+.An Justin T. Gibbs .
+.Sh BUGS
+Some Quantum drives (at least the Empire 2100 and 1080s) will not run on an
+.Tn AIC7870
+Rev B in synchronous mode at 10MHz.
+Controllers with this problem have a
+42 MHz clock crystal on them and run slightly above 10MHz.
+This confuses the drive and hangs the bus.
+Setting a maximum synchronous negotiation rate of 8MHz in the
+.Tn SCSI-Select
+utility will allow normal operation.
+.Pp
+Although the Ultra2 and Ultra160 products have sufficient instruction
+ram space to support both the initiator and target roles concurrently,
+this configuration is disabled in favor of allowing the target role
+to respond on multiple target ids.
+A method for configuring dual role mode should be provided.
+.Pp
+Tagged Queuing is not supported in target mode.
+.Pp
+Reselection in target mode fails to function correctly on all high
+voltage differential boards as shipped by Adaptec.
+Information on
+how to modify HVD board to work correctly in target mode is available
+from Adaptec.
diff --git a/share/man/man4/ahci.4 b/share/man/man4/ahci.4
new file mode 100644
index 0000000..1019e6d
--- /dev/null
+++ b/share/man/man4/ahci.4
@@ -0,0 +1,184 @@
+.\" Copyright (c) 2009-2013 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 22, 2013
+.Dt AHCI 4
+.Os
+.Sh NAME
+.Nm ahci
+.Nd Serial ATA Advanced Host Controller Interface driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device scbus"
+.Cd "device ahci"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ahci_load="YES"
+.Ed
+.Pp
+The following tunables are settable from the
+.Xr loader 8 :
+.Bl -ohang
+.It Va hint.ahci. Ns Ar X Ns Va .msi
+controls Message Signaled Interrupts (MSI) usage by the specified controller.
+.Pp
+.Bl -tag -width 4n -offset indent -compact
+.It 0
+MSI disabled;
+.It 1
+single MSI vector used, if supported;
+.It 2
+multiple MSI vectors used, if supported (default);
+.El
+.It Va hint.ahci. Ns Ar X Ns Va .ccc
+controls Command Completion Coalescing (CCC) usage by the specified controller.
+Non-zero value enables CCC and defines maximum time (in ms), request can wait
+for interrupt, if there are some more requests present on controller queue.
+CCC reduces number of context switches on systems with many parallel requests,
+but it can decrease disk performance on some workloads due to additional
+command latency.
+.It Va hint.ahci. Ns Ar X Ns Va .direct
+controls whether the driver should use direct command completion from
+interrupt thread(s), or queue them to CAM completion threads.
+Default value depends on number of MSI interrupts supported and number of
+implemented SATA ports.
+.It Va hint.ahcich. Ns Ar X Ns Va .pm_level
+controls SATA interface Power Management for the specified channel,
+allowing some power to be saved at the cost of additional command
+latency.
+Possible values:
+.Pp
+.Bl -tag -width 4n -offset indent -compact
+.It 0
+interface Power Management is disabled (default);
+.It 1
+device is allowed to initiate PM state change, host is passive;
+.It 2
+host initiates PARTIAL PM state transition every time port becomes idle;
+.It 3
+host initiates SLUMBER PM state transition every time port becomes idle.
+.It 4
+driver initiates PARTIAL PM state transition 1ms after port becomes idle;
+.It 5
+driver initiates SLUMBER PM state transition 125ms after port becomes idle.
+.El
+.Pp
+Some controllers, such as ICH8, do not implement modes 2 and 3 with NCQ used.
+Because of artificial entering latency, performance degradation in modes
+4 and 5 is much smaller then in modes 2 and 3.
+.Pp
+Note that interface Power Management complicates device presence detection.
+A manual bus reset/rescan may be needed after device hot-plug, unless hardware
+implements Cold Presence Detection.
+.It Va hint.ahcich. Ns Ar X Ns Va .sata_rev
+setting to nonzero value limits maximum SATA revision (speed).
+Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps.
+.It Va hw.ahci.force
+setting to nonzero value forces driver attach to some known AHCI-capable
+chips even if they are configured for legacy IDE emulation.
+Default is 1.
+.El
+.Sh DESCRIPTION
+This driver provides the
+.Xr CAM 4
+subsystem with native access to the
+.Tn SATA
+ports of AHCI-compatible controllers.
+Each SATA port found is represented to CAM as a separate bus with one
+target, or, if HBA supports Port Multipliers, 16 targets.
+Most of the bus-management details are handled by the SATA-specific
+transport of CAM.
+Connected ATA disks are handled by the ATA protocol disk peripheral driver
+.Xr ada 4 .
+ATAPI devices are handled by the SCSI protocol peripheral drivers
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4 ,
+etc.
+.Pp
+Driver features include support for Serial ATA and ATAPI devices,
+Port Multipliers (including FIS-based switching, when supported),
+hardware command queues (up to 32 commands per port),
+Native Command Queuing, SATA interface Power Management, device hot-plug
+and Message Signaled Interrupts.
+.Pp
+Driver supports "LED" enclosure management messages, defined by the AHCI.
+When supported by hardware, it allows to control per-port activity, locate
+and fault LEDs via the
+.Xr led 4
+API or emulated
+.Xr ses 4
+device for localization and status reporting purposes.
+Supporting AHCI controllers may transmit that information to the backplane
+controllers via SGPIO interface. Backplane controllers interpret received
+statuses in some way (IBPI standard) to report them using present indicators.
+.Pp
+AHCI hardware is also supported by ataahci driver from
+.Xr ata 4
+subsystem.
+If both drivers are loaded at the same time, this one will be
+given precedence as the more functional of the two.
+.Sh HARDWARE
+The
+.Nm
+driver supports AHCI compatible controllers having PCI class 1 (mass storage),
+subclass 6 (SATA) and programming interface 1 (AHCI).
+.Pp
+Also, in cooperation with atamarvell and atajmicron drivers of ata(4),
+it supports AHCI part of legacy-PATA + AHCI-SATA combined controllers,
+such as JMicron JMB36x and Marvell 88SE61xx.
+.Sh FILES
+.Bl -tag -width /dev/led/ahcich*.locate
+.It Pa /dev/led/ahci*.*.act
+activity LED device nodes
+.It Pa /dev/led/ahci*.*.fault
+fault LED device nodes
+.It Pa /dev/led/ahci*.*.locate
+locate LED device nodes
+.El
+.Sh SEE ALSO
+.Xr ada 4 ,
+.Xr ata 4 ,
+.Xr cam 4 ,
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4 ,
+.Xr ses 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An Alexander Motin Aq mav@FreeBSD.org .
diff --git a/share/man/man4/ahd.4 b/share/man/man4/ahd.4
new file mode 100644
index 0000000..e00c427
--- /dev/null
+++ b/share/man/man4/ahd.4
@@ -0,0 +1,180 @@
+.\"
+.\" Copyright (c) 1995, 1996, 1997, 1998, 2000
+.\" Justin T. Gibbs. All rights reserved.
+.\" Copyright (c) 2002
+.\" Scott Long. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 4, 2004
+.Dt AHD 4
+.Os
+.Sh NAME
+.Nm ahd
+.Nd Adaptec PCI/PCI-X Ultra320 SCSI host adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device scbus"
+.Cd "device ahd"
+.Pp
+To compile in debugging code:
+.Cd options AHD_DEBUG
+.Cd options AHD_DEBUG_OPTS=<bitmask of options>
+.Cd options AHD_REG_PRETTY_PRINT
+.Pp
+To configure one or more controllers to assume the target role:
+.Cd options AHD_TMODE_ENABLE=<bitmask of units>
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ahd_load="YES"
+.Ed
+.Sh DESCRIPTION
+This driver provides access to the
+.Tn SCSI
+bus(es) connected to Adaptec
+.Tn AIC79xx
+host adapter chips.
+.Pp
+Driver features include support for narrow and wide busses,
+fast, ultra, ultra2, ultra160, and ultra320 synchronous transfers,
+packetized transfers, tagged queueing, 512 SCB's, and target mode.
+.Pp
+The
+.Dv AHD_DEBUG_OPTS
+option is used to control which diagnostic messages are printed to the
+console when
+.Dv AHD_DEBUG
+is enabled.
+Logically OR the following bits together:
+.Bl -column -offset indent Value Function
+.Em "Value Function"
+0x0001 Show miscellaneous information
+0x0002 Show sense data
+0x0004 Show Serial EEPROM contents
+0x0008 Show bus termination settings
+0x0010 Show host memory usage
+0x0020 Show SCSI protocol messages
+0x0040 Show mode pointer of the chip register window
+0x0080 Show selection timeouts
+0x0100 Show FIFO usage messages
+0x0200 Show Queue Full status
+0x0400 Show SCB queue status
+0x0800 Show inbound packet information
+0x1000 Show S/G list information
+0x2000 Enable extra diagnostic code in the firmware
+.El
+.Pp
+The
+.Dv AHD_REG_PRETTY_PRINT
+option compiles in support for human-readable bit definitions for each register
+that is printed by the debugging code.
+However, it also bloats the compiled
+size of the driver by approximately 215KB.
+.Pp
+Individual controllers may be configured to operate in the target role
+through the
+.Dv AHD_TMODE_ENABLE
+configuration option.
+The value assigned to this option should be a bitmap
+of all units where target mode is desired.
+For example, a value of 0x25 would enable target mode on units 0, 2, and 5.
+Note that target mode is only supported for ultra160 speeds and below.
+.Pp
+Per target configuration performed in the
+.Tn SCSI-Select
+menu, accessible at boot,
+is honored by this driver.
+This includes synchronous/asynchronous transfers,
+maximum synchronous negotiation rate,
+wide transfers,
+disconnection,
+and the host adapter's
+.Tn SCSI
+ID.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following:
+.Pp
+.Bl -bullet -compact
+.It
+Adaptec
+.Tn AIC7901
+host adapter chip
+.It
+Adaptec
+.Tn AIC7901A
+host adapter chip
+.It
+Adaptec
+.Tn AIC7902
+host adapter chip
+.It
+Adaptec
+.Tn 29320
+host adapter
+.It
+Adaptec
+.Tn 39320
+host adapter
+.It
+Many motherboards with on-board
+.Tn SCSI
+support
+.El
+.Sh SEE ALSO
+.Xr ahc 4 ,
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.7 .
+.Sh AUTHORS
+The
+.Nm
+driver, the
+.Tn AIC7xxx
+sequencer-code assembler,
+and the firmware running on the aic79xx chips was written by
+.An Justin T. Gibbs .
+This manual page is based on the
+.Xr ahc 4
+manual page.
+.Sh BUGS
+The current generation of 79xx chips do not support target mode in Ultra320
+mode.
+Target mode in general has not been well tested in this driver.
diff --git a/share/man/man4/aibs.4 b/share/man/man4/aibs.4
new file mode 100644
index 0000000..b955f0f
--- /dev/null
+++ b/share/man/man4/aibs.4
@@ -0,0 +1,207 @@
+.\" $FreeBSD$
+.\" $NetBSD: aibs.4,v 1.2 2010/02/09 05:37:25 cnst Exp $
+.\" $OpenBSD: aibs.4,v 1.4 2009/07/30 06:30:45 jmc Exp $
+.\"
+.\" Copyright (c) 2009/2010 Constantine A. Murenin <cnst++@FreeBSD.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd April 4, 2010
+.Dt AIBS 4
+.Os
+.Sh NAME
+.Nm aibs
+.Nd "ASUSTeK AI Booster ACPI ATK0110 voltage, temperature and fan sensor"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device aibs"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+aibs_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the voltage, temperature and fan sensors
+available through the
+.Tn ATK0110
+.Tn ASOC
+.Tn ACPI
+device
+on
+.Tn ASUSTeK
+motherboards.
+The number of sensors of each type,
+as well as the description of each sensor,
+varies according to the motherboard.
+.Pp
+The driver supports an arbitrary set of sensors,
+provides descriptions regarding what each sensor is used for,
+and reports the current values as well as
+the supposed range specifications of each sensor's input
+as defined by the motherboard manufacturer through
+.Tn ACPI .
+.Pp
+The range specifications are as follows:
+.Bl -bullet
+.It
+Voltage sensors have a lower and an upper range specification.
+.It
+Temperature sensors have two upper specifications.
+.It
+Fan sensors may either have only the lower specification,
+or, depending on the
+.Tn DSDT ,
+one lower and one upper specification.
+.El
+.Pp
+Sensor readings and the range specifications are made available through the
+.Xr sysctl 3
+interface,
+and can be monitored with
+.Xr sysctl 8 .
+For example, on an ASUS V3-P5G965 barebone:
+.Bd -literal -offset indent
+> sysctl dev.aibs.0.{volt,temp,fan}
+dev.aibs.0.volt.0: 1192 850 1600
+dev.aibs.0.volt.1: 3312 2970 3630
+dev.aibs.0.volt.2: 5017 4500 5500
+dev.aibs.0.volt.3: 12302 10200 13800
+dev.aibs.0.temp.0: 28.0C 80.0C 95.0C
+dev.aibs.0.temp.1: 55.0C 60.0C 95.0C
+dev.aibs.0.fan.0: 878 600 7200
+dev.aibs.0.fan.1: 0 700 7200
+.Pp
+> sysctl -d dev.aibs.0.{volt,temp,fan}
+dev.aibs.0.volt:
+dev.aibs.0.volt.0: Vcore Voltage
+dev.aibs.0.volt.1: +3.3 Voltage
+dev.aibs.0.volt.2: +5 Voltage
+dev.aibs.0.volt.3: +12 Voltage
+dev.aibs.0.temp:
+dev.aibs.0.temp.0: CPU Temperature
+dev.aibs.0.temp.1: MB Temperature
+dev.aibs.0.fan:
+dev.aibs.0.fan.0: CPU FAN Speed
+dev.aibs.0.fan.1: CHASSIS FAN Speed
+.Ed
+.Pp
+Generally, sensors provided by the
+.Nm
+driver may also be supported by certain other drivers or utilities
+that access the
+.Tn ISA /
+.Tn LPC
+or
+.Tn I2C /
+.Tn SMBus
+devices directly.
+The precise collection of
+.Nm
+sensors is comprised of the sensors
+specifically utilised in the motherboard
+design, which may be supported through
+a combination of one or more physical hardware monitoring chips.
+.Pp
+The
+.Nm
+driver, however, provides the following advantages
+when compared to the native hardware monitoring drivers or other utilities:
+.Bl -bullet
+.It
+Sensor values from
+.Nm
+are expected to be more reliable.
+For example, voltage sensors in many hardware monitoring chips
+can only sense voltage from 0 to 2 or 4 volts, and the excessive
+voltage is removed by the resistors, which may vary with the motherboard
+and with the voltage that is being sensed.
+In
+.Nm ,
+the required resistor factors are provided by
+the motherboard manufacturer through
+.Tn ACPI ;
+in the native drivers, the resistor factors
+are encoded into the driver based on the chip manufacturer's recommendations.
+In essence, sensor values from
+.Nm
+are very likely to be identical to the readings from the
+Hardware Monitor screen in the BIOS.
+.It
+Sensor descriptions from
+.Nm
+are more likely to match the markings on the motherboard.
+.It
+Sensor range specifications are supported by
+.Nm .
+The range specification is reported
+for each individual sensor as suggested by the motherboard manufacturer.
+For example, the threshold for the CPU temperature sensor is likely
+to be significantly higher than that for the chassis temperature sensor.
+.It
+Support for newer chips in
+.Nm .
+Newer chips may miss a native driver,
+but should be supported through
+.Nm
+regardless.
+.El
+.Sh SEE ALSO
+.Xr sysctl 3 ,
+.Xr acpi 4 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 4.7 ,
+.Dx 2.5 ,
+.Nx 6.0
+and
+.Fx 9.0 .
+.Pp
+An earlier version of the driver,
+.Nm acpi_aiboost ,
+first appeared in
+.Fx 7.0
+and
+.Nx 5.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written for
+.Ox ,
+.Dx ,
+.Nx
+and
+.Fx
+by
+.An Constantine A. Murenin Aq cnst@FreeBSD.org ,
+Raouf Boutaba Research Group,
+David R. Cheriton School of Computer Science,
+University of Waterloo.
+.Pp
+An earlier version of the driver, named
+.Nm acpi_aiboost ,
+was written for
+.Fx
+by
+.An Takanori Watanabe .
diff --git a/share/man/man4/aio.4 b/share/man/man4/aio.4
new file mode 100644
index 0000000..8e773d9
--- /dev/null
+++ b/share/man/man4/aio.4
@@ -0,0 +1,68 @@
+.\"-
+.\" Copyright (c) 2002 Dag-Erling Coïdan Smørgrav
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 24, 2002
+.Dt AIO 4
+.Os
+.Sh NAME
+.Nm aio
+.Nd asynchronous I/O
+.Sh SYNOPSIS
+To link into the kernel:
+.Cd "options VFS_AIO"
+.Pp
+To load as a kernel loadable module:
+.Dl kldload aio
+.Sh DESCRIPTION
+The
+.Nm
+facility provides system calls for asynchronous I/O.
+It is available both as a kernel option for static inclusion and as a
+dynamic kernel module.
+.Sh SEE ALSO
+.Xr aio_cancel 2 ,
+.Xr aio_error 2 ,
+.Xr aio_read 2 ,
+.Xr aio_return 2 ,
+.Xr aio_suspend 2 ,
+.Xr aio_waitcomplete 2 ,
+.Xr aio_write 2 ,
+.Xr lio_listio 2 ,
+.Xr config 8 ,
+.Xr kldload 8 ,
+.Xr kldunload 8
+.Sh HISTORY
+The
+.Nm
+facility appeared as a kernel option in
+.Fx 3.0 .
+The
+.Nm
+kernel module appeared in
+.Fx 5.0 .
diff --git a/share/man/man4/alc.4 b/share/man/man4/alc.4
new file mode 100644
index 0000000..9fe3c29
--- /dev/null
+++ b/share/man/man4/alc.4
@@ -0,0 +1,168 @@
+.\" Copyright (c) 2009 Pyun YongHyeon
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 9, 2010
+.Dt ALC 4
+.Os
+.Sh NAME
+.Nm alc
+.Nd Atheros AR813x/AR815x Gigabit/Fast Ethernet driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device alc"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_alc_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for Atheros AR813x and AR815x PCI
+Express Gigabit/Fast Ethernet controllers.
+.Pp
+All LOMs supported by the
+.Nm
+driver have TCP/UDP/IP checksum offload for transmit, TCP
+segmentation offload (TSO), hardware VLAN tag stripping/insertion
+features, Wake On Lan (WOL) and an interrupt moderation mechanism
+as well as a 64-bit multicast hash filter.
+.Pp
+The AR813x and AR815x supports Jumbo Frames (up to 9216 and 6144
+bytes, respectively), which can be configured via the interface
+MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+.It Cm 1000baseTX
+Set 1000baseTX operation over twisted pair.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+device driver provides support for the following Ethernet controllers:
+.Pp
+.Bl -bullet -compact
+.It
+Atheros AR8131 PCI Express Gigabit Ethernet controller
+.It
+Atheros AR8132 PCI Express Fast Ethernet controller
+.It
+Atheros AR8151 v1.0 PCI Express Gigabit Ethernet controller
+.It
+Atheros AR8151 v2.0 PCI Express Gigabit Ethernet controller
+.It
+Atheros AR8152 v1.1 PCI Express Fast Ethernet controller
+.It
+Atheros AR8152 v2.0 PCI Express Fast Ethernet controller
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "xxxxxx"
+.It Va hw.alc.msi_disable
+This tunable disables MSI support on the Ethernet hardware.
+The default value is 0.
+.It Va hw.alc.msix_disable
+This tunable disables MSI-X support on the Ethernet hardware.
+The default value is 0.
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width "xxxxxx"
+.It Va dev.alc.%d.int_rx_mod
+Maximum amount of time to delay receive interrupt processing in
+units of 1us.
+The accepted range is 0 to 130000, the default is 100(100us).
+Value 0 completely disables the interrupt moderation.
+.It Va dev.alc.%d.int_tx_mod
+Maximum amount of time to delay transmit interrupt processing in
+units of 1us.
+The accepted range is 0 to 130000, the default is 1000(1ms).
+Value 0 completely disables the interrupt moderation.
+.It Va dev.alc.%d.process_limit
+Maximum amount of Rx frames to be processed in the event loop before
+rescheduling a taskqueue.
+The accepted range is 32 to 255, the default value is 64 events.
+The interface does not need to be brought down and up again before
+a change takes effect.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver was written by
+.An Pyun YongHyeon
+.Aq yongari@FreeBSD.org .
+It first appeared in
+.Fx 8.0 .
diff --git a/share/man/man4/ale.4 b/share/man/man4/ale.4
new file mode 100644
index 0000000..d5102a1
--- /dev/null
+++ b/share/man/man4/ale.4
@@ -0,0 +1,162 @@
+.\" Copyright (c) 2008 Pyun YongHyeon
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 12, 2008
+.Dt ALE 4
+.Os
+.Sh NAME
+.Nm ale
+.Nd Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device ale"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ale_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for Atheros AR8121 PCI Express
+Gigabit Ethernet controllers and Atheros AR8113/AR8114 PCI
+Express Fast Ethernet controllers.
+.Pp
+All LOMs supported by the
+.Nm
+driver have TCP/UDP/IP checksum offload for both receive and transmit,
+TCP segmentation offload (TSO), hardware VLAN tag stripping/insertion
+features, Wake On Lan (WOL) and an interrupt coalescing/moderation
+mechanism as well as a 64-bit multicast hash filter.
+.Pp
+The AR8121 also supports Jumbo Frames (up to 8132 bytes), which can
+be configured via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+.It Cm 1000baseTX
+Set 1000baseTX operation over twisted pair.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+device driver provides support for the following Ethernet controllers:
+.Pp
+.Bl -bullet -compact
+.It
+Atheros AR8113 PCI Express Fast Ethernet controller
+.It
+Atheros AR8114 PCI Express Fast Ethernet controller
+.It
+Atheros AR8121 PCI Express Gigabit Ethernet controller
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "xxxxxx"
+.It Va hw.ale.msi_disable
+This tunable disables MSI support on the Ethernet hardware.
+The default value is 0.
+.It Va hw.ale.msix_disable
+This tunable disables MSI-X support on the Ethernet hardware.
+The default value is 0.
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width "xxxxxx"
+.It Va dev.ale.%d.int_rx_mod
+Maximum amount of time to delay receive interrupt processing in
+units of 1us.
+The accepted range is 0 to 130000, the default is 30(30us).
+Value 0 completely disables the interrupt moderation.
+.It Va dev.ale.%d.int_tx_mod
+Maximum amount of time to delay transmit interrupt processing in
+units of 1us.
+The accepted range is 0 to 130000, the default is 1000(1ms).
+Value 0 completely disables the interrupt moderation.
+.It Va dev.ale.%d.process_limit
+Maximum amount of Rx frames to be processed in the event loop before
+rescheduling a taskqueue.
+The accepted range is 32 to 255, the default value is 128 events.
+The interface does not need to be brought down and up again before
+a change takes effect.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver was written by
+.An Pyun YongHyeon
+.Aq yongari@FreeBSD.org .
+It first appeared in
+.Fx 7.1 .
diff --git a/share/man/man4/alpm.4 b/share/man/man4/alpm.4
new file mode 100644
index 0000000..43ee459
--- /dev/null
+++ b/share/man/man4/alpm.4
@@ -0,0 +1,62 @@
+.\" Copyright (c) 1999 Nicolas Souchu
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 13, 1999
+.Dt ALPM 4
+.Os
+.Sh NAME
+.Nm alpm
+.Nd Acer Aladdin 15x3 Power Management controller driver
+.Sh SYNOPSIS
+.Cd device smbus
+.Cd device smb
+.Cd device alpm
+.Sh DESCRIPTION
+This driver provides access to the
+.Tn Aladdin 15x3 Power Management Unit .
+Currently, only smbus controller
+function is implemented.
+.Pp
+The embedded SMBus controller of the Aladdin chipset may give you access
+to the monitoring facilities of your mainboard.
+See
+.Xr smb 4
+for writing user code to fetch voltages, temperature and so on from the
+monitoring chip of your mainboard.
+.Sh SEE ALSO
+.Xr smb 4 ,
+.Xr smbus 4
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Nicolas Souchu Aq nsouch@FreeBSD.org
+.Sh BUGS
+Only polling mode is supported.
diff --git a/share/man/man4/altera_atse.4 b/share/man/man4/altera_atse.4
new file mode 100644
index 0000000..d3d96ff
--- /dev/null
+++ b/share/man/man4/altera_atse.4
@@ -0,0 +1,100 @@
+.\"-
+.\" Copyright (c) 2013 SRI International
+.\" All rights reserved.
+.\"
+.\" This software was developed by SRI International and the University of
+.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+.\" ("CTSRD"), as part of the DARPA CRASH research programme.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 18, 2013
+.Dt ALTERA_ATSE 4
+.Os
+.Sh NAME
+.Nm atse
+.Nd driver for the Altera Triple-Speed Ethernet MegaCore
+.Sh SYNOPSIS
+.Cd "device atse"
+.Cd "options ATSE_CFI_HACK"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.atse.0.at="nexus0"
+.Cd hint.atse.0.maddr=0x7f007000
+.Cd hint.atse.0.msize=0x540
+.Cd hint.atse.0.rc_irq=1
+.Cd hint.atse.0.rx_maddr=0x7f007500
+.Cd hint.atse.0.rx_msize=0x8
+.Cd hint.atse.0.rxc_maddr=0x7f007520
+.Cd hint.atse.0.rxc_msize=0x20
+.Cd hint.atse.0.tx_irq=2
+.Cd hint.atse.0.tx_maddr=0x7f007400
+.Cd hint.atse.0.tx_msize=0x8
+.Cd hint.atse.0.txc_maddr=0x7f007420
+.Cd hint.atse.0.txc_msize=0x20
+.Cd hint.e1000phy.0.at="miibus0"
+.Cd hint.e1000phy.0.phyno=0
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for the Altera Triple-Speed Ethernet
+MegaCore.
+.Sh HARDWARE
+The current version of the
+.Nm
+driver supports the Ethernet MegaCore as described in version 11.1 of
+Altera's documentation when the device is configured with internal FIFOs.
+.Sh SEE ALSO
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ifconfig 8
+.Rs
+.%T Triple-Speed Ethernet MegaCore Function User Guide
+.%D November 2011
+.%I Altera Corporation
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+The
+.Nm
+device driver and this manual page were
+developed by SRI International and the University of Cambridge Computer
+Laboratory under DARPA/AFRL contract
+.Pq FA8750-10-C-0237
+.Pq Do CTSRD Dc ,
+as part of the DARPA CRASH research programme.
+This device driver was written by
+.An Bjoern A. Zeeb .
+.Sh BUGS
+The
+.Nm
+driver only supports a single configuration of the MegaCore as installed
+on the Terasic Technologies Altera DE4 Development and Education Board.
+.Pp
+Only gigabit Ethernet speeds are currently supported.
diff --git a/share/man/man4/altera_avgen.4 b/share/man/man4/altera_avgen.4
new file mode 100644
index 0000000..2ba9360
--- /dev/null
+++ b/share/man/man4/altera_avgen.4
@@ -0,0 +1,155 @@
+.\"-
+.\" Copyright (c) 2012 Robert N. M. Watson
+.\" All rights reserved.
+.\"
+.\" This software was developed by SRI International and the University of
+.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+.\" ("CTSRD"), as part of the DARPA CRASH research programme.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 18, 2012
+.Dt ALTERA_AVGEN 4
+.Os
+.Sh NAME
+.Nm altera_avgen
+.Nd driver for generic Altera Avalon-bus-attached, memory-mapped devices
+.Sh SYNOPSIS
+.Cd "device altera_avgen"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.altera_avgen.0.at="nexus0"
+.Cd hint.altera_avgen.0.maddr=0x7f00a000
+.Cd hint.altera_avgen.0.msize=20
+.Cd hint.altera_avgen.0.width=4
+.Cd hint.altera_avgen.0.fileio="rw"
+.Cd hint.altera_avgen.0.devname="berirom"
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides generic support for memory-mapped devices on the
+Altera Avalon bus.
+.Pa device.hints
+entries configure the address, size, I/O disposition, and
+.Pa /dev
+device node name that will be used.
+The
+.Xr open 2 ,
+.Xr read 2 ,
+.Xr write 2 ,
+and
+.Xr mmap 2
+system calls (and variations) may be used on
+.Nm
+device nodes, subject to constraints imposed using
+.Pa device.hints
+entries.
+Although reading and writing mapped memory is supported,
+.Nm
+does not currently support directing device interrupts to userspace.
+.Pp
+A number of
+.Pa device.hints
+sub-fields are available to configure
+.Nm
+device instances:
+.Bl -tag -width devunit
+.It maddr
+base physical address of the memory region to export; must be aligned to
+.Li width
+.It msize
+length of the memory region export; must be aligned to
+.Li width
+.It width
+Granularity at which
+.Xr read 2
+and
+.Xr write 2
+operations will be performed.
+Larger requests will be broken down into
+.Li width -sized
+operations; smaller requests will be rejected.
+I/O operations must be aligned to
+.Li width .
+.It fileio
+allowed file descriptor operations;
+.Li r
+authorizes
+.Xr read 2 ;
+.Li w
+authorizes
+.Xr write 2 .
+.It mmapio
+allowed
+.Xr mmap 2
+permissions;
+.Li w
+authorizes
+.Dv PROT_WRITE ;
+.Li r
+authorizes
+.Dv PROT_READ ;
+.Li x
+authorizes
+.Dv PROT_EXEC .
+.It devname
+specifies a device name relative to
+.Pa /dev .
+.It devunit
+specifies a device unit number; no unit number is used if this is unspecified.
+.El
+.Sh SEE ALSO
+.Xr mmap 2 ,
+.Xr open 2 ,
+.Xr read 2 ,
+.Xr write 2
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+The
+.Nm
+device driver and this manual page were
+developed by SRI International and the University of Cambridge Computer
+Laboratory under DARPA/AFRL contract
+.Pq FA8750-10-C-0237
+.Pq Do CTSRD Dc ,
+as part of the DARPA CRASH research programme.
+This device driver was written by
+.An Robert N. M. Watson .
+.Sh BUGS
+.Nm
+is intended to support the writing of userspace device drivers; however, it
+does not permit directing interrupts to userspace, only memory-mapped I/O.
+.Pp
+.Nm
+supports only a
+.Li nexus
+bus attachment, which is appropriate for system-on-chip busses such as
+Altera's Avalon bus.
+If the target device is off of another bus type, then additional bus
+attachments will be required.
diff --git a/share/man/man4/altera_jtag_uart.4 b/share/man/man4/altera_jtag_uart.4
new file mode 100644
index 0000000..5b5a25f
--- /dev/null
+++ b/share/man/man4/altera_jtag_uart.4
@@ -0,0 +1,121 @@
+.\"-
+.\" Copyright (c) 2012 Robert N. M. Watson
+.\" All rights reserved.
+.\"
+.\" This software was developed by SRI International and the University of
+.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+.\" ("CTSRD"), as part of the DARPA CRASH research programme.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 18, 2012
+.Dt ALTERA_JTAG_UART 4
+.Os
+.Sh NAME
+.Nm altera_jtag_uart
+.Nd driver for the Altera JTAG UART Core
+.Sh SYNOPSIS
+.Cd "device altera_jtag_uart"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.altera_jtag_uart.0.at="nexus0"
+.Cd hint.altera_jtag_uart.0.maddr=0x7f000000
+.Cd hint.altera_jtag_uart.0.msize=0x40
+.Cd hint.altera_jtag_uart.0.irq=0
+.Cd hint.altera_jtag_uart.1.at="nexus0"
+.Cd hint.altera_jtag_uart.1.maddr=0x7f001000
+.Cd hint.altera_jtag_uart.1.msize=0x40
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for the Altera JTAG UART core, which allows
+multiple UART-like streams to be carried over JTAG.
+.Nm
+allows JTAG UART streams to be attached to both the low-level console
+interface, used for direct kernel input and output, and the
+.Xr tty 4
+layer, to be used with
+.Xr ttys 5
+and
+.Xr login 1 .
+Sequential Altera JTAG UART devices will appear as
+.Li ttyu0 ,
+.Li ttyu1 ,
+etc.
+.Sh HARDWARE
+Altera JTAG UART devices can be connected to using Altera's
+.Pa nios2-terminal
+program, with the instance selected using the
+.Li --instance
+argument on the management host.
+.Nm
+supports JTAG UART cores with or without interrupt lines connected; if the
+.Li irq
+portion of the
+.Pa device.hints
+entry is omitted, the driver will poll rather than configure interrupts.
+.Sh SEE ALSO
+.Xr login 1 ,
+.Xr tty 4 ,
+.Xr ttys 5
+.Rs
+.%T Altera Embedded Peripherals IP User Guide
+.%D June 2011
+.%I Altera Corporation
+.%U http://www.altera.com/literature/ug/ug_embedded_ip.pdf
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+The
+.Nm
+device driver and this manual page were
+developed by SRI International and the University of Cambridge Computer
+Laboratory under DARPA/AFRL contract
+.Pq FA8750-10-C-0237
+.Pq Do CTSRD Dc ,
+as part of the DARPA CRASH research programme.
+This device driver was written by
+.An Robert N. M. Watson .
+.Sh BUGS
+.Nm
+must dynamically poll to detect when JTAG is present, in order to disable flow
+control in the event that there is no receiving endpoint.
+Otherwise, the boot may hang waiting for the JTAG client to be attached, and
+user processes attached to JTAG UART devices might block indefinitely.
+However, there is no way to flush the output buffer once JTAG is detected to
+have disappeared; this means that a small amount of stale output data will
+remain in the output buffer, being displayed by
+.Li nios2-terminal
+when it is connected.
+Loss of JTAG will not generate a hang-up event, as that is rarely the desired
+behaviour.
+.Pp
+.Li nios2-terminal
+does not place the client-side TTY in raw mode, and so by default will not
+pass all control characters through to the UART.
diff --git a/share/man/man4/altera_sdcard.4 b/share/man/man4/altera_sdcard.4
new file mode 100644
index 0000000..4155dcb
--- /dev/null
+++ b/share/man/man4/altera_sdcard.4
@@ -0,0 +1,118 @@
+.\"-
+.\" Copyright (c) 2012 Robert N. M. Watson
+.\" All rights reserved.
+.\"
+.\" This software was developed by SRI International and the University of
+.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+.\" ("CTSRD"), as part of the DARPA CRASH research programme.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 18, 2012
+.Dt ALTERA_SDCARD 4
+.Os
+.Sh NAME
+.Nm altera_sdcard
+.Nd driver for the Altera University Program Secure Data Card IP Core
+.Sh SYNOPSIS
+.Cd "device altera_sdcard"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.altera_sdcardc.0.at="nexus0"
+.Cd hint.altera_sdcardc.0.maddr=0x7f008000
+.Cd hint.altera_sdcardc.0.msize=0x400
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for the Altera University Program Secure Data
+Card (SD Card) IP Core device.
+A controller device,
+.Li altera_sdcardcX ,
+will be attached during boot.
+Inserted disks are presented as
+.Xr disk 9
+devices,
+.Li altera_sdcardX ,
+corresponding to the controller number.
+.Sh HARDWARE
+The current version of the
+.Nm
+driver supports the SD Card IP core as described in the August 2011 version of
+Altera's documentation.
+The core supports only cards up to 2G (CSD 0); larger cards, or cards using
+newer CSD versions, will not be detected.
+The IP core has two key limitations: a lack of interrupt support, requiring
+timer-driven polling to detect I/O completion, and support for only single
+512-byte block read and write operations at a time.
+The combined effect of those two limits is that the system clock rate,
+.Dv HZ ,
+must be set to at least 200 in order to accomplish the maximum 100KB/s data
+rate supported by the IP core.
+.Sh SEE ALSO
+.Xr disk 9
+.Rs
+.%T Altera University Program Secure Data Card IP Core
+.%D August 2011
+.%I Altera Corporation - University Program
+.%U ftp://ftp.altera.com/up/pub/Altera_Material/11.0/University_Program_IP_Cores/Memory/SD_Card_Interface_for_SoPC_Builder.pdf
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+The
+.Nm
+device driver and this manual page were
+developed by SRI International and the University of Cambridge Computer
+Laboratory under DARPA/AFRL contract
+.Pq FA8750-10-C-0237
+.Pq Do CTSRD Dc ,
+as part of the DARPA CRASH research programme.
+This device driver was written by
+.An Robert N. M. Watson .
+.Sh BUGS
+.Nm
+contains a number of work-arounds for IP core bugs.
+Perhaps most critically,
+.Nm
+ignores the CRC error bit returned in the RR1 register, which appears to be
+unexpectedly set by the IP core.
+.Pp
+.Nm
+uses fixed polling intervals are used for card insertion/removal and
+I/O completion detection; an adaptive strategy might improve performance by
+reducing the latency to detecting completed I/O.
+However, in our experiments, using polling rates greater than 200 times a
+second did not improve performance.
+.Pp
+.Nm
+supports only a
+.Li nexus
+bus attachment, which is appropriate for system-on-chip busses such as
+Altera's Avalon bus.
+If the IP core is configured off of another bus type, then additional bus
+attachments will be required.
diff --git a/share/man/man4/altq.4 b/share/man/man4/altq.4
new file mode 100644
index 0000000..718b593
--- /dev/null
+++ b/share/man/man4/altq.4
@@ -0,0 +1,193 @@
+.\"
+.\" Copyright (c) 2004 Max Laier <mlaier@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 9, 2011
+.Dt ALTQ 4
+.Os
+.Sh NAME
+.Nm ALTQ
+.Nd "alternate queuing of network packets"
+.Sh SYNOPSIS
+.Cd options ALTQ
+.Pp
+.Cd options ALTQ_CBQ
+.Cd options ALTQ_RED
+.Cd options ALTQ_RIO
+.Cd options ALTQ_HFSC
+.Cd options ALTQ_CDNR
+.Cd options ALTQ_PRIQ
+.Sh DESCRIPTION
+The
+.Nm
+framework provides several disciplines for queuing outgoing network packets.
+This is done by modifications to the interface packet queues.
+See
+.Xr altq 9
+for details.
+.Pp
+The user interface for
+.Nm
+is implemented by the
+.Xr pfctl 8
+utility, so please refer to the
+.Xr pfctl 8
+and the
+.Xr pf.conf 5
+manpages for a complete description of the
+.Nm
+capabilities and how to use it.
+.Ss Kernel Options
+The following options in the kernel configuration file are related to
+.Nm
+operation:
+.Pp
+.Bl -tag -width ".Dv ALTQ_DEBUG" -compact
+.It Dv ALTQ
+Enable
+.Nm .
+.It Dv ALTQ_CBQ
+Build the
+.Dq "Class Based Queuing"
+discipline.
+.It Dv ALTQ_RED
+Build the
+.Dq "Random Early Detection"
+extension.
+.It Dv ALTQ_RIO
+Build
+.Dq "Random Early Drop"
+for input and output.
+.It Dv ALTQ_HFSC
+Build the
+.Dq "Hierarchical Packet Scheduler"
+discipline.
+.It Dv ALTQ_CDNR
+Build the traffic conditioner.
+This option is meaningless at the moment as the conditioner is not used by
+any of the available disciplines or consumers.
+.It Dv ALTQ_PRIQ
+Build the
+.Dq "Priority Queuing"
+discipline.
+.It Dv ALTQ_NOPCC
+Required if the TSC is unusable.
+.It Dv ALTQ_DEBUG
+Enable additional debugging facilities.
+.El
+.Pp
+Note that
+.Nm Ns -disciplines
+cannot be loaded as kernel modules.
+In order to use a certain discipline you have to build it into a custom
+kernel.
+The
+.Xr pf 4
+interface, that is required for the configuration process of
+.Nm
+can be loaded as a module.
+.Sh SUPPORTED DEVICES
+The driver modifications described in
+.Xr altq 9
+are required to use a certain network card with
+.Nm .
+They have been applied to the following hardware drivers:
+.Xr ae 4 ,
+.Xr age 4 ,
+.Xr alc 4 ,
+.Xr ale 4 ,
+.Xr an 4 ,
+.Xr ath 4 ,
+.Xr aue 4 ,
+.Xr axe 4 ,
+.Xr bce 4 ,
+.Xr bfe 4 ,
+.Xr bge 4 ,
+.Xr bxe 4 ,
+.Xr cas 4 ,
+.Xr cxgbe 4 ,
+.Xr dc 4 ,
+.Xr de 4 ,
+.Xr ed 4 ,
+.Xr em 4 ,
+.Xr ep 4 ,
+.Xr epair 4 ,
+.Xr et 4 ,
+.Xr fxp 4 ,
+.Xr gem 4 ,
+.Xr hme 4 ,
+.Xr igb 4 ,
+.Xr ipw 4 ,
+.Xr iwi 4 ,
+.Xr ixgbe 4 ,
+.Xr jme 4 ,
+.Xr le 4 ,
+.Xr msk 4 ,
+.Xr mxge 4 ,
+.Xr my 4 ,
+.Xr nfe 4 ,
+.Xr nge 4 ,
+.Xr npe 4 ,
+.Xr qlxgb 4 ,
+.Xr ral 4 ,
+.Xr re 4 ,
+.Xr rl 4 ,
+.Xr rum 4 ,
+.Xr sf 4 ,
+.Xr sge 4 ,
+.Xr sis 4 ,
+.Xr sk 4 ,
+.Xr ste 4 ,
+.Xr stge 4 ,
+.Xr ti 4 ,
+.Xr txp 4 ,
+.Xr udav 4 ,
+.Xr ural 4 ,
+.Xr vge 4 ,
+.Xr vr 4 ,
+.Xr vte 4 ,
+.Xr wi 4 ,
+and
+.Xr xl 4 .
+.Pp
+The
+.Xr ndis 4
+framework also has support for
+.Nm
+and thus all encapsulated drivers.
+.Pp
+The
+.Xr tun 4
+and
+.Xr ng_iface 4
+pseudo drivers also do support
+.Nm .
+.Sh SEE ALSO
+.Xr pf 4 ,
+.Xr pf.conf 5 ,
+.Xr ipfw 8 ,
+.Xr pfctl 8 ,
+.Xr altq 9
diff --git a/share/man/man4/amdpm.4 b/share/man/man4/amdpm.4
new file mode 100644
index 0000000..f791a28
--- /dev/null
+++ b/share/man/man4/amdpm.4
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2001 Murray Stokely
+.\" Copyright (c) 1999 Takanori Watanabe
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 31, 2005
+.Dt AMDPM 4
+.Os
+.Sh NAME
+.Nm amdpm
+.Nd AMD 756/766/768/8111 Power Management controller driver
+.Sh SYNOPSIS
+.Cd device smbus
+.Cd device smb
+.Cd device amdpm
+.Sh DESCRIPTION
+This driver provides access to
+.Tn AMD 756/766/768/8111 Power management controllers .
+Currently, only the SMBus 1.0 controller function is implemented.
+The SMBus 2.0 functionality of the AMD 8111 controller is supported via the
+.Xr amdsmb 4
+driver.
+.Pp
+The embedded SMBus controller of the AMD 756 chipset may give you access
+to the monitoring facilities of your mainboard.
+See
+.Xr smb 4
+for writing user code to fetch voltages, temperature and so on from the
+monitoring chip of your mainboard.
+.Sh SEE ALSO
+.Xr amdsmb 4 ,
+.Xr smb 4 ,
+.Xr smbus 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.5 .
+.Sh AUTHORS
+.An -nosplit
+This driver was written by
+.An "Matthew C. Forman" .
+Based heavily on the
+.Nm alpm
+driver by
+.An Nicolas Souchu .
+This manual page was written by
+.An Murray Stokely Aq murray@FreeBSD.org .
+.Sh BUGS
+Only polling mode is supported.
diff --git a/share/man/man4/amdsbwd.4 b/share/man/man4/amdsbwd.4
new file mode 100644
index 0000000..cfb2f79
--- /dev/null
+++ b/share/man/man4/amdsbwd.4
@@ -0,0 +1,74 @@
+.\"-
+.\" Copyright (c) 2009 Andriy Gapon
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 7, 2011
+.Dt AMDSBWD 4
+.Os
+.Sh NAME
+.Nm amdsbwd
+.Nd device driver for the AMD SB600/SB7xx/SB8xx watchdog timers
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device amdsbwd"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+amdsbwd_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides
+.Xr watchdog 4
+support for the watchdog timers present on
+AMD SB600, SB7xx and SB8xx southbridges.
+.Sh SEE ALSO
+.Xr watchdog 4 ,
+.Xr watchdog 8 ,
+.Xr watchdogd 8 ,
+.Xr watchdog 9
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 7.3
+and
+.Fx 8.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Andriy Gapon Aq avg@FreeBSD.org .
+This manual page was written by
+.An Andriy Gapon Aq avg@FreeBSD.org .
diff --git a/share/man/man4/amdsmb.4 b/share/man/man4/amdsmb.4
new file mode 100644
index 0000000..c038584
--- /dev/null
+++ b/share/man/man4/amdsmb.4
@@ -0,0 +1,54 @@
+.\" Copyright (c) 2005 Christian Brueffer
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 31, 2005
+.Dt AMDSMB 4
+.Os
+.Sh NAME
+.Nm amdsmb
+.Nd "AMD-8111 SMBus 2.0 controller driver"
+.Sh SYNOPSIS
+.Cd "device smbus"
+.Cd "device smb"
+.Cd "device amdsmb"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides access to the AMD-8111 SMBus 2.0 controller.
+.Sh SEE ALSO
+.Xr smb 4 ,
+.Xr smbus 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.2 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Ruslan Ermilov Aq ru@FreeBSD.org .
diff --git a/share/man/man4/amdtemp.4 b/share/man/man4/amdtemp.4
new file mode 100644
index 0000000..52444f5
--- /dev/null
+++ b/share/man/man4/amdtemp.4
@@ -0,0 +1,111 @@
+.\"-
+.\" Copyright (c) 2008 Rui Paulo
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 23, 2012
+.Dt AMDTEMP 4
+.Os
+.Sh NAME
+.Nm amdtemp
+.Nd device driver for
+.Tn AMD
+processor on-die digital thermal sensor
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device amdtemp"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+amdtemp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the on-die digital thermal sensor present
+in
+.Tn AMD
+Family 0Fh, 10h, 11h, 12h, 14h, and 15h processors.
+.Pp
+For Family 0Fh processors, the
+.Nm
+driver reports each core's temperature through sysctl nodes, named
+.Va dev.amdtemp.%d.core{0,1}.sensor{0,1} .
+The driver also creates
+.Va dev.cpu.%d.temperature
+in the corresponding CPU device's sysctl tree, displaying the maximum
+temperature of the two sensors located in each CPU core.
+.Pp
+For Family 10h, 11h, 12h, 14h, and 15h processors, the driver reports each
+package's temperature through a sysctl node, named
+.Va dev.amdtemp.%d.core0.sensor0 .
+The driver also creates
+.Va dev.cpu.%d.temperature
+in the corresponding CPU device's sysctl tree, displaying the temperature
+of the shared sensor located in each CPU package.
+.Sh SYSCTL VARIABLES
+The following variable is available as both
+.Xr sysctl 8
+variable and
+.Xr loader 8
+tunable:
+.Bl -tag -width indent
+.It Va dev.amdtemp.%d.sensor_offset
+.El
+Add the given offset to the temperature of the sensor.
+Default is 0.
+.Sh SEE ALSO
+.Xr loader 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 7.1 .
+.Sh AUTHORS
+.An Rui Paulo Aq rpaulo@FreeBSD.org
+.An Norikatsu Shigemura Aq nork@FreeBSD.org
+.An Jung-uk Kim Aq jkim@FreeBSD.org
+.Sh CAVEATS
+For Family 10h and later processors,
+.Do
+(the reported temperature) is a non-physical temperature measured on
+an arbitrary scale and it does not represent an actual physical
+temperature like die or case temperature.
+Instead, it specifies the processor temperature relative to the point
+at which the system must supply the maximum cooling for the processor's
+specified maximum case temperature and maximum thermal power dissipation
+.Dc
+according to
+.Rs
+.%T BIOS and Kernel Developer's Guide (BKDG) for AMD Processors
+.%U http://developer.amd.com/documentation/guides/Pages/default.aspx
+.Re
diff --git a/share/man/man4/amr.4 b/share/man/man4/amr.4
new file mode 100644
index 0000000..ad94ffe
--- /dev/null
+++ b/share/man/man4/amr.4
@@ -0,0 +1,241 @@
+.\"
+.\" Copyright (c) 2000 Jeroen Ruigrok van der Werven
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 29, 2006
+.Dt AMR 4
+.Os
+.Sh NAME
+.Nm amr
+.Nd MegaRAID SCSI/ATA/SATA RAID driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device scbus"
+.Cd "device amr"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+amr_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for LSI Logic MegaRAID SCSI, ATA and SATA
+RAID controllers and legacy American Megatrends MegaRAID
+SCSI RAID controllers, including models relabeled
+and sold by Dell and Hewlett-Packard.
+.Pp
+LSI MegaRAID SAS controllers are supported by
+.Xr mfi 4
+and will not work with this driver.
+.Sh HARDWARE
+Controllers supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+MegaRAID SATA 150-4
+.It
+MegaRAID SATA 150-6
+.It
+MegaRAID SATA 300-4X
+.It
+MegaRAID SATA 300-8X
+.It
+MegaRAID SCSI 320-1E
+.It
+MegaRAID SCSI 320-2E
+.It
+MegaRAID SCSI 320-4E
+.It
+MegaRAID SCSI 320-0X
+.It
+MegaRAID SCSI 320-2X
+.It
+MegaRAID SCSI 320-4X
+.It
+MegaRAID SCSI 320-0
+.It
+MegaRAID SCSI 320-1
+.It
+MegaRAID SCSI 320-2
+.It
+MegaRAID SCSI 320-4
+.It
+MegaRAID Series 418
+.It
+MegaRAID i4 133 RAID
+.It
+MegaRAID Elite 1500 (Series 467)
+.It
+MegaRAID Elite 1600 (Series 493)
+.It
+MegaRAID Elite 1650 (Series 4xx)
+.It
+MegaRAID Enterprise 1200 (Series 428)
+.It
+MegaRAID Enterprise 1300 (Series 434)
+.It
+MegaRAID Enterprise 1400 (Series 438)
+.It
+MegaRAID Enterprise 1500 (Series 467)
+.It
+MegaRAID Enterprise 1600 (Series 471)
+.It
+MegaRAID Express 100 (Series 466WS)
+.It
+MegaRAID Express 200 (Series 466)
+.It
+MegaRAID Express 300 (Series 490)
+.It
+MegaRAID Express 500 (Series 475)
+.It
+Dell PERC
+.It
+Dell PERC 2/SC
+.It
+Dell PERC 2/DC
+.It
+Dell PERC 3/DCL
+.It
+Dell PERC 3/QC
+.It
+Dell PERC 4/DC
+.It
+Dell PERC 4/IM
+.It
+Dell PERC 4/SC
+.It
+Dell PERC 4/Di
+.It
+Dell PERC 4e/DC
+.It
+Dell PERC 4e/Di
+.It
+Dell PERC 4e/Si
+.It
+Dell PERC 4ei
+.It
+HP NetRAID-1/Si
+.It
+HP NetRAID-3/Si (D4943A)
+.It
+HP Embedded NetRAID
+.It
+Intel RAID Controller SRCS16
+.It
+Intel RAID Controller SRCU42X
+.El
+.Sh DIAGNOSTICS
+.Ss Driver initialisation/shutdown phase
+.Bl -diag
+.It amr%d: memory window not available
+.It amr%d: I/O window not available
+.Pp
+The PCI BIOS did not allocate resources necessary for the correct operation of
+the controller.
+The driver cannot attach to this controller.
+.It amr%d: busmaster bit not set, enabling
+.Pp
+The PCI BIOS did not enable busmaster DMA,
+which is required for the correct operation of the controller.
+The driver has enabled this bit and initialisation will proceed.
+.It amr%d: can't allocate register window
+.It amr%d: can't allocate interrupt
+.It amr%d: can't set up interrupt
+.It amr%d: can't allocate parent DMA tag
+.It amr%d: can't allocate buffer DMA tag
+.It amr%d: can't allocate scatter/gather DMA tag
+.It amr%d: can't allocate s/g table
+.It amr%d: can't allocate mailbox tag
+.It amr%d: can't allocate mailbox memory
+.Pp
+A resource allocation error occurred while initialising the driver;
+initialisation has failed and the driver will not attach to this controller.
+.It amr%d: can't obtain configuration data from controller
+.It amr%d: can't obtain product data from controller
+.Pp
+The driver was unable to obtain vital configuration data from the controller.
+Initialisation has failed and the driver will not attach to this controller.
+.It amr%d: can't establish configuration hook
+.It amr%d: can't scan controller for drives
+.Pp
+The scan for logical drives managed by the controller failed.
+No drives will be attached.
+.It amr%d: device_add_child failed
+.It amr%d: bus_generic_attach returned %d
+.Pp
+Creation of the logical drive instances failed;
+attachment of one or more logical drives may have been aborted.
+.It amr%d: flushing cache...
+.Pp
+The controller cache is being flushed prior to shutdown or detach.
+.El
+.Ss Operational diagnostics
+.Bl -diag
+.It amr%d: I/O beyond end of unit (%u,%d > %u)
+.Pp
+A partitioning error or disk corruption has caused an I/O request
+beyond the end of the logical drive.
+This may also occur if FlexRAID Virtual Sizing is enabled and
+an I/O operation is attempted on a portion of the virtual drive
+beyond the actual capacity available.
+.It amr%d: polled command timeout
+.Pp
+An initialisation command timed out.
+The initialisation process may fail as a result.
+.It amr%d: bad slot %d completed
+.Pp
+The controller reported completion of a command that the driver did not issue.
+This may result in data corruption,
+and suggests a hardware or firmware problem with the system or controller.
+.It amr%d: I/O error - %x
+.Pp
+An I/O error has occurred.
+.El
+.Sh SEE ALSO
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr mfi 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Mike Smith Aq msmith@FreeBSD.org .
+.Pp
+This manual page was written by
+.An Mike Smith Aq msmith@FreeBSD.org
+and
+.An Jeroen Ruigrok van der Werven Aq asmodai@FreeBSD.org .
diff --git a/share/man/man4/an.4 b/share/man/man4/an.4
new file mode 100644
index 0000000..608a4ed
--- /dev/null
+++ b/share/man/man4/an.4
@@ -0,0 +1,144 @@
+.\" Copyright (c) 1997, 1998, 1999
+.\" Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt AN 4
+.Os
+.Sh NAME
+.Nm an
+.Nd "Aironet Communications 4500/4800 wireless network adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device an"
+.Cd "device wlan"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_an_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Aironet Communications 4500 and 4800
+wireless network adapters and variants, including the following:
+.Pp
+.Bl -bullet -compact -offset indent
+.It
+Aironet Communications 4500 and 4800 series
+.It
+Cisco Aironet 340 and 350 series
+.It
+Xircom Wireless Ethernet Adapter
+.El
+.Pp
+Support for these devices include the ISA, PCI and PCMCIA
+varieties.
+The Aironet 4500 series adapters operate at 1 and 2Mbps while
+the Aironet 4800 series and Cisco adapters can operate at 1, 2, 5.5 and 11Mbps.
+The ISA, PCI
+and PCMCIA devices are all based on the same core PCMCIA modules
+and all have the same programming interface, however unlike the
+Lucent WaveLAN/IEEE cards, the ISA and PCI cards appear to the
+host as normal ISA and PCI devices and do not require any PCCARD
+support.
+.Pp
+The PCMCIA Aironet cards require PC Card support, including the
+kernel
+.Xr pccard 4
+driver.
+ISA cards can either be configured to use ISA Plug and Play
+or to use a particular I/O address and IRQ
+by properly setting the DIP switches on the board.
+(The default
+switch setting is for Plug and Play.)
+The
+.Nm
+driver has Plug and Play support and will work in either configuration,
+however when using a hard-wired I/O address and IRQ, the driver
+configuration and the NIC's switch settings must agree.
+PCI cards
+require no switch settings of any kind and will be automatically
+probed and attached.
+.Pp
+All host/device interaction with the Aironet cards is via programmed I/O.
+The Aironet devices support 802.11 and 802.3 frames, power management,
+BSS (infrastructure) and IBSS (ad-hoc) operation modes.
+The
+.Nm
+driver encapsulates all IP and ARP traffic as 802.11 frames, however
+it can receive either 802.11 or 802.3 frames.
+Transmit speed is
+selectable between 1Mbps, 2Mbps, 5.5Mbps, 11Mbps or
+"auto" (the NIC automatically chooses the best speed).
+.Pp
+By default, the
+.Nm
+driver configures the Aironet card for infrastructure operation.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "an%d: init failed"
+The Aironet card failed to become ready after an initialization command was
+issued.
+.It "an%d: failed to allocate %d bytes on NIC"
+The driver was unable to allocate memory for transmit frames in the
+NIC's on-board RAM.
+.It "an%d: device timeout"
+The Aironet card failed to generate an interrupt to acknowledge a transmit
+command.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr wlan 4 ,
+.Xr ancontrol 8 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ee.columbia.edu .
diff --git a/share/man/man4/aout.4 b/share/man/man4/aout.4
new file mode 100644
index 0000000..e44362e
--- /dev/null
+++ b/share/man/man4/aout.4
@@ -0,0 +1,146 @@
+.\" Copyright (c) 2012 Konstantin Belousov <kib@FreeBSD.org>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 14, 2012
+.Dt AOUT 4
+.Os
+.Sh NAME
+.Nm aout
+.Nd kernel support for executing binary files in legacy a.out format
+.Sh SYNOPSIS
+.Bd -literal -offset indent
+kldload a.out
+.Ed
+.Sh DESCRIPTION
+The
+.Xr a.out 5
+executable format was used before the release of
+.Fx 3.0 .
+Since i386 was the only supported architecture at that time,
+.Xr a.out 5
+executables can only be activated on platforms that support
+execution of i386 code, such as i386, amd64 and (partially) ia64.
+.Pp
+To add kernel support for old syscalls and old syscall invocation methods,
+place the following options in the kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options COMPAT_43"
+.br
+.Cd "options COMPAT_FREEBSD32"
+.Ed
+.Pp
+The
+.Va COMPAT_FREEBSD32
+option is only required on 64-bit CPU architectures.
+.Pp
+The
+.Va aout.ko
+module needs to be loaded with the
+.Xr kldload 8
+utility in order to support the
+.Xr a.out 5
+image activator:
+.Bd -ragged -offset indent
+.Ic kldload aout
+.Ed
+.Pp
+Alternatively, to load the module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+aout_load="YES"
+.Ed
+.Pp
+The
+.Xr a.out 5
+format was mainstream quite a long time ago.
+Reasonable default settings and security requirements of
+modern operating systems today contradict the default environment of that time
+and require adjustments of the system to mimic natural environment for
+old binaries.
+.Pp
+The following
+.Xr sysctl 8
+tunables are useful for this:
+.Bl -tag -offset indent -width "XXXXXXXXXXXXXXXXXXXXXXXXX"
+.It Xo Va security.bsd.map_at_zero
+.Xc
+Set to 1 to allow mapping of process pages at address 0.
+Some very old
+.Va ZMAGIC
+executable images require text mapping at address 0.
+.It Xo Va kern.pid_max
+.Xc
+Old versions of
+.Fx
+used signed 16-bit type for
+.Vt pid_t .
+Current kernels use 32-bit type for
+.Vt pid_t ,
+and allow process id's up to 99999.
+Such values cannot be represented by old
+.Vt pid_t ,
+mostly causing issues for processes using
+.Xr wait 2
+syscalls, for example shells.
+Set the sysctl to 30000 to work around the problem.
+.It Xo Va kern.elf32.read_exec
+.Xc
+Set to 1 to force any accessible memory mapping performed by 32-bit
+process to allow execution, see
+.Xr mmap 2 .
+Old i386 CPUs did not have a bit in PTE which disallowed execution
+from the page, so many old programs did not specify
+.Va PROT_EXEC
+even for mapping of executable code.
+The sysctl forces
+.Va PROT_EXEC
+if mapping has any access allowed at all.
+The setting is only needed if the host architecture allows
+non-executable mappings.
+.El
+.Sh SEE ALSO
+.Xr execve 2 ,
+.Xr a.out 5 ,
+.Xr elf 5 ,
+.Xr sysctl 8 .
+.Sh HISTORY
+The
+.Xr a.out 5
+executable format was used on ancient
+.At
+and served as the main executable format for
+.Fx
+from the beginning up to
+.Fx 2.2.9 .
+In
+.Fx 3.0
+it was superseded by
+.Xr elf 5 .
+.Sh AUTHORS
+The
+.Nm
+manual page was written by
+.An Konstantin Belousov Aq kib@FreeBSD.org .
+.Sh BUGS
+On 64bit architectures, not all wrappers for older syscalls are implemented.
diff --git a/share/man/man4/apic.4 b/share/man/man4/apic.4
new file mode 100644
index 0000000..0856232
--- /dev/null
+++ b/share/man/man4/apic.4
@@ -0,0 +1,77 @@
+.\" Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 20, 2011
+.Dt APIC 4
+.Os
+.Sh NAME
+.Nm apic
+.Nd Advanced Programmable Interrupt Controller (APIC) driver
+.Sh SYNOPSIS
+This driver is a mandatory part of amd64 kernel.
+To compile this driver into i386 or pc98 kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device apic"
+.Ed
+.Pp
+The following tunable is settable from the
+.Xr loader 8 :
+.Bl -ohang
+.It Va hint.apic. Ns Ar X Ns Va .clock
+controls event timers functionality support. Setting to 0, disables it.
+Default value is 1.
+.It Va hint.apic. Ns Ar X Ns Va .disabled
+Set this to 1 to disable APIC support, falling back to the legacy PIC.
+.El
+.Sh DESCRIPTION
+There are two components in the Intel APIC system, the local APIC (LAPIC)
+and the I/O APIC.
+There is one local APIC in each CPU in the system.
+There is typically one I/O APIC for each peripheral bus in the system.
+.Pp
+Local APICs manage all external interrupts for a specific processor.
+In addition, they are able to accept and generate inter-processor interrupts
+(IPIs).
+.Pp
+I/O APICs contain a redirection table, which is used to route the interrupts
+they receive from peripheral buses to one or more local APICs.
+.Pp
+Each local APIC includes one 32-bit programmable timer.
+This driver uses them to supply kernel with one event timer named "LAPIC".
+Event timer provided by the driver supports both one-shot an periodic modes.
+Because of local APIC nature it is per-CPU.
+The timer frequency is not reported by the platform and so automatically
+measured by the driver on the first use.
+Depending on CPU model this timer may stop in C3 and deeper CPU sleep states.
+Driver automatically adjusts event timer priority and reports it to prevent
+entering dangerous sleep states when it is used.
+.Sh SEE ALSO
+.Xr atrtc 4 ,
+.Xr attimer 4 ,
+.Xr eventtimers 4 ,
+.Xr hpet 4
diff --git a/share/man/man4/arcmsr.4 b/share/man/man4/arcmsr.4
new file mode 100644
index 0000000..1d4d650
--- /dev/null
+++ b/share/man/man4/arcmsr.4
@@ -0,0 +1,170 @@
+.\" Copyright (c) 2005 Scott Long
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 18, 2013
+.Dt ARCMSR 4
+.Os
+.Sh NAME
+.Nm arcmsr
+.Nd Areca RAID Controller driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device scbus"
+.Cd "device da"
+.Cd "device arcmsr"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+arcmsr_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Areca ARC-11xx, ARC-12xx, ARC-13xx,
+ARC-16xx and ARC-18xx series of SAS and SATA RAID controllers.
+These controllers feature RAID-0, 1, 3, 5, 6, and 10 and
+JBOD acceleration for up to 16 SATA drives.
+RAID level and stripe level
+migration, online capacity expansion, hot insertion/removal, automatic failover
+and rebuild, and SMART are also supported.
+Access to the arrays is provided
+via the SCSI CAM
+.Pa /dev/da?
+device nodes.
+A management interface is also present via the
+.Pa /dev/arcmsr?
+device node.
+Management tools for i386 and amd64 are available from Areca.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following cards:
+.Pp
+.Bl -bullet -compact
+.It
+ARC-1110
+.It
+ARC-1120
+.It
+ARC-1130
+.It
+ARC-1160
+.It
+ARC-1170
+.It
+ARC-1110ML
+.It
+ARC-1120ML
+.It
+ARC-1130ML
+.It
+ARC-1160ML
+.It
+ARC-1200
+.It
+ARC-1201
+.It
+ARC-1210
+.It
+ARC-1212
+.It
+ARC-1213
+.It
+ARC-1214
+.It
+ARC-1220
+.It
+ARC-1222
+.It
+ARC-1223
+.It
+ARC-1224
+.It
+ARC-1230
+.It
+ARC-1231
+.It
+ARC-1260
+.It
+ARC-1261
+.It
+ARC-1270
+.It
+ARC-1280
+.It
+ARC-1210ML
+.It
+ARC-1220ML
+.It
+ARC-1231ML
+.It
+ARC-1261ML
+.It
+ARC-1280ML
+.It
+ARC-1380
+.It
+ARC-1381
+.It
+ARC-1680
+.It
+ARC-1681
+.It
+ARC-1880
+.It
+ARC-1882
+.It
+ARC-1883
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/arcmsr?" -compact
+.It Pa /dev/da?
+Array block device
+.It Pa /dev/arcmsr?
+Management interface
+.El
+.Sh SEE ALSO
+.Xr da 4 ,
+.Xr scbus 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.4 .
+.Sh AUTHORS
+The driver was written by
+.An Erich Chen Aq erich@areca.com.tw .
+.Sh BUGS
+The driver has been tested on i386 and amd64.
+It likely requires additional
+work to function on big-endian architectures.
diff --git a/share/man/man4/asmc.4 b/share/man/man4/asmc.4
new file mode 100644
index 0000000..6ad3744
--- /dev/null
+++ b/share/man/man4/asmc.4
@@ -0,0 +1,163 @@
+.\"-
+.\" Copyright (c) 2007, 2008, 2009 Rui Paulo <rpaulo@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 27, 2009
+.Dt ASMC 4
+.Os
+.Sh NAME
+.Nm asmc
+.Nd device driver for the Apple System Management Console (SMC)
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device asmc"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+asmc_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver controls the Apple System Management Console (SMC for short)
+found on Intel Apple systems.
+.Pp
+The SMC is known to be found on the following systems:
+.Pp
+.Bl -bullet -offset indent -compact
+.It
+MacBook
+.It
+MacBook Pro
+.It
+Intel MacMini
+.It
+Mac Pro
+.It
+MacBook Air
+.It
+Intel iMac
+.El
+.Pp
+With this driver, you can configure your keyboard backlight
+brightness, check temperatures of several sensors, check the speed of
+the internal fans and check the status of the Sudden Motion Sensor.
+.Pp
+Variables related to the SMC control and inspection are exported via
+.Xr sysctl 3
+under the device tree
+.Va dev.asmc .
+.Sh KEYBOARD BACKLIGHT
+On
+.Tn MacBook Pro
+systems, you can control the keyboard brightness by writing a value to
+the
+.Va dev.asmc.%d.light.control
+sysctl MIB.
+.Pp
+The following sysctl MIBs contains the raw value returned by the left
+and right light sensors:
+.Va dev.asmc.%d.light.left
+or
+.Va dev.asmc.%d.light.right .
+.Sh TEMPERATURES
+The number of temperature sensors and their description varies among
+systems.
+You can inspect the temperature sensors on your system by traversing
+the
+.Va dev.asmc.temp
+sysctl MIB.
+.Pp
+All values are in degrees celsius.
+.Sh SYSTEM FANS
+The
+.Va dev.asmc.fan.%d
+sysctl tree contains the leaf nodes
+.Va speed ,
+.Va safespeed ,
+.Va minspeed ,
+.Va maxspeed
+and
+.Va targetspeed .
+Each of these leaf nodes represent the current fan speed, the safest
+minimum fan speed, the minimum speed and the maximum speed
+respectively.
+.Pp
+All values are in RPM.
+.Sh SUDDEN MOTION SENSOR
+The Sudden Motion Sensor (SMS for short) is a device that detects
+laptop movement and notifies the operating system via an interrupt.
+The sysctl MIBs present under
+.Va dev.asmc.sms
+all relate to the SMS.
+.Pp
+The most interesting usage of this device is to park the disk heads
+when the laptop is moved harshly.
+First, you need to install
+.Xr ataidle 8 Pq Pa ports/sysutils/ataidle
+and then configure
+.Xr devd 8
+the following way:
+.Bd -literal -offset indent
+notify 0 {
+ match "system" "ACPI";
+ match "subsystem" "asmc";
+ action "/usr/local/sbin/ataidle -s X Y";
+};
+.Ed
+.Pp
+Do not forget to change the
+.Ar X
+and
+.Ar Y
+values in the command above.
+.Pp
+Also, please note that parking the disk heads too many times can
+dramatically reduce your hard drive's life span.
+Do not rely solely on
+the SMS to protect your hard drive: good care and common sense can
+increase your hard drive's life.
+.Sh SEE ALSO
+.Xr ataidle 8 Pq Pa ports/sysutils/ataidle ,
+.Xr devd 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+.An Rui Paulo Aq rpaulo@FreeBSD.org
+(Google Summer of Code project).
+.Sh BUGS
+Support for the latest models was never tested and is most likely not
+fully working.
diff --git a/share/man/man4/asr.4 b/share/man/man4/asr.4
new file mode 100644
index 0000000..955eb0f
--- /dev/null
+++ b/share/man/man4/asr.4
@@ -0,0 +1,115 @@
+.\" Copyright (c) 2003 David E. O'Brien
+.\" Copyright (c) 2000 Adaptec, Inc.
+.\" All rights reserved.
+.\"
+.\" Manpage cleanup by: Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 14, 2004
+.Dt ASR 4
+.Os
+.Sh NAME
+.Nm asr
+.Nd driver for Adaptec I2O based SCSI/ATA host bus adapters
+.Sh SYNOPSIS
+.Cd "device asr"
+.Sh DESCRIPTION
+The Adaptec
+.Nm
+driver provides access to disks
+and disk arrays controlled by I2O based host bus adapters and
+SmartRAID SCSI RAID adapters through the standard SCSI disk
+.Xr da 4
+interface.
+.Pp
+The supported adapters provide 64 bit PCI,
+Compact PCI, Zero Channel PCI,
+and up to four channels of Ultra2, Ultra 160, or Ultra320 SCSI,
+or two channels of 1GB Fibre.
+All support RAID-0, RAID-1, RAID-10, RAID-5 and RAID-50 arrays.
+All SCSI target types are supported.
+For the ATA based controllers, one IDE drive per channel is supported.
+Hot-swapping of IDE drives is not supported at this time.
+.Pp
+All host bus adapters must be configured
+before they can be used with any operating system.
+Please contact Adaptec directly to obtain the latest information
+on configuration utilities for the adapters.
+Currently there are both a Motif based GUI configuration utility
+and a CLI based configuration utility available from the Adaptec Web site.
+The cards and arrays can also be configured via the BIOS based configuration
+tool (SMOR).
+.Sh HARDWARE
+The adapters currently supported by the
+.Nm
+driver include the following:
+.Pp
+.Bl -bullet -compact
+.It
+Adaptec Zero-Channel SCSI RAID 2000S, 2005S, 2010S, 2015S
+.It
+Adaptec SCSI RAID 2100S, 2110S
+.It
+Adaptec ATA-100 RAID 2400A
+.It
+Adaptec SCSI RAID 3200S, 3210S
+.It
+Adaptec SCSI RAID 3400S, 3410S
+.It
+Adaptec SmartRAID PM1554
+.It
+Adaptec SmartRAID PM1564
+.It
+Adaptec SmartRAID PM2554
+.It
+Adaptec SmartRAID PM2564
+.It
+Adaptec SmartRAID PM2664
+.It
+Adaptec SmartRAID PM2754
+.It
+Adaptec SmartRAID PM2865
+.It
+Adaptec SmartRAID PM3754
+.It
+Adaptec SmartRAID PM3755U2B / SmartRAID V Millennium
+.It
+Adaptec SmartRAID PM3757
+.It
+DEC KZPCC-AC (LVD 1-ch, 4MB or 16MB cache),
+DEC KZPCC-CE (LVD 3-ch, 64MB cache),
+DEC KZPCC-XC (LVD 1-ch, 16MB cache),
+DEC KZPCC-XE (LVD 3-ch, 64MB cache) -- rebadged SmartRAID V Millennium
+.El
+.Sh FILES
+.Bl -tag -width "/dev/asr*" -compact
+.It Pa /dev/asr*
+Adaptec SCSI RAID control nodes
+.El
+.Sh NOTES
+The ATA based controllers present their devices as SCSI-like devices via CAM.
+For IDE drives attached to these cards, a subset of standard SCSI commands
+and mode pages are understood via translation performed in the card's firmware.
+.Sh SEE ALSO
+.Xr da 4
+.Sh HISTORY
+The
+.Nm
+(Adaptec SCSI RAID)
+driver first appeared as the dpti2o driver under BSDi
+.Bsx 3.2 ,
+then under
+.Fx 2.2.8
+and was ported over to the CAM layer represented in 4.0.
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was kindly donated by Adaptec
+and is maintained by
+.An Mark Salyzyn Aq mark_salyzyn@adaptec.com .
+This manual page was written by
+.An Mark Salyzyn
+and fixed up by
+.An Jeroen Ruigrok van der Werven Aq asmodai@FreeBSD.org .
diff --git a/share/man/man4/ata.4 b/share/man/man4/ata.4
new file mode 100644
index 0000000..a1cbad3
--- /dev/null
+++ b/share/man/man4/ata.4
@@ -0,0 +1,273 @@
+.\" Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 3, 2012
+.Dt ATA 4
+.Os
+.Sh NAME
+.Nm ata
+.Nd generic ATA/SATA controller driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device ata"
+.Ed
+.Pp
+Alternatively, to load the driver as set of modules at boot time,
+place some of the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ata_load="YES"
+
+atacard_load="YES"
+ataisa_load="YES"
+atapci_load="YES"
+
+ataacard_load="YES"
+ataacerlabs_load="YES"
+ataadaptec_load="YES"
+ataahci_load="YES"
+ataamd_load="YES"
+ataati_load="YES"
+atacenatek_load="YES"
+atacypress_load="YES"
+atacyrix_load="YES"
+atahighpoint_load="YES"
+ataintel_load="YES"
+ataite_load="YES"
+atajmicron_load="YES"
+atamarvell_load="YES"
+atamicron_load="YES"
+atanational_load="YES"
+atanetcell_load="YES"
+atanvidia_load="YES"
+atapromise_load="YES"
+ataserverworks_load="YES"
+atasiliconimage_load="YES"
+atasis_load="YES"
+atavia_load="YES"
+.Ed
+.Pp
+The first line is for the common hardware independent code, and is a
+prerequisite for the other modules.
+The next three lines are generic bus-specific drivers.
+Of the rest, ataahci is the AHCI driver.
+The others are vendor-specific PCI drivers.
+.Pp
+The following tunables are settable from the
+.Xr loader 8 :
+.Bl -ohang
+.It Va hw.ahci.force
+set to nonzero value for forcing drivers to attach to some known AHCI-capable
+chips even if they are configured for legacy IDE emulation (the default is 1,
+force the attach).
+.It Va hw.ata.ata_dma_check_80pin
+set to 0 to disable the 80pin cable check (the default is 1, check the cable).
+.It Va hint.atapci.X.msi
+set to 1 to allow Message Signalled Interrupts (MSI) to be used by the
+specified PCI ATA controller, if supported.
+.It Va hint.ata.X.devX.mode
+limits the initial ATA mode for the specified device on the specified channel.
+.It Va hint.ata.X.mode
+limits the initial ATA mode for every device on the specified channel.
+.It Va hint.ata.X.pm_level
+controls SATA interface Power Management for the specified channel,
+allowing some power savings at the cost of additional command latency.
+Possible values:
+.Pp
+.Bl -tag -width 4n -offset indent -compact
+.It 0
+Interface Power Management is disabled.
+This is the default value.
+.It 1
+The device is allowed to initiate a PM state change; the host is passive.
+.It 2
+The host initiates a PARTIAL PM state transition every time a port becomes idle.
+.It 3
+host initiates SLUMBER PM state transition every time port becomes idle.
+.El
+.Pp
+Modes 2 and 3 are only supported for AHCI.
+.It Va hint.ata. Ns Ar X Ns Va .dev Ns Ar X Ns Va .sata_rev
+limits the initial SATA revision (speed) for the specified device
+on the specified channel.
+Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps.
+.It Va hint.ata. Ns Ar X Ns Va .sata_rev
+Same, but for every device on the specified channel.
+.El
+.Sh DESCRIPTION
+The
+.Nm
+driver gives the
+.Xr CAM 4
+subsystem access to the ATA (IDE) and SATA ports
+of many generic controllers.
+Depending on the controller, each PATA (IDE)
+port or each one or two SATA ports are
+represented to CAM as a separate bus with one or two targets.
+Most of the bus-management details are handled by the ATA/SATA-specific
+transport of CAM.
+Connected ATA disks are handled by the ATA protocol disk peripheral driver
+.Xr ada 4 .
+ATAPI devices are handled by the SCSI protocol peripheral drivers
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4 ,
+etc.
+.Pp
+This driver supports ATA, and for the most of controllers, ATAPI devices.
+Command queuing and SATA port multipliers are not supported.
+Device hot-plug and SATA interface power management is supported only on
+some controllers.
+.Pp
+The
+.Nm
+driver can change the transfer mode when the system is up and running.
+See the
+.Cm negotiate
+subcommand of
+.Xr camcontrol 8 .
+.Pp
+The
+.Nm
+driver sets the maximum transfer mode supported by the hardware as default.
+However, the
+.Nm
+driver sometimes warns:
+.Dq Sy "DMA limited to UDMA33, non-ATA66 cable or device".
+This means that
+the
+.Nm
+driver has detected that the required 80 conductor cable is not present
+or could not be detected properly,
+or that one of the devices on the channel only accepts up
+to UDMA2/ATA33.
+The
+.Va hw.ata.ata_dma_check_80pin
+tunable can be set to 0 to disable this check.
+.Sh HARDWARE
+The currently supported ATA/SATA controller chips are:
+.Pp
+.Bl -tag -width "Silicon Image:" -compact
+.It Acard:
+ATP850P, ATP860A, ATP860R, ATP865A, ATP865R.
+.It ALI:
+M5228, M5229, M5281, M5283, M5287, M5288, M5289.
+.It AMD:
+AMD756, AMD766, AMD768, AMD8111, CS5536.
+.It ATI:
+IXP200, IXP300, IXP400, IXP600, IXP700, IXP800.
+.It CMD:
+CMD646, CMD646U2, CMD648, CMD649.
+.It Cypress:
+Cypress 82C693.
+.It Cyrix:
+Cyrix 5530.
+.It HighPoint:
+HPT302, HPT366, HPT368, HPT370, HPT371, HPT372, HPT372N, HPT374.
+.It Intel:
+6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5,
+ICH6, ICH7, ICH8, ICH9, ICH10, SCH, PCH.
+.It ITE:
+IT8211F, IT8212F, IT8213F.
+.It JMicron:
+JMB360, JMB361, JMB363, JMB365, JMB366, JMB368.
+.It Marvell
+88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SE6101,
+88SE6102, 88SE6111, 88SE6121, 88SE6141, 88SE6145, 88SX7042.
+.It National:
+SC1100.
+.It NetCell:
+NC3000, NC5000.
+.It nVidia:
+nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4,
+MCP51, MCP55, MCP61, MCP65, MCP67, MCP73, MCP77, MCP79, MCP89.
+.It Promise:
+PDC20246, PDC20262, PDC20263, PDC20265, PDC20267, PDC20268, PDC20269, PDC20270,
+PDC20271, PDC20275, PDC20276, PDC20277, PDC20318, PDC20319, PDC20371, PDC20375,
+PDC20376, PDC20377, PDC20378, PDC20379, PDC20571, PDC20575, PDC20579, PDC20580,
+PDC20617, PDC20618, PDC20619, PDC20620, PDC20621, PDC20622, PDC40518, PDC40519,
+PDC40718, PDC40719.
+.It ServerWorks:
+HT1000, ROSB4, CSB5, CSB6, K2, Frodo4, Frodo8.
+.It Silicon Image:
+SiI0680, SiI3112, SiI3114, SiI3124, SiI3132, SiI3512.
+.It SiS:
+SIS180, SIS181, SIS182, SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630,
+SIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962,
+SIS963, SIS964, SIS965.
+.It VIA:
+VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686,
+VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237,
+VT8237A, VT8237S, VT8251, CX700, VX800, VX855, VX900.
+.El
+.Pp
+Some of above chips are also supported by the more featured
+.Xr ahci 4 ,
+.Xr mvs 4 ,
+and
+.Xr siis 4
+drivers.
+If both drivers are loaded at the same time, those will have precedence.
+.Pp
+Unknown ATA chipsets are supported in PIO modes, and if the standard
+busmaster DMA registers are present and contain valid setup, DMA is
+also enabled, although the max mode is limited to UDMA33, as it is
+not known what the chipset can do and how to program it.
+.Sh NOTES
+Please remember that in order to use UDMA4/ATA66 and above modes you
+.Em must
+use 80 conductor cables.
+Please assure that ribbon cables are no longer than 45cm.
+In case of rounded ATA cables, the length depends on the
+quality of the cables.
+SATA cables can be up to 1m long according to the specification.
+External SATA cables can be 2m long and more, but not all controllers
+work well on long cables, especially at high speeds.
+.Sh SEE ALSO
+.Xr ada 4 ,
+.Xr ahci 4 ,
+.Xr cam 4 ,
+.Xr camcontrol 8 ,
+.Xr cd 4 ,
+.Xr mvs 4 ,
+.Xr siis 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.0 .
+It was turned into a
+.Xr CAM 4
+interface module in
+.Fx 9.0 .
+.Sh AUTHORS
+.An Alexander Motin
+.Aq mav@FreeBSD.org ,
+.An S\(/oren Schmidt
+.Aq sos@FreeBSD.org
diff --git a/share/man/man4/ath.4 b/share/man/man4/ath.4
new file mode 100644
index 0000000..acd83a8
--- /dev/null
+++ b/share/man/man4/ath.4
@@ -0,0 +1,302 @@
+.\"-
+.\" Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
+.\" All rights reserved.
+.\""
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+.\" redistribution must be conditioned upon including a substantially
+.\" similar Disclaimer requirement for further binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
+.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" $FreeBSD$
+.\"/
+.Dd April 14, 2014
+.Dt ATH 4
+.Os
+.Sh NAME
+.Nm ath
+.Nd "Atheros IEEE 802.11 wireless network driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ath"
+.Cd "device ath_pci"
+.Cd "device ath_hal"
+.Cd "options AH_SUPPORT_AR5416"
+.Cd "device ath_rate_sample"
+.Cd "device wlan"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ath_load="YES"
+if_ath_pci_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for wireless network adapters based on
+the Atheros AR5210, AR5211, AR5212, AR5416 and AR9300 programming APIs.
+These APIs are used by a wide variety of chips; most all chips with
+a PCI and/or CardBus interface are supported.
+.Pp
+Supported features include 802.11 and 802.3 frames, power management, BSS,
+IBSS, MBSS, TDMA, and host-based access point operation modes.
+All host/device interaction is via DMA.
+.Pp
+Please note that from FreeBSD-9.0, the
+.Nm
+driver does not include the PCI/PCIe bus glue.
+The same driver supports multiple underlying bus types, including PCI/PCIe,
+but also embedded (AHB) and USB in the future.
+.Pp
+To enable use for PCI/PCIe systems, see the
+.Xr ath_pci 4
+driver.
+For embedded systems which use the AHB to connect the wireless MAC, see the
+.Xr ath_ahb 4
+driver.
+.Pp
+The
+.Nm
+driver encapsulates all IP and ARP traffic as 802.11 frames, however
+it can receive either 802.11 or 802.3 frames.
+Transmit speed and operating mode is selectable
+and depends on the specific chipset.
+AR5210-based devices support 802.11a operation with transmit speeds
+of 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, and 54 Mbps.
+AR5211-based devices support 802.11a and 802.11b operation with transmit
+speeds as above for 802.11a operation and
+1Mbps, 2Mbps, 5.5 Mbps and 11Mbps for 802.11b operation.
+AR5212-based devices support 802.11a, 802.11b, and 802.11g operation
+with transmit speeds appropriate to each.
+AR5416 and later class devices are capable of 802.11n operation.
+Most chips also support an Atheros Turbo Mode (TM) that operates in
+the 5GHz frequency range with 2x the transmit speeds.
+Some chips also support Turbo mode in the 2.4GHz range with 802.11g
+though this support is not presently available due to regulatory requirements.
+(Note that Turbo modes are, however,
+only interoperable with other Atheros-based devices.)
+AR5212-based and AR5416-based devices also support half- (10MHz) and quarter-width (5MHz) channels.
+The actual transmit speed used is dependent on signal quality and the
+.Dq "rate control"
+algorithm employed by the driver.
+All chips support WEP encryption.
+AR5212, AR5416 and later parts have hardware support for the
+AES-CCM, TKIP, and Michael cryptographic
+operations required for WPA.
+To enable encryption, use
+.Xr ifconfig 8
+as shown below.
+.Pp
+The driver supports
+.Cm station ,
+.Cm adhoc ,
+.Cm adhoc-demo ,
+.Cm hostap ,
+.Cm mesh ,
+.Cm wds ,
+and
+.Cm monitor
+mode operation.
+Multiple
+.Cm hostap
+virtual interfaces may be configured for simultaneous
+use on cards that use a 5212 or later part.
+When multiple interfaces are configured each may have a separate
+mac address that is formed by setting the U/L bits in the mac
+address assigned to the underlying device.
+Any number of
+.Cm wds
+virtual interfaces may be configured together with
+.Cm hostap
+interfaces.
+Multiple
+.Cm station
+interfaces may be operated together with
+.Cm hostap
+interfaces to construct a wireless repeater device.
+The driver also support
+.Cm tdma
+operation when compiled with
+.Cd "options IEEE80211_SUPPORT_TDMA"
+(which also enables the required 802.11 support).
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+Devices supported by the
+.Nm
+driver come in either Cardbus or mini-PCI packages.
+Wireless cards in Cardbus slots may be inserted and ejected on the fly.
+.Sh HARDWARE
+The
+.Nm
+driver supports all Atheros Cardbus and PCI cards,
+except those that are based on the AR5005VL chipset.
+.Sh EXAMPLES
+Join a specific BSS network with WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev ath0
+ifconfig wlan0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net \e
+ wepmode on wepkey 0x8736639624
+.Ed
+.Pp
+Join/create an 802.11b IBSS network with network name
+.Dq Li my_net :
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev ath0 wlanmode adhoc
+ifconfig wlan0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e
+ mode 11b
+.Ed
+.Pp
+Create an 802.11g host-based access point:
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev ath0 wlanmode hostap
+ifconfig wlan0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e
+ mode 11g
+.Ed
+.Pp
+Create an 802.11a mesh station:
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev ath0 wlanmode mesh
+ifconfig wlan0 meshid my_mesh mode 11a inet 192.168.0.10/24
+.Ed
+.Pp
+Create two virtual 802.11a host-based access points, one with
+WEP enabled and one with no security, and bridge them to
+the fxp0 (wired) device:
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev ath0 wlanmode hostap \e
+ ssid paying-customers wepmode on wepkey 0x1234567890 \e
+ mode 11a up
+ifconfig wlan1 create wlandev ath0 wlanmode hostap bssid \e
+ ssid freeloaders up
+ifconfig bridge0 create addm wlan0 addm wlan1 addm fxp0 up
+.Ed
+.Pp
+Create a master node in a two slot TDMA BSS configured to use
+2.5 millisecond slots.
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev ath0 wlanmode tdma \e
+ ssid tdma-test tmdaslot 0 tdmaslotlen 2500 \e
+ channel 36 up
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ath%d: unable to attach hardware; HAL status %u"
+The Atheros Hardware Access Layer was unable to configure the hardware
+as requested.
+The status code is explained in the HAL include file
+.Pa sys/dev/ath/ath_hal/ah.h .
+.It "ath%d: failed to allocate descriptors: %d"
+The driver was unable to allocate contiguous memory for the transmit
+and receive descriptors.
+This usually indicates system memory is scarce and/or fragmented.
+.It "ath%d: unable to setup a data xmit queue!"
+The request to the HAL to set up the transmit queue for normal
+data frames failed.
+This should not happen.
+.It "ath%d: unable to setup a beacon xmit queue!"
+The request to the HAL to set up the transmit queue for 802.11 beacon frames
+failed.
+This should not happen.
+.It "ath%d: 802.11 address: %s"
+The MAC address programmed in the EEPROM is displayed.
+.It "ath%d: hardware error; resetting"
+An unrecoverable error in the hardware occurred.
+Errors of this sort include unrecoverable DMA errors.
+The driver will reset the hardware and continue.
+.It "ath%d: rx FIFO overrun; resetting"
+The receive FIFO in the hardware overflowed before the data could be
+transferred to the host.
+This typically occurs because the hardware ran short of receive
+descriptors and had no place to transfer received data.
+The driver will reset the hardware and continue.
+.It "ath%d: unable to reset hardware; hal status %u"
+The Atheros Hardware Access Layer was unable to reset the hardware
+as requested.
+The status code is explained in the HAL include file
+.Pa sys/dev/ath/ath_hal/ah.h .
+This should not happen.
+.It "ath%d: unable to start recv logic"
+The driver was unable to restart frame reception.
+This should not happen.
+.It "ath%d: device timeout"
+A frame dispatched to the hardware for transmission did not complete in time.
+The driver will reset the hardware and continue.
+This should not happen.
+.It "ath%d: bogus xmit rate 0x%x"
+An invalid transmit rate was specified for an outgoing frame.
+The frame is discarded.
+This should not happen.
+.It "ath%d: ath_chan_set: unable to reset channel %u (%u MHz)"
+The Atheros Hardware Access Layer was unable to reset the hardware
+when switching channels during scanning.
+This should not happen.
+.It "ath%d: failed to enable memory mapping"
+The driver was unable to enable memory-mapped I/O to the PCI device registers.
+This should not happen.
+.It "ath%d: failed to enable bus mastering"
+The driver was unable to enable the device as a PCI bus master for doing DMA.
+This should not happen.
+.It "ath%d: cannot map register space"
+The driver was unable to map the device registers into the host address space.
+This should not happen.
+.It "ath%d: could not map interrupt"
+The driver was unable to allocate an IRQ for the device interrupt.
+This should not happen.
+.It "ath%d: could not establish interrupt"
+The driver was unable to install the device interrupt handler.
+This should not happen.
+.El
+.Sh SEE ALSO
+.Xr ath_hal 4 ,
+.Xr cardbus 4 ,
+.Xr intro 4 ,
+.Xr pcic 4 ,
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr wlan_xauth 4 ,
+.Xr hostapd 8 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.2 .
+.Sh CAVEATS
+Revision A1 of the D-LINK DWL-G520 and DWL-G650 are based on an
+Intersil PrismGT chip and are not supported by this driver.
+.Sh BUGS
+The driver does not fully enable power-save operation of the chip
+in station mode; consequently power use is suboptimal (e.g. on a laptop).
+.Pp
+The AR5210 can only do WEP in hardware; consequently hardware assisted WEP
+is disabled in order to allow software implementations of TKIP and CCMP to
+function.
+Hardware WEP can be re-enabled by modifying the driver.
diff --git a/share/man/man4/ath_ahb.4 b/share/man/man4/ath_ahb.4
new file mode 100644
index 0000000..6688dc2
--- /dev/null
+++ b/share/man/man4/ath_ahb.4
@@ -0,0 +1,60 @@
+.\"-
+.\" Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd
+.\" All rights reserved.
+.\""
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+.\" redistribution must be conditioned upon including a substantially
+.\" similar Disclaimer requirement for further binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
+.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" $FreeBSD$
+.\"/
+.Dd May 30, 2011
+.Dt ATH_AHB 4
+.Os
+.Sh NAME
+.Nm ath_ahb
+.Nd "Atheros AHB device glue"
+.Sh SYNOPSIS
+.Cd "device ath_ahb"
+.Sh DESCRIPTION
+This module provides the AHB bus glue needed for the devices supported
+by the
+.Xr ath 4
+and
+.Xr ath_hal 4
+drivers.
+.Pp
+This is only relevant for embedded System-on-Chip (SoC) devices such as
+the Atheros AR913x series, which include an Atheros wireless MAC on-die.
+.Sh SEE ALSO
+.Xr ath 4
+.Xr ath_hal 4
+.Sh HISTORY
+The
+.Nm
+module first appeared in
+.Fx 9.0 .
+.Sh BUGS
+See
+.Xr ath 4
+for known bugs.
diff --git a/share/man/man4/ath_hal.4 b/share/man/man4/ath_hal.4
new file mode 100644
index 0000000..e3a7dcf
--- /dev/null
+++ b/share/man/man4/ath_hal.4
@@ -0,0 +1,145 @@
+.\"-
+.\" Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
+.\" All rights reserved.
+.\""
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+.\" redistribution must be conditioned upon including a substantially
+.\" similar Disclaimer requirement for further binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
+.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" $FreeBSD$
+.\"/
+.Dd July 22, 2013
+.Dt ATH_HAL 4
+.Os
+.Sh NAME
+.Nm ath_hal
+.Nd "Atheros Hardware Access Layer (HAL)"
+.Sh SYNOPSIS
+.Cd "device ath_hal"
+.Cd "options AH_SUPPORT_AR5416"
+or
+.Cd "device ath_ar5210"
+.Cd "device ath_ar5211"
+.Cd "device ath_ar5212"
+.Cd "device ath_rf2413"
+.Cd "device ath_rf2417"
+.Cd "device ath_rf2425"
+.Cd "device ath_rf5111"
+.Cd "device ath_rf5112"
+.Cd "device ath_rf5413"
+.Cd "device ath_ar5416"
+.\".Cd "device ath_ar5312"
+.\".Cd "device ath_rf2136"
+.\".Cd "device ath_rf2137"
+.Cd "device ath_ar9130"
+.Cd "device ath_ar9160"
+.Cd "device ath_ar9280"
+.Cd "device ath_ar9285"
+.Cd "device ath_ar9287"
+.Cd "device ath_ar9300"
+.Cd "options AH_SUPPORT_AR5416"
+.Sh DESCRIPTION
+The hal provides hardware support for wireless network adapters based on
+the Atheros AR5210, AR5211, AR5212, AR5213, AR2413, AR2417, AR2425,
+AR5413, AR5416, AR5418, AR5424, AR9160, AR9220, AR9280, AR9285, AR9287,
+AR9380, AR9390, AR9580, AR9590, AR9562 and QCA9565
+chips (and companion RF/baseband parts).
+This code is part of the
+.Xr ath 4
+driver but configured separately to allow fine-grained control
+over the set of chips supported.
+Selecting
+.Nm
+enables support for all PCI and Cardbus devices.
+Note this includes AR5416, AR5418, AR9130, AR9160, AR9220, AR9280, AR9285
+and AR9287 devices and must be accompanied by the
+AH_SUPPORT_AR5416
+option to enable the extended hardware descriptor format used by
+AR5416 and later devices.
+.Pp
+Some devices come in Cardbus/MiniPCI/PCI format.
+Others (for example AR2413, AR2427, AR5418, AR9280, AR9285, AR9287) come in
+PCIe, Mini-PCIe or ExpressCard format.
+.Pp
+Historically this code has been released in a binary-only form
+and packaged as a separate module.
+With the release of source code for the hal this is no longer true
+and the code is tightly integrated with the driver.
+.Sh HARDWARE
+The following cards are among those supported by the
+.Nm
+module:
+.Pp
+.Bl -column -compact "Samsung SWL-5200N" "AR5212" "Cardbus" "a/b/g"
+.It Em "Card Chip Bus Standard"
+.It "Aztech WL830PC AR5212 CardBus b/g"
+.It "D-Link DWL-A650 AR5210 CardBus a"
+.It "D-Link DWL-AB650 AR5211 CardBus a/b"
+.It "D-Link DWL-A520 AR5210 PCI a"
+.It "D-Link DWL-AG520 AR5212 PCI a/b/g"
+.It "D-Link DWL-AG650 AR5212 CardBus a/b/g"
+.It "D-Link DWL-G520B AR5212 PCI b/g"
+.It "D-Link DWL-G650B AR5212 CardBus b/g"
+.It "Elecom LD-WL54AG AR5212 Cardbus a/b/g"
+.It "Elecom LD-WL54 AR5211 Cardbus a"
+.It "Fujitsu E5454 AR5212 Cardbus a/b/g"
+.It "Fujitsu FMV-JW481 AR5212 Cardbus a/b/g"
+.It "Fujitsu E5454 AR5212 Cardbus a/b/g"
+.It "HP NC4000 AR5212 PCI a/b/g"
+.It "I/O Data WN-AB AR5212 CardBus a/b"
+.It "I/O Data WN-AG AR5212 CardBus a/b/g"
+.It "I/O Data WN-A54 AR5212 CardBus a"
+.It "Linksys WMP55AG AR5212 PCI a/b/g"
+.It "Linksys WPC51AB AR5211 CardBus a/b"
+.It "Linksys WPC55AG AR5212 CardBus a/b/g"
+.It "NEC PA-WL/54AG AR5212 CardBus a/b/g"
+.It "Netgear WAG311 AR5212 PCI a/b/g"
+.It "Netgear WAB501 AR5211 CardBus a/b"
+.It "Netgear WAG511 AR5212 CardBus a/b/g"
+.It "Netgear WG311 (aka WG311v1) AR5212 PCI b/g"
+.It "Netgear WG311v2 AR5212 PCI b/g"
+.It "Netgear WG311T AR5212 PCI b/g"
+.It "Netgear WG511T AR5212 CardBus b/g"
+.It "Orinoco 8480 AR5212 CardBus a/b/g"
+.It "Orinoco 8470WD AR5212 CardBus a/b/g"
+.It "Proxim Skyline 4030 AR5210 CardBus a"
+.It "Proxim Skyline 4032 AR5210 PCI a"
+.It "Samsung SWL-5200N AR5212 CardBus a/b/g"
+.It "SMC SMC2735W AR5210 CardBus a"
+.It "Sony PCWA-C700 AR5212 Cardbus a/b"
+.It "Sony PCWA-C300S AR5212 Cardbus b/g"
+.It "Sony PCWA-C500 AR5210 Cardbus a"
+.It "3Com 3CRPAG175 AR5212 CardBus a/b/g"
+.It "TP-LINK TL-WDN4800 AR9380 PCIe a/b/g/n"
+.El
+.Sh SEE ALSO
+.Xr ath 4
+.Sh HISTORY
+The
+.Nm
+module first appeared in
+.Fx 5.2 .
+.Sh BUGS
+See
+.Xr ath 4
+for known bugs.
diff --git a/share/man/man4/ath_pci.4 b/share/man/man4/ath_pci.4
new file mode 100644
index 0000000..814e535
--- /dev/null
+++ b/share/man/man4/ath_pci.4
@@ -0,0 +1,57 @@
+.\"-
+.\" Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd
+.\" All rights reserved.
+.\""
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+.\" redistribution must be conditioned upon including a substantially
+.\" similar Disclaimer requirement for further binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
+.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" $FreeBSD$
+.\"/
+.Dd May 30, 2011
+.Dt ATH_PCI 4
+.Os
+.Sh NAME
+.Nm ath_pci
+.Nd "Atheros PCI device glue"
+.Sh SYNOPSIS
+.Cd "device ath_pci"
+.Sh DESCRIPTION
+This module provides the PCI/PCIe bus glue needed for the devices supported
+by the
+.Xr ath 4
+and
+.Xr ath_hal 4
+drivers.
+.Sh SEE ALSO
+.Xr ath 4
+.Xr ath_hal 4
+.Sh HISTORY
+The
+.Nm
+module first appeared in
+.Fx 9.0 .
+.Sh BUGS
+See
+.Xr ath 4
+for known bugs.
diff --git a/share/man/man4/atkbd.4 b/share/man/man4/atkbd.4
new file mode 100644
index 0000000..17ccef5
--- /dev/null
+++ b/share/man/man4/atkbd.4
@@ -0,0 +1,230 @@
+.\"
+.\" Copyright (c) 1999
+.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 29, 2008
+.Dt ATKBD 4
+.Os
+.Sh NAME
+.Nm atkbd
+.Nd the AT keyboard interface
+.Sh SYNOPSIS
+.Cd "options ATKBD_DFLT_KEYMAP"
+.Cd "makeoptions ATKBD_DFLT_KEYMAP=_keymap_name_"
+.Cd "options KBD_DISABLE_KEYMAP_LOAD"
+.Cd "device atkbd"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.atkbd.0.at="atkbdc"
+.Cd hint.atkbd.0.irq="1"
+.Sh DESCRIPTION
+The
+.Nm
+driver, together with the
+.Nm atkbdc
+driver, provides access to the AT 84 keyboard or the AT enhanced keyboard
+which is connected to the AT keyboard controller.
+.Pp
+This driver is required for the console driver
+.Xr syscons 4 .
+.Pp
+There can be only one
+.Nm
+device defined in the kernel configuration file.
+This device also requires the
+.Nm atkbdc
+keyboard controller to be present.
+The
+.Em irq
+number must always be 1; there is no provision of changing the number.
+.Ss Function Keys
+The AT keyboard has a number of function keys.
+They are numbered as follows and can be associated with strings
+by the
+.Xr kbdcontrol 1
+command.
+You can use a keyboard map file (see
+.Xr kbdmap 5 )
+to map them to arbitrary keys, particularly
+the functions in the range from 65 to 96
+which are not used by default.
+.Pp
+.Bl -tag -width "Function Key Number" -compact
+.It "Function Key number"
+Function Key
+.It "1, 2,...12"
+F1, F2,...\& F12
+.It "13, 14,...24"
+Shift+F1, Shift+F2,...\& Shift+F12
+.It "25, 26,...36"
+Ctl+F1, Ctl+F2,...\& Ctl+F12
+.It "37, 38,...48"
+Shift+Ctl+F1, Shift+Ctl+F2,...\& Shift+Ctl+F12
+.It 49
+Home and Numpad 7 (without NumLock)
+.It 50
+Up Arrow and Numpad 8 (without NumLock)
+.It 51
+Page Up and Numpad 9 (without NumLock)
+.It 52
+Numpad -
+.It 53
+Left Arrow and Numpad 4 (without NumLock)
+.It 54
+Numpad 5 (without NumLock)
+.It 55
+Right Arrow and Numpad 6 (without NumLock)
+.It 56
+Numpad +
+.It 57
+End and Numpad 1 (without NumLock)
+.It 58
+Down Arrow and Numpad 2 (without NumLock)
+.It 59
+Page Down and Numpad 3 (without NumLock)
+.It 60
+Ins and Numpad 0 (without NumLock)
+.It 61
+Del
+.It 62
+Left GUI Key
+.It 63
+Right GUI Key
+.It 64
+Menu
+.It "65, 66,...96"
+free (not used by default)
+.El
+.Pp
+See the man page for the
+.Xr kbdcontrol 1
+command for how to assign a string to the function key.
+.Sh DRIVER CONFIGURATION
+.Ss Kernel Configuration Options
+The following kernel configuration options control the
+.Nm
+driver.
+.Bl -tag -width ATKBD_DFLT
+.It Em ATKBD_DFLT_KEYMAP
+This option sets the default, built-in keymap of the
+.Nm
+driver to the named keymap.
+See
+.Sx EXAMPLES
+below.
+.It Em KBD_DISABLE_KEYMAP_LOAD
+The keymap can be modified by the
+.Xr kbdcontrol 1
+command.
+This option will disable this feature and prevent the user from
+changing key assignment.
+.El
+.Ss Driver Flags
+The
+.Nm
+driver accepts the following driver flags.
+They can be set either in
+.Pa /boot/device.hints ,
+or else from within the boot loader
+(see
+.Xr loader 8 ) .
+.Bl -tag -width FAIL
+.It bit 0 (FAIL_IF_NO_KBD)
+By default the
+.Nm
+driver will install even if a keyboard is not actually connected to the
+system.
+This option prevents the driver from being installed in this situation.
+.It bit 1 (NO_RESET)
+When this option is given, the
+.Nm
+driver will not reset the keyboard when initializing it.
+It may be useful for laptop computers whose function keys
+have special functions and these functions are forgotten when the
+keyboard is reset.
+.It bit 2 (ALT_SCANCODESET)
+Certain keyboards, such as those on some ThinkPad models, behave
+like the old XT keyboard and require this option.
+.It bit 3 (NO_PROBE_TEST)
+When this option is given, the
+.Nm
+driver will not test the keyboard port during the probe routine.
+Some machines hang during boot when this test is performed.
+.El
+.\".Sh FILES
+.Sh EXAMPLES
+The
+.Nm
+driver requires the keyboard controller
+.Nm atkbdc .
+Thus, the kernel configuration file should contain the following lines.
+.Pp
+.Dl "device atkbdc"
+.Dl "device atkbd"
+.Pp
+The following example shows how to set the default, built-in keymap
+to
+.Pa jp.106.kbd .
+.Pp
+.Dl "device atkbdc"
+.Dl "options ATKBD_DFLT_KEYMAP"
+.Dl "makeoptions ATKBD_DFLT_KEYMAP=jp.106"
+.Dl "device atkbd"
+.Pp
+In both cases, you also need to have following lines in
+.Pa /boot/device.hints .
+.Pp
+.Dl hint.atkbdc.0.at="isa"
+.Dl hint.atkbdc.0.port="0x060"
+.Dl hint.atkbd.0.at="atkbdc"
+.Dl hint.atkbd.0.irq="1"
+.\".Sh DIAGNOSTICS
+.\".Sh CAVEATS
+.\".Sh BUGS
+.Sh SEE ALSO
+.Xr kbdcontrol 1 ,
+.Xr atkbdc 4 ,
+.Xr psm 4 ,
+.Xr syscons 4 ,
+.Xr kbdmap 5 ,
+.Xr loader 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 3.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An S\(/oren Schmidt Aq sos@FreeBSD.org
+and
+.An Kazutaka Yokota Aq yokota@FreeBSD.org .
+This manual page was written by
+.An Kazutaka Yokota .
diff --git a/share/man/man4/atkbdc.4 b/share/man/man4/atkbdc.4
new file mode 100644
index 0000000..46d30c1
--- /dev/null
+++ b/share/man/man4/atkbdc.4
@@ -0,0 +1,119 @@
+.\"
+.\" Copyright (c) 1999
+.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 9, 1999
+.Dt ATKBDC 4
+.Os
+.Sh NAME
+.Nm atkbdc
+.Nd the AT keyboard controller interface
+.Sh SYNOPSIS
+.Cd "options KBD_RESETDELAY=N"
+.Cd "options KBD_MAXWAIT=N"
+.Cd "options KBDIO_DEBUG=N"
+.Cd "device atkbdc"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.atkbdc.0.at="isa"
+.Cd hint.atkbdc.0.port="0x060"
+.Sh DESCRIPTION
+The keyboard controller
+.Nm
+provides I/O services for the AT keyboard and PS/2 mouse style
+pointing devices.
+This controller is required for the keyboard driver
+.Nm atkbd
+and the PS/2 pointing device driver
+.Nm psm .
+.Pp
+There can be only one
+.Nm
+device configured in the system.
+.Sh DRIVER CONFIGURATION
+.Ss Kernel Configuration Options
+The following kernel configuration options can be used to control the
+.Nm
+driver.
+They may be set in the kernel configuration file
+(see
+.Xr config 8 ) .
+.Bl -tag -width MOUSE
+.It Em KBD_RESETDELAY=X , KBD_MAXWAIT=Y
+The keyboard driver
+.Nm atkbd
+and the pointing device driver
+.Nm psm
+may ask the
+.Nm
+driver to reset these devices during the boot process.
+It sometimes takes a long time before these devices respond to
+the reset command.
+These options control how long the
+.Nm
+driver should
+wait before eventually giving up -- the driver will wait
+.Fa X
+*
+.Fa Y
+msecs at most.
+If the drivers seem unable to detect
+devices, you may want to increase these values.
+The default values are
+200 msec for
+.Fa X
+and 5
+for
+.Fa Y .
+.It Em KBDIO_DEBUG=N
+Sets the debug level to
+.Fa N .
+The default value is zero, which suppresses all debugging output.
+.El
+.\".Ss Driver Flags
+.\".Sh FILES
+.\".Sh EXAMPLE
+.\".Sh DIAGNOSTICS
+.\".Sh CAVEATS
+.\".Sh BUGS
+.Sh SEE ALSO
+.Xr atkbd 4 ,
+.Xr psm 4 ,
+.Xr config 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 3.1 .
+It is based on the kbdio module in
+.Fx 2.2 .
+.Sh AUTHORS
+The kbdio module, the
+.Nm
+driver and this manual page were written by
+.An Kazutaka Yokota Aq yokota@FreeBSD.org .
diff --git a/share/man/man4/atp.4 b/share/man/man4/atp.4
new file mode 100644
index 0000000..f782798
--- /dev/null
+++ b/share/man/man4/atp.4
@@ -0,0 +1,157 @@
+.\" Copyright (c) 2014 Rohit Grover <rgrover1 at gmail dot com>.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 24, 2014
+.Dt ATP 4
+.Os
+.Sh NAME
+.Nm atp
+.Nd Apple touchpad driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines into
+your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device atp"
+.Cd "device usb"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+atp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Apple Internal Trackpad device found in many
+Apple laptops. Older (Fountain/Geyser) and the newer (Wellspring) trackpad
+families are all supported through a unified driver.
+.Pp
+The driver simulates a three\-button mouse using multi\-finger tap detection.
+Single finger tap generates a left\-button click; two\-finger tap maps to the
+middle button; whereas a three\-finger tap gets treated as a right button
+click.
+.Pp
+There is support for 2\-finger horizontal scrolling, which translates to
+page\-back/forward events; vertical multi\-finger scrolling emulates the mouse
+wheel.
+.Pp
+A double\-tap followed by a drag is treated as a selection gesture; a
+virtual left\-button click is assumed for the lifespan of the drag.
+.Pp
+.Nm
+supports dynamic reconfiguration using
+.Xr sysctl 8 ;
+through nodes under
+.Nm hw.usb.atp .
+Pointer sensitivity can be controlled using the sysctl tunable
+.Nm hw.usb.atp.scale_factor .
+Smaller values of
+.Fa scale_factor
+result in faster movement.
+.
+A simple high-pass filter is used to reduce contributions
+from small movements; the threshold for this filter may be controlled by
+.Nm hw.usb.atp.small_movement .
+.
+The maximum tolerable duration of a touch gesture is controlled by
+.Nm hw.usb.atp.touch_timeout
+(in microseconds); beyond this period, touches are considered to be slides.
+(This conversion also happens when a finger stroke accumulates at least
+.Nm hw.usb.atp.slide_min_movement
+movement (in mickeys).
+.
+The maximum time (in microseconds) to allow an association between a double-
+tap and drag gesture may be controlled by
+.Nm hw.usb.atp.double_tap_threshold .
+.
+Should one want to disable tap detection and rely only upon physical button
+presses, set the following sysctl to a value of 2
+.Nm hw.usb.atp.tap_minimum .
+.
+.Sh HARDWARE
+The
+.Nm
+driver provides support for the following Product IDs:
+.Pp
+.Bl -bullet -compact
+.It
+PowerBooks, iBooks (IDs: 0x020e, 0x020f, 0x0210, 0x0214, 0x0215, 0x0216)
+.It
+Core Duo MacBook & MacBook Pro (IDs: 0x0217, 0x0218, 0x0219)
+.It
+Core2 Duo MacBook & MacBook Pro (IDs: 0x021a, 0x021b, 0x021c)
+.It
+Core2 Duo MacBook3,1 (IDs: 0x0229, 0x022a, 0x022b)
+.It
+12 inch PowerBook and iBook (IDs: 0x030a, 0x030b)
+.It
+15 inch PowerBook (IDs: 0x020e, 0x020f, 0x0215)
+.It
+17 inch PowerBook (ID: 0x020d)
+.It
+Almost all recent Macbook-Pros and Airs (IDs: 0x0223, 0x0223, 0x0224, 0x0224,
+0x0225, 0x0225, 0x0230, 0x0230, 0x0231, 0x0231, 0x0232, 0x0232, 0x0236,
+0x0236, 0x0237, 0x0237, 0x0238, 0x0238, 0x023f, 0x023f, 0x0240, 0x0241,
+0x0242, 0x0243, 0x0244, 0x0245, 0x0246, 0x0247, 0x0249, 0x024a, 0x024b,
+0x024c, 0x024d, 0x024e, 0x0252, 0x0252, 0x0253, 0x0253, 0x0254, 0x0254,
+0x0259, 0x025a, 0x025b, 0x0262, 0x0262, 0x0263, 0x0264, 0x0290, 0x0291,
+0x0292)
+.El
+.Pp
+To discover the product\-id of a touchpad, search for 'Trackpad' in the
+output of
+.Xr lshal 1
+and look up the property
+.Nm usb_device.product_id .
+.Sh FILES
+.Nm
+creates a blocking pseudo\-device file,
+.Pa /dev/atp0 ,
+which presents the mouse as a
+.Ar sysmouse
+or
+.Ar mousesystems
+type device\-\-see
+.Xr moused 8
+for an explanation of these mouse
+types.
+.Sh SEE ALSO
+.Xr sysmouse 4 ,
+.Xr usb 4 ,
+.Xr loader.conf 5 ,
+.Xr xorg.conf 5 Pq Pa ports/x11/xorg ,
+.Xr moused 8 ,
+.Xr sysctl 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Rohit Grover Aq rgrover1@gmail.com .
diff --git a/share/man/man4/atrtc.4 b/share/man/man4/atrtc.4
new file mode 100644
index 0000000..0b0dd8f
--- /dev/null
+++ b/share/man/man4/atrtc.4
@@ -0,0 +1,57 @@
+.\" Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 17, 2010
+.Dt ATRTC 4
+.Os
+.Sh NAME
+.Nm atrtc
+.Nd AT Real-Time Clock (RTC) driver
+.Sh SYNOPSIS
+This driver is a mandatory part of i386/amd64 kernels.
+.Pp
+The following tunable is settable from the
+.Xr loader 8 :
+.Bl -ohang
+.It Va hint.atrtc. Ns Ar X Ns Va .clock
+controls event timers functionality support. Setting to 0, disables it.
+Default value is 1.
+.El
+.Sh DESCRIPTION
+This driver uses RTC hardware to supply kernel with time-of-day clock
+with 1 second resolution and one event timer.
+This hardware uses base frequency of 32768Hz for advancing time-of-day clock
+and generating periodic interrupts.
+Interrupts could be generated with fixed number of frequencies, from 2Hz to
+8192Hz, obtained by dividing base frequency by one of supported power-of-2
+divisors.
+.Pp
+Event timer provided by the driver is irrelevant to CPU power states.
+.Sh SEE ALSO
+.Xr apic 4 ,
+.Xr attimer 4 ,
+.Xr eventtimers 4 ,
+.Xr hpet 4
diff --git a/share/man/man4/attimer.4 b/share/man/man4/attimer.4
new file mode 100644
index 0000000..097e073
--- /dev/null
+++ b/share/man/man4/attimer.4
@@ -0,0 +1,87 @@
+.\" Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 26, 2014
+.Dt ATTIMER 4
+.Os
+.Sh NAME
+.Nm attimer
+.Nd i8254 Programmable Interval Timer (AT Timer) driver
+.Sh SYNOPSIS
+This driver is a mandatory part of x86 kernels.
+.Pp
+The following tunables are settable from the
+.Xr loader 8 :
+.Bl -ohang
+.It Va hint.attimer. Ns Ar X Ns Va .clock
+controls support for the event timer functionality.
+Setting this value to
+.Dv 0
+disables it.
+The default value is
+.Dv 1 .
+.It Va hint.attimer. Ns Ar X Ns Va .timecounter
+controls support for the time counter functionality.
+Setting this value to
+.Dv 0
+disables it.
+The default value is
+.Dv 1 .
+.It Va hw.i8254.freq
+allows overriding the default counter frequency.
+The same value is also available at run-time via the
+.Va machdep.i8254_freq
+sysctl.
+.El
+.Sh DESCRIPTION
+This driver uses i8254 Programmable Interval Timer (AT Timer) hardware
+to supply the kernel with one timecounter and one event timer, and to generate
+sound tones for the system speaker.
+This hardware includes three channels.
+Each channel includes a 16 bit counter which decreases with a known,
+platform-dependent frequency.
+Counters can operate in several different modes, including periodic and
+one-shot.
+The output of each channel has platform-defined wiring: one channel is wired
+to the interrupt controller and may be used as event timer, one channel is
+wired to the speaker and used to generate sound tones, and one timer is reserved
+for platform purposes.
+.Pp
+The
+.Nm
+driver uses a single hardware channel to provide both time counter and event
+timer functionality.
+To make this possible, the respective counter must be running in periodic mode.
+As a result, the one-shot event timer mode is supported only when time counter
+functionality is disabled.
+.Pp
+The event timer provided by the driver is irrelevant to CPU power states.
+.Sh SEE ALSO
+.Xr apic 4 ,
+.Xr atrtc 4 ,
+.Xr eventtimers 4 ,
+.Xr hpet 4 ,
+.Xr timecounters 4
diff --git a/share/man/man4/audit.4 b/share/man/man4/audit.4
new file mode 100644
index 0000000..8fbce7d
--- /dev/null
+++ b/share/man/man4/audit.4
@@ -0,0 +1,140 @@
+.\" Copyright (c) 2006 Robert N. M. Watson
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 31, 2009
+.Dt AUDIT 4
+.Os
+.Sh NAME
+.Nm audit
+.Nd Security Event Audit
+.Sh SYNOPSIS
+.Cd "options AUDIT"
+.Sh DESCRIPTION
+Security Event Audit is a facility to provide fine-grained, configurable
+logging of security-relevant events, and is intended to meet the requirements
+of the Common Criteria (CC) Common Access Protection Profile (CAPP)
+evaluation.
+The
+.Fx
+.Nm
+facility implements the de facto industry standard BSM API, file
+formats, and command line interface, first found in the Solaris operating
+system.
+Information on the user space implementation can be found in
+.Xr libbsm 3 .
+.Pp
+Audit support is enabled at boot, if present in the kernel, using an
+.Xr rc.conf 5
+flag.
+The audit daemon,
+.Xr auditd 8 ,
+is responsible for configuring the kernel to perform
+.Nm ,
+pushing
+configuration data from the various audit configuration files into the
+kernel.
+.Ss Audit Special Device
+The kernel
+.Nm
+facility provides a special device,
+.Pa /dev/audit ,
+which is used by
+.Xr auditd 8
+to monitor for
+.Nm
+events, such as requests to cycle the log, low disk
+space conditions, and requests to terminate auditing.
+This device is not intended for use by applications.
+.Ss Audit Pipe Special Devices
+Audit pipe special devices, discussed in
+.Xr auditpipe 4 ,
+provide a configurable live tracking mechanism to allow applications to
+tee the audit trail, as well as to configure custom preselection parameters
+to track users and events in a fine-grained manner.
+.Sh SEE ALSO
+.Xr auditreduce 1 ,
+.Xr praudit 1 ,
+.Xr audit 2 ,
+.Xr auditctl 2 ,
+.Xr auditon 2 ,
+.Xr getaudit 2 ,
+.Xr getauid 2 ,
+.Xr poll 2 ,
+.Xr select 2 ,
+.Xr setaudit 2 ,
+.Xr setauid 2 ,
+.Xr libbsm 3 ,
+.Xr auditpipe 4 ,
+.Xr audit_class 5 ,
+.Xr audit_control 5 ,
+.Xr audit_event 5 ,
+.Xr audit.log 5 ,
+.Xr audit_user 5 ,
+.Xr audit_warn 5 ,
+.Xr rc.conf 5 ,
+.Xr audit 8 ,
+.Xr auditd 8 ,
+.Xr auditdistd 8
+.Sh HISTORY
+The
+.Tn OpenBSM
+implementation was created by McAfee Research, the security
+division of McAfee Inc., under contract to Apple Computer Inc.\& in 2004.
+It was subsequently adopted by the TrustedBSD Project as the foundation for
+the OpenBSM distribution.
+.Pp
+Support for kernel
+.Nm
+first appeared in
+.Fx 6.2 .
+.Sh AUTHORS
+.An -nosplit
+This software was created by McAfee Research, the security research division
+of McAfee, Inc., under contract to Apple Computer Inc.
+Additional authors include
+.An Wayne Salamon ,
+.An Robert Watson ,
+and SPARTA Inc.
+.Pp
+The Basic Security Module (BSM) interface to audit records and audit event
+stream format were defined by Sun Microsystems.
+.Pp
+This manual page was written by
+.An Robert Watson Aq rwatson@FreeBSD.org .
+.Sh BUGS
+The
+.Fx
+kernel does not fully validate that audit records submitted by user
+applications are syntactically valid BSM; as submission of records is limited
+to privileged processes, this is not a critical bug.
+.Pp
+Instrumentation of auditable events in the kernel is not complete, as some
+system calls do not generate audit records, or generate audit records with
+incomplete argument information.
+.Pp
+Mandatory Access Control (MAC) labels, as provided by the
+.Xr mac 4
+facility, are not audited as part of records involving MAC decisions.
diff --git a/share/man/man4/auditpipe.4 b/share/man/man4/auditpipe.4
new file mode 100644
index 0000000..19db856
--- /dev/null
+++ b/share/man/man4/auditpipe.4
@@ -0,0 +1,256 @@
+.\" Copyright (c) 2006 Robert N. M. Watson
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 5, 2006
+.Dt AUDITPIPE 4
+.Os
+.Sh NAME
+.Nm auditpipe
+.Nd "pseudo-device for live audit event tracking"
+.Sh SYNOPSIS
+.Cd "options AUDIT"
+.Sh DESCRIPTION
+While audit trail files
+generated with
+.Xr audit 4
+and maintained by
+.Xr auditd 8
+provide a reliable long-term store for audit log information, current log
+files are owned by the audit daemon until terminated making them somewhat
+unwieldy for live monitoring applications such as host-based intrusion
+detection.
+For example, the log may be cycled and new records written to a new file
+without notice to applications that may be accessing the file.
+.Pp
+The audit facility provides an audit pipe facility for applications requiring
+direct access to live BSM audit data for the purposes of real-time
+monitoring.
+Audit pipes are available via a clonable special device,
+.Pa /dev/auditpipe ,
+subject to the permissions on the device node, and provide a
+.Qq tee
+of the audit event stream.
+As the device is clonable, more than one instance of the device may be opened
+at a time; each device instance will provide independent access to all
+records.
+.Pp
+The audit pipe device provides discrete BSM audit records; if the read buffer
+passed by the application is too small to hold the next record in the
+sequence, it will be dropped.
+Unlike audit data written to the audit trail, the reliability of record
+delivery is not guaranteed.
+In particular, when an audit pipe queue fills, records will be dropped.
+Audit pipe devices are blocking by default, but support non-blocking I/O,
+asynchronous I/O using
+.Dv SIGIO ,
+and polled operation via
+.Xr select 2
+and
+.Xr poll 2 .
+.Pp
+Applications may choose to track the global audit trail, or configure local
+preselection parameters independent of the global audit trail parameters.
+.Ss Audit Pipe Queue Ioctls
+The following ioctls retrieve and set various audit pipe record queue
+properties:
+.Bl -tag -width ".Dv AUDITPIPE_GET_MAXAUDITDATA"
+.It Dv AUDITPIPE_GET_QLEN
+Query the current number of records available for reading on the pipe.
+.It Dv AUDITPIPE_GET_QLIMIT
+Retrieve the current maximum number of records that may be queued for reading
+on the pipe.
+.It Dv AUDITPIPE_SET_QLIMIT
+Set the current maximum number of records that may be queued for reading on
+the pipe.
+The new limit must fall between the queue limit minimum and queue limit
+maximum queryable using the following two ioctls.
+.It Dv AUDITPIPE_GET_QLIMIT_MIN
+Query the lowest possible maximum number of records that may be queued for
+reading on the pipe.
+.It Dv AUDITPIPE_GET_QLIMIT_MAX
+Query the highest possible maximum number of records that may be queued for
+reading on the pipe.
+.It Dv AUDITPIPE_FLUSH
+Flush all outstanding records on the audit pipe; useful after setting initial
+preselection properties to delete records queued during the configuration
+process which may not match the interests of the user process.
+.It Dv AUDITPIPE_GET_MAXAUDITDATA
+Query the maximum size of an audit record, which is a useful minimum size for
+a user space buffer intended to hold audit records read from the audit pipe.
+.El
+.Ss Audit Pipe Preselection Mode Ioctls
+By default, the audit pipe facility configures pipes to present records
+matched by the system-wide audit trail, configured by
+.Xr auditd 8 .
+However, the preselection mechanism for audit pipes can be configured using
+alternative criteria, including pipe-local flags and naflags settings, as
+well as auid-specific selection masks.
+This allows applications to track events not captured in the global audit
+trail, as well as limit records presented to those of specific interest to
+the application.
+.Pp
+The following ioctls configure the preselection mode on an audit pipe:
+.Bl -tag -width ".Dv AUDITPIPE_GET_PRESELECT_MODE"
+.It Dv AUDITPIPE_GET_PRESELECT_MODE
+Return the current preselect mode on the audit pipe.
+The ioctl argument should be of type
+.Vt int .
+.It Dv AUDITPIPE_SET_PRESELECT_MODE
+Set the current preselection mode on the audit pipe.
+The ioctl argument should be of type
+.Vt int .
+.El
+.Pp
+Possible preselection mode values are:
+.Bl -tag -width ".Dv AUDITPIPE_PRESELECT_MODE_TRAIL"
+.It Dv AUDITPIPE_PRESELECT_MODE_TRAIL
+Use the global audit trail preselection parameters to select records for the
+audit pipe.
+.It Dv AUDITPIPE_PRESELECT_MODE_LOCAL
+Use local audit pipe preselection; this model is similar to the global audit
+trail configuration model, consisting of global flags and naflags parameters,
+as well as a set of per-auid masks.
+These parameters are configured using further ioctls.
+.El
+.Pp
+After changing the audit pipe preselection mode, records selected under
+earlier preselection configuration may still be in the audit pipe queue.
+The application may flush the current record queue after changing the
+configuration to remove possibly undesired records.
+.Ss Audit Pipe Local Preselection Mode Ioctls
+The following ioctls configure the preselection parameters used when an audit
+pipe is configured for the
+.Dv AUDITPIPE_PRESELECT_MODE_LOCAL
+preselection mode.
+.Bl -tag -width ".Dv AUDITPIPE_GET_PRESELECT_NAFLAGS"
+.It Dv AUDITPIPE_GET_PRESELECT_FLAGS
+Retrieve the current default preselection flags for attributable events on
+the pipe.
+These flags correspond to the
+.Va flags
+field in
+.Xr audit_control 5 .
+The ioctl argument should be of type
+.Vt u_int .
+.It Dv AUDITPIPE_SET_PRESELECT_FLAGS
+Set the current default preselection flags for attributable events on the
+pipe.
+These flags correspond to the
+.Va flags
+field in
+.Xr audit_control 5 .
+The ioctl argument should be of type
+.Vt u_int .
+.It Dv AUDITPIPE_GET_PRESELECT_NAFLAGS
+Retrieve the current default preselection flags for non-attributable events
+on the pipe.
+These flags correspond to the
+.Va naflags
+field in
+.Xr audit_control 5 .
+The ioctl argument should be of type
+.Vt u_int .
+.It Dv AUDITPIPE_SET_PRESELECT_NAFLAGS
+Set the current default preselection flags for non-attributable events on the
+pipe.
+These flags correspond to the
+.Va naflags
+field in
+.Xr audit_control 5 .
+The ioctl argument should be of type
+.Vt u_int .
+.It Dv AUDITPIPE_GET_PRESELECT_AUID
+Query the current preselection masks for a specific auid on the pipe.
+The ioctl argument should be of type
+.Vt "struct auditpipe_ioctl_preselect" .
+The auid to query is specified via the
+.Va ap_auid
+field of type
+.Vt au_id_t ;
+the mask will be returned via
+.Va ap_mask
+of type
+.Vt au_mask_t .
+.It Dv AUDITPIPE_SET_PRESELECT_AUID
+Set the current preselection masks for a specific auid on the pipe.
+Arguments are identical to
+.Dv AUDITPIPE_GET_PRESELECT_AUID ,
+except that the caller should properly initialize the
+.Va ap_mask
+field to hold the desired preselection mask.
+.It Dv AUDITPIPE_DELETE_PRESELECT_AUID
+Delete the current preselection mask for a specific auid on the pipe.
+Once called, events associated with the specified auid will use the default
+flags mask.
+The ioctl argument should be of type
+.Vt au_id_t .
+.It Dv AUDITPIPE_FLUSH_PRESELECT_AUID
+Delete all auid specific preselection specifications.
+.El
+.Sh EXAMPLES
+The
+.Xr praudit 1
+utility
+may be directly executed on
+.Pa /dev/auditpipe
+to review the default audit trail.
+.Sh SEE ALSO
+.Xr poll 2 ,
+.Xr select 2 ,
+.Xr audit 4 ,
+.Xr audit_control 5 ,
+.Xr audit 8 ,
+.Xr auditd 8
+.Sh HISTORY
+The OpenBSM implementation was created by McAfee Research, the security
+division of McAfee Inc., under contract to Apple Computer Inc.\& in 2004.
+It was subsequently adopted by the TrustedBSD Project as the foundation for
+the OpenBSM distribution.
+.Pp
+Support for kernel audit first appeared in
+.Fx 6.2 .
+.Sh AUTHORS
+The audit pipe facility was designed and implemented by
+.An Robert Watson Aq rwatson@FreeBSD.org .
+.Pp
+The Basic Security Module (BSM) interface to audit records and audit event
+stream format were defined by Sun Microsystems.
+.Sh BUGS
+See the
+.Xr audit 4
+manual page for information on audit-related bugs and limitations.
+.Pp
+The configurable preselection mechanism mirrors the selection model present
+for the global audit trail.
+It might be desirable to provided a more flexible selection model.
+.Pp
+The per-pipe audit event queue is fifo, with drops occurring if either the
+user thread provides in sufficient for the record on the queue head, or on
+enqueue if there is insufficient room.
+It might be desirable to support partial reads of records, which would be
+more compatible with buffered I/O as implemented in system libraries, and to
+allow applications to select which records are dropped, possibly in the style
+of preselection.
diff --git a/share/man/man4/aue.4 b/share/man/man4/aue.4
new file mode 100644
index 0000000..c708c89
--- /dev/null
+++ b/share/man/man4/aue.4
@@ -0,0 +1,205 @@
+.\" Copyright (c) 1997, 1998, 1999
+.\" Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 7, 2006
+.Dt AUE 4
+.Os
+.Sh NAME
+.Nm aue
+.Nd ADMtek AN986 Pegasus USB Ethernet driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device miibus"
+.Cd "device aue"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_aue_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB Ethernet adapters based on the ADMtek
+AN986 Pegasus chipset.
+.Pp
+The LinkSys USB10T adapters that contain the AN986 Pegasus chipset
+will operate at 100Base-TX and full-duplex.
+.Pp
+The Pegasus contains a 10/100
+Ethernet MAC with MII interface and is designed to work with both
+Ethernet and HomePNA transceivers.
+Although designed to interface with
+100Mbps peripherals, the existing USB standard specifies a maximum
+transfer speed of 12Mbps.
+Users should therefore not expect to actually
+achieve 100Mbps speeds with these devices.
+.Pp
+The Pegasus supports a 64-bit multicast hash table, single perfect
+filter entry for the station address and promiscuous mode.
+Packets are
+received and transmitted over separate USB bulk transfer endpoints.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to the
+.Pa /etc/rc.conf
+file.
+.It 10baseT/UTP
+Set 10Mbps operation.
+The
+.Ar mediaopt
+option can also be used to enable
+.Ar full-duplex
+operation.
+Not specifying
+.Ar full duplex
+implies
+.Ar half-duplex
+mode.
+.It 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Ar mediaopt
+option can also be used to enable
+.Ar full-duplex
+operation.
+Not specifying
+.Ar full duplex
+implies
+.Ar half-duplex
+mode.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It full-duplex
+Force full duplex operation.
+The interface will operate in
+half duplex mode if this media option is not specified.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+Adapters supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Abocom UFE1000, DSB650TX_NA
+.It
+Accton USB320-EC, SpeedStream
+.It
+ADMtek AN986, AN8511
+.It
+Billionton USB100, USB100LP, USB100EL, USBE100
+.It
+Corega Ether FEther USB-T, FEther USB-TX, FEther USB-TXS
+.It
+D-Link DSB-650, DSB-650TX, DSB-650TX-PNA
+.It
+Elecom LD-USBL/TX
+.It
+Elsa Microlink USB2Ethernet
+.It
+HP hn210e
+.It
+I-O Data USB ETTX
+.It
+Kingston KNU101TX
+.It
+LinkSys USB10T adapters that contain the AN986 Pegasus chipset,
+USB10TA, USB10TX, USB100TX, USB100H1
+.It
+MELCO LUA-TX, LUA2-TX
+.It
+Netgear FA101
+.It
+Planex UE-200TX
+.It
+Sandberg USB to Network Link (model number 133-06)
+.It
+Siemens Speedstream
+.It
+SmartBridges smartNIC
+.It
+SMC 2202USB
+.It
+SOHOware NUB100
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "aue%d: watchdog timeout"
+A packet was queued for transmission and a transmit command was
+issued, however the device failed to acknowledge the transmission
+before a timeout expired.
+.It "aue%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Rs
+.%T ADMtek AN986 data sheet
+.%U http://www.admtek.com.tw
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ee.columbia.edu .
diff --git a/share/man/man4/axe.4 b/share/man/man4/axe.4
new file mode 100644
index 0000000..65e1887
--- /dev/null
+++ b/share/man/man4/axe.4
@@ -0,0 +1,258 @@
+.\" Copyright (c) 1997, 1998, 1999, 2000-2003
+.\" Bill Paul <wpaul@windriver.com>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 25, 2013
+.Dt AXE 4
+.Os
+.Sh NAME
+.Nm axe
+.Nd "ASIX Electronics AX88x7x/760 USB Ethernet driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device miibus"
+.Cd "device axe"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_axe_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB Ethernet adapters based on the ASIX
+Electronics AX88172, AX88178, AX88772, AX88772A, AX88772B and AX88760
+USB 2.0 chipsets.
+.Pp
+The AX88172, AX88772, AX88772A, AX88772B and AX88760 contain a 10/100
+Ethernet MAC with MII interface and are designed to work with both
+Ethernet and HomePNA transceivers.
+The AX88178 has a 10/100/1000 Ethernet MAC with GMII/RGMII interface
+for interfacing with Gigabit Ethernet PHY.
+.Pp
+These devices will operate with
+both USB 1.x and USB 2.0 controllers, however performance with 1.x
+controllers will be limited since the USB 1.x standard specifies a
+maximum transfer speed of 12Mbps.
+Users with USB 1.x controllers should therefore not expect to actually
+achieve 100Mbps speeds with these devices.
+.Pp
+All chipsets support a 64-bit multicast hash table, single perfect
+filter entry for the station address, all-multicast mode and promiscuous mode.
+Packets are
+received and transmitted over separate USB bulk transfer endpoints.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 1000baseT
+Set 1000Mbps (Gigabit Ethernet) operation (AX88178 only).
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports ASIX Electronics AX88172/AX88178/AX88772/AX88772A/AX88772B/AX88760
+based USB Ethernet adapters including:
+.Pp
+AX88172:
+.Bl -bullet -compact
+.It
+AboCom UF200
+.It
+Acer Communications EP1427X2
+.It
+ASIX AX88172
+.It
+ATen UC210T
+.It
+Billionton SnapPort
+.It
+Billionton USB2AR
+.It
+Buffalo (Melco Inc.) LUA-U2-KTX
+.It
+Corega USB2_TX
+.It
+D-Link DUBE100
+.It
+Goodway GWUSB2E
+.It
+JVC MP_PRX1
+.It
+LinkSys USB200M
+.It
+Netgear FA120
+.It
+Sitecom LN-029
+.It
+System TALKS Inc.\& SGC-X2UL
+.El
+.Pp
+AX88178:
+.Bl -bullet -compact
+.It
+ASIX AX88178
+.It
+Belkin F5D5055
+.It
+Logitec LAN-GTJ/U2A
+.It
+Buffalo (Melco Inc.) LUA3-U2-AGT
+.It
+Planex Communications GU1000T
+.It
+Sitecom Europe LN-028
+.El
+.Pp
+AX88772:
+.Bl -bullet -compact
+.It
+ASIX AX88772
+.It
+Buffalo (Melco Inc.) LUA3-U2-ATX
+.It
+D-Link DUBE100B1
+.It
+Planex UE-200TX-G
+.It
+Planex UE-200TX-G2
+.El
+.Pp
+AX88772A:
+.Bl -bullet -compact
+.It
+ASIX AX88772A
+.It
+Cisco-Linksys USB200Mv2
+.El
+.Pp
+AX88772B:
+.Bl -bullet -compact
+.It
+ASIX AX88772B
+.It
+Lenovo USB 2.0 Ethernet
+.El
+.Pp
+AX88760:
+.Bl -bullet -compact
+.It
+ASIX AX88760
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "axe%d: watchdog timeout"
+A packet was queued for transmission and a transmit command was
+issued, however the device failed to acknowledge the transmission
+before a timeout expired.
+.It "axe%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr rgephy 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Rs
+.%T "ASIX AX88x7x and AX88760 data sheets"
+.%U http://www.asix.com.tw
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@windriver.com .
diff --git a/share/man/man4/axge.4 b/share/man/man4/axge.4
new file mode 100644
index 0000000..33f7db3
--- /dev/null
+++ b/share/man/man4/axge.4
@@ -0,0 +1,150 @@
+.\" Copyright (c) 1997, 1998, 1999, 2000-2003
+.\" Bill Paul <wpaul@windriver.com>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 22, 2013
+.Dt AXGE 4
+.Os
+.Sh NAME
+.Nm axge
+.Nd "ASIX Electronics AX88178A/AX88179 USB Gigabit Ethernet driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device xhci"
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device miibus"
+.Cd "device axge"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_axge_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB Gigabit Ethernet adapters based on the ASIX
+Electronics AX88179 USB 3.0 and AX88178A USB 2.0 chipsets.
+.Pp
+The AX88179 and AX88178A contain a 10/100/1000 Ethernet MAC with a GMII
+interface for interfacing with the Gigabit Ethernet PHY.
+.Pp
+These devices will operate with both USB 1.x and USB 2.0 controllers, and the
+AX88179 will operate with USB 3.0 controllers.
+Packets are received and transmitted over separate USB bulk transfer endpoints.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 1000baseT
+Set 1000Mbps (Gigabit Ethernet) operation (AX88178 only).
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr rgephy 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.1 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Kevin Lo Aq kevlo@FreeBSD.org
+and
+.An Li-Wen Hsu Aq lwhsu@FreeBSD.org .
+This manual page was adapted by
+.An Mark Johnston Aq markj@FreeBSD.org
+from the
+.Xr axe 4
+manual page.
diff --git a/share/man/man4/bce.4 b/share/man/man4/bce.4
new file mode 100644
index 0000000..004ffa3
--- /dev/null
+++ b/share/man/man4/bce.4
@@ -0,0 +1,432 @@
+.\" Copyright (c) 2006-2014 QLogic Corporation
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS'
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 4, 2012
+.Dt BCE 4
+.Os
+.Sh NAME
+.Nm bce
+.Nd "QLogic NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device bce"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_bce_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports QLogic's NetXtreme II product family, including the
+BCM5706, BCM5708, BCM5709 and BCM5716 Ethernet controllers.
+.Pp
+The NetXtreme II product family is composed of various Converged NIC (or CNIC)
+Ethernet controllers which support a TCP Offload Engine (TOE), Remote DMA (RDMA),
+and iSCSI acceleration, in addition to standard L2 Ethernet traffic, all on the
+same controller.
+.Pp
+The following features are supported in the
+.Nm
+driver under
+.Fx :
+.Pp
+.Bl -item -offset indent -compact
+.It
+IP/TCP/UDP checksum offload
+.It
+Jumbo frames (up to 9022 bytes)
+.It
+VLAN tag stripping
+.It
+Interrupt coalescing
+.It
+10/100/1000Mbps operation in full-duplex mode
+.It
+10/100Mbps operation in half-duplex mode
+.El
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 1000baseSX
+Sets 1000Mbps operation.
+Only
+.Cm full-duplex
+mode is supported at this speed.
+.It Cm 1000baseT
+Set 1000baseT operation over twisted pair.
+Only
+.Cm full-duplex
+mode is supported.
+.It Cm 2500BaseSX
+Set 2500Mbps operation.
+Only
+.Cm full-duplex
+mode is supported.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver provides support for various NICs based on the QLogic NetXtreme II
+family of Gigabit Ethernet controllers, including the
+following:
+.Pp
+.Bl -bullet -compact
+.It
+QLogic NetXtreme II BCM5706 1000Base-SX
+.It
+QLogic NetXtreme II BCM5706 1000Base-T
+.It
+QLogic NetXtreme II BCM5708 1000Base-SX
+.It
+QLogic NetXtreme II BCM5708 1000Base-T
+.It
+QLogic NetXtreme II BCM5709 1000Base-SX
+.It
+QLogic NetXtreme II BCM5709 1000Base-T
+.It
+QLogic NetXtreme II BCM5716 1000Base-T
+.It
+Dell PowerEdge 1950 integrated BCM5708 NIC
+.It
+Dell PowerEdge 2950 integrated BCM5708 NIC
+.It
+Dell PowerEdge R710 integrated BCM5709 NIC
+.It
+HP NC370F Multifunction Gigabit Server Adapter
+.It
+HP NC370T Multifunction Gigabit Server Adapter
+.It
+HP NC370i Multifunction Gigabit Server Adapter
+.It
+HP NC371i Multifunction Gigabit Server Adapter
+.It
+HP NC373F PCIe Multifunc Giga Server Adapter
+.It
+HP NC373T PCIe Multifunction Gig Server Adapter
+.It
+HP NC373i Multifunction Gigabit Server Adapter
+.It
+HP NC373m Multifunction Gigabit Server Adapter
+.It
+HP NC374m PCIe Multifunction Adapter
+.It
+HP NC380T PCIe DP Multifunc Gig Server Adapter
+.It
+HP NC382T PCIe DP Multifunction Gigabit Server Adapter
+.It
+HP NC382i DP Multifunction Gigabit Server Adapter
+.It
+HP NC382m DP 1GbE Multifunction BL-c Adapter
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width indent
+.It Va hw.bce.verbose
+Enable/Disable verbose logging and output to the console.
+Useful for debugging (default 0).
+.It Va hw.bce.msi_enable
+Enable/Disable MSI support (default 1).
+.It Va hw.bce.tso_enable
+Enable/Disable TSO support (default 1).
+.It Va hw.bce.strict_rx_mtu
+Enable/Disable strict RX frame size checking (default 0).
+.It Va hw.bce.hdr_split
+Enable/Disable frame header/payload splitting (default 1).
+.It Va hw.bce.rx_pages
+Set the number of memory pages assigned to receive packets by the driver.
+Due to alignment issues, this value can only be of the set
+1, 2, 4 or 8 (default 2).
+.It Va hw.bce.tx_pages
+Set the number of memory pages assigned to transmit packets
+by the driver.
+Due to alignment issues, this value can only be of the set
+1, 2, 4 or 8 (default 2).
+.It Va hw.bce.rx_ticks
+Time in microsecond ticks to wait before generating a status
+block updates due to RX processing activity.
+Values from 0-100 are valid.
+A value of 0 disables this status block update.
+Cannot be set to 0 if hw.bce.rx_quick_cons_trip is also 0
+(default 18).
+.It Va hw.bce.rx_ticks_int
+Time in microsecond ticks to wait during RX interrupt
+processing before generating a status block update.
+Values from 0-100 are valid.
+Valid values are in the range from 0-100.
+A value of 0 disables this status block update (default 18).
+.It Va hw.bce.rx_quick_cons_trip
+Number of RX Quick BD Chain entries that must be completed
+before a status block is generated.
+Values from 0-256 are valid.
+A value of 0 disables this status block update.
+Cannot be set to 0 if hw.bce.rx_ticks is also 0 (default 6).
+.It Va hw.bce.rx_quick_cons_trip_int
+Number of RX quick BD entries that must be completed before
+a status block is generated duing interrupt processing.
+Values from 0-256 are valid.
+A value of 0 disables this status block update (default 6).
+.It Va hw.bce.tx_ticks
+Time in microsecond ticks to wait before a status block
+update is generated due to TX activitiy.
+Values from 0-100 are valid.
+A value of 0 disables this status block update.
+Cannot be set to 0 if hw.bce.tx_quick_cons_trip is also 0
+(default 80).
+.It Va hw.bce.tx_ticks_int
+Time in microsecond ticks to wait in interrupt processing
+before a status block update is generated due to TX activity
+Values from 0-100 are valid.
+A value of 0 disables this status block update (default 80).
+.It Va hw.bce.tx_cons_trip
+How many TX Quick BD Chain entries that must be completed
+before a status block is generated.
+Values from 0-100 are valid.
+A value of 0 disables this status block update.
+Cannot be set to 0 if hw.bce.tx_ticks is also 0 (default 20).
+.It Va hw.bce.tx_cons_trip_int
+How many TX Quick BD Chain entries that must be completed
+before a status block is generated during an interrupt.
+Values from 0-100 are valid.
+A value of 0 disables this status block update (default 20).
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "bce%d: PCI memory allocation failed!"
+The driver has encountered a fatal initialization error.
+.It "bce%d: PCI map interrupt failed!"
+The driver has encountered a fatal initialization error.
+.It "bce%d: Unsupported controller revision (%c%d)"
+The driver does not support the controller revision in use.
+.It "bce%d: Controller initialization failed!"
+The driver has encountered a fatal initialization error.
+.It "bce%d: NVRAM test failed!"
+The driver could not access the controller NVRAM correctly.
+.It "bce%d: DMA resource allocation failed!"
+The driver could not allocate DMA memory to setup the controllers
+host memory data structures.
+.It "bce%d: Interface allocation failed!"
+The driver could not create a network interface for the controller.
+.It "bce%d: PHY probe failed!"
+The driver could not access the PHY used by the controller.
+.It "bce%d: Failed to setup IRQ!"
+The driver could not initialize the IRQ handler.
+.It "bce%d: Error: PHY read timeout!"
+The driver could not read a PHY register before the timeout period expired.
+.It "bce%d: PHY write timeout!"
+The driver could not write to the PHY register because a timeout occurred.
+.It "bce%d: Timeout error reading NVRAM at offset 0x%08X!"
+The driver could not write to NVRAM because a timeout occurred.
+.It "bce%d: Unknown Flash NVRAM found!"
+The driver does not recognize the NVRAM device being used and therefore
+cannot access it correctly.
+.It "bce%d: Invalid NVRAM magic value!"
+The driver cannot read NVRAM or the NVRAM is corrupt.
+.It "bce%d: Invalid Manufacturing Information NVRAM CRC!"
+The driver cannot read NVRAM or the NVRAM is corrupt.
+.It "bce%d: Invalid Feature Configuration Information NVRAM CRC!"
+The driver cannot read NVRAM or the NVRAM is corrupt.
+.It "bce%d: DMA mapping error!"
+The driver was unable to map memory into DMA addressable space required
+by the controller.
+.It "bce%d: Could not allocate parent DMA tag!"
+The driver could not allocate a PCI compatible DMA tag.
+.It "bce%d: Could not allocate status block DMA tag!"
+The driver could not allocate a DMA tag for the controller's
+status block.
+.It "bce%d: Could not allocate status block DMA memory!"
+The driver could not allocate DMA addressable memory for the controller's
+status block.
+.It "bce%d: Could not map status block DMA memory!"
+The driver could not map the status block memory into the controller's DMA
+address space.
+.It "bce%d: Could not allocate statistics block DMA tag!"
+The driver could not allocate a DMA tag for the controller's
+statistics block.
+.It "bce%d: Could not allocate statistics block DMA memory!"
+The driver could not allocate DMA addressable memory for the controller's
+statistics block.
+.It "bce%d: Could not map statistics block DMA memory!"
+The driver could not map the statistics block memory into the controller's DMA
+address space.
+.It "bce%d: Could not allocate TX descriptor chain DMA tag!"
+The driver could not allocate a DMA tag for the controller's
+TX chain.
+.It "bce%d: Could not allocate TX descriptor chain DMA memory!"
+The driver could not allocate DMA addressable memory for the controller's
+TX chain.
+.It "bce%d: Could not map TX descriptor chain DMA memory!"
+The driver could not map the TX descriptor chain memory into the controller's DMA
+address space.
+.It "bce%d: Could not allocate TX mbuf DMA tag!"
+The driver could not allocate a DMA tag for the controller's
+TX mbuf memory.
+.It "bce%d: Unable to create TX mbuf DMA map!"
+The driver could not map the TX mbuf memory into the controller's DMA
+address space.
+.It "bce%d: Could not allocate RX descriptor chain DMA tag!"
+The driver could not allocate a DMA tag for the controller's
+RX chain.
+.It "bce%d: Could not allocate RX descriptor chain "
+The driver could not allocate DMA addressable memory for the controller's
+RX chain.
+.It "bce%d: Could not map RX descriptor chain DMA memory!"
+The driver could not map the RX descriptor chain memory into the controller's DMA
+address space.
+.It "bce%d: Could not allocate RX mbuf DMA tag!"
+The driver could not allocate a DMA tag for the controller's
+RX mbuf memory.
+.It "bce%d: Unable to create RX mbuf DMA map!"
+The driver could not map the RX mbuf memory into the controller's DMA
+address space.
+.It "bce%d: Firmware synchronization timeout!"
+The driver was not able to synchronize with the firmware running on the
+controller.
+The firmware may be stopped or hung.
+.It "bce%d: Invalid Ethernet address!"
+The driver was not able to read a valid Ethernet MAC address from NVRAM.
+.It "bce%d: Reset failed!"
+The driver has encountered a fatal initialization error.
+.It "bce%d: Byte swap is incorrect!"
+The driver has encountered a fatal initialization error.
+Contact the author
+with details of the CPU architecture and system chipset in use.
+.It "bce%d: Firmware did not complete initialization!"
+The driver has encountered a fatal initialization error.
+.It "bce%d: Bootcode not running!"
+The driver has encountered a fatal initialization error.
+.It "bce%d: Error mapping mbuf into RX chain!"
+The driver could not map a RX mbuf into DMA addressable memory.
+.It "bce%d: Error filling RX chain: rx_bd[0x%04X]!"
+The driver was unable to allocate enough mbufs to fill the RX chain
+during initialization.
+Try increasing the number of mbufs available in
+the system, increase system memory, or if using jumbo frames, make sure
+enough 9KB mbufs are available.
+.It "bce%d: Failed to allocate new mbuf, incoming frame dropped!"
+The driver was unable to allocate a new mbuf for the RX chain and reused
+the mbuf for the received frame, dropping the incoming frame in the process.
+Try increasing the number of mbufs available in the system or increase system
+memory.
+.It "bce%d: Controller reset failed!"
+A fatal initialization error has occurred.
+.It "bce%d: Controller initialization failed!"
+A fatal initialization error has occurred.
+.It "bce%d: Block initialization failed!"
+A fatal initialization error has occurred.
+.It "bce%d: Error mapping mbuf into TX chain!"
+The driver could not map a TX mbuf into DMA addressable memory.
+.It "bce%d: Error registering poll function!"
+The driver received an error while attempting to register the poll function.
+.It "bce%d: Changing VLAN_MTU not supported."
+Changing the VLAN MTU is not currently supported by the driver.
+.It "bce%d: Cannot change VLAN_HWTAGGING while management firmware (ASF/IPMI/UMP) is running!"
+Management firmware to support ASF/IPMI/UMP requires that VLAN
+tag stripping be enabled in the controller.
+.It "bce%d: Changing VLAN_HWTAGGING not supported!"
+Disabling VLAN tag stripping is not currently supported by the driver.
+.It "bce%d: Watchdog timeout occurred, resetting!"
+The device has stopped responding to the network, there is a problem
+with the cable connection, or a driver logic problem has occurred..
+.It "bce%d: Fatal attention detected: 0x%08X!"
+A controller hardware failure has occurred.
+If the problem continues replace the controller.
+.El
+.Sh SUPPORT
+For support questions please contact your QLogic approved reseller or
+QLogic Technical Support at
+.Pa http://support.qlogic.com ,
+or by E-mail at
+.Aq support@qlogic.com .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 6.1 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An David Christensen Aq davidch@broadcom.com .
diff --git a/share/man/man4/bfe.4 b/share/man/man4/bfe.4
new file mode 100644
index 0000000..307813b
--- /dev/null
+++ b/share/man/man4/bfe.4
@@ -0,0 +1,109 @@
+.\"
+.\" Copyright (c) 2003 Stuart Walsh
+.\"
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt BFE 4
+.Os
+.Sh NAME
+.Nm bfe
+.Nd "Broadcom BCM4401 Ethernet Device Driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device bfe"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_bfe_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Broadcom BCM4401 based Fast Ethernet adapters.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Set full duplex operation.
+.El
+.Pp
+For further information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "bfe%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "bfe%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "bfe%d: failed to allocate DMA resources"
+There are not enough mbufs available for allocation.
+.It "bfe%d: watchdog timeout -- resetting"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An Stuart Walsh
+and
+.An Duncan Barclay .
+This manual page was written by
+.An Stuart Walsh .
diff --git a/share/man/man4/bge.4 b/share/man/man4/bge.4
new file mode 100644
index 0000000..dc31ff6
--- /dev/null
+++ b/share/man/man4/bge.4
@@ -0,0 +1,264 @@
+.\" Copyright (c) 2001 Wind River Systems
+.\" Copyright (c) 1997, 1998, 1999, 2000, 2001
+.\" Bill Paul <wpaul@windriver.com>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 19, 2012
+.Dt BGE 4
+.Os
+.Sh NAME
+.Nm bge
+.Nd "Broadcom BCM57xx/BCM590x Gigabit/Fast Ethernet driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device bge"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_bge_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for various NICs based on the Broadcom BCM570x,
+571x, 572x, 575x, 576x, 578x, 5776x and 5778x Gigabit Ethernet controller
+chips and the 590x and 5779x Fast Ethernet controller chips.
+.Pp
+All of these NICs are capable of 10, 100 and 1000Mbps speeds over CAT5
+copper cable, except for the SysKonnect SK-9D41 which supports only
+1000Mbps over multimode fiber.
+The BCM570x builds upon the technology of the Alteon Tigon II.
+It has two R4000 CPU cores and is PCI v2.2 and PCI-X v1.0 compliant.
+It supports IP, TCP
+and UDP checksum offload for both receive and transmit,
+multiple RX and TX DMA rings for QoS applications, rules-based
+receive filtering, and VLAN tag stripping/insertion as well as
+a 256-bit multicast hash filter.
+Additional features may be
+provided via value-add firmware updates.
+The BCM570x supports TBI (ten bit interface) and GMII
+transceivers, which means it can be used with either copper or 1000baseX
+fiber applications.
+Note however the device only supports a single
+speed in TBI mode.
+.Pp
+Most BCM5700-based cards also use the Broadcom BCM5401 or BCM5411 10/100/1000
+copper gigabit transceivers,
+which support autonegotiation of 10, 100 and 1000Mbps modes in
+full or half duplex.
+.Pp
+The BCM5700, BCM5701, BCM5702, BCM5703, BCM5704, BCM5714, BCM5717, BCM5719,
+BCM5720, BCM5780 and BCM57765 also support jumbo frames, which can be
+configured via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit jumbo frames.
+Using jumbo frames can greatly improve performance for certain tasks,
+such as file transfers and data streaming.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+The
+.Xr ifconfig 8
+.Ic mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Xr ifconfig 8
+.Ic mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 1000baseTX
+Set 1000baseTX operation over twisted pair.
+Only
+.Cm full-duplex
+mode is supported.
+.It Cm 1000baseSX
+Set 1000Mbps (Gigabit Ethernet) operation.
+Both
+.Cm full-duplex
+and
+.Cm half-duplex
+modes are supported.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver provides support for various NICs based on the Broadcom BCM570x
+family of Gigabit Ethernet controller chips, including the
+following:
+.Pp
+.Bl -bullet -compact
+.It
+3Com 3c996-SX (1000baseSX)
+.It
+3Com 3c996-T (10/100/1000baseTX)
+.It
+Dell PowerEdge 1750 integrated BCM5704C NIC (10/100/1000baseTX)
+.It
+Dell PowerEdge 2550 integrated BCM5700 NIC (10/100/1000baseTX)
+.It
+Dell PowerEdge 2650 integrated BCM5703 NIC (10/100/1000baseTX)
+.It
+Dell PowerEdge R200 integrated BCM5750 NIC (10/100/1000baseTX)
+.It
+Dell PowerEdge R300 integrated BCM5722 NIC (10/100/1000baseTX)
+.It
+IBM x235 server integrated BCM5703x NIC (10/100/1000baseTX)
+.It
+HP Compaq dc7600 integrated BCM5752 NIC (10/100/1000baseTX)
+.It
+HP ProLiant NC7760 embedded Gigabit NIC (10/100/1000baseTX)
+.It
+HP ProLiant NC7770 PCI-X Gigabit NIC (10/100/1000baseTX)
+.It
+HP ProLiant NC7771 PCI-X Gigabit NIC (10/100/1000baseTX)
+.It
+HP ProLiant NC7781 embedded PCI-X Gigabit NIC (10/100/1000baseTX)
+.It
+Netgear GA302T (10/100/1000baseTX)
+.It
+SysKonnect SK-9D21 (10/100/1000baseTX)
+.It
+SysKonnect SK-9D41 (1000baseSX)
+.El
+.Sh LOADER TUNABLES
+The following tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel, or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va hw.bge.allow_asf
+Allow the ASF feature for cooperating with IPMI.
+Can cause system lockup problems on a small number of systems.
+Enabled by default.
+.It Va dev.bge.%d.msi
+Non-zero value enables MSI support on the Ethernet hardware.
+The default value is 1.
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width indent
+.It Va dev.bge.%d.forced_collapse
+Allow collapsing multiple transmit buffers into a single buffer
+to increase transmit performance with the cost of CPU cycles.
+The default value is 0 to disable transmit buffer collapsing.
+.It Va dev.bge.%d.forced_udpcsum
+Enable UDP transmit checksum offloading even if controller can generate
+UDP datagrams with checksum value 0.
+UDP datagrams with checksum value 0 can confuse receiver host as it means
+sender did not compute UDP checksum.
+The default value is 0 which disables UDP transmit checksum offloading.
+The interface need to be brought down and up again before a change takes
+effect.
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "bge%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "bge%d: couldn't map ports"
+A fatal initialization error has occurred.
+.It "bge%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "bge%d: no memory for softc struct!"
+The driver failed to allocate memory for per-device instance information
+during initialization.
+.It "bge%d: failed to enable memory mapping!"
+The driver failed to initialize PCI shared memory mapping.
+This might
+happen if the card is not in a bus-master slot.
+.It "bge%d: no memory for jumbo buffers!"
+The driver failed to allocate memory for jumbo frames during
+initialization.
+.It "bge%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.5 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@windriver.com .
diff --git a/share/man/man4/bhyve.4 b/share/man/man4/bhyve.4
new file mode 100644
index 0000000..cdfc1e2
--- /dev/null
+++ b/share/man/man4/bhyve.4
@@ -0,0 +1,68 @@
+.\"
+.\" Copyright (c) 2012 NetApp Inc
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 5, 2013
+.Dt BHYVE 4
+.Os
+.Sh NAME
+.Nm bhyve
+.Nd virtual machine monitor
+.Sh SYNOPSIS
+.Cd "/usr/sbin/bhyve"
+.Cd "/usr/sbin/bhyveload"
+.Cd "/usr/sbin/bhyvectl"
+.Cd "/boot/kernel/vmm.ko"
+.Sh DESCRIPTION
+.Nm
+is a virtual machine monitor that is hosted by FreeBSD. It is used to host
+unmodified guest operating systems on top of FreeBSD.
+.Pp
+.Nm
+relies heavily on hardware assist provided by the CPU and chipset to virtualize
+processor and memory resources.
+.Sh SEE ALSO
+.Xr bhyve 8 ,
+.Xr bhyveload 8 ,
+.Xr bhyvectl 8 ,
+.Xr vmm 4
+.Sh HISTORY
+.Nm
+first appeared in
+.Fx 10.0 ,
+and was developed at NetApp Inc.
+.Sh AUTHORS
+.Nm
+was developed by
+.An -nosplit
+.An "Peter Grehan" Aq grehan@FreeBSD.org
+and
+.An "Neel Natu" Aq neel@FreeBSD.org
+at NetApp Inc.
+.Sh BUGS
+.Nm
+is considered experimental in
+.Fx .
diff --git a/share/man/man4/bktr.4 b/share/man/man4/bktr.4
new file mode 100644
index 0000000..59136bf
--- /dev/null
+++ b/share/man/man4/bktr.4
@@ -0,0 +1,266 @@
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 18, 2006
+.Dt BKTR 4
+.Os
+.Sh NAME
+.Nm bktr
+.Nd Brooktree Bt848/849/878/879 and Pinnacle PCTV video capture driver
+.Sh SYNOPSIS
+.Cd device bktr
+.Pp
+.Cd device iicbus
+.Cd device iicbb
+.Cd device smbus
+.Sh DESCRIPTION
+The
+.Nm bktr
+driver provides support for PCI
+.Em video
+capture and
+.Em VBI
+capture on low cost, high performance boards.
+The driver is based on the Matrox Meteor driver and uses the same API.
+The
+.Nm
+driver should support most video cards based on the
+.Em "Brooktree Bt848/849/878/879 Video Capture Chip" .
+Also supported are most
+.Em "Pinnacle PCTV"
+video cards.
+Furthermore, the driver supports
+.Em FM Radio
+if the tuner supports it.
+.Pp
+The driver currently supports the following features:
+.Bd -unfilled -offset indent
+PCI to PCI dma transfer
+clipping
+yuv
+rgb16
+rgb24
+rgb32
+.Ed
+.Pp
+On the supported cards, tuners and other components are interconnected
+with an I2C bus.
+The Brooktree848 chips act as a master device on the bus to control them.
+Therefore,
+.Xr iicbus 4 ,
+.Xr iicbb 4
+and
+.Xr smbus 4
+controller declarations are mandatory to activate
+.Nm
+support.
+.Pp
+The following kernel parameters may be used to further configure the driver:
+.Pp
+.Em options "BROOKTREE_ALLOC_PAGES=xxx"
+specifies the number of contiguous pages to allocate when successfully
+probed.
+The default number of pages allocated by the kernel is 216.
+This means that there are (216*4096) bytes available for use.
+.Bd -unfilled
+.Cd options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_PAL
+.Cd options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_NTSC
+.Ed
+One of these options can be used to set the default video format for the driver.
+This fixed random hangs and lockups with the VideoLogic Captivator PCI card.
+.Pp
+The following sysctls may be used to further configure the driver:
+.Pp
+.Em sysctl hw.bt848.card=nnnn
+This can be used to override the card make which was detected at boot time.
+.Ql nnnn
+is set to an integer from 1 to 23 taken from the following table:
+.Pp
+.Bl -tag -compact -width 30n
+.It MIRO
+1
+.It HAUPPAUGE
+2
+.It STB
+3
+.It INTEL
+4
+.It IMS_TURBO
+5
+.It AVER_MEDIA
+6
+.It OSPREY
+7
+.It NEC_PK
+8
+.It IO_GV
+9
+.It FLYVIDEO
+10
+.It ZOLTRIX
+11
+.It KISS
+12
+.It VIDEO_HIGHWAY_XTREME
+13
+.It ASKEY_DYNALINK_MAGIC_TVIEW
+14
+.It LEADTEK
+15
+.It TERRATVPLUS
+16
+.It IO_BCTV3
+17
+.It AOPEN_VA1000
+18
+.It PINNACLE_PCTV_RAVE
+19
+.It PIXELVIEW_PLAYTV_PAK
+20
+.It TERRATVALUE
+21
+.It PIXELVIEW_PLAYTV_PRO_REV_4C
+22
+.It Bt848_MAX
+23
+.El
+.Pp
+.Em sysctl hw.bt848.tuner=nnnn
+This can be used to override the tuner make which was detected at boot time.
+.Ql nnnn
+is set to an integer from 0 to 16 taken from the following table:
+.Pp
+.Bl -tag -compact -width 22n
+.It NO_TUNER
+0
+.It TEMIC_NTSC
+1
+.It TEMIC_PAL
+2
+.It TEMIC_SECAM
+3
+.It PHILIPS_NTSC
+4
+.It PHILIPS_PAL
+5
+.It PHILIPS_SECAM
+6
+.It TEMIC_PALI
+7
+.It PHILIPS_PALI
+8
+.It PHILIPS_FR1236_NTSC
+9 /* These have FM Radio support */
+.It PHILIPS_FR1216_PAL
+10 /* These have FM Radio support */
+.It PHILIPS_FR1236_SECAM
+11 /* These have FM Radio support */
+.It ALPS_TSCH5
+12
+.It ALPS_TSBH1
+13
+.It MT2032
+14
+.It LG_TPI8PSB12P_PAL
+15
+.It Bt848_MAX
+16
+.El
+.Sh HARDWARE
+The
+.Nm
+driver supports video capture cards based on the
+Brooktree Bt848/849/878/879 chips, as well as
+Pinnacle PCTV cards, including:
+.Pp
+.Bl -bullet -compact
+.It
+AOpen VA1000
+.It
+AVerMedia AVerTV Studio
+.It
+AVerMedia TF/FM-98
+.It
+ATI TV Wonder VE
+.It
+Hauppauge WinCast/TV
+.It
+Hauppauge WinTV-Go-FM
+.It
+Hauppauge WinTV-pci
+.It
+Hauppauge WinTV-radio
+.It
+Intel Smart Video Recorder III
+.It
+KWORLD PCI TV Tuner
+.It
+Miro PC TV
+.It
+Pinnacle PCTV Pro
+.It
+Pinnacle PCTV Rave
+.It
+PixelView PlayTV PAK
+.It
+PixelView PlayTV Pro (rev 4C, 9D)
+.It
+SIGMA TV II
+.It
+STB TV PCI Television Tuner
+.It
+Super TV Tuner
+.It
+TerraTec TValue
+.It
+V-Stream XPERT TV-PVR 878
+.It
+Video Highway XTreme
+.It
+VideoLogic Captivator PCI
+.El
+.Sh FILES
+.Bl -tag -width /usr/share/examples/meteor -compact
+.It Pa /usr/share/examples/meteor
+Examples of what you can do with the (similarly designed) Meteor driver.
+.It Pa /usr/ports/multimedia/fxtv
+A TV and Camera display program utilizing the bktr driver - requires that
+.Em The X Window System
+and
+.Em The Ports Collection
+also be installed.
+.It Pa /usr/ports/misc/alevt
+A program to capture and display Teletext (VideoText) pages - requires that
+.Em The X Window System
+and
+.Em The Ports Collection
+also be installed.
+.It Pa /usr/ports/audio/xmradio
+An FM Radio Tuner for cards which have an FM Radio tuner fitted - requires that
+.Em The X Window System
+and
+.Em The Ports Collection
+also be installed.
+It also requires
+.Em Motif
+or the
+.Em lesstif
+port.
+.El
+.Sh SEE ALSO
+.Xr meteor 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 2.2 .
+.Sh AUTHORS
+.An -nosplit
+This driver is based on the work of
+.An Jim Lowe Aq james@miller.cs.uwm.edu ,
+.An Mark Tinguely Aq tinguely@plains.nodak.edu ,
+.An Amancio Hasty Aq hasty@star-gate.com ,
+.An Roger Hardiman Aq roger@FreeBSD.org
+and a bunch of other people.
+Support for Pinnacle PCTV Rave cards was added by
+.An Branko Lankester Aq branko@euro.net .
diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4
new file mode 100644
index 0000000..668f92d
--- /dev/null
+++ b/share/man/man4/blackhole.4
@@ -0,0 +1,84 @@
+.\"
+.\" blackhole - drop refused TCP or UDP connects
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\"
+.\" $FreeBSD$
+.Dd January 1, 2007
+.Dt BLACKHOLE 4
+.Os
+.Sh NAME
+.Nm blackhole
+.Nd a
+.Xr sysctl 8
+MIB for manipulating behaviour in respect of refused TCP or UDP connection
+attempts
+.Sh SYNOPSIS
+.Cd sysctl net.inet.tcp.blackhole[=[0 | 1 | 2]]
+.Cd sysctl net.inet.udp.blackhole[=[0 | 1]]
+.Sh DESCRIPTION
+The
+.Nm
+.Xr sysctl 8
+MIB is used to control system behaviour when connection requests
+are received on TCP or UDP ports where there is no socket listening.
+.Pp
+Normal behaviour, when a TCP SYN segment is received on a port where
+there is no socket accepting connections, is for the system to return
+a RST segment, and drop the connection.
+The connecting system will
+see this as a
+.Dq Connection refused .
+By setting the TCP blackhole
+MIB to a numeric value of one, the incoming SYN segment
+is merely dropped, and no RST is sent, making the system appear
+as a blackhole.
+By setting the MIB value to two, any segment arriving
+on a closed port is dropped without returning a RST.
+This provides some degree of protection against stealth port scans.
+.Pp
+In the UDP instance, enabling blackhole behaviour turns off the sending
+of an ICMP port unreachable message in response to a UDP datagram which
+arrives on a port where there is no socket listening.
+It must be noted that this behaviour will prevent remote systems from running
+.Xr traceroute 8
+to a system.
+.Pp
+The blackhole behaviour is useful to slow down anyone who is port scanning
+a system, attempting to detect vulnerable services on a system.
+It could potentially also slow down someone who is attempting a denial
+of service attack.
+.Sh WARNING
+The TCP and UDP blackhole features should not be regarded as a replacement
+for firewall solutions.
+Better security would consist of the
+.Nm
+.Xr sysctl 8
+MIB used in conjunction with one of the available firewall packages.
+.Pp
+This mechanism is not a substitute for securing a system.
+It should be used together with other security mechanisms.
+.Sh SEE ALSO
+.Xr ip 4 ,
+.Xr tcp 4 ,
+.Xr udp 4 ,
+.Xr ipf 8 ,
+.Xr ipfw 8 ,
+.Xr pfctl 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The TCP and UDP
+.Nm
+MIBs
+first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Geoffrey M. Rehmet
diff --git a/share/man/man4/bpf.4 b/share/man/man4/bpf.4
new file mode 100644
index 0000000..072f8e0
--- /dev/null
+++ b/share/man/man4/bpf.4
@@ -0,0 +1,1112 @@
+.\" Copyright (c) 2007 Seccuris Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed by Robert N. M. Watson under contract to
+.\" Seccuris Inc.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Copyright (c) 1990 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that: (1) source code distributions
+.\" retain the above copyright notice and this paragraph in its entirety, (2)
+.\" distributions including binary code include the above copyright notice and
+.\" this paragraph in its entirety in the documentation or other materials
+.\" provided with the distribution, and (3) all advertising materials mentioning
+.\" features or use of this software display the following acknowledgement:
+.\" ``This product includes software developed by the University of California,
+.\" Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+.\" the University nor the names of its contributors may be used to endorse
+.\" or promote products derived from this software without specific prior
+.\" written permission.
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\" This document is derived in part from the enet man page (enet.4)
+.\" distributed with 4.3BSD Unix.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 15, 2010
+.Dt BPF 4
+.Os
+.Sh NAME
+.Nm bpf
+.Nd Berkeley Packet Filter
+.Sh SYNOPSIS
+.Cd device bpf
+.Sh DESCRIPTION
+The Berkeley Packet Filter
+provides a raw interface to data link layers in a protocol
+independent fashion.
+All packets on the network, even those destined for other hosts,
+are accessible through this mechanism.
+.Pp
+The packet filter appears as a character special device,
+.Pa /dev/bpf .
+After opening the device, the file descriptor must be bound to a
+specific network interface with the
+.Dv BIOCSETIF
+ioctl.
+A given interface can be shared by multiple listeners, and the filter
+underlying each descriptor will see an identical packet stream.
+.Pp
+A separate device file is required for each minor device.
+If a file is in use, the open will fail and
+.Va errno
+will be set to
+.Er EBUSY .
+.Pp
+Associated with each open instance of a
+.Nm
+file is a user-settable packet filter.
+Whenever a packet is received by an interface,
+all file descriptors listening on that interface apply their filter.
+Each descriptor that accepts the packet receives its own copy.
+.Pp
+The packet filter will support any link level protocol that has fixed length
+headers.
+Currently, only Ethernet,
+.Tn SLIP ,
+and
+.Tn PPP
+drivers have been modified to interact with
+.Nm .
+.Pp
+Since packet data is in network byte order, applications should use the
+.Xr byteorder 3
+macros to extract multi-byte values.
+.Pp
+A packet can be sent out on the network by writing to a
+.Nm
+file descriptor.
+The writes are unbuffered, meaning only one packet can be processed per write.
+Currently, only writes to Ethernets and
+.Tn SLIP
+links are supported.
+.Sh BUFFER MODES
+.Nm
+devices deliver packet data to the application via memory buffers provided by
+the application.
+The buffer mode is set using the
+.Dv BIOCSETBUFMODE
+ioctl, and read using the
+.Dv BIOCGETBUFMODE
+ioctl.
+.Ss Buffered read mode
+By default,
+.Nm
+devices operate in the
+.Dv BPF_BUFMODE_BUFFER
+mode, in which packet data is copied explicitly from kernel to user memory
+using the
+.Xr read 2
+system call.
+The user process will declare a fixed buffer size that will be used both for
+sizing internal buffers and for all
+.Xr read 2
+operations on the file.
+This size is queried using the
+.Dv BIOCGBLEN
+ioctl, and is set using the
+.Dv BIOCSBLEN
+ioctl.
+Note that an individual packet larger than the buffer size is necessarily
+truncated.
+.Ss Zero-copy buffer mode
+.Nm
+devices may also operate in the
+.Dv BPF_BUFMODE_ZEROCOPY
+mode, in which packet data is written directly into two user memory buffers
+by the kernel, avoiding both system call and copying overhead.
+Buffers are of fixed (and equal) size, page-aligned, and an even multiple of
+the page size.
+The maximum zero-copy buffer size is returned by the
+.Dv BIOCGETZMAX
+ioctl.
+Note that an individual packet larger than the buffer size is necessarily
+truncated.
+.Pp
+The user process registers two memory buffers using the
+.Dv BIOCSETZBUF
+ioctl, which accepts a
+.Vt struct bpf_zbuf
+pointer as an argument:
+.Bd -literal
+struct bpf_zbuf {
+ void *bz_bufa;
+ void *bz_bufb;
+ size_t bz_buflen;
+};
+.Ed
+.Pp
+.Vt bz_bufa
+is a pointer to the userspace address of the first buffer that will be
+filled, and
+.Vt bz_bufb
+is a pointer to the second buffer.
+.Nm
+will then cycle between the two buffers as they fill and are acknowledged.
+.Pp
+Each buffer begins with a fixed-length header to hold synchronization and
+data length information for the buffer:
+.Bd -literal
+struct bpf_zbuf_header {
+ volatile u_int bzh_kernel_gen; /* Kernel generation number. */
+ volatile u_int bzh_kernel_len; /* Length of data in the buffer. */
+ volatile u_int bzh_user_gen; /* User generation number. */
+ /* ...padding for future use... */
+};
+.Ed
+.Pp
+The header structure of each buffer, including all padding, should be zeroed
+before it is configured using
+.Dv BIOCSETZBUF .
+Remaining space in the buffer will be used by the kernel to store packet
+data, laid out in the same format as with buffered read mode.
+.Pp
+The kernel and the user process follow a simple acknowledgement protocol via
+the buffer header to synchronize access to the buffer: when the header
+generation numbers,
+.Vt bzh_kernel_gen
+and
+.Vt bzh_user_gen ,
+hold the same value, the kernel owns the buffer, and when they differ,
+userspace owns the buffer.
+.Pp
+While the kernel owns the buffer, the contents are unstable and may change
+asynchronously; while the user process owns the buffer, its contents are
+stable and will not be changed until the buffer has been acknowledged.
+.Pp
+Initializing the buffer headers to all 0's before registering the buffer has
+the effect of assigning initial ownership of both buffers to the kernel.
+The kernel signals that a buffer has been assigned to userspace by modifying
+.Vt bzh_kernel_gen ,
+and userspace acknowledges the buffer and returns it to the kernel by setting
+the value of
+.Vt bzh_user_gen
+to the value of
+.Vt bzh_kernel_gen .
+.Pp
+In order to avoid caching and memory re-ordering effects, the user process
+must use atomic operations and memory barriers when checking for and
+acknowledging buffers:
+.Bd -literal
+#include <machine/atomic.h>
+
+/*
+ * Return ownership of a buffer to the kernel for reuse.
+ */
+static void
+buffer_acknowledge(struct bpf_zbuf_header *bzh)
+{
+
+ atomic_store_rel_int(&bzh->bzh_user_gen, bzh->bzh_kernel_gen);
+}
+
+/*
+ * Check whether a buffer has been assigned to userspace by the kernel.
+ * Return true if userspace owns the buffer, and false otherwise.
+ */
+static int
+buffer_check(struct bpf_zbuf_header *bzh)
+{
+
+ return (bzh->bzh_user_gen !=
+ atomic_load_acq_int(&bzh->bzh_kernel_gen));
+}
+.Ed
+.Pp
+The user process may force the assignment of the next buffer, if any data
+is pending, to userspace using the
+.Dv BIOCROTZBUF
+ioctl.
+This allows the user process to retrieve data in a partially filled buffer
+before the buffer is full, such as following a timeout; the process must
+recheck for buffer ownership using the header generation numbers, as the
+buffer will not be assigned to userspace if no data was present.
+.Pp
+As in the buffered read mode,
+.Xr kqueue 2 ,
+.Xr poll 2 ,
+and
+.Xr select 2
+may be used to sleep awaiting the availability of a completed buffer.
+They will return a readable file descriptor when ownership of the next buffer
+is assigned to user space.
+.Pp
+In the current implementation, the kernel may assign zero, one, or both
+buffers to the user process; however, an earlier implementation maintained
+the invariant that at most one buffer could be assigned to the user process
+at a time.
+In order to both ensure progress and high performance, user processes should
+acknowledge a completely processed buffer as quickly as possible, returning
+it for reuse, and not block waiting on a second buffer while holding another
+buffer.
+.Sh IOCTLS
+The
+.Xr ioctl 2
+command codes below are defined in
+.In net/bpf.h .
+All commands require
+these includes:
+.Bd -literal
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/ioctl.h>
+ #include <net/bpf.h>
+.Ed
+.Pp
+Additionally,
+.Dv BIOCGETIF
+and
+.Dv BIOCSETIF
+require
+.In sys/socket.h
+and
+.In net/if.h .
+.Pp
+In addition to
+.Dv FIONREAD
+and
+.Dv SIOCGIFADDR ,
+the following commands may be applied to any open
+.Nm
+file.
+The (third) argument to
+.Xr ioctl 2
+should be a pointer to the type indicated.
+.Bl -tag -width BIOCGETBUFMODE
+.It Dv BIOCGBLEN
+.Pq Li u_int
+Returns the required buffer length for reads on
+.Nm
+files.
+.It Dv BIOCSBLEN
+.Pq Li u_int
+Sets the buffer length for reads on
+.Nm
+files.
+The buffer must be set before the file is attached to an interface
+with
+.Dv BIOCSETIF .
+If the requested buffer size cannot be accommodated, the closest
+allowable size will be set and returned in the argument.
+A read call will result in
+.Er EIO
+if it is passed a buffer that is not this size.
+.It Dv BIOCGDLT
+.Pq Li u_int
+Returns the type of the data link layer underlying the attached interface.
+.Er EINVAL
+is returned if no interface has been specified.
+The device types, prefixed with
+.Dq Li DLT_ ,
+are defined in
+.In net/bpf.h .
+.It Dv BIOCPROMISC
+Forces the interface into promiscuous mode.
+All packets, not just those destined for the local host, are processed.
+Since more than one file can be listening on a given interface,
+a listener that opened its interface non-promiscuously may receive
+packets promiscuously.
+This problem can be remedied with an appropriate filter.
+.It Dv BIOCFLUSH
+Flushes the buffer of incoming packets,
+and resets the statistics that are returned by BIOCGSTATS.
+.It Dv BIOCGETIF
+.Pq Li "struct ifreq"
+Returns the name of the hardware interface that the file is listening on.
+The name is returned in the ifr_name field of
+the
+.Li ifreq
+structure.
+All other fields are undefined.
+.It Dv BIOCSETIF
+.Pq Li "struct ifreq"
+Sets the hardware interface associate with the file.
+This
+command must be performed before any packets can be read.
+The device is indicated by name using the
+.Li ifr_name
+field of the
+.Li ifreq
+structure.
+Additionally, performs the actions of
+.Dv BIOCFLUSH .
+.It Dv BIOCSRTIMEOUT
+.It Dv BIOCGRTIMEOUT
+.Pq Li "struct timeval"
+Set or get the read timeout parameter.
+The argument
+specifies the length of time to wait before timing
+out on a read request.
+This parameter is initialized to zero by
+.Xr open 2 ,
+indicating no timeout.
+.It Dv BIOCGSTATS
+.Pq Li "struct bpf_stat"
+Returns the following structure of packet statistics:
+.Bd -literal
+struct bpf_stat {
+ u_int bs_recv; /* number of packets received */
+ u_int bs_drop; /* number of packets dropped */
+};
+.Ed
+.Pp
+The fields are:
+.Bl -hang -offset indent
+.It Li bs_recv
+the number of packets received by the descriptor since opened or reset
+(including any buffered since the last read call);
+and
+.It Li bs_drop
+the number of packets which were accepted by the filter but dropped by the
+kernel because of buffer overflows
+(i.e., the application's reads are not keeping up with the packet traffic).
+.El
+.It Dv BIOCIMMEDIATE
+.Pq Li u_int
+Enable or disable
+.Dq immediate mode ,
+based on the truth value of the argument.
+When immediate mode is enabled, reads return immediately upon packet
+reception.
+Otherwise, a read will block until either the kernel buffer
+becomes full or a timeout occurs.
+This is useful for programs like
+.Xr rarpd 8
+which must respond to messages in real time.
+The default for a new file is off.
+.It Dv BIOCSETF
+.It Dv BIOCSETFNR
+.Pq Li "struct bpf_program"
+Sets the read filter program used by the kernel to discard uninteresting
+packets.
+An array of instructions and its length is passed in using
+the following structure:
+.Bd -literal
+struct bpf_program {
+ int bf_len;
+ struct bpf_insn *bf_insns;
+};
+.Ed
+.Pp
+The filter program is pointed to by the
+.Li bf_insns
+field while its length in units of
+.Sq Li struct bpf_insn
+is given by the
+.Li bf_len
+field.
+See section
+.Sx "FILTER MACHINE"
+for an explanation of the filter language.
+The only difference between
+.Dv BIOCSETF
+and
+.Dv BIOCSETFNR
+is
+.Dv BIOCSETF
+performs the actions of
+.Dv BIOCFLUSH
+while
+.Dv BIOCSETFNR
+does not.
+.It Dv BIOCSETWF
+.Pq Li "struct bpf_program"
+Sets the write filter program used by the kernel to control what type of
+packets can be written to the interface.
+See the
+.Dv BIOCSETF
+command for more
+information on the
+.Nm
+filter program.
+.It Dv BIOCVERSION
+.Pq Li "struct bpf_version"
+Returns the major and minor version numbers of the filter language currently
+recognized by the kernel.
+Before installing a filter, applications must check
+that the current version is compatible with the running kernel.
+Version numbers are compatible if the major numbers match and the application minor
+is less than or equal to the kernel minor.
+The kernel version number is returned in the following structure:
+.Bd -literal
+struct bpf_version {
+ u_short bv_major;
+ u_short bv_minor;
+};
+.Ed
+.Pp
+The current version numbers are given by
+.Dv BPF_MAJOR_VERSION
+and
+.Dv BPF_MINOR_VERSION
+from
+.In net/bpf.h .
+An incompatible filter
+may result in undefined behavior (most likely, an error returned by
+.Fn ioctl
+or haphazard packet matching).
+.It Dv BIOCSHDRCMPLT
+.It Dv BIOCGHDRCMPLT
+.Pq Li u_int
+Set or get the status of the
+.Dq header complete
+flag.
+Set to zero if the link level source address should be filled in automatically
+by the interface output routine.
+Set to one if the link level source
+address will be written, as provided, to the wire.
+This flag is initialized to zero by default.
+.It Dv BIOCSSEESENT
+.It Dv BIOCGSEESENT
+.Pq Li u_int
+These commands are obsolete but left for compatibility.
+Use
+.Dv BIOCSDIRECTION
+and
+.Dv BIOCGDIRECTION
+instead.
+Set or get the flag determining whether locally generated packets on the
+interface should be returned by BPF.
+Set to zero to see only incoming packets on the interface.
+Set to one to see packets originating locally and remotely on the interface.
+This flag is initialized to one by default.
+.It Dv BIOCSDIRECTION
+.It Dv BIOCGDIRECTION
+.Pq Li u_int
+Set or get the setting determining whether incoming, outgoing, or all packets
+on the interface should be returned by BPF.
+Set to
+.Dv BPF_D_IN
+to see only incoming packets on the interface.
+Set to
+.Dv BPF_D_INOUT
+to see packets originating locally and remotely on the interface.
+Set to
+.Dv BPF_D_OUT
+to see only outgoing packets on the interface.
+This setting is initialized to
+.Dv BPF_D_INOUT
+by default.
+.It Dv BIOCSTSTAMP
+.It Dv BIOCGTSTAMP
+.Pq Li u_int
+Set or get format and resolution of the time stamps returned by BPF.
+Set to
+.Dv BPF_T_MICROTIME ,
+.Dv BPF_T_MICROTIME_FAST ,
+.Dv BPF_T_MICROTIME_MONOTONIC ,
+or
+.Dv BPF_T_MICROTIME_MONOTONIC_FAST
+to get time stamps in 64-bit
+.Vt struct timeval
+format.
+Set to
+.Dv BPF_T_NANOTIME ,
+.Dv BPF_T_NANOTIME_FAST ,
+.Dv BPF_T_NANOTIME_MONOTONIC ,
+or
+.Dv BPF_T_NANOTIME_MONOTONIC_FAST
+to get time stamps in 64-bit
+.Vt struct timespec
+format.
+Set to
+.Dv BPF_T_BINTIME ,
+.Dv BPF_T_BINTIME_FAST ,
+.Dv BPF_T_NANOTIME_MONOTONIC ,
+or
+.Dv BPF_T_BINTIME_MONOTONIC_FAST
+to get time stamps in 64-bit
+.Vt struct bintime
+format.
+Set to
+.Dv BPF_T_NONE
+to ignore time stamp.
+All 64-bit time stamp formats are wrapped in
+.Vt struct bpf_ts .
+The
+.Dv BPF_T_MICROTIME_FAST ,
+.Dv BPF_T_NANOTIME_FAST ,
+.Dv BPF_T_BINTIME_FAST ,
+.Dv BPF_T_MICROTIME_MONOTONIC_FAST ,
+.Dv BPF_T_NANOTIME_MONOTONIC_FAST ,
+and
+.Dv BPF_T_BINTIME_MONOTONIC_FAST
+are analogs of corresponding formats without _FAST suffix but do not perform
+a full time counter query, so their accuracy is one timer tick.
+The
+.Dv BPF_T_MICROTIME_MONOTONIC ,
+.Dv BPF_T_NANOTIME_MONOTONIC ,
+.Dv BPF_T_BINTIME_MONOTONIC ,
+.Dv BPF_T_MICROTIME_MONOTONIC_FAST ,
+.Dv BPF_T_NANOTIME_MONOTONIC_FAST ,
+and
+.Dv BPF_T_BINTIME_MONOTONIC_FAST
+store the time elapsed since kernel boot.
+This setting is initialized to
+.Dv BPF_T_MICROTIME
+by default.
+.It Dv BIOCFEEDBACK
+.Pq Li u_int
+Set packet feedback mode.
+This allows injected packets to be fed back as input to the interface when
+output via the interface is successful.
+When
+.Dv BPF_D_INOUT
+direction is set, injected outgoing packet is not returned by BPF to avoid
+duplication. This flag is initialized to zero by default.
+.It Dv BIOCLOCK
+Set the locked flag on the
+.Nm
+descriptor.
+This prevents the execution of
+ioctl commands which could change the underlying operating parameters of
+the device.
+.It Dv BIOCGETBUFMODE
+.It Dv BIOCSETBUFMODE
+.Pq Li u_int
+Get or set the current
+.Nm
+buffering mode; possible values are
+.Dv BPF_BUFMODE_BUFFER ,
+buffered read mode, and
+.Dv BPF_BUFMODE_ZBUF ,
+zero-copy buffer mode.
+.It Dv BIOCSETZBUF
+.Pq Li struct bpf_zbuf
+Set the current zero-copy buffer locations; buffer locations may be
+set only once zero-copy buffer mode has been selected, and prior to attaching
+to an interface.
+Buffers must be of identical size, page-aligned, and an integer multiple of
+pages in size.
+The three fields
+.Vt bz_bufa ,
+.Vt bz_bufb ,
+and
+.Vt bz_buflen
+must be filled out.
+If buffers have already been set for this device, the ioctl will fail.
+.It Dv BIOCGETZMAX
+.Pq Li size_t
+Get the largest individual zero-copy buffer size allowed.
+As two buffers are used in zero-copy buffer mode, the limit (in practice) is
+twice the returned size.
+As zero-copy buffers consume kernel address space, conservative selection of
+buffer size is suggested, especially when there are multiple
+.Nm
+descriptors in use on 32-bit systems.
+.It Dv BIOCROTZBUF
+Force ownership of the next buffer to be assigned to userspace, if any data
+present in the buffer.
+If no data is present, the buffer will remain owned by the kernel.
+This allows consumers of zero-copy buffering to implement timeouts and
+retrieve partially filled buffers.
+In order to handle the case where no data is present in the buffer and
+therefore ownership is not assigned, the user process must check
+.Vt bzh_kernel_gen
+against
+.Vt bzh_user_gen .
+.El
+.Sh BPF HEADER
+One of the following structures is prepended to each packet returned by
+.Xr read 2
+or via a zero-copy buffer:
+.Bd -literal
+struct bpf_xhdr {
+ struct bpf_ts bh_tstamp; /* time stamp */
+ uint32_t bh_caplen; /* length of captured portion */
+ uint32_t bh_datalen; /* original length of packet */
+ u_short bh_hdrlen; /* length of bpf header (this struct
+ plus alignment padding) */
+};
+
+struct bpf_hdr {
+ struct timeval bh_tstamp; /* time stamp */
+ uint32_t bh_caplen; /* length of captured portion */
+ uint32_t bh_datalen; /* original length of packet */
+ u_short bh_hdrlen; /* length of bpf header (this struct
+ plus alignment padding) */
+};
+.Ed
+.Pp
+The fields, whose values are stored in host order, and are:
+.Pp
+.Bl -tag -compact -width bh_datalen
+.It Li bh_tstamp
+The time at which the packet was processed by the packet filter.
+.It Li bh_caplen
+The length of the captured portion of the packet.
+This is the minimum of
+the truncation amount specified by the filter and the length of the packet.
+.It Li bh_datalen
+The length of the packet off the wire.
+This value is independent of the truncation amount specified by the filter.
+.It Li bh_hdrlen
+The length of the
+.Nm
+header, which may not be equal to
+.\" XXX - not really a function call
+.Fn sizeof "struct bpf_xhdr"
+or
+.Fn sizeof "struct bpf_hdr" .
+.El
+.Pp
+The
+.Li bh_hdrlen
+field exists to account for
+padding between the header and the link level protocol.
+The purpose here is to guarantee proper alignment of the packet
+data structures, which is required on alignment sensitive
+architectures and improves performance on many other architectures.
+The packet filter ensures that the
+.Vt bpf_xhdr ,
+.Vt bpf_hdr
+and the network layer
+header will be word aligned.
+Currently,
+.Vt bpf_hdr
+is used when the time stamp is set to
+.Dv BPF_T_MICROTIME ,
+.Dv BPF_T_MICROTIME_FAST ,
+.Dv BPF_T_MICROTIME_MONOTONIC ,
+.Dv BPF_T_MICROTIME_MONOTONIC_FAST ,
+or
+.Dv BPF_T_NONE
+for backward compatibility reasons.
+Otherwise,
+.Vt bpf_xhdr
+is used.
+However,
+.Vt bpf_hdr
+may be deprecated in the near future.
+Suitable precautions
+must be taken when accessing the link layer protocol fields on alignment
+restricted machines.
+(This is not a problem on an Ethernet, since
+the type field is a short falling on an even offset,
+and the addresses are probably accessed in a bytewise fashion).
+.Pp
+Additionally, individual packets are padded so that each starts
+on a word boundary.
+This requires that an application
+has some knowledge of how to get from packet to packet.
+The macro
+.Dv BPF_WORDALIGN
+is defined in
+.In net/bpf.h
+to facilitate
+this process.
+It rounds up its argument to the nearest word aligned value (where a word is
+.Dv BPF_ALIGNMENT
+bytes wide).
+.Pp
+For example, if
+.Sq Li p
+points to the start of a packet, this expression
+will advance it to the next packet:
+.Dl p = (char *)p + BPF_WORDALIGN(p->bh_hdrlen + p->bh_caplen)
+.Pp
+For the alignment mechanisms to work properly, the
+buffer passed to
+.Xr read 2
+must itself be word aligned.
+The
+.Xr malloc 3
+function
+will always return an aligned buffer.
+.Sh FILTER MACHINE
+A filter program is an array of instructions, with all branches forwardly
+directed, terminated by a
+.Em return
+instruction.
+Each instruction performs some action on the pseudo-machine state,
+which consists of an accumulator, index register, scratch memory store,
+and implicit program counter.
+.Pp
+The following structure defines the instruction format:
+.Bd -literal
+struct bpf_insn {
+ u_short code;
+ u_char jt;
+ u_char jf;
+ u_long k;
+};
+.Ed
+.Pp
+The
+.Li k
+field is used in different ways by different instructions,
+and the
+.Li jt
+and
+.Li jf
+fields are used as offsets
+by the branch instructions.
+The opcodes are encoded in a semi-hierarchical fashion.
+There are eight classes of instructions:
+.Dv BPF_LD ,
+.Dv BPF_LDX ,
+.Dv BPF_ST ,
+.Dv BPF_STX ,
+.Dv BPF_ALU ,
+.Dv BPF_JMP ,
+.Dv BPF_RET ,
+and
+.Dv BPF_MISC .
+Various other mode and
+operator bits are or'd into the class to give the actual instructions.
+The classes and modes are defined in
+.In net/bpf.h .
+.Pp
+Below are the semantics for each defined
+.Nm
+instruction.
+We use the convention that A is the accumulator, X is the index register,
+P[] packet data, and M[] scratch memory store.
+P[i:n] gives the data at byte offset
+.Dq i
+in the packet,
+interpreted as a word (n=4),
+unsigned halfword (n=2), or unsigned byte (n=1).
+M[i] gives the i'th word in the scratch memory store, which is only
+addressed in word units.
+The memory store is indexed from 0 to
+.Dv BPF_MEMWORDS
+- 1.
+.Li k ,
+.Li jt ,
+and
+.Li jf
+are the corresponding fields in the
+instruction definition.
+.Dq len
+refers to the length of the packet.
+.Bl -tag -width BPF_STXx
+.It Dv BPF_LD
+These instructions copy a value into the accumulator.
+The type of the source operand is specified by an
+.Dq addressing mode
+and can be a constant
+.Pq Dv BPF_IMM ,
+packet data at a fixed offset
+.Pq Dv BPF_ABS ,
+packet data at a variable offset
+.Pq Dv BPF_IND ,
+the packet length
+.Pq Dv BPF_LEN ,
+or a word in the scratch memory store
+.Pq Dv BPF_MEM .
+For
+.Dv BPF_IND
+and
+.Dv BPF_ABS ,
+the data size must be specified as a word
+.Pq Dv BPF_W ,
+halfword
+.Pq Dv BPF_H ,
+or byte
+.Pq Dv BPF_B .
+The semantics of all the recognized
+.Dv BPF_LD
+instructions follow.
+.Bd -literal
+BPF_LD+BPF_W+BPF_ABS A <- P[k:4]
+BPF_LD+BPF_H+BPF_ABS A <- P[k:2]
+BPF_LD+BPF_B+BPF_ABS A <- P[k:1]
+BPF_LD+BPF_W+BPF_IND A <- P[X+k:4]
+BPF_LD+BPF_H+BPF_IND A <- P[X+k:2]
+BPF_LD+BPF_B+BPF_IND A <- P[X+k:1]
+BPF_LD+BPF_W+BPF_LEN A <- len
+BPF_LD+BPF_IMM A <- k
+BPF_LD+BPF_MEM A <- M[k]
+.Ed
+.It Dv BPF_LDX
+These instructions load a value into the index register.
+Note that
+the addressing modes are more restrictive than those of the accumulator loads,
+but they include
+.Dv BPF_MSH ,
+a hack for efficiently loading the IP header length.
+.Bd -literal
+BPF_LDX+BPF_W+BPF_IMM X <- k
+BPF_LDX+BPF_W+BPF_MEM X <- M[k]
+BPF_LDX+BPF_W+BPF_LEN X <- len
+BPF_LDX+BPF_B+BPF_MSH X <- 4*(P[k:1]&0xf)
+.Ed
+.It Dv BPF_ST
+This instruction stores the accumulator into the scratch memory.
+We do not need an addressing mode since there is only one possibility
+for the destination.
+.Bd -literal
+BPF_ST M[k] <- A
+.Ed
+.It Dv BPF_STX
+This instruction stores the index register in the scratch memory store.
+.Bd -literal
+BPF_STX M[k] <- X
+.Ed
+.It Dv BPF_ALU
+The alu instructions perform operations between the accumulator and
+index register or constant, and store the result back in the accumulator.
+For binary operations, a source mode is required
+.Dv ( BPF_K
+or
+.Dv BPF_X ) .
+.Bd -literal
+BPF_ALU+BPF_ADD+BPF_K A <- A + k
+BPF_ALU+BPF_SUB+BPF_K A <- A - k
+BPF_ALU+BPF_MUL+BPF_K A <- A * k
+BPF_ALU+BPF_DIV+BPF_K A <- A / k
+BPF_ALU+BPF_AND+BPF_K A <- A & k
+BPF_ALU+BPF_OR+BPF_K A <- A | k
+BPF_ALU+BPF_LSH+BPF_K A <- A << k
+BPF_ALU+BPF_RSH+BPF_K A <- A >> k
+BPF_ALU+BPF_ADD+BPF_X A <- A + X
+BPF_ALU+BPF_SUB+BPF_X A <- A - X
+BPF_ALU+BPF_MUL+BPF_X A <- A * X
+BPF_ALU+BPF_DIV+BPF_X A <- A / X
+BPF_ALU+BPF_AND+BPF_X A <- A & X
+BPF_ALU+BPF_OR+BPF_X A <- A | X
+BPF_ALU+BPF_LSH+BPF_X A <- A << X
+BPF_ALU+BPF_RSH+BPF_X A <- A >> X
+BPF_ALU+BPF_NEG A <- -A
+.Ed
+.It Dv BPF_JMP
+The jump instructions alter flow of control.
+Conditional jumps
+compare the accumulator against a constant
+.Pq Dv BPF_K
+or the index register
+.Pq Dv BPF_X .
+If the result is true (or non-zero),
+the true branch is taken, otherwise the false branch is taken.
+Jump offsets are encoded in 8 bits so the longest jump is 256 instructions.
+However, the jump always
+.Pq Dv BPF_JA
+opcode uses the 32 bit
+.Li k
+field as the offset, allowing arbitrarily distant destinations.
+All conditionals use unsigned comparison conventions.
+.Bd -literal
+BPF_JMP+BPF_JA pc += k
+BPF_JMP+BPF_JGT+BPF_K pc += (A > k) ? jt : jf
+BPF_JMP+BPF_JGE+BPF_K pc += (A >= k) ? jt : jf
+BPF_JMP+BPF_JEQ+BPF_K pc += (A == k) ? jt : jf
+BPF_JMP+BPF_JSET+BPF_K pc += (A & k) ? jt : jf
+BPF_JMP+BPF_JGT+BPF_X pc += (A > X) ? jt : jf
+BPF_JMP+BPF_JGE+BPF_X pc += (A >= X) ? jt : jf
+BPF_JMP+BPF_JEQ+BPF_X pc += (A == X) ? jt : jf
+BPF_JMP+BPF_JSET+BPF_X pc += (A & X) ? jt : jf
+.Ed
+.It Dv BPF_RET
+The return instructions terminate the filter program and specify the amount
+of packet to accept (i.e., they return the truncation amount).
+A return value of zero indicates that the packet should be ignored.
+The return value is either a constant
+.Pq Dv BPF_K
+or the accumulator
+.Pq Dv BPF_A .
+.Bd -literal
+BPF_RET+BPF_A accept A bytes
+BPF_RET+BPF_K accept k bytes
+.Ed
+.It Dv BPF_MISC
+The miscellaneous category was created for anything that does not
+fit into the above classes, and for any new instructions that might need to
+be added.
+Currently, these are the register transfer instructions
+that copy the index register to the accumulator or vice versa.
+.Bd -literal
+BPF_MISC+BPF_TAX X <- A
+BPF_MISC+BPF_TXA A <- X
+.Ed
+.El
+.Pp
+The
+.Nm
+interface provides the following macros to facilitate
+array initializers:
+.Fn BPF_STMT opcode operand
+and
+.Fn BPF_JUMP opcode operand true_offset false_offset .
+.Sh SYSCTL VARIABLES
+A set of
+.Xr sysctl 8
+variables controls the behaviour of the
+.Nm
+subsystem
+.Bl -tag -width indent
+.It Va net.bpf.optimize_writers: No 0
+Various programs use BPF to send (but not receive) raw packets
+(cdpd, lldpd, dhcpd, dhcp relays, etc. are good examples of such programs).
+They do not need incoming packets to be send to them.
+Turning this option on
+makes new BPF users to be attached to write-only interface list until program
+explicitly specifies read filter via
+.Fn pcap_set_filter .
+This removes any performance degradation for high-speed interfaces.
+.It Va net.bpf.stats:
+Binary interface for retrieving general statistics.
+.It Va net.bpf.zerocopy_enable: No 0
+Permits zero-copy to be used with net BPF readers.
+Use with caution.
+.It Va net.bpf.maxinsns: No 512
+Maximum number of instructions that BPF program can contain.
+Use
+.Xr tcpdump 1
+.Fl d
+option to determine approximate number of instruction for any filter.
+.It Va net.bpf.maxbufsize: No 524288
+Maximum buffer size to allocate for packets buffer.
+.It Va net.bpf.bufsize: No 4096
+Default buffer size to allocate for packets buffer.
+.El
+.Sh EXAMPLES
+The following filter is taken from the Reverse ARP Daemon.
+It accepts only Reverse ARP requests.
+.Bd -literal
+struct bpf_insn insns[] = {
+ BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 12),
+ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, ETHERTYPE_REVARP, 0, 3),
+ BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 20),
+ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, REVARP_REQUEST, 0, 1),
+ BPF_STMT(BPF_RET+BPF_K, sizeof(struct ether_arp) +
+ sizeof(struct ether_header)),
+ BPF_STMT(BPF_RET+BPF_K, 0),
+};
+.Ed
+.Pp
+This filter accepts only IP packets between host 128.3.112.15 and
+128.3.112.35.
+.Bd -literal
+struct bpf_insn insns[] = {
+ BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 12),
+ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, ETHERTYPE_IP, 0, 8),
+ BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 26),
+ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0x8003700f, 0, 2),
+ BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 30),
+ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0x80037023, 3, 4),
+ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0x80037023, 0, 3),
+ BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 30),
+ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0x8003700f, 0, 1),
+ BPF_STMT(BPF_RET+BPF_K, (u_int)-1),
+ BPF_STMT(BPF_RET+BPF_K, 0),
+};
+.Ed
+.Pp
+Finally, this filter returns only TCP finger packets.
+We must parse the IP header to reach the TCP header.
+The
+.Dv BPF_JSET
+instruction
+checks that the IP fragment offset is 0 so we are sure
+that we have a TCP header.
+.Bd -literal
+struct bpf_insn insns[] = {
+ BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 12),
+ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, ETHERTYPE_IP, 0, 10),
+ BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 23),
+ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, IPPROTO_TCP, 0, 8),
+ BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 20),
+ BPF_JUMP(BPF_JMP+BPF_JSET+BPF_K, 0x1fff, 6, 0),
+ BPF_STMT(BPF_LDX+BPF_B+BPF_MSH, 14),
+ BPF_STMT(BPF_LD+BPF_H+BPF_IND, 14),
+ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 79, 2, 0),
+ BPF_STMT(BPF_LD+BPF_H+BPF_IND, 16),
+ BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 79, 0, 1),
+ BPF_STMT(BPF_RET+BPF_K, (u_int)-1),
+ BPF_STMT(BPF_RET+BPF_K, 0),
+};
+.Ed
+.Sh SEE ALSO
+.Xr tcpdump 1 ,
+.Xr ioctl 2 ,
+.Xr kqueue 2 ,
+.Xr poll 2 ,
+.Xr select 2 ,
+.Xr byteorder 3 ,
+.Xr ng_bpf 4 ,
+.Xr bpf 9
+.Rs
+.%A McCanne, S.
+.%A Jacobson V.
+.%T "An efficient, extensible, and portable network monitor"
+.Re
+.Sh HISTORY
+The Enet packet filter was created in 1980 by Mike Accetta and
+Rick Rashid at Carnegie-Mellon University.
+Jeffrey Mogul, at
+Stanford, ported the code to
+.Bx
+and continued its development from
+1983 on.
+Since then, it has evolved into the Ultrix Packet Filter at
+.Tn DEC ,
+a
+.Tn STREAMS
+.Tn NIT
+module under
+.Tn SunOS 4.1 ,
+and
+.Tn BPF .
+.Sh AUTHORS
+.An -nosplit
+.An Steven McCanne ,
+of Lawrence Berkeley Laboratory, implemented BPF in
+Summer 1990.
+Much of the design is due to
+.An Van Jacobson .
+.Pp
+Support for zero-copy buffers was added by
+.An Robert N. M. Watson
+under contract to Seccuris Inc.
+.Sh BUGS
+The read buffer must be of a fixed size (returned by the
+.Dv BIOCGBLEN
+ioctl).
+.Pp
+A file that does not request promiscuous mode may receive promiscuously
+received packets as a side effect of another file requesting this
+mode on the same hardware interface.
+This could be fixed in the kernel with additional processing overhead.
+However, we favor the model where
+all files must assume that the interface is promiscuous, and if
+so desired, must utilize a filter to reject foreign packets.
+.Pp
+Data link protocols with variable length headers are not currently supported.
+.Pp
+The
+.Dv SEESENT ,
+.Dv DIRECTION ,
+and
+.Dv FEEDBACK
+settings have been observed to work incorrectly on some interface
+types, including those with hardware loopback rather than software loopback,
+and point-to-point interfaces.
+They appear to function correctly on a
+broad range of Ethernet-style interfaces.
diff --git a/share/man/man4/bridge.4 b/share/man/man4/bridge.4
new file mode 100644
index 0000000..ec54666
--- /dev/null
+++ b/share/man/man4/bridge.4
@@ -0,0 +1,521 @@
+.\" $NetBSD: bridge.4,v 1.5 2004/01/31 20:14:11 jdc Exp $
+.\"
+.\" Copyright 2001 Wasabi Systems, Inc.
+.\" All rights reserved.
+.\"
+.\" Written by Jason R. Thorpe for Wasabi Systems, Inc.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed for the NetBSD Project by
+.\" Wasabi Systems, Inc.
+.\" 4. The name of Wasabi Systems, Inc. may not be used to endorse
+.\" or promote products derived from this software without specific prior
+.\" written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 27, 2013
+.Dt IF_BRIDGE 4
+.Os
+.Sh NAME
+.Nm if_bridge
+.Nd network bridge device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device if_bridge"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_bridge_load="YES"
+bridgestp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver creates a logical link between two or more IEEE 802 networks
+that use the same (or
+.Dq "similar enough" )
+framing format.
+For example, it is possible to bridge Ethernet and 802.11 networks together,
+but it is not possible to bridge Ethernet and Token Ring together.
+.Pp
+Each
+.Nm
+interface is created at runtime using interface cloning.
+This is
+most easily done with the
+.Xr ifconfig 8
+.Cm create
+command or using the
+.Va cloned_interfaces
+variable in
+.Xr rc.conf 5 .
+.Pp
+The
+.Nm
+interface randomly chooses a link (MAC) address in the range reserved for
+locally administered addresses when it is created.
+This address is guaranteed to be unique
+.Em only
+across all
+.Nm
+interfaces on the local machine.
+Thus you can theoretically have two bridges on the different machines with
+the same link addresses.
+The address can be changed by assigning the desired link address using
+.Xr ifconfig 8 .
+.Pp
+If
+.Xr sysctl 8
+node
+.Va net.link.bridge.inherit_mac
+has non-zero value, newly created bridge will inherit MAC address
+from its first member instead of choosing random link-level address.
+This will provide more predictable bridge MAC without any
+additional configuration, but currently this feature is known
+to break some L2 protocols, for example PPPoE that is provided
+by
+.Xr ng_pppoe 4
+and
+.Xr ppp 8 .
+Now this feature is considered as experimental and is turned off
+by-default.
+.Pp
+A bridge can be used to provide several services, such as a simple
+802.11-to-Ethernet bridge for wireless hosts, and traffic isolation.
+.Pp
+A bridge works like a switch, forwarding traffic from one interface
+to another.
+Multicast and broadcast packets are always forwarded to all
+interfaces that are part of the bridge.
+For unicast traffic, the bridge learns which MAC addresses are associated
+with which interfaces and will forward the traffic selectively.
+.Pp
+All the bridged member interfaces need to be up in order to pass network traffic.
+These can be enabled using
+.Xr ifconfig 8
+or
+.Va ifconfig_ Ns Ao Ar interface Ac Ns Li ="up"
+in
+.Xr rc.conf 5 .
+.Pp
+The MTU of the first member interface to be added is used as the bridge MTU.
+All additional members are required to have exactly the same value.
+.Pp
+The TXCSUM capability is disabled for any interface added to the bridge, and it
+is restored when the interface is removed again.
+.Pp
+The bridge supports
+.Dq monitor mode ,
+where the packets are discarded after
+.Xr bpf 4
+processing, and are not processed or forwarded further.
+This can be used to multiplex the input of two or more interfaces into a single
+.Xr bpf 4
+stream.
+This is useful for reconstructing the traffic for network taps
+that transmit the RX/TX signals out through two separate interfaces.
+.Sh IPV6 SUPPORT
+.Nm
+supports the
+.Li AF_INET6
+address family on bridge interfaces.
+The following
+.Xr rc.conf 5
+variable configures an IPv6 link-local address on
+.Li bridge0
+interface:
+.Bd -literal -offset indent
+ifconfig_bridge0_ipv6="up"
+.Ed
+.Pp
+or in a more explicit manner:
+.Bd -literal -offset indent
+ifconfig_bridge0_ipv6="inet6 auto_linklocal"
+.Ed
+.Pp
+However, the
+.Li AF_INET6
+address family has a concept of scope zone.
+Bridging multiple interfaces change the zone configuration because
+multiple links are merged to each other and form a new single link
+while the member interfaces still work individually.
+This means each member interface still has a separate link-local scope
+zone and the
+.Nm
+interface has another single,
+aggregated link-local scope zone at the same time.
+This situation is clearly against the description
+.Qq zones of the same scope cannot overlap
+in Section 5,
+RFC 4007.
+Although it works in most cases,
+it can cause some conterintuitive or undesirable behavior in some
+edge cases when both of the
+.Nm
+interface and one of the member interface have an IPv6 address
+and applications use both of them.
+.Pp
+To prevent this situation,
+.Nm
+checks whether a link-local scoped IPv6 address is configured on
+a member interface to be added and the
+.Nm
+interface.
+When the
+.Nm
+interface has IPv6 addresses,
+IPv6 addresses on the member interface will be automatically removed
+before the interface is added.
+.Pp
+This behavior can be disabled by setting
+.Xr sysctl 8
+variable
+.Va net.link.bridge.allow_llz_overlap
+to
+.Li 1 .
+.Pp
+Note that
+.Li ACCEPT_RTADV
+and
+.Li AUTO_LINKLOCAL
+interface flag are not enabled by default on
+.Nm
+interface even when
+.Va net.inet6.ip6.accept_rtadv
+and/or
+.Va net.inet6.ip6.auto_linklocal
+is set to
+.Li 1 .
+.Sh SPANNING TREE
+The
+.Nm
+driver implements the Rapid Spanning Tree Protocol (RSTP or 802.1w) with
+backwards compatibility with the legacy Spanning Tree Protocol (STP).
+Spanning Tree is used to detect and remove loops in a network topology.
+.Pp
+RSTP provides faster spanning tree convergence than legacy STP, the protocol
+will exchange information with neighbouring switches to quickly transition to
+forwarding without creating loops.
+.Pp
+The code will default to RSTP mode but will downgrade any port connected to a
+legacy STP network so is fully backward compatible.
+A bridge can be forced to operate in STP mode without rapid state transitions
+via the
+.Va proto
+command in
+.Xr ifconfig 8 .
+.Pp
+The bridge can log STP port changes to
+.Xr syslog 3
+by enabling the
+.Va net.link.bridge.log_stp
+variable using
+.Xr sysctl 8 .
+.Sh PACKET FILTERING
+Packet filtering can be used with any firewall package that hooks in via the
+.Xr pfil 9
+framework.
+When filtering is enabled, bridged packets will pass through the filter
+inbound on the originating interface, on the bridge interface and outbound on
+the appropriate interfaces.
+Either stage can be disabled.
+The filtering behaviour can be controlled using
+.Xr sysctl 8 :
+.Bl -tag -width ".Va net.link.bridge.pfil_onlyip"
+.It Va net.link.bridge.pfil_onlyip
+Controls the handling of non-IP packets which are not passed to
+.Xr pfil 9 .
+Set to
+.Li 1
+to only allow IP packets to pass (subject to firewall rules), set to
+.Li 0
+to unconditionally pass all non-IP Ethernet frames.
+.It Va net.link.bridge.pfil_member
+Set to
+.Li 1
+to enable filtering on the incoming and outgoing member interfaces, set
+to
+.Li 0
+to disable it.
+.It Va net.link.bridge.pfil_bridge
+Set to
+.Li 1
+to enable filtering on the bridge interface, set
+to
+.Li 0
+to disable it.
+.It Va net.link.bridge.pfil_local_phys
+Set to
+.Li 1
+to additionally filter on the physical interface for locally destined packets.
+Set to
+.Li 0
+to disable this feature.
+.It Va net.link.bridge.ipfw
+Set to
+.Li 1
+to enable layer2 filtering with
+.Xr ipfirewall 4 ,
+set to
+.Li 0
+to disable it.
+This needs to be enabled for
+.Xr dummynet 4
+support.
+When
+.Va ipfw
+is enabled,
+.Va pfil_bridge
+and
+.Va pfil_member
+will be disabled so that IPFW
+is not run twice; these can be re-enabled if desired.
+.It Va net.link.bridge.ipfw_arp
+Set to
+.Li 1
+to enable layer2 ARP filtering with
+.Xr ipfirewall 4 ,
+set to
+.Li 0
+to disable it.
+Requires
+.Va ipfw
+to be enabled.
+.El
+.Pp
+ARP and REVARP packets are forwarded without being filtered and others
+that are not IP nor IPv6 packets are not forwarded when
+.Va pfil_onlyip
+is enabled.
+IPFW can filter Ethernet types using
+.Cm mac-type
+so all packets are passed to
+the filter for processing.
+.Pp
+The packets originating from the bridging host will be seen by
+the filter on the interface that is looked up in the routing
+table.
+.Pp
+The packets destined to the bridging host will be seen by the filter
+on the interface with the MAC address equal to the packet's destination
+MAC.
+There are situations when some of the bridge members are sharing
+the same MAC address (for example the
+.Xr vlan 4
+interfaces: they are currently sharing the
+MAC address of the parent physical interface).
+It is not possible to distinguish between these interfaces using
+their MAC address, excluding the case when the packet's destination
+MAC address is equal to the MAC address of the interface on which
+the packet was entered to the system.
+In this case the filter will see the incoming packet on this
+interface.
+In all other cases the interface seen by the packet filter is chosen
+from the list of bridge members with the same MAC address and the
+result strongly depends on the member addition sequence and the
+actual implementation of
+.Nm .
+It is not recommended to rely on the order chosen by the current
+.Nm
+implementation: it can be changed in the future.
+.Pp
+The previous paragraph is best illustrated with the following
+pictures.
+Let
+.Bl -bullet
+.It
+the MAC address of the incoming packet's destination is
+.Nm nn:nn:nn:nn:nn:nn ,
+.It
+the interface on which packet entered the system is
+.Nm ifX ,
+.It
+.Nm ifX
+MAC address is
+.Nm xx:xx:xx:xx:xx:xx ,
+.It
+there are possibly other bridge members with the same MAC address
+.Nm xx:xx:xx:xx:xx:xx ,
+.It
+the bridge has more than one interface that are sharing the
+same MAC address
+.Nm yy:yy:yy:yy:yy:yy ;
+we will call them
+.Nm vlanY1 ,
+.Nm vlanY2 ,
+etc.
+.El
+.Pp
+Then if the MAC address
+.Nm nn:nn:nn:nn:nn:nn
+is equal to the
+.Nm xx:xx:xx:xx:xx:xx
+then the filter will see the packet on the interface
+.Nm ifX
+no matter if there are any other bridge members carrying the same
+MAC address.
+But if the MAC address
+.Nm nn:nn:nn:nn:nn:nn
+is equal to the
+.Nm yy:yy:yy:yy:yy:yy
+then the interface that will be seen by the filter is one of the
+.Nm vlanYn .
+It is not possible to predict the name of the actual interface
+without the knowledge of the system state and the
+.Nm
+implementation details.
+.Pp
+This problem arises for any bridge members that are sharing the same
+MAC address, not only to the
+.Xr vlan 4
+ones: they we taken just as the example of such situation.
+So if one wants the filter the locally destined packets based on
+their interface name, one should be aware of this implication.
+The described situation will appear at least on the filtering bridges
+that are doing IP-forwarding; in some of such cases it is better
+to assign the IP address only to the
+.Nm
+interface and not to the bridge members.
+Enabling
+.Va net.link.bridge.pfil_local_phys
+will let you do the additional filtering on the physical interface.
+.Sh EXAMPLES
+The following when placed in the file
+.Pa /etc/rc.conf
+will cause a bridge called
+.Dq Li bridge0
+to be created, and will add the interfaces
+.Dq Li wlan0
+and
+.Dq Li fxp0
+to the bridge, and then enable packet forwarding.
+Such a configuration could be used to implement a simple
+802.11-to-Ethernet bridge (assuming the 802.11 interface is
+in ad-hoc mode).
+.Bd -literal -offset indent
+cloned_interfaces="bridge0"
+ifconfig_bridge0="addm wlan0 addm fxp0 up"
+.Ed
+.Pp
+For the bridge to forward packets all member interfaces and the bridge need
+to be up.
+The above example would also require:
+.Bd -literal -offset indent
+create_args_wlan0="wlanmode hostap"
+ifconfig_wlan0="up ssid my_ap mode 11g"
+ifconfig_fxp0="up"
+.Ed
+.Pp
+Consider a system with two 4-port Ethernet boards.
+The following will cause a bridge consisting of all 8 ports with Rapid Spanning
+Tree enabled to be created:
+.Bd -literal -offset indent
+ifconfig bridge0 create
+ifconfig bridge0 \e
+ addm fxp0 stp fxp0 \e
+ addm fxp1 stp fxp1 \e
+ addm fxp2 stp fxp2 \e
+ addm fxp3 stp fxp3 \e
+ addm fxp4 stp fxp4 \e
+ addm fxp5 stp fxp5 \e
+ addm fxp6 stp fxp6 \e
+ addm fxp7 stp fxp7 \e
+ up
+.Ed
+.Pp
+The bridge can be used as a regular host interface at the same time as bridging
+between its member ports.
+In this example, the bridge connects em0 and em1, and will receive its IP
+address through DHCP:
+.Bd -literal -offset indent
+cloned_interfaces="bridge0"
+ifconfig_bridge0="addm em0 addm em1 DHCP"
+ifconfig_em0="up"
+ifconfig_em1="up"
+.Ed
+.Pp
+The bridge can tunnel Ethernet across an IP internet using the EtherIP
+protocol.
+This can be combined with
+.Xr ipsec 4
+to provide an encrypted connection.
+Create a
+.Xr gif 4
+interface and set the local and remote IP addresses for the
+tunnel, these are reversed on the remote bridge.
+.Bd -literal -offset indent
+ifconfig gif0 create
+ifconfig gif0 tunnel 1.2.3.4 5.6.7.8 up
+ifconfig bridge0 create
+ifconfig bridge0 addm fxp0 addm gif0 up
+.Ed
+.Pp
+Note that
+.Fx
+6.1, 6.2, 6.3, 7.0, 7.1, and 7.2 have a bug in the EtherIP protocol.
+For more details and workaround, see
+.Xr gif 4
+manual page.
+.Sh SEE ALSO
+.Xr gif 4 ,
+.Xr ipf 4 ,
+.Xr ipfw 4 ,
+.Xr pf 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm bridge
+driver was originally written by
+.An Jason L. Wright
+.Aq jason@thought.net
+as part of an undergraduate independent study at the University of
+North Carolina at Greensboro.
+.Pp
+This version of the
+.Nm
+driver has been heavily modified from the original version by
+.An Jason R. Thorpe
+.Aq thorpej@wasabisystems.com .
+.Pp
+Rapid Spanning Tree Protocol (RSTP) support was added by
+.An Andrew Thompson
+.Aq thompsa@FreeBSD.org .
+.Sh BUGS
+The
+.Nm
+driver currently supports only Ethernet and Ethernet-like (e.g., 802.11)
+network devices, with exactly the same interface MTU size as the bridge device.
diff --git a/share/man/man4/bt.4 b/share/man/man4/bt.4
new file mode 100644
index 0000000..6a09bef
--- /dev/null
+++ b/share/man/man4/bt.4
@@ -0,0 +1,203 @@
+.\"
+.\" Copyright (c) 1994 Jordan Hubbard
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 18, 2006
+.Dt BT 4
+.Os
+.Sh NAME
+.Nm bt
+.Nd Buslogic/Mylex MultiMaster SCSI host adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device isa"
+.Cd "device scbus"
+.Cd "device bt"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.bt.0.at="isa"
+.Cd hint.bt.0.port="0x330"
+.Ed
+.Sh DESCRIPTION
+This driver provides access to the
+.Tn SCSI
+bus connected to a Buslogic/Mylex MultiMaster or compatible controller:
+.Bd -ragged -offset indent
+MultiMaster "W" Series Host Adapters:
+.Bl -column "BT-956CD " "ISA " "Commands " "Description"
+.Em "Adapter" Ta Em "Bus" Ta Em "Commands" Ta Em "Description"
+BT-948 PCI 192 Ultra SCSI-3
+BT-958 PCI 192 Wide Ultra SCSI-3
+BT-958D PCI 192 Wide Differential Ultra SCSI-3
+.El
+.Pp
+MultiMaster "C" Series Host Adapters:
+.Bl -column "BT-956CD " "ISA " "Commands " "Description"
+.Em "Adapter" Ta Em "Bus" Ta Em "Commands" Ta Em "Description"
+BT-946C PCI 100 Fast SCSI-2
+BT-956C PCI 100 Wide Fast SCSI-2
+BT-956CD PCI 100 Wide Differential Fast SCSI-2
+BT-445C VLB 100 Fast SCSI-2
+BT-747C EISA 100 Fast SCSI-2
+BT-757C EISA 100 Wide Fast SCSI-2
+BT-757CD EISA 100 Wide Differential Fast SCSI-2
+BT-545C ISA 50 Fast SCSI-2
+BT-540CF ISA 50 Fast SCSI-2
+.El
+.Pp
+MultiMaster "S" Series Host Adapters:
+.Bl -column "BT-956CD " "ISA " "Commands " "Description"
+.Em "Adapter" Ta Em "Bus" Ta Em "Commands" Ta Em "Description"
+BT-445S VLB 30 Fast SCSI-2
+BT-747S EISA 30 Fast SCSI-2
+BT-747D EISA 30 Differential Fast SCSI-2
+BT-757S EISA 30 Wide Fast SCSI-2
+BT-757D EISA 30 Wide Differential Fast SCSI-2
+BT-545S ISA 30 Fast SCSI-2
+BT-542D ISA 30 Differential Fast SCSI-2
+BT-742A EISA 30 SCSI-2 (742A revision H)
+BT-542B ISA 30 SCSI-2 (542B revision H)
+.El
+.Pp
+MultiMaster "A" Series Host Adapters:
+.Bl -column "BT-956CD " "ISA " "Commands " "Description"
+.Em "Adapter" Ta Em "Bus" Ta Em "Commands" Ta Em "Description"
+BT-742A EISA 30 SCSI-2 (742A revisions A - G)
+BT-542B ISA 30 SCSI-2 (542B revisions A - G)
+.El
+.Ed
+.Pp
+Tagged queueing is supported on 'W' series adapters, 'C' series adapters
+with firmware of rev 4.42 and higher, and 'S' series adapters with firmware
+of rev 3.35 and higher.
+.Pp
+Boards with certain firmware revisions may lock up under heavy load to
+certain devices, especially if tagged queueing is used.
+Should you encounter
+a problem with your adapter, contact Mylex technical support and ensure you
+have the latest firmware for your controller.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following BusLogic MultiMaster
+.Dq W ,
+.Dq C ,
+.Dq S ,
+and
+.Dq A
+series and compatible SCSI host adapters:
+.Pp
+.Bl -bullet -compact
+.It
+BusLogic BT-445C
+.It
+BusLogic BT-445S
+.It
+BusLogic BT-540CF
+.It
+BusLogic BT-542B
+.It
+BusLogic BT-542B
+.It
+BusLogic BT-542D
+.It
+BusLogic BT-545C
+.It
+BusLogic BT-545S
+.It
+BusLogic/BusTek BT-640
+.It
+BusLogic BT-742A
+.It
+BusLogic BT-742A
+.It
+BusLogic BT-747C
+.It
+BusLogic BT-747D
+.It
+BusLogic BT-747S
+.It
+BusLogic BT-757C
+.It
+BusLogic BT-757CD
+.It
+BusLogic BT-757D
+.It
+BusLogic BT-757S
+.It
+BusLogic BT-946C
+.It
+BusLogic BT-948
+.It
+BusLogic BT-956C
+.It
+BusLogic BT-956CD
+.It
+BusLogic BT-958
+.It
+BusLogic BT-958D
+.It
+Storage Dimensions SDC3211B / SDC3211F
+.El
+.Pp
+AMI FastDisk Host Adapters that are true BusLogic MultiMaster clones
+are also supported by the
+.Nm
+driver.
+.Sh SEE ALSO
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in the
+.Bx 386
+patch kit.
+.Sh AUTHORS
+.An -nosplit
+.An Julian Elischer
+wrote a driver for the Multimaster cards that appeared in the
+.Bx 386
+patch kit.
+The driver was rewritten by
+.An Justin T. Gibbs
+to take advantage of new board features and work with the CAM SCSI framework in
+.Fx 3.0 .
+.Pp
+Special thanks to
+.An Leonard N. Zubkoff
+for writing such a complete and well documented Mylex/BusLogic MultiMaster
+driver for Linux.
+Support in this driver for the wide range of MultiMaster
+controllers and firmware revisions, with their otherwise undocumented quirks,
+would not have been possible without his efforts.
diff --git a/share/man/man4/bwi.4 b/share/man/man4/bwi.4
new file mode 100644
index 0000000..fe1ea65
--- /dev/null
+++ b/share/man/man4/bwi.4
@@ -0,0 +1,148 @@
+.\" Copyright (c) 2009 Christian Brueffer
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 6, 2011
+.Dt BWI 4
+.Os
+.Sh NAME
+.Nm bwi
+.Nd Broadcom BCM43xx IEEE 802.11b/g wireless network driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device bwi"
+.Cd "device wlan"
+.Cd "device wlan_amrr"
+.Cd "device firmware"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_bwi_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Broadcom BCM43xx based
+PCI/CardBus network adapters.
+.Pp
+It supports
+.Cm station
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+This driver requires firmware to be loaded before it will work.
+The
+.Pa ports/net/bwi-firmware-kmod
+port needs to be installed before
+.Xr ifconfig 8
+will work.
+.Sh HARDWARE
+The
+.Nm
+driver supports Broadcom BCM43xx based wireless devices, including:
+.Bl -column "Apple Airport Extreme" "BCM4306" "Mini PCI" "a/b/g" -offset 6n
+.It Em "Card" Ta Em "Chip" Ta Em "Bus" Ta Em "Standard"
+.It "Apple Airport Extreme BCM4306 PCI b/g"
+.It "Apple Airport Extreme BCM4318 PCI b/g"
+.It "ASUS WL-138g BCM4318 PCI b/g"
+.It "Buffalo WLI-CB-G54S BCM4318 CardBus b/g"
+.It "Buffalo WLI-PCI-G54S BCM4306 PCI b/g"
+.It "Compaq R4035 onboard BCM4306 PCI b/g"
+.It "Dell Wireless 1390 BCM4311 Mini PCI b/g"
+.It "Dell Wireless 1470 BCM4318 Mini PCI b/g"
+.It "Dell Truemobile 1300 r2 BCM4306 Mini PCI b/g"
+.It "Dell Truemobile 1400 BCM4309 Mini PCI b/g"
+.It "HP nx6125 BCM4319 PCI b/g"
+.It "Linksys WPC54G Ver 3 BCM4318 CardBus b/g"
+.It "Linksys WPC54GS Ver 2 BCM4318 CardBus b/g"
+.It "TRENDnet TEW-401PCplus BCM4306 CardBus b/g"
+.It "US Robotics 5411 BCM4318 CardBus b/g"
+.El
+.Pp
+The
+.Nm
+driver uses the older v3 version of Broadcom's firmware.
+While this older firmware does support most BCM43xx parts, the
+.Xr bwn 4
+driver works better for the newer chips it supports.
+You must use the
+.Nm
+driver if you are using older Broadcom chipsets (BCM4301, BCM4303 and
+BCM4306 rev 2).
+The v4 version of the firmware that
+.Xr bwn 4
+uses does not support these chips.
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev bwi0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev bwi0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev bwi0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr cardbus 4 ,
+.Xr intro 4 ,
+.Xr pci 4 ,
+.Xr wlan 4 ,
+.Xr wlan_amrr 4 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written for DragonFly BSD by
+.An Sepherosa Ziehau
+and subsequently ported to
+.Fx .
+.Sh BUGS
+Some card based on the BCM4306 and BCM4309 chips do not work properly
+on channel 1, 2 and 3.
diff --git a/share/man/man4/bwn.4 b/share/man/man4/bwn.4
new file mode 100644
index 0000000..4aa75fd
--- /dev/null
+++ b/share/man/man4/bwn.4
@@ -0,0 +1,156 @@
+.\" Copyright (c) 2009 Christian Brueffer
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 15, 2011
+.Dt BWN 4
+.Os
+.Sh NAME
+.Nm bwn
+.Nd Broadcom BCM43xx IEEE 802.11b/g wireless network driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device siba_bwn"
+.Cd "device bwn"
+.Cd "device wlan"
+.Cd "device wlan_amrr"
+.Cd "device firmware"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_bwn_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Broadcom BCM43xx based
+PCI/CardBus network adapters.
+.Pp
+It supports
+.Cm station
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+This driver requires firmware to be loaded before it will work.
+The
+.Pa ports/net/bwn-firmware-kmod
+port needs to be installed before
+.Xr ifconfig 8
+will work.
+Most cases you need to use bwn_v4_ucode module but if you are a
+LP (low power) PHY user please uses bwn_v4_lp_ucode module.
+.Sh HARDWARE
+The
+.Nm
+driver supports Broadcom BCM43xx based wireless devices, including:
+.Bl -column "Apple Airport Extreme" "BCM4306" "Mini PCI" "a/b/g"
+.It Em "Card" Ta Em "Chip" Ta Em "Bus" Ta Em "Standard"
+.It "Apple Airport Extreme BCM4318 PCI b/g"
+.It "ASUS WL-138g BCM4318 PCI b/g"
+.It "Buffalo WLI-CB-G54S BCM4318 CardBus b/g"
+.It "Dell Wireless 1390 BCM4311 Mini PCI b/g"
+.It "Dell Wireless 1470 BCM4318 Mini PCI b/g"
+.It "Dell Truemobile 1400 BCM4309 Mini PCI b/g"
+.It "HP Compaq 6715b BCM4312 PCI b/g"
+.It "HP nx6125 BCM4319 PCI b/g"
+.It "Linksys WPC54G Ver 3 BCM4318 CardBus b/g"
+.It "Linksys WPC54GS Ver 2 BCM4318 CardBus b/g"
+.It "US Robotics 5411 BCM4318 CardBus b/g"
+.El
+.Pp
+Users of older Broadcom chipsets (BCM4301, BCM4303 and BCM4306 rev 2)
+must use
+.Xr bwi 4
+because the v4 version of the firmware does not support these chips.
+The newer firmware is too big to fit into these old chips.
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev bwn0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev bwn0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev bwn0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va hw.bwn.msi_disable
+This tunable disables MSI support on the hardware.
+The default value is 0.
+.It Va hw.bwn.usedma
+This tunable enables DMA operations on the hardware.
+If the value is 0, PIO mode would be used.
+The default value is 1.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr bwi 4 ,
+.Xr cardbus 4 ,
+.Xr intro 4 ,
+.Xr pci 4 ,
+.Xr wlan 4 ,
+.Xr wlan_amrr 4 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 8.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Weongyo Jeong
+.Aq weongyo@FreeBSD.org .
+.\".Sh BUGS
+.\"Some card based on the BCM4306 and BCM4309 chips do not work properly
+.\"on channel 1, 2 and 3.
+.Sh CAVEATS
+Some LP PHY devices have DMA operation problems that in that case try to
+use PIO mode.
diff --git a/share/man/man4/bxe.4 b/share/man/man4/bxe.4
new file mode 100644
index 0000000..0067385
--- /dev/null
+++ b/share/man/man4/bxe.4
@@ -0,0 +1,344 @@
+.\" Copyright (c) 2014 Qlogic Corporation. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS'
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 29, 2012
+.Dt BXE 4
+.Os
+.Sh NAME
+.Nm bxe
+.Nd QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device bxe"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_bxe_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCIe 10Gb Ethernet adapters based on the QLogic
+NetXtreme II family of 10Gb chips.
+The driver supports Jumbo Frames, VLAN
+tagging, checksum offload (IPv4, TCP, UDP, IPv6-TCP, IPv6-UDP), MSI-X
+interrupts, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), and
+Receive Side Scaling (RSS).
+.Sh HARDWARE
+The
+.Nm
+driver provides support for various NICs based on the QLogic NetXtreme II
+family of 10Gb Ethernet controller chips, including the following:
+.Pp
+.Bl -bullet -compact
+.It
+QLogic NetXtreme II BCM57710 10Gb
+.It
+QLogic NetXtreme II BCM57711 10Gb
+.It
+QLogic NetXtreme II BCM57711E 10Gb
+.It
+QLogic NetXtreme II BCM57712 10Gb
+.It
+QLogic NetXtreme II BCM57712-MF 10Gb
+.It
+QLogic NetXtreme II BCM57800 10Gb
+.It
+QLogic NetXtreme II BCM57800-MF 10Gb
+.It
+QLogic NetXtreme II BCM57810 10Gb
+.It
+QLogic NetXtreme II BCM57810-MF 10Gb
+.It
+QLogic NetXtreme II BCM57840 10Gb / 20Gb
+.It
+QLogic NetXtreme II BCM57840-MF 10Gb
+.El
+.Sh CONFIGURATION
+There a number of configuration parameters that can be set to tweak the
+driver's behavior.
+These parameters can be set via the
+.Xr loader.conf 5
+file to take affect during the next system boot.
+The following parameters affect
+ALL instances of the driver.
+.Bl -tag -width indent
+.It Va hw.bxe.debug
+DEFAULT = 0
+.br
+Sets the default logging level of the driver.
+See the Diagnostics and Debugging
+section below for more details.
+.It Va hw.bxe.interrupt_mode
+DEFAULT = 2
+.br
+Sets the default interrupt mode: 0=IRQ, 1=MSI, 2=MSIX.
+If set to MSIX and
+allocation fails, the driver will roll back and attempt MSI allocation.
+If MSI
+allocation fails, the driver will roll back and attempt fixed level IRQ
+allocation.
+If IRQ allocation fails, then the driver load fails.
+With MSI/MSIX,
+the driver attempts to allocate a vector for each queue in addition to one more
+for default processing.
+.It Va hw.bxe.queue_count
+DEFAULT = 4
+.br
+Sets the default number of fast path packet processing queues.
+Note that one
+MSI/MSIX interrupt vector is allocated per-queue.
+.It Va hw.bxe.max_rx_bufs
+DEFAULT = 0
+.br
+Sets the maximum number of receive buffers to allocate per-queue.
+Zero(0) means
+to allocate a receive buffer for every buffer descriptor.
+By default this
+equates to 4080 buffers per-queue which is the maximum value for this config
+parameter.
+.It Va hw.bxe.hc_rx_ticks
+DEFAULT = 25
+.br
+Sets the number of ticks for host interrupt coalescing in the receive path.
+.It Va hw.bxe.hc_tx_ticks
+DEFAULT = 50
+.br
+Sets the number of ticks for host interrupt coalescing in the transmit path.
+.It Va hw.bxe.rx_budget
+DEFAULT = 0xffffffff
+.br
+Sets the maximum number of receive packets to process in an interrupt.
+If the
+budget is reached then the remaining/pending packets will be processed in a
+scheduled taskqueue.
+.It Va hw.bxe.max_aggregation_size
+DEFAULT = 32768
+.br
+Sets the maximum LRO aggregration byte size.
+The higher the value the more
+packets the hardware will aggregate.
+Maximum is 65K.
+.It Va hw.bxe.mrrs
+DEFAULT = -1
+.br
+Sets the PCI MRRS: -1=Auto, 0=128B, 1=256B, 2=512B, 3=1KB
+.It Va hw.bxe.autogreeen
+DEFAULT = 0
+.br
+Set AutoGrEEEN: 0=HW_DEFAULT, 1=FORCE_ON, 2=FORCE_OFF
+.It Va hw.bxe.udp_rss
+DEFAULT = 0
+.br
+Enable/Disable 4-tuple RSS for UDP: 0=DISABLED, 1=ENABLED
+.El
+.Pp
+Special care must be taken when modifying the number of queues and receive
+buffers.
+FreeBSD imposes a limit on the maximum number of
+.Xr mbuf 9
+allocations.
+If buffer allocations fail, the interface initialization will fail
+and the interface will not be usable.
+The driver does not make a best effort
+for buffer allocations.
+It is an all or nothing effort.
+.Pp
+You can tweak the
+.Xr mbuf 9
+allocation limit using
+.Xr sysctl 8
+and view the current usage with
+.Xr netstat 1
+as follows:
+.Bd -literal -offset indent
+# netstat -m
+# sysctl kern.ipc.nmbclusters
+# sysctl kern.ipc.nmbclusters=<#>
+.Ed
+.Pp
+There are additional configuration parameters that can be set on a per-instance
+basis to dynamically override the default configuration.
+The '#' below must be
+replaced with the driver instance / interface unit number:
+.Bl -tag -width indent
+.It Va dev.bxe.#.debug
+DEFAULT = 0
+.br
+Sets the default logging level of the driver instance.
+See
+.Va hw.bxe.debug
+above and
+the Diagnostics and Debugging section below for more details.
+.It Va dev.bxe.#.rx_budget
+DEFAULT = 0xffffffff
+.br
+Sets the maximum number of receive packets to process in an interrupt for the
+driver instance.
+See
+.Va hw.bxe.rx_budget
+above for more details.
+.El
+.Pp
+Additional items can be configured using
+.Xr ifconfig 8 :
+.Bl -tag -width indent
+.It Va MTU - Maximum Transmission Unit
+DEFAULT = 1500
+.br
+RANGE = 46-9184
+.br
+# ifconfig bxe# mtu <n>
+.It Va Promiscuous Mode
+DEFAULT = OFF
+.br
+# ifconfig bxe# [ promisc | -promisc ]
+.It Va Rx/Tx Checksum Offload
+DEFAULT = RX/TX CSUM ON
+.br
+Note that the Rx and Tx settings are not independent.
+.br
+# ifconfig bxe# [ rxcsum | -rxcsum | txcsum | -txcsum ]
+.It Va TSO - TCP Segmentation Offload
+DEFAULT = ON
+.br
+# ifconfig bxe# [ tso | -tso | tso6 | -tso6 ]
+.It Va LRO - TCP Large Receive Offload
+DEFAULT = ON
+.br
+# ifconfig bxe# [ lro | -lro ]
+.El
+.Sh DIAGNOSTICS AND DEBUGGING
+There are many statistics exposed by
+.Nm
+via
+.Xr sysctl 8 .
+.Pp
+To dump the default driver configuration:
+.Bd -literal -offset indent
+# sysctl -a | grep hw.bxe
+.Ed
+.Pp
+To dump every instance's configuration and detailed statistics:
+.Bd -literal -offset indent
+# sysctl -a | grep dev.bxe
+.Ed
+.Pp
+To dump information for a single instance (replace the '#' with the driver
+instance / interface unit number):
+.Bd -literal -offset indent
+# sysctl -a | grep dev.bxe.#
+.Ed
+.Pp
+To dump information for all the queues of a single instance:
+.Bd -literal -offset indent
+# sysctl -a | grep dev.bxe.#.queue
+.Ed
+.Pp
+To dump information for a single queue of a single instance (replace the
+additional '#' with the queue number):
+.Bd -literal -offset indent
+# sysctl -a | grep dev.bxe.#.queue.#
+.Ed
+.Pp
+The
+.Nm
+driver has the ability to dump a ton of debug messages to the system
+log.
+The default level of logging can be set with the
+.Va hw.bxe.debug
+.Xr sysctl 8 .
+Take care with this setting as it can result in too
+many logs being dumped.
+Since this parameter is the default one, it affects
+every instance and will dramatically change the timing in the driver.
+A better
+alternative to aid in debugging is to dynamically change the debug level of a
+specific instance with the
+.Va dev.bxe.#.debug
+.Xr sysctl 8 .
+This allows
+you to turn on/off logging of various debug groups on-the-fly.
+.Pp
+The different debug groups that can be toggled are:
+.Bd -literal -offset indent
+DBG_LOAD 0x00000001 /* load and unload */
+DBG_INTR 0x00000002 /* interrupt handling */
+DBG_SP 0x00000004 /* slowpath handling */
+DBG_STATS 0x00000008 /* stats updates */
+DBG_TX 0x00000010 /* packet transmit */
+DBG_RX 0x00000020 /* packet receive */
+DBG_PHY 0x00000040 /* phy/link handling */
+DBG_IOCTL 0x00000080 /* ioctl handling */
+DBG_MBUF 0x00000100 /* dumping mbuf info */
+DBG_REGS 0x00000200 /* register access */
+DBG_LRO 0x00000400 /* lro processing */
+DBG_ASSERT 0x80000000 /* debug assert */
+DBG_ALL 0xFFFFFFFF /* flying monkeys */
+.Ed
+.Pp
+For example, to debug an issue in the receive path on bxe0:
+.Bd -literal -offset indent
+# sysctl dev.bxe.0.debug=0x22
+.Ed
+.Pp
+When finished turn the logging back off:
+.Bd -literal -offset indent
+# sysctl dev.bxe.0.debug=0
+.Ed
+.Sh SUPPORT
+For support questions please contact your QLogic approved reseller or
+QLogic Technical Support at
+.Pa http://support.qlogic.com ,
+or by E-mail at
+.Aq support@qlogic.com .
+.Sh SEE ALSO
+.Xr netstat 1 ,
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 9.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Eric Davis Aq edavis@broadcom.com ,
+.An David Christensen Aq davidch@broadcom.com ,
+and
+.An Gary Zambrano Aq zambrano@broadcom.com .
diff --git a/share/man/man4/capsicum.4 b/share/man/man4/capsicum.4
new file mode 100644
index 0000000..9009d3f
--- /dev/null
+++ b/share/man/man4/capsicum.4
@@ -0,0 +1,131 @@
+.\"
+.\" Copyright (c) 2011, 2013 Robert N. M. Watson
+.\" Copyright (c) 2011 Jonathan Anderson
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 19, 2013
+.Dt CAPSICUM 4
+.Os
+.Sh NAME
+.Nm Capsicum
+.Nd lightweight OS capability and sandbox framework
+.Sh SYNOPSIS
+.Cd "options CAPABILITY_MODE"
+.Cd "options CAPABILITIES"
+.Sh DESCRIPTION
+.Nm
+is a lightweight OS capability and sandbox framework implementing a hybrid
+capability system model.
+.Nm
+can be used for application and library compartmentalisation, the
+decomposition of larger bodies of software into isolated (sandboxed)
+components in order to implement security policies and limit the impact of
+software vulnerabilities.
+.Pp
+.Nm
+provides two core kernel primitives:
+.Bl -tag -width indent
+.It capability mode
+A process mode, entered by invoking
+.Xr cap_enter 2 ,
+in which access to global OS namespaces (such as the file system and PID
+namespaces) is restricted; only explicitly delegated rights, referenced by
+memory mappings or file descriptors, may be used.
+Once set, the flag is inherited by future children processes, and may not be
+cleared.
+.It capabilities
+Limit operations that can be called on file descriptors.
+For example, a file descriptor returned by
+.Xr open 2
+may be refined using
+.Xr cap_rights_limit 2
+so that only
+.Xr read 2
+and
+.Xr write 2
+can be called, but not
+.Xr fchmod 2 .
+The complete list of the capability rights can be found in the
+.Xr rights 4
+manual page.
+.El
+.Pp
+In some cases,
+.Nm
+requires use of alternatives to traditional POSIX APIs in order to name
+objects using capabilities rather than global namespaces:
+.Bl -tag -width indent
+.It process descriptors
+File descriptors representing processes, allowing parent processes to manage
+child processes without requiring access to the PID namespace; described in
+greater detail in
+.Xr procdesc 4 .
+.It anonymous shared memory
+An extension to the POSIX shared memory API to support anonymous swap objects
+associated with file descriptors; described in greater detail in
+.Xr shm_open 2 .
+.El
+.Sh SEE ALSO
+.Xr cap_enter 2 ,
+.Xr cap_fcntls_limit 2 ,
+.Xr cap_getmode 2 ,
+.Xr cap_ioctls_limit 2 ,
+.Xr cap_rights_limit 2 ,
+.Xr fchmod 2 ,
+.Xr open 2 ,
+.Xr pdfork 2 ,
+.Xr pdgetpid 2 ,
+.Xr pdkill 2 ,
+.Xr pdwait4 2 ,
+.Xr read 2 ,
+.Xr shm_open 2 ,
+.Xr write 2 ,
+.Xr cap_rights_get 3 ,
+.Xr libcapsicum 3 ,
+.Xr procdesc 4 ,
+.Xr casperd 8
+.Sh HISTORY
+.Nm
+first appeared in
+.Fx 9.0 ,
+and was developed at the University of Cambridge.
+.Sh AUTHORS
+.Nm
+was developed by
+.An -nosplit
+.An "Robert Watson" Aq rwatson@FreeBSD.org
+and
+.An "Jonathan Anderson" Aq jonathan@FreeBSD.org
+at the University of Cambridge, and
+.An "Ben Laurie" Aq benl@FreeBSD.org
+and
+.An "Kris Kennaway" Aq kris@FreeBSD.org
+at Google, Inc., and
+.An "Pawel Jakub Dawidek" Aq pawel@dawidek.net .
+.Sh BUGS
+.Nm
+is considered experimental in
+.Fx .
diff --git a/share/man/man4/cardbus.4 b/share/man/man4/cardbus.4
new file mode 100644
index 0000000..1c3600a
--- /dev/null
+++ b/share/man/man4/cardbus.4
@@ -0,0 +1,59 @@
+.\"
+.\" Copyright (c) 2002 M. Warner Losh
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 9, 2002
+.Dt CARDBUS 4
+.Os
+.Sh NAME
+.Nm cardbus
+.Nd CardBus bus driver
+.Sh SYNOPSIS
+.Cd device cardbus
+.Sh DESCRIPTION
+The
+.Nm
+driver implements the CardBus bus.
+The
+.Nm
+driver supports all cardbus bridges in the system.
+.Sh TUNABLES
+The driver supports the following tunable parameters, which may be
+added to
+.Pa /boot/loader.conf
+or set via the
+.Xr sysctl 8
+command:
+.Bl -tag -width ".Cm hw.cardbus.cis_debug" -compact
+.It Cm hw.cardbus.debug
+Non-zero values cause more verbose information to be printed when a
+32-bit CardBus card is inserted or removed.
+.It Cm hw.cardbus.cis_debug
+Non-zero value causes the CIS parsing of the 32-bit CardBus card to be
+much more verbose and include a complete CIS dump.
+.El
+.Sh SEE ALSO
+.Xr pccard 4 ,
+.Xr pccbb 4
diff --git a/share/man/man4/carp.4 b/share/man/man4/carp.4
new file mode 100644
index 0000000..ca52ba2
--- /dev/null
+++ b/share/man/man4/carp.4
@@ -0,0 +1,323 @@
+.\" $OpenBSD: carp.4,v 1.16 2004/12/07 23:41:35 jmc Exp $
+.\"
+.\" Copyright (c) 2003, Ryan McBride. All rights reserved.
+.\" Copyright (c) 2011, Gleb Smirnoff <glebius@FreeBSD.org>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 21, 2013
+.Dt CARP 4
+.Os
+.Sh NAME
+.Nm carp
+.Nd Common Address Redundancy Protocol
+.Sh SYNOPSIS
+.Cd "device carp"
+.Sh DESCRIPTION
+The CARP allows multiple hosts on the same local network to share a set of
+IPv4 and/or IPv6 addresses.
+Its primary purpose is to ensure that these
+addresses are always available.
+.Pp
+To use
+.Nm ,
+the administrator needs to configure at a minimum a common virtual host ID
+(vhid), and attach at least one IP address to this vhid on each machine which
+is to take part in the virtual group.
+Additional parameters can also be set on a per-vhid basis:
+.Cm advbase
+and
+.Cm advskew ,
+which are used to control how frequently the host sends advertisements when it
+is the master for a virtual host, and
+.Cm pass
+which is used to authenticate
+.Nm
+advertisements.
+The
+.Cm advbase
+parameter stands for
+.Dq "advertisement base" .
+It is measured in seconds and specifies the base of the advertisement interval.
+The
+.Cm advskew
+parameter stands for
+.Dq "advertisement skew" .
+It is measured in 1/256 of seconds.
+It is added to the base advertisement interval to make one host advertise
+a bit slower that the other does.
+Both
+.Cm advbase
+and
+.Cm advskew
+are put inside CARP advertisements.
+These values can be configured using
+.Xr ifconfig 8 ,
+or through the
+.Dv SIOCSVH
+.Xr ioctl 2 .
+.Pp
+CARP virtual hosts can be configured on multicast-capable interfaces: Ethernet,
+layer 2 VLAN, FDDI and Token Ring.
+An arbitrary number of virtual host IDs can be configured on an interface.
+An arbitrary number of IPv4 or IPv6 addresses can be attached to a particular
+vhid.
+It is important that all hosts participating in a vhid have the same list
+of prefixes configured on the vhid, since all prefixes are included in the
+cryptographic checksum supplied in each advertisement.
+Multiple vhids running on one interface participate in master/backup
+elections independently.
+.Pp
+Additionally, there are a number of global parameters which can be set using
+.Xr sysctl 8 :
+.Bl -tag -width ".Va net.inet.carp.ifdown_demotion_factor"
+.It Va net.inet.carp.allow
+Accept incoming
+.Nm
+packets.
+Enabled by default.
+.It Va net.inet.carp.preempt
+Allow virtual hosts to preempt each other.
+When enabled, a vhid in a backup state would preempt a master that
+is announcing itself with a lower advskew.
+Disabled by default.
+.It Va net.inet.carp.log
+Determines what events relating to
+.Nm
+vhids are logged.
+A value of 0 disables any logging.
+A value of 1 enables logging state changes of
+.Nm
+vhids.
+Values above 1 enable logging of bad
+.Nm
+packets.
+The default value is 1.
+.It Va net.inet.carp.demotion
+This value shows current level of CARP demotion.
+The value is added to the actual advskew sent in announcements for
+all vhids.
+At normal system operation the demotion factor is zero.
+However, problematic conditions raise its level: when
+.Nm
+experiences problem with sending announcements, when an interface
+running a vhid goes down, or while the
+.Xr pfsync 4
+interface is not synchronized.
+The demotion factor can be adjusted writing to the sysctl oid.
+The signed value supplied to the
+.Xr sysctl 8
+command is added to current demotion factor.
+This allows to control
+.Nm
+behaviour depending on some external conditions, for example on the status
+of some daemon utility.
+.It Va net.inet.carp.ifdown_demotion_factor
+This value is added to
+.Va net.inet.carp.demotion
+when an interface running a vhid goes down.
+The default value is 240 (the maximum advskew value).
+.It Va net.inet.carp.senderr_demotion_factor
+This value is added to
+.Va net.inet.carp.demotion
+when
+.Nm
+experiences errors sending its announcements.
+The default value is 240 (the maximum advskew value).
+.El
+.\".Sh ARP level load balancing
+.\"A
+.\".Nm
+.\"interface has limited abilities for load balancing incoming connections
+.\"between hosts in an Ethernet network.
+.\"For load-balancing operation, one needs several CARP interfaces that
+.\"are configured to the same IP address, but to a different vhids.
+.\"Once an ARP request is received, the CARP protocol will use a hashing
+.\"function against the source IP address in the ARP request to determine
+.\"which vhid the request will be assigned to.
+.\"If the corresponding CARP interface is the current
+.\"master interface, a reply will
+.\"be sent to the ARP request;
+.\"otherwise it will be ignored.
+.\"See the
+.\".Sx EXAMPLES
+.\"section for a practical example of load balancing.
+.\".Pp
+.\"The ARP load balancing implemented in
+.\".Nm
+.\"has some limitations.
+.\"First, ARP balancing only works on the local network segment.
+.\"It cannot balance traffic that crosses a router, because the
+.\"router itself will always be balanced to the same virtual host.
+.\"Second, ARP load balancing can lead to asymmetric routing
+.\"of incoming and outgoing traffic, and thus combining it with
+.\".Xr pfsync 4
+.\"is dangerous, because this creates a race condition between
+.\"balanced routers and a host they are serving.
+.\"Imagine an incoming packet creating state on the first router, being
+.\"forwarded to its destination, and the destination replying faster
+.\"than the state information is packed and synced with the second router.
+.\"If the reply would be load balanced to second router, it will be
+.\"dropped since the second router has not yet received information about
+.\"the connection state.
+.Sh STATE CHANGE NOTIFICATIONS
+Sometimes it is useful to get notified about
+.Nm
+status change events.
+This can be accomplished by using
+.Xr devd 8
+hooks.
+Master/slave events are signalled under system
+.Dv CARP .
+The subsystem specifies the vhid and name of the interface where
+the master/slave event occurred.
+The type of the message displays the new state of the vhid.
+Please see
+.Xr devd.conf 5
+and the
+.Sx EXAMPLES
+section for more information.
+.Sh EXAMPLES
+For firewalls and routers with multiple interfaces, it is desirable to
+failover all of the addresses running
+.Nm
+together, when one of the physical interfaces goes down.
+This is achieved by the use of the preempt option.
+Enable it on both hosts A and B:
+.Pp
+.Dl sysctl net.inet.carp.preempt=1
+.Pp
+Assume that host A is the preferred master and we are running the
+192.168.1.0/24 prefix on em0 and 192.168.2.0/24 on em1.
+This is the setup for host A (advskew is above 0 so it could be overwritten
+in the emergency situation from the other host):
+.Bd -literal -offset indent
+ifconfig em0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.1/24
+ifconfig em1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.2.1/24
+.Ed
+.Pp
+The setup for host B is identical, but it has a higher
+.Cm advskew :
+.Bd -literal -offset indent
+ifconfig em0 vhid 1 advskew 200 pass mekmitasdigoat 192.168.1.1/24
+ifconfig em1 vhid 2 advskew 200 pass mekmitasdigoat 192.168.2.1/24
+.Ed
+.Pp
+When one of the physical interfaces of host A fails,
+.Cm advskew
+is demoted to a configured value on all its
+.Nm
+vhids.
+Due to the preempt option, host B would start announcing itself, and thus
+preempt host A on both interfaces instead of just the failed one.
+.\".Pp
+.\"In order to set up an ARP balanced virtual host, it is necessary to configure
+.\"one virtual host for each physical host which would respond to ARP requests
+.\"and thus handle the traffic.
+.\"In the following example, two virtual hosts are configured on two hosts to
+.\"provide balancing and failover for the IP address 192.168.1.10.
+.\".Pp
+.\"First the
+.\".Nm
+.\"interfaces on host A are configured.
+.\"The
+.\".Cm advskew
+.\"of 100 on the second virtual host means that its advertisements will be sent
+.\"out slightly less frequently.
+.\".Bd -literal -offset indent
+.\"ifconfig carp0 create
+.\"ifconfig carp0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.10/24
+.\"ifconfig carp1 create
+.\"ifconfig carp1 vhid 2 advskew 200 pass mekmitasdigoat 192.168.1.10/24
+.\".Ed
+.\".Pp
+.\"The configuration for host B is identical, except the
+.\".Cm advskew
+.\"is on virtual host 1 rather than virtual host 2.
+.\".Bd -literal -offset indent
+.\"ifconfig carp0 create
+.\"ifconfig carp0 vhid 1 advskew 200 pass mekmitasdigoat 192.168.1.10/24
+.\"ifconfig carp1 create
+.\"ifconfig carp1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.1.10/24
+.\".Ed
+.\".Pp
+.\"Finally, the ARP balancing feature must be enabled on both hosts:
+.\".Pp
+.\".Dl sysctl net.inet.carp.arpbalance=1
+.\".Pp
+.\"When the hosts receive an ARP request for 192.168.1.10, the source IP address
+.\"of the request is used to compute which virtual host should answer the request.
+.\"The host which is master of the selected virtual host will reply to the
+.\"request, the other(s) will ignore it.
+.\".Pp
+.\"This way, locally connected systems will receive different ARP replies and
+.\"subsequent IP traffic will be balanced among the hosts.
+.\"If one of the hosts fails, the other will take over the virtual MAC address,
+.\"and begin answering ARP requests on its behalf.
+.Pp
+Processing of
+.Nm
+status change events can be set up by using the following devd.conf rule:
+.Bd -literal -offset indent
+notify 0 {
+ match "system" "CARP";
+ match "subsystem" "[0-9]+@[0-9a-z]+";
+ match "type" "(MASTER|BACKUP)";
+ action "/root/carpcontrol.sh $subsystem $type";
+};
+.Ed
+.Pp
+To see
+.Nm
+packets decoded in
+.Xr tcpdump 8
+output, one needs to specify
+.Fl T Ar carp
+option, otherwise
+.Xr tcpdump 8
+tries to interpret them as VRRP packets:
+.Bd -literal -offset indent
+tcpdump -npi vlan0 -T carp
+.Ed
+.Sh SEE ALSO
+.Xr inet 4 ,
+.Xr pfsync 4 ,
+.Xr rc.conf 5 ,
+.Xr devd.conf 5 ,
+.Xr ifconfig 8 ,
+.Xr sysctl 8
+.Xr tcpdump 8
+.Sh HISTORY
+The
+.Nm
+device first appeared in
+.Ox 3.5 .
+The
+.Nm
+device was imported into
+.Fx 5.4 .
+In
+.Fx 10.0 ,
+.Nm
+was significantly rewritten, and is no longer a pseudo-interface.
diff --git a/share/man/man4/cas.4 b/share/man/man4/cas.4
new file mode 100644
index 0000000..36a5ab1
--- /dev/null
+++ b/share/man/man4/cas.4
@@ -0,0 +1,159 @@
+.\"
+.\" Copyright (c) 2009 Marius Strobl <marius@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 24, 2012
+.Dt CAS 4
+.Os
+.Sh NAME
+.Nm cas
+.Nd Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn Gigabit Ethernet driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device cas"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_cas_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Sun Cassini/Cassini+ and National
+Semiconductor DP83065 Saturn Gigabit Ethernet controllers found
+on-board in Sun UltraSPARC machines and as add-on cards.
+.Pp
+All controllers supported by the
+.Nm
+driver have TCP/UDP checksum offload capability for both receive and
+transmit, support for the reception and transmission of extended frames
+for
+.Xr vlan 4
+and an interrupt coalescing/moderation mechanism as well as a 512-bit
+multicast hash filter.
+.Pp
+The
+.Nm
+driver also supports Jumbo Frames (up to 9022 bytes), which can be
+configured via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+.Sh HARDWARE
+The chips supported by the
+.Nm
+driver are:
+.Pp
+.Bl -bullet -compact
+.It
+National Semiconductor DP83065 Saturn Gigabit Ethernet
+.It
+Sun Cassini Gigabit Ethernet
+.It
+Sun Cassini+ Gigabit Ethernet
+.El
+.Pp
+The
+following add-on cards are known to work with the
+.Nm
+driver at this time:
+.Pp
+.Bl -bullet -compact
+.It
+Sun GigaSwift Ethernet 1.0 MMF (Cassini Kuheen)
+(part no.\& 501-5524)
+.It
+Sun GigaSwift Ethernet 1.0 UTP (Cassini)
+(part no.\& 501-5902)
+.It
+Sun GigaSwift Ethernet UTP (GCS)
+(part no.\& 501-6719)
+.It
+Sun Quad GigaSwift Ethernet UTP (QGE)
+(part no.\& 501-6522)
+.It
+Sun Quad GigaSwift Ethernet PCI-X (QGE-X)
+(part no.\& 501-6738)
+.El
+.Sh NOTES
+On sparc64 the
+.Nm
+driver respects the
+.Va local-mac-address?
+system configuration variable which can be set in the Open Firmware boot
+monitor using the
+.Ic setenv
+command or by
+.Xr eeprom 8 .
+If set to
+.Dq Li false
+(the default), the
+.Nm
+driver will use the system's default MAC address for all of its devices.
+If set to
+.Dq Li true ,
+the unique MAC address of each interface is used if present rather than
+the system's default MAC address.
+.Pp
+Supported interfaces having their own MAC address include on-board
+versions on boards equipped with more than one Ethernet interface and
+all add-on cards.
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr vlan 4 ,
+.Xr eeprom 8 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Fx 8.0
+and
+.Fx 7.3 .
+It is named after the
+.Nm
+driver which first appeared in
+.Ox 4.1
+and supports the same set of controllers but is otherwise unrelated.
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Marius Strobl
+.Aq marius@FreeBSD.org
+based on the
+.Xr gem 4
+driver.
diff --git a/share/man/man4/cc_cdg.4 b/share/man/man4/cc_cdg.4
new file mode 100644
index 0000000..c111bd4
--- /dev/null
+++ b/share/man/man4/cc_cdg.4
@@ -0,0 +1,155 @@
+.\"
+.\" Copyright (c) 2013 Swinburne University of Technology, Melbourne, Australia
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 2, 2013
+.Dt CC_CDG 4
+.Os
+.Sh NAME
+.Nm cc_cdg
+.Nd CDG Congestion Control Algorithm
+.Sh DESCRIPTION
+CAIA-Delay Gradient (CDG) is a hybrid congestion control algorithm which reacts
+to both packet loss and inferred queuing delay.
+It attempts to operate as a delay-based algorithm where possible, but utilises
+heuristics to detect loss-based TCP cross traffic and will compete effectively
+as required.
+CDG is therefore incrementally deployable and suitable for use on shared
+networks.
+.Pp
+During delay-based operation, CDG uses a delay-gradient based probabilistic
+backoff mechanism, and will also try to infer non congestion related
+packet losses and avoid backing off when they occur.
+During loss-based operation, CDG essentially reverts to
+.Xr cc_newreno 4 Ns - Ns like
+behaviour.
+.Pp
+CDG switches to loss-based operation when it detects that a configurable number
+of consecutive delay-based backoffs have had no measurable effect.
+It periodically attempts to return to delay-based operation, but will keep
+switching back to loss-based operation as required.
+.Sh MIB Variables
+The algorithm exposes the following variables in the
+.Va net.inet.tcp.cc.cdg
+branch of the
+.Xr sysctl 3
+MIB:
+.Bl -tag -width ".Va exp_backoff_scale"
+.It Va version
+Current algorithm/implementation version number.
+.It Va beta_delay
+Delay-based window decrease factor as a percentage (on delay-based backoff, w =
+w * beta_delay / 100).
+Default is 70.
+.It Va beta_loss
+Loss-based window decrease factor as a percentage (on loss-based backoff, w =
+w * beta_loss / 100).
+Default is 50.
+.It Va exp_backoff_scale
+Scaling parameter for the probabilistic exponential backoff.
+Default is 2.
+.It Va smoothing_factor
+Number of samples used for moving average smoothing (0 means no smoothing).
+Default is 8.
+.It Va loss_compete_consec_cong
+Number of consecutive delay-gradient based congestion episodes which will
+trigger loss-based CC compatibility.
+Default is 5.
+.It Va loss_compete_hold_backoff
+Number of consecutive delay-gradient based congestion episodes to hold the
+window backoff for loss-based CC compatibility.
+Default is 5.
+.It Va alpha_inc
+If non-zero, this enables an experimental mode where CDG's window increase
+factor (alpha) is increased by 1 MSS every
+.Va alpha_inc
+RTTs during congestion avoidance mode.
+(Setting
+.Va alpha_inc
+to 1 results in the most aggressive growth of the window increase factor over
+time.
+Use higher
+.Va alpha_inc
+values for slower growth.)
+Default is 0.
+.El
+.Sh SEE ALSO
+.Xr cc_chd 4 ,
+.Xr cc_cubic 4 ,
+.Xr cc_hd 4 ,
+.Xr cc_htcp 4 ,
+.Xr cc_newreno 4 ,
+.Xr cc_vegas 4 ,
+.Xr h_ertt 4 ,
+.Xr mod_cc 4 ,
+.Xr tcp 4 ,
+.Xr khelp 9 ,
+.Xr mod_cc 9
+.Rs
+.%A "D. A. Hayes"
+.%A "G. Armitage"
+.%T "Revisiting TCP Congestion Control using Delay Gradients"
+.%J "Networking 2011 Proceedings, Part II"
+.%D "May 2011"
+.%P "328-341"
+.Re
+.Rs
+.%A "N. Khademi"
+.%A "G. Armitage"
+.%T "Minimising RTT across homogeneous 802.11 WLANs with CAIA Delay-Gradient TCP (v0.1)"
+.%R "CAIA Technical Report 121113A"
+.%D "November 2012"
+.%U "http://caia.swin.edu.au/reports/121113A/CAIA-TR-121113A.pdf"
+.Re
+.Sh ACKNOWLEDGEMENTS
+Development and testing of this software were made possible in part by grants
+from the FreeBSD Foundation and The Cisco University Research Program Fund, a
+corporate advised fund of Silicon Valley Community Foundation.
+.Sh HISTORY
+The
+.Nm
+congestion control module first appeared in
+.Fx 9.2 .
+.Pp
+The module was first released in 2011 by David Hayes whilst working on the
+NewTCP research project at Swinburne University of Technology's Centre for
+Advanced Internet Architectures, Melbourne, Australia.
+More details are available at:
+.Pp
+http://caia.swin.edu.au/urp/newtcp/
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+congestion control module was written by
+.An David Hayes Aq david.hayes@ieee.org .
+This manual page was written by
+.An Lawrence Stewart Aq lstewart@FreeBSD.org
+and
+.An Grenville Armitage Aq garmitage@swin.edu.au .
+.Sh BUGS
+The underlying algorithm and parameter values are still a work in progress and
+may not be optimal for some network scenarios.
diff --git a/share/man/man4/cc_chd.4 b/share/man/man4/cc_chd.4
new file mode 100644
index 0000000..39cdef3
--- /dev/null
+++ b/share/man/man4/cc_chd.4
@@ -0,0 +1,128 @@
+.\"
+.\" Copyright (c) 2010-2011 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This documentation was written at the Centre for Advanced Internet
+.\" Architectures, Swinburne University of Technology, Melbourne, Australia by
+.\" David Hayes under sponsorship from the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 15, 2011
+.Dt CC_CHD 4
+.Os
+.Sh NAME
+.Nm cc_chd
+.Nd CHD Congestion Control Algorithm
+.Sh DESCRIPTION
+CHD enhances the HD algorithm implemented in
+.Xr cc_hd 4 .
+It provides tolerance to non-congestion related packet loss and improvements to
+coexistence with traditional loss-based TCP flows, especially when the
+bottleneck link is lightly multiplexed.
+.Pp
+Like HD, the algorithm aims to keep network queuing delays below a particular
+threshold (queue_threshold) and decides to reduce the congestion window (cwnd)
+probabilistically based on its estimate of the network queuing delay.
+.Pp
+It differs from HD in three key aspects:
+.Bl -bullet
+.It
+The probability of cwnd reduction due to congestion is calculated once per round
+trip time instead of each time an acknowledgement is received as done by
+.Xr cc_hd 4 .
+.It
+Packet losses that occur while the queuing delay is less than queue_threshold
+do not cause cwnd to be reduced.
+.It
+CHD uses a shadow window to help regain lost transmission opportunities when
+competing with loss-based TCP flows.
+.El
+.Sh MIB Variables
+The algorithm exposes the following tunable variables in the
+.Va net.inet.tcp.cc.chd
+branch of the
+.Xr sysctl 3
+MIB:
+.Bl -tag -width ".Va queue_threshold"
+.It Va queue_threshold
+Queueing congestion threshold (qth) in ticks.
+Default is 20.
+.It Va pmax
+Per RTT maximum backoff probability as a percentage.
+Default is 50.
+.It Va qmin
+Minimum queuing delay threshold (qmin) in ticks.
+Default is 5.
+.It Va loss_fair
+If 1, cwnd is adjusted using the shadow window when a congestion
+related loss is detected.
+Default is 1.
+.It Va use_max
+If 1, the maximum RTT seen within the measurement period is used as the basic
+delay measurement for the algorithm, otherwise a sampled RTT measurement
+is used.
+Default is 1.
+.El
+.Sh SEE ALSO
+.Xr cc_cubic 4 ,
+.Xr cc_hd 4 ,
+.Xr cc_htcp 4 ,
+.Xr cc_newreno 4 ,
+.Xr cc_vegas 4 ,
+.Xr h_ertt 4 ,
+.Xr mod_cc 4 ,
+.Xr tcp 4 ,
+.Xr khelp 9 ,
+.Xr mod_cc 9
+.Rs
+.%A "D. A. Hayes"
+.%A "G. Armitage"
+.%T "Improved coexistence and loss tolerance for delay based TCP congestion control"
+.%J "in 35th Annual IEEE Conference on Local Computer Networks"
+.%D "October 2010"
+.%P "24-31"
+.Re
+.Sh ACKNOWLEDGEMENTS
+Development and testing of this software were made possible in part by grants
+from the FreeBSD Foundation and Cisco University Research Program Fund at
+Community Foundation Silicon Valley.
+.Sh HISTORY
+The
+.Nm
+congestion control module first appeared in
+.Fx 9.0 .
+.Pp
+The module was first released in 2010 by David Hayes whilst working on the
+NewTCP research project at Swinburne University of Technology's Centre for
+Advanced Internet Architectures, Melbourne, Australia.
+More details are available at:
+.Pp
+http://caia.swin.edu.au/urp/newtcp/
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+congestion control module and this manual page were written by
+.An David Hayes Aq david.hayes@ieee.org .
diff --git a/share/man/man4/cc_cubic.4 b/share/man/man4/cc_cubic.4
new file mode 100644
index 0000000..771f264
--- /dev/null
+++ b/share/man/man4/cc_cubic.4
@@ -0,0 +1,114 @@
+.\"
+.\" Copyright (c) 2009 Lawrence Stewart <lstewart@FreeBSD.org>
+.\" Copyright (c) 2010-2011 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" Portions of this documentation were written at the Centre for Advanced
+.\" Internet Architectures, Swinburne University of Technology, Melbourne,
+.\" Australia by David Hayes under sponsorship from the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 15, 2011
+.Dt CC_CUBIC 4
+.Os
+.Sh NAME
+.Nm cc_cubic
+.Nd CUBIC Congestion Control Algorithm
+.Sh DESCRIPTION
+The CUBIC congestion control algorithm was designed to provide increased
+throughput in fast and long-distance networks.
+It attempts to maintain fairness when competing with legacy NewReno TCP in lower
+speed scenarios where NewReno is able to operate adequately.
+.Pp
+The congestion window is increased as a function of the time elapsed since the
+last congestion event.
+During regular operation, the window increase function follows a cubic function,
+with the inflection point set to be the congestion window value reached at the
+last congestion event.
+CUBIC also calculates an estimate of the congestion window that NewReno would
+have achieved at a given time after a congestion event.
+When updating the congestion window, the algorithm will choose the larger of the
+calculated CUBIC and estimated NewReno windows.
+.Pp
+CUBIC also backs off less on congestion by changing the multiplicative decrease
+factor from 1/2 (used by standard NewReno TCP) to 4/5.
+.Pp
+The implementation was done in a clean-room fashion, and is based on the
+Internet Draft and paper referenced in the
+.Sx SEE ALSO
+section below.
+.Sh MIB Variables
+There are currently no tunable MIB variables.
+.Sh SEE ALSO
+.Xr cc_chd 4 ,
+.Xr cc_hd 4 ,
+.Xr cc_htcp 4 ,
+.Xr cc_newreno 4 ,
+.Xr cc_vegas 4 ,
+.Xr mod_cc 4 ,
+.Xr tcp 4 ,
+.Xr mod_cc 9
+.Rs
+.%A "Sangtae Ha"
+.%A "Injong Rhee"
+.%A "Lisong Xu"
+.%T "CUBIC for Fast Long-Distance Networks"
+.%U "http://tools.ietf.org/id/draft-rhee-tcpm-cubic-02.txt"
+.Re
+.Rs
+.%A "Sangtae Ha"
+.%A "Injong Rhee"
+.%A "Lisong Xu"
+.%T "CUBIC: a new TCP-friendly high-speed TCP variant"
+.%J "SIGOPS Oper. Syst. Rev."
+.%V "42"
+.%N "5"
+.%D "July 2008"
+.%P "64-74"
+.Re
+.Sh ACKNOWLEDGEMENTS
+Development and testing of this software were made possible in part by grants
+from the FreeBSD Foundation and Cisco University Research Program Fund at
+Community Foundation Silicon Valley.
+.Sh HISTORY
+The
+.Nm
+congestion control module first appeared in
+.Fx 9.0 .
+.Pp
+The module was first released in 2009 by Lawrence Stewart whilst studying at
+Swinburne University of Technology's Centre for Advanced Internet Architectures,
+Melbourne, Australia.
+More details are available at:
+.Pp
+http://caia.swin.edu.au/urp/newtcp/
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+congestion control module and this manual page were written by
+.An Lawrence Stewart Aq lstewart@FreeBSD.org
+and
+.An David Hayes Aq david.hayes@ieee.org .
diff --git a/share/man/man4/cc_hd.4 b/share/man/man4/cc_hd.4
new file mode 100644
index 0000000..d0acb34
--- /dev/null
+++ b/share/man/man4/cc_hd.4
@@ -0,0 +1,120 @@
+.\"
+.\" Copyright (c) 2010-2011 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This documentation was written at the Centre for Advanced Internet
+.\" Architectures, Swinburne University of Technology, Melbourne, Australia by
+.\" David Hayes under sponsorship from the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 15, 2011
+.Dt CC_HD 4
+.Os
+.Sh NAME
+.Nm cc_hd
+.Nd HD Congestion Control Algorithm
+.Sh DESCRIPTION
+The HD congestion control algorithm is an implementation of the Hamilton
+Institute's delay-based congestion control which aims to keep network queuing
+delays below a particular threshold (queue_threshold).
+.Pp
+HD probabilistically reduces the congestion window (cwnd) based on its estimate
+of the network queuing delay.
+The probability of reducing cwnd is zero at hd_qmin or less, rising to a maximum
+at queue_threshold, and then back to zero at the maximum queuing delay.
+.Pp
+Loss-based congestion control algorithms such as NewReno probe for network
+capacity by filling queues until there is a packet loss.
+HD competes with loss-based congestion control algorithms by allowing its
+probability of reducing cwnd to drop from a maximum at queue_threshold to be
+zero at the maximum queuing delay.
+This has been shown to work well when the bottleneck link is highly multiplexed.
+.Sh MIB Variables
+The algorithm exposes the following tunable variables in the
+.Va net.inet.tcp.cc.hd
+branch of the
+.Xr sysctl 3
+MIB:
+.Bl -tag -width ".Va queue_threshold"
+.It Va queue_threshold
+Queueing congestion threshold (qth) in ticks.
+Default is 20.
+.It Va pmax
+Per packet maximum backoff probability as a percentage.
+Default is 5.
+.It Va qmin
+Minimum queuing delay threshold (qmin) in ticks.
+Default is 5.
+.El
+.Sh SEE ALSO
+.Xr cc_chd 4 ,
+.Xr cc_cubic 4 ,
+.Xr cc_htcp 4 ,
+.Xr cc_newreno 4 ,
+.Xr cc_vegas 4 ,
+.Xr h_ertt 4 ,
+.Xr mod_cc 4 ,
+.Xr tcp 4 ,
+.Xr khelp 9 ,
+.Xr mod_cc 9
+.Rs
+.%A "L. Budzisz"
+.%A "R. Stanojevic"
+.%A "R. Shorten"
+.%A "F. Baker"
+.%T "A strategy for fair coexistence of loss and delay-based congestion control algorithms"
+.%J "IEEE Commun. Lett."
+.%D "Jul 2009"
+.%V "13"
+.%N "7"
+.%P "555-557"
+.Re
+.Sh ACKNOWLEDGEMENTS
+Development and testing of this software were made possible in part by grants
+from the FreeBSD Foundation and Cisco University Research Program Fund at
+Community Foundation Silicon Valley.
+.Sh FUTURE WORK
+The Hamilton Institute have recently made some improvements to the algorithm
+implemented by this module and have called it Coexistent-TCP (C-TCP).
+The improvements should be evaluated and potentially incorporated into this
+module.
+.Sh HISTORY
+The
+.Nm
+congestion control module first appeared in
+.Fx 9.0 .
+.Pp
+The module was first released in 2010 by David Hayes whilst working on the
+NewTCP research project at Swinburne University of Technology's Centre for
+Advanced Internet Architectures, Melbourne, Australia.
+More details are available at:
+.Pp
+http://caia.swin.edu.au/urp/newtcp/
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+congestion control module and this manual page were written by
+.An David Hayes Aq david.hayes@ieee.org .
diff --git a/share/man/man4/cc_htcp.4 b/share/man/man4/cc_htcp.4
new file mode 100644
index 0000000..45d0018
--- /dev/null
+++ b/share/man/man4/cc_htcp.4
@@ -0,0 +1,136 @@
+.\"
+.\" Copyright (c) 2008 Lawrence Stewart <lstewart@FreeBSD.org>
+.\" Copyright (c) 2010-2011 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" Portions of this documentation were written at the Centre for Advanced
+.\" Internet Architectures, Swinburne University of Technology, Melbourne,
+.\" Australia by David Hayes under sponsorship from the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 15, 2011
+.Dt CC_HTCP 4
+.Os
+.Sh NAME
+.Nm cc_htcp
+.Nd H-TCP Congestion Control Algorithm
+.Sh DESCRIPTION
+The H-TCP congestion control algorithm was designed to provide increased
+throughput in fast and long-distance networks.
+It attempts to maintain fairness when competing with legacy NewReno TCP in lower
+speed scenarios where NewReno is able to operate adequately.
+.Pp
+The congestion window is increased as a function of the time elapsed since the
+last congestion event.
+The window increase algorithm operates like NewReno for the first second after a
+congestion event, and then switches to a high-speed mode based on a quadratic
+increase function.
+.Pp
+The implementation was done in a clean-room fashion, and is based on the
+Internet Draft and other documents referenced in the
+.Sx SEE ALSO
+section below.
+.Sh MIB Variables
+The algorithm exposes the following tunable variables in the
+.Va net.inet.tcp.cc.htcp
+branch of the
+.Xr sysctl 3
+MIB:
+.Bl -tag -width ".Va adaptive_backoff"
+.It Va adaptive_backoff
+Controls use of the adaptive backoff algorithm, which is designed to keep
+network queues non-empty during congestion recovery episodes.
+Default is 0 (disabled).
+.It Va rtt_scaling
+Controls use of the RTT scaling algorithm, which is designed to make congestion
+window increase during congestion avoidance mode invariant with respect to RTT.
+Default is 0 (disabled).
+.El
+.Sh SEE ALSO
+.Xr cc_chd 4 ,
+.Xr cc_cubic 4 ,
+.Xr cc_hd 4 ,
+.Xr cc_newreno 4 ,
+.Xr cc_vegas 4 ,
+.Xr mod_cc 4 ,
+.Xr tcp 4 ,
+.Xr mod_cc 9
+.Rs
+.%A "D. Leith"
+.%A "R. Shorten"
+.%T "H-TCP: TCP Congestion Control for High Bandwidth-Delay Product Paths"
+.%U "http://tools.ietf.org/id/draft-leith-tcp-htcp-06.txt"
+.Re
+.Rs
+.%A "D. Leith"
+.%A "R. Shorten"
+.%A "T. Yee"
+.%T "H-TCP: A framework for congestion control in high-speed and long-distance networks"
+.%B "Proc. PFLDnet"
+.%D "2005"
+.Re
+.Rs
+.%A "G. Armitage"
+.%A "L. Stewart"
+.%A "M. Welzl"
+.%A "J. Healy"
+.%T "An independent H-TCP implementation under FreeBSD 7.0: description and observed behaviour"
+.%J "SIGCOMM Comput. Commun. Rev."
+.%V "38"
+.%N "3"
+.%D "July 2008"
+.%P "27-38"
+.Re
+.Sh ACKNOWLEDGEMENTS
+Development and testing of this software were made possible in part by grants
+from the FreeBSD Foundation and Cisco University Research Program Fund at
+Community Foundation Silicon Valley.
+.Sh HISTORY
+The
+.Nm
+congestion control module first appeared in
+.Fx 9.0 .
+.Pp
+The module was first released in 2007 by James Healy and Lawrence Stewart whilst
+working on the NewTCP research project at Swinburne University of Technology's
+Centre for Advanced Internet Architectures, Melbourne, Australia, which was made
+possible in part by a grant from the Cisco University Research Program Fund at
+Community Foundation Silicon Valley.
+More details are available at:
+.Pp
+http://caia.swin.edu.au/urp/newtcp/
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+congestion control module was written by
+.An James Healy Aq jimmy@deefa.com
+and
+.An Lawrence Stewart Aq lstewart@FreeBSD.org .
+.Pp
+This manual page was written by
+.An Lawrence Stewart Aq lstewart@FreeBSD.org
+and
+.An David Hayes Aq david.hayes@ieee.org .
diff --git a/share/man/man4/cc_newreno.4 b/share/man/man4/cc_newreno.4
new file mode 100644
index 0000000..fe4c3db
--- /dev/null
+++ b/share/man/man4/cc_newreno.4
@@ -0,0 +1,82 @@
+.\"
+.\" Copyright (c) 2009 Lawrence Stewart <lstewart@FreeBSD.org>
+.\" Copyright (c) 2011 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" Portions of this documentation were written at the Centre for Advanced
+.\" Internet Architectures, Swinburne University of Technology, Melbourne,
+.\" Australia by Lawrence Stewart under sponsorship from the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 15, 2011
+.Dt CC_NEWRENO 4
+.Os
+.Sh NAME
+.Nm cc_newreno
+.Nd NewReno Congestion Control Algorithm
+.Sh DESCRIPTION
+The NewReno congestion control algorithm is the default for TCP.
+Details about the algorithm can be found in RFC5681.
+.Sh MIB Variables
+There are currently no tunable MIB variables.
+.Sh SEE ALSO
+.Xr cc_chd 4 ,
+.Xr cc_cubic 4 ,
+.Xr cc_hd 4 ,
+.Xr cc_htcp 4 ,
+.Xr cc_vegas 4 ,
+.Xr mod_cc 4 ,
+.Xr tcp 4 ,
+.Xr mod_cc 9
+.Sh ACKNOWLEDGEMENTS
+Development and testing of this software were made possible in part by grants
+from the FreeBSD Foundation and Cisco University Research Program Fund at
+Community Foundation Silicon Valley.
+.Sh HISTORY
+The
+.Nm
+congestion control algorithm first appeared in its modular form in
+.Fx 9.0 .
+.Pp
+The module was first released in 2007 by James Healy and Lawrence Stewart whilst
+working on the NewTCP research project at Swinburne University of Technology's
+Centre for Advanced Internet Architectures, Melbourne, Australia, which was made
+possible in part by a grant from the Cisco University Research Program Fund at
+Community Foundation Silicon Valley.
+More details are available at:
+.Pp
+http://caia.swin.edu.au/urp/newtcp/
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+congestion control module was written by
+.An James Healy Aq jimmy@deefa.com ,
+.An Lawrence Stewart Aq lstewart@FreeBSD.org
+and
+.An David Hayes Aq david.hayes@ieee.org .
+.Pp
+This manual page was written by
+.An Lawrence Stewart Aq lstewart@FreeBSD.org .
diff --git a/share/man/man4/cc_vegas.4 b/share/man/man4/cc_vegas.4
new file mode 100644
index 0000000..a7397d5
--- /dev/null
+++ b/share/man/man4/cc_vegas.4
@@ -0,0 +1,136 @@
+.\"
+.\" Copyright (c) 2010-2011 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This documentation was written at the Centre for Advanced Internet
+.\" Architectures, Swinburne University of Technology, Melbourne, Australia by
+.\" David Hayes under sponsorship from the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 15, 2011
+.Dt CC_VEGAS 4
+.Os
+.Sh NAME
+.Nm cc_vegas
+.Nd Vegas Congestion Control Algorithm
+.Sh DESCRIPTION
+The Vegas congestion control algorithm uses what the authors term the actual and
+expected transmission rates to determine whether there is congestion along the
+network path i.e.
+.Bl -item -offset indent
+.It
+actual rate = (total data sent in a RTT) / RTT
+.It
+expected rate = cwnd / RTTmin
+.It
+diff = expected - actual
+.El
+.Pp
+where RTT is the measured instantaneous round trip time and RTTmin is the
+smallest round trip time observed during the connection.
+.Pp
+The algorithm aims to keep diff between two parameters alpha and beta, such
+that:
+.Bl -item -offset indent
+.It
+alpha < diff < beta
+.El
+.Pp
+If diff > beta, congestion is inferred and cwnd is decremented by one packet (or
+the maximum TCP segment size).
+If diff < alpha, then cwnd is incremented by one packet.
+Alpha and beta govern the amount of buffering along the path.
+.Pp
+The implementation was done in a clean-room fashion, and is based on the
+paper referenced in the
+.Sx SEE ALSO
+section below.
+.Sh IMPLEMENTATION NOTES
+The time from the transmission of a marked packet until the receipt of an
+acknowledgement for that packet is measured once per RTT.
+This implementation does not implement Brakmo's and Peterson's original
+duplicate ACK policy since clock ticks in today's machines are not as coarse as
+they were (i.e. 500ms) when Vegas was originally designed.
+Note that modern TCP recovery processes such as fast retransmit and SACK are
+enabled by default in the TCP stack.
+.Sh MIB Variables
+The algorithm exposes the following tunable variables in the
+.Va net.inet.tcp.cc.vegas
+branch of the
+.Xr sysctl 3
+MIB:
+.Bl -tag -width ".Va alpha"
+.It Va alpha
+Query or set the Vegas alpha parameter as a number of buffers on the path.
+When setting alpha, the value must satisfy: 0 < alpha < beta.
+Default is 1.
+.It Va beta
+Query or set the Vegas beta parameter as a number of buffers on the path.
+When setting beta, the value must satisfy: 0 < alpha < beta.
+Default is 3.
+.El
+.Sh SEE ALSO
+.Xr cc_chd 4 ,
+.Xr cc_cubic 4 ,
+.Xr cc_hd 4 ,
+.Xr cc_htcp 4 ,
+.Xr cc_newreno 4 ,
+.Xr h_ertt 4 ,
+.Xr mod_cc 4 ,
+.Xr tcp 4 ,
+.Xr khelp 9 ,
+.Xr mod_cc 9
+.Rs
+.%A "L. S. Brakmo"
+.%A "L. L. Peterson"
+.%T "TCP Vegas: end to end congestion avoidance on a global internet"
+.%J "IEEE J. Sel. Areas Commun."
+.%D "October 1995"
+.%V "13"
+.%N "8"
+.%P "1465-1480"
+.Re
+.Sh ACKNOWLEDGEMENTS
+Development and testing of this software were made possible in part by grants
+from the FreeBSD Foundation and Cisco University Research Program Fund at
+Community Foundation Silicon Valley.
+.Sh HISTORY
+The
+.Nm
+congestion control module first appeared in
+.Fx 9.0 .
+.Pp
+The module was first released in 2010 by David Hayes whilst working on the
+NewTCP research project at Swinburne University of Technology's Centre for
+Advanced Internet Architectures, Melbourne, Australia.
+More details are available at:
+.Pp
+http://caia.swin.edu.au/urp/newtcp/
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+congestion control module and this manual page were written by
+.An David Hayes Aq david.hayes@ieee.org .
diff --git a/share/man/man4/ccd.4 b/share/man/man4/ccd.4
new file mode 100644
index 0000000..4c95fb8
--- /dev/null
+++ b/share/man/man4/ccd.4
@@ -0,0 +1,287 @@
+.\" $NetBSD: ccd.4,v 1.5 1995/10/09 06:09:09 thorpej Exp $
+.\"
+.\" Copyright (c) 1994 Jason Downs.
+.\" Copyright (c) 1994, 1995 Jason R. Thorpe.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed for the NetBSD Project
+.\" by Jason Downs and Jason R. Thorpe.
+.\" 4. Neither the name of the author nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 9, 1995
+.Dt CCD 4
+.Os
+.Sh NAME
+.Nm ccd
+.Nd Concatenated Disk driver
+.Sh SYNOPSIS
+.Cd "device ccd"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides the capability of combining one or more disks/partitions
+into one virtual disk.
+.Pp
+This document assumes that you are familiar with how to generate kernels,
+how to properly configure disks and devices in a kernel
+configuration file, and how to partition disks.
+.Pp
+In order to compile in support for the
+.Nm ,
+you must add a line similar
+to the following to your kernel configuration file:
+.Pp
+.Dl "device ccd # concatenated disk devices"
+.Pp
+As of the
+.Fx 3.0
+release, you do not need to
+configure your kernel with
+.Nm
+but may instead use it as a kernel loadable
+module.
+Simply running
+.Xr ccdconfig 8
+will load the module into the kernel.
+.Pp
+A
+.Nm
+may be either serially concatenated or interleaved.
+To serially
+concatenate the partitions, specify the interleave factor of 0.
+Note that mirroring may not be used with an interleave factor of 0.
+.Pp
+There is a run-time utility that is used for configuring
+.Nm Ns s .
+See
+.Xr ccdconfig 8
+for more information.
+.Ss The Interleave Factor
+If a
+.Nm
+is interleaved correctly, a
+.Dq striping
+effect is achieved, which can increase sequential read/write
+performance.
+The interleave factor is expressed in units of
+.Dv DEV_BSIZE
+(usually 512 bytes).
+For large writes, the optimum interleave factor
+is typically the size of a track, while for large reads, it is about a
+quarter of a track.
+(Note that this changes greatly depending on the
+number and speed of disks.)
+For instance, with eight 7,200 RPM drives
+on two Fast-Wide SCSI buses, this translates to about 128 for writes
+and 32 for reads.
+A larger interleave tends to work better when the
+disk is taking a multitasking load by localizing the file I/O from
+any given process onto a single disk.
+You lose sequential performance when
+you do this, but sequential performance is not usually an issue with a
+multitasking load.
+.Pp
+An interleave factor must be specified when using a mirroring configuration,
+even when you have only two disks (i.e., the layout winds up being the same
+no matter what the interleave factor).
+The interleave factor will determine
+how I/O is broken up, however, and a value 128 or greater is recommended.
+.Pp
+.Nm
+has an option for a parity disk, but does not currently implement it.
+.Pp
+The best performance is achieved if all component disks have the same
+geometry and size.
+Optimum striping cannot occur with different
+disk types.
+.Pp
+For random-access oriented workloads, such as news servers, a larger
+interleave factor (e.g., 65,536) is more desirable.
+Note that there
+is not much
+.Nm
+can do to speed up applications that are seek-time limited.
+Larger
+interleave factors will at least reduce the chance of having to seek
+two disk-heads to read one directory or a file.
+.Ss Disk Mirroring
+You can configure the
+.Nm
+to
+.Dq mirror
+any even number of disks.
+See
+.Xr ccdconfig 8
+for how to specify the necessary flags.
+For example, if you have a
+.Nm
+configuration specifying four disks, the first two disks will be mirrored with
+the second two disks.
+A write will be run to both sides of
+the mirror.
+A read will be run to either side of the mirror depending
+on what the driver believes to be most optimal.
+If the read fails,
+the driver will automatically attempt to read the same sector from the
+other side of the mirror.
+Currently
+.Nm
+uses a dual seek zone model to optimize reads for a multi-tasking load
+rather than a sequential load.
+.Pp
+In an event of a disk
+failure, you can use
+.Xr dd 1
+to recover the failed disk.
+.Pp
+Note that a one-disk
+.Nm
+is not the same as the original partition.
+In particular, this means
+if you have a file system on a two-disk mirrored
+.Nm
+and one of the disks fail, you cannot mount and use the remaining
+partition as itself; you have to configure it as a one-disk
+.Nm .
+You cannot replace a disk in a mirrored
+.Nm
+partition without first backing up the partition, then replacing the disk,
+then restoring the partition.
+.Ss Linux Compatibility
+The
+.Tn Linux
+compatibility mode does not try to read the label that
+.Tn Linux Ns '
+.Xr md 4
+driver leaves on the raw devices.
+You will have to give the order
+of devices and the interleave factor on your own.
+When in
+.Tn Linux
+compatibility mode,
+.Nm
+will convert the interleave factor from
+.Tn Linux
+terminology.
+That means you give the same interleave factor that you
+gave as chunk size in
+.Tn Linux .
+.Pp
+If you have a
+.Tn Linux
+.Xr md 4
+device in
+.Dq legacy
+mode, do not use the
+.Dv CCDF_LINUX
+flag in
+.Xr ccdconfig 8 .
+Use the
+.Dv CCDF_NO_OFFSET
+flag instead.
+In that case you have to convert
+the interleave factor on your own, usually it is
+.Tn Linux Ns '
+chunk size multiplied by two.
+.Pp
+Using a
+.Tn Linux
+RAID this way is potentially dangerous and can destroy
+the data in there.
+Since
+.Fx
+does not read the label used by
+.Tn Linux ,
+changes in
+.Tn Linux
+might invalidate the compatibility layer.
+.Pp
+However, using this is reasonably safe if you test the compatibility
+before mounting a RAID read-write for the first time.
+Just using
+.Xr ccdconfig 8
+without mounting does not write anything to the
+.Tn Linux
+RAID.
+Then you do a
+.Nm fsck.ext2fs Pq Pa ports/sysutils/e2fsprogs
+on the
+.Nm
+device using the
+.Fl n
+flag.
+You can mount the file system read-only to check files in there.
+If all this works, it is unlikely that there is a problem with
+.Nm .
+Keep in mind that even when the
+.Tn Linux
+compatibility mode in
+.Nm
+is working correctly, bugs in
+.Fx Ap s
+.Nm ex2fs
+implementation would still destroy
+your data.
+.Sh WARNINGS
+If just one (or more) of the disks in a
+.Nm
+fails, the entire
+file system will be lost unless you are mirroring the disks.
+.Pp
+If one of the disks in a mirror is lost, you should still
+be able to back up your data.
+If a write error occurs, however, data
+read from that sector may be non-deterministic.
+It may return the data
+prior to the write or it may return the data that was written.
+When a
+write error occurs, you should recover and regenerate the data as soon
+as possible.
+.Pp
+Changing the interleave or other parameters for a
+.Nm
+disk usually destroys whatever data previously existed on that disk.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/ccd*"
+.It Pa /dev/ccd*
+.Nm
+device special files
+.El
+.Sh SEE ALSO
+.Xr dd 1 ,
+.Xr ccdconfig 8 ,
+.Xr config 8 ,
+.Xr disklabel 8 ,
+.Xr fsck 8 ,
+.Xr gvinum 8 ,
+.Xr mount 8 ,
+.Xr newfs 8
+.Sh HISTORY
+The concatenated disk driver was originally written at the University of
+Utah.
diff --git a/share/man/man4/cd.4 b/share/man/man4/cd.4
new file mode 100644
index 0000000..495b28d
--- /dev/null
+++ b/share/man/man4/cd.4
@@ -0,0 +1,372 @@
+.\" Copyright (c) 1996
+.\" Julian Elischer <julian@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 9, 2014
+.Dt CD 4
+.Os
+.Sh NAME
+.Nm cd
+.Nd SCSI CD-ROM driver
+.Sh SYNOPSIS
+.Cd device cd
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for a
+.Tn SCSI
+.Tn CD-ROM
+(Compact Disc-Read Only Memory) drive.
+In an attempt to look like a regular disk, the
+.Nm
+driver synthesizes a partition table, with one partition covering the entire
+.Tn CD-ROM .
+It is possible to modify this partition table using
+.Xr disklabel 8 ,
+but it will only last until the
+.Tn CD-ROM
+is unmounted.
+In general the interfaces are similar to those described by
+.Xr ada 4
+and
+.Xr da 4 .
+.Pp
+As the
+.Tn SCSI
+adapter is probed during boot, the
+.Tn SCSI
+bus is scanned for devices.
+Any devices found which answer as CDROM
+(type 5) or WORM (type 4) type devices will be `attached' to the
+.Nm
+driver.
+Prior to
+.Fx 2.1 ,
+the first device found will be attached as
+.Li cd0
+the next,
+.Li cd1 ,
+etc.
+Beginning in
+.Fx 2.1
+it is possible to specify what cd unit a device should
+come on line as; refer to
+.Xr scsi 4
+for details on kernel configuration.
+.Pp
+The system utility
+.Xr disklabel 8
+may be used to read the synthesized
+disk label
+structure, which will contain correct figures for the size of the
+.Tn CD-ROM
+should that information be required.
+.Sh KERNEL CONFIGURATION
+Any number of
+.Tn CD-ROM
+devices may be attached to the system regardless of system
+configuration as all resources are dynamically allocated.
+.Sh IOCTLS
+The following
+.Xr ioctl 2
+calls which apply to
+.Tn SCSI
+.Tn CD-ROM
+drives are defined
+in the header files
+.In sys/cdio.h
+and
+.In sys/disklabel.h .
+.Bl -tag -width CDIOCREADSUBCHANNEL
+.It Dv DIOCGDINFO
+.It Dv DIOCSDINFO
+.Pq Li "struct disklabel"
+Read or write the in-core copy of the disklabel for the
+drive.
+The disklabel is initialized with information
+read from the scsi inquiry commands, and should be the same as
+the information printed at boot.
+This structure is defined in the header file
+.In sys/disklabel.h .
+.It Dv CDIOCPLAYTRACKS
+.Pq Li "struct ioc_play_track"
+Start audio playback given a track address and length.
+The structure is defined as follows:
+.Bd -literal -offset indent
+struct ioc_play_track
+{
+ u_char start_track;
+ u_char start_index;
+ u_char end_track;
+ u_char end_index;
+};
+.Ed
+.It Dv CDIOCPLAYBLOCKS
+.Pq Li "struct ioc_play_blocks"
+Start audio playback given a block address and length.
+The structure is defined as follows:
+.Bd -literal -offset indent
+struct ioc_play_blocks
+{
+ int blk;
+ int len;
+};
+.Ed
+.It Dv CDIOCPLAYMSF
+.Pq Li "struct ioc_play_msf"
+Start audio playback given a `minutes-seconds-frames' address and
+length.
+The structure is defined as follows:
+.Bd -literal -offset indent
+struct ioc_play_msf
+{
+ u_char start_m;
+ u_char start_s;
+ u_char start_f;
+ u_char end_m;
+ u_char end_s;
+ u_char end_f;
+};
+.Ed
+.It Dv CDIOCREADSUBCHANNEL
+.Pq Li "struct ioc_read_subchannel"
+Read information from the subchannel at the location specified by this
+structure:
+.Bd -literal -offset indent
+struct ioc_read_subchannel {
+ u_char address_format;
+#define CD_LBA_FORMAT 1
+#define CD_MSF_FORMAT 2
+ u_char data_format;
+#define CD_SUBQ_DATA 0
+#define CD_CURRENT_POSITION 1
+#define CD_MEDIA_CATALOG 2
+#define CD_TRACK_INFO 3
+ u_char track;
+ int data_len;
+ struct cd_sub_channel_info *data;
+};
+.Ed
+.It Dv CDIOREADTOCHEADER
+.Pq Li "struct ioc_toc_header"
+Return summary information about the table of contents for the mounted
+.Tn CD-ROM .
+The information is returned into the following structure:
+.Bd -literal -offset indent
+struct ioc_toc_header {
+ u_short len;
+ u_char starting_track;
+ u_char ending_track;
+};
+.Ed
+.It Dv CDIOREADTOCENTRYS
+.Pq Li "struct ioc_read_toc_entry"
+Return information from the table of contents entries mentioned.
+.Pq Yes, this command name is misspelled.
+The argument structure is defined as follows:
+.Bd -literal -offset indent
+struct ioc_read_toc_entry {
+ u_char address_format;
+ u_char starting_track;
+ u_short data_len;
+ struct cd_toc_entry *data;
+};
+.Ed
+The requested data is written into an area of size
+.Li data_len
+and pointed to by
+.Li data .
+.It Dv CDIOCSETPATCH
+.Pq Li "struct ioc_patch"
+Attach various audio channels to various output channels.
+The argument structure is defined thusly:
+.Bd -literal -offset indent
+struct ioc_patch {
+ u_char patch[4];
+ /* one for each channel */
+};
+.Ed
+.It Dv CDIOCGETVOL
+.It Dv CDIOCSETVOL
+.Pq Li "struct ioc_vol"
+Get (set) information about the volume settings of the output channels.
+The argument structure is as follows:
+.Bd -literal -offset indent
+struct ioc_vol
+{
+ u_char vol[4];
+ /* one for each channel */
+};
+.Ed
+.It Dv CDIOCSETMONO
+Patch all output channels to all source channels.
+.It Dv CDIOCSETSTEREO
+Patch left source channel to the left output channel and the right
+source channel to the right output channel.
+.It Dv CDIOCSETMUTE
+Mute output without changing the volume settings.
+.It Dv CDIOCSETLEFT
+.It Dv CDIOCSETRIGHT
+Attach both output channels to the left (right) source channel.
+.It Dv CDIOCSETDEBUG
+.It Dv CDIOCCLRDEBUG
+Turn on (off) debugging for the appropriate device.
+.It Dv CDIOCPAUSE
+.It Dv CDIOCRESUME
+Pause (resume) audio play, without resetting the location of the read-head.
+.It Dv CDIOCRESET
+Reset the drive.
+.It Dv CDIOCSTART
+.It Dv CDIOCSTOP
+Tell the drive to spin-up (-down) the
+.Tn CD-ROM .
+.It Dv CDIOCALLOW
+.It Dv CDIOCPREVENT
+Tell the drive to allow (prevent) manual ejection of the
+.Tn CD-ROM
+disc.
+Not all drives support this feature.
+.It Dv CDIOCEJECT
+Eject the
+.Tn CD-ROM .
+.It Dv CDIOCCLOSE
+Tell the drive to close its door and load the media.
+Not all drives support this feature.
+.El
+.Sh NOTES
+When a
+.Tn CD-ROM
+is changed in a drive controlled by the
+.Nm
+driver, then the act of changing the media will invalidate the
+disklabel and information held within the kernel.
+To stop corruption,
+all accesses to the device will be discarded until there are no more
+open file descriptors referencing the device.
+During this period, all
+new open attempts will be rejected.
+When no more open file descriptors
+reference the device, the first next open will load a new set of
+parameters (including disklabel) for the drive.
+.Pp
+The audio code in the
+.Nm
+driver only support
+.Tn SCSI-2
+standard audio commands.
+As many
+.Tn CD-ROM
+manufacturers have not followed the standard, there are many
+.Tn CD-ROM
+drives for which audio will not work.
+Some work is planned to support
+some of the more common `broken'
+.Tn CD-ROM
+drives; however, this is not yet under way.
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width 12
+.It kern.cam.cd.retry_count
+.Pp
+This variable determines how many times the
+.Nm
+driver will retry a READ or WRITE command.
+This does not affect the number of retries used during probe time or for
+the
+.Nm
+driver dump routine.
+This value currently defaults to 4.
+.It kern.cam.cd.%d.minimum_cmd_size
+.Pp
+The
+.Nm
+driver attempts to automatically determine whether the drive it is talking
+to supports 6 byte or 10 byte MODE SENSE/MODE SELECT operations.
+Many
+.Tn SCSI
+drives only support 6 byte commands, and
+.Tn ATAPI
+drives only support 10 byte commands.
+The
+.Nm
+driver first attempts to determine whether the protocol in use typically
+supports 6 byte commands by issuing a CAM Path Inquiry CCB.
+It will then default to 6 byte or 10 byte commands as appropriate.
+After that, the
+.Nm
+driver defaults to using 6 byte commands (assuming the protocol the drive
+speaks claims to support 6 byte commands), until one fails with a
+.Tn SCSI
+ILLEGAL REQUEST error.
+Then it tries the 10 byte version of the command to
+see if that works instead.
+Users can change the default via per-drive
+sysctl variables and loader tunables.
+Where
+.Dq %d
+is the unit number of the drive in question.
+Valid minimum command sizes
+are 6 and 10.
+Any value above 6 will be rounded to 10, and any value below
+6 will be rounded to 6.
+.El
+.Sh FILES
+.Bl -tag -width /dev/cd[0-9][a-h] -compact
+.It Pa /dev/cd[0-9][a-h]
+raw mode
+.Tn CD-ROM
+devices
+.El
+.Sh DIAGNOSTICS
+None.
+.Sh SEE ALSO
+.Xr cam 4 ,
+.Xr da 4 ,
+.Xr disklabel 8 ,
+.Xr cd 9
+.Sh HISTORY
+This
+.Nm
+driver is based upon the
+.Nm
+driver written by Julian Elischer, which appeared in
+.Bx 386 0.1 .
+The
+CAM version of the
+.Nm
+driver was written by Kenneth Merry and first appeared in
+.Fx 3.0 .
+.Sh BUGS
+The names of the structures used for the third argument to
+.Fn ioctl
+were poorly chosen, and a number of spelling errors have survived in
+the names of the
+.Fn ioctl
+commands.
diff --git a/share/man/man4/cdce.4 b/share/man/man4/cdce.4
new file mode 100644
index 0000000..e055e1b
--- /dev/null
+++ b/share/man/man4/cdce.4
@@ -0,0 +1,155 @@
+.\" Copyright (c) 2004 Daniel Hartmeier
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" - Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" - Redistributions in binary form must reproduce the above
+.\" copyright notice, this list of conditions and the following
+.\" disclaimer in the documentation and/or other materials provided
+.\" with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $NetBSD: cdce.4,v 1.4 2004/12/08 18:35:56 peter Exp $
+.\" $FreeBSD$
+.\"
+.Dd September 17, 2005
+.Dt CDCE 4
+.Os
+.Sh NAME
+.Nm cdce
+.Nd "USB Communication Device Class Ethernet driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device cdce"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_cdce_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB Host-to-Host (aka USB-to-USB) and
+USB-to-Ethernet bridges based on the USB Communication Device Class
+(CDC) and Ethernet subclass.
+.Pp
+The USB bridge appears as a regular network interface on both sides,
+transporting Ethernet frames.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+USB 1.x bridges support speeds of up to 12Mbps, and USB 2.0 speeds of
+up to 480Mbps.
+.Pp
+Packets are
+received and transmitted over separate USB bulk transfer endpoints.
+.Pp
+The
+.Nm
+driver does not support different media types or options.
+.Sh HARDWARE
+The following devices are supported by the
+.Nm
+driver:
+.Pp
+.Bl -bullet -compact
+.It
+Prolific PL-2501 Host-to-Host Bridge Controller
+.It
+Sharp Zaurus PDA
+.It
+Terayon TJ-715 DOCSIS Cable Modem
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "cdce%d: no union descriptor"
+The driver could not fetch an interface descriptor from the USB
+device.
+For a manually added USB vendor/product, the CDCE_NO_UNION flag
+can be tried to work around the missing descriptor.
+.It "cdce%d: no data interface"
+.It "cdce%d: could not read endpoint descriptor"
+.It "cdce%d: unexpected endpoint"
+.It "cdce%d: could not find data bulk in/out"
+For a manually added USB vendor/product, these errors indicate
+that the bridge is not compatible with the driver.
+.It "cdce%d: watchdog timeout"
+A packet was queued for transmission and a transmit command was
+issued, however the device failed to acknowledge the transmission
+before a timeout expired.
+.It "cdce%d: no memory for rx list -- packet dropped!"
+Memory allocation through MGETHDR or MCLGET failed, the system
+is running low on mbufs.
+.It "cdce%d: abort/close rx/tx pipe failed"
+.It "cdce%d: rx/tx list init failed"
+.It "cdce%d: open rx/tx pipe failed"
+.It "cdce%d: usb error on rx/tx"
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr intro 4 ,
+.Xr netintro 4 ,
+.Xr usb 4 ,
+.\" .Xr hostname.if 5 ,
+.Xr ifconfig 8
+.Rs
+.%T "Universal Serial Bus Class Definitions for Communication Devices"
+.%U http://www.usb.org/developers/devclass_docs/usbcdc11.pdf
+.Re
+.Rs
+.%T "Data sheet Prolific PL-2501 Host-to-Host Bridge/Network Controller"
+.%U http://tech.prolific.com.tw/visitor/fcabdl.asp?fid=20679530
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Ox 3.6 ,
+.Nx 3.0
+and
+.Fx 6.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Craig Boston Aq craig@tobuj.gank.org
+based on the
+.Xr aue 4
+driver written by
+.An Bill Paul Aq wpaul@windriver.com
+and ported to
+.Ox
+by
+.An Daniel Hartmeier Aq dhartmei@openbsd.org .
+.Sh CAVEATS
+Many USB devices notoriously fail to report their class and interfaces
+correctly.
+Undetected products might work flawlessly when their vendor and product IDs
+are added to the driver manually.
diff --git a/share/man/man4/ch.4 b/share/man/man4/ch.4
new file mode 100644
index 0000000..d097d54
--- /dev/null
+++ b/share/man/man4/ch.4
@@ -0,0 +1,352 @@
+.\" $FreeBSD$
+.\" Copyright (c) 1996
+.\" Julian Elischer <julian@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd May 14, 1998
+.Dt CH 4
+.Os
+.Sh NAME
+.Nm ch
+.Nd SCSI media-changer (juke box) driver
+.Sh SYNOPSIS
+.Cd device ch
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for a
+.Em SCSI
+media changer.
+It allows many slots of media to be multiplexed between
+a number of drives.
+The changer device may optionally be equipped
+with a bar code reader, which reads label information attached to
+the media.
+.Pp
+A SCSI adapter must also be separately configured into the system
+before a SCSI changer can be configured.
+.Pp
+As the SCSI adapter is probed during boot, the
+.Em SCSI
+bus is scanned for devices.
+Any devices found which answer as 'Changer'
+type devices will be 'attached' to the
+.Nm
+driver.
+In
+.Fx
+releases prior to 2.1, the first found will be attached as
+.Em ch0
+and the next,
+.Em ch1
+etc.
+Beginning in 2.1 it is possible to specify what ch unit a device should
+come on line as; refer to
+.Xr scsi 4
+for details on kernel configuration.
+.Sh KERNEL CONFIGURATION
+It is only necessary to explicitly configure one
+.Nm
+device; data structures are dynamically allocated as media changes are found
+on the
+.Tn SCSI
+bus.
+.Sh IOCTLS
+User mode programs communicate with the changer driver through a
+number of ioctls which are described below.
+Changer element addresses
+used in the communication between the kernel and the changer device are
+mapped to zero-based logical addresses.
+Element types are specified as follows:
+.Bl -tag -width CHET_MT
+.It Dv CHET_MT
+Medium transport element (picker).
+.It Dv CHET_ST
+Storage element (slot).
+.It Dv CHET_IE
+Import/export element (portal).
+.It Dv CHET_DT
+Data transfer element (drive).
+.El
+.Pp
+The following
+.Xr ioctl 2
+calls apply to the changer.
+They are defined
+in the header file
+.In sys/chio.h .
+.Bl -tag -width CHIOEXCHANGE
+.It Dv CHIOMOVE
+.Pq Vt "struct changer_move"
+Move a medium from one element to another
+.Pq Sy "MOVE MEDIUM"
+using the current picker.
+The source and destination elements are specified
+in a changer_move structure, which includes at least the following
+fields:
+.Bd -literal -offset indent
+u_int cm_fromtype; /* element type to move from */
+u_int cm_fromunit; /* logical unit of from element */
+u_int cm_totype; /* element type to move to */
+u_int cm_tounit; /* logical unit of to element */
+u_int cm_flags; /* misc. flags */
+.Ed
+If the
+.Dv CM_INVERT
+in the
+.Va cm_flags
+field is set, the medium
+changer is instructed to flip the medium while moving it.
+.It Dv CHIOEXCHANGE
+.Pq Vt "struct changer_exchange"
+Move the medium located in the source element to the first destination
+element, and move the medium that had been in the first destination
+element to the second destination element.
+In case of a simple
+exchange, the source and second destination elements should be the
+same.
+The current picker is used to perform the operation.
+The addresses of the affected elements is specified to the ioctl in a
+.Vt changer_exchange
+structure which includes at least the following
+fields:
+.Bd -literal -offset indent
+u_int ce_srctype; /* element type of source */
+u_int ce_srcunit; /* logical unit of source */
+u_int ce_fdsttype; /* element type of first destination */
+u_int ce_fdstunit; /* logical unit of first destination */
+u_int ce_sdsttype; /* element type of second destination */
+u_int ce_sdstunit; /* logical unit of second destination */
+u_int ce_flags; /* misc. flags */
+.Ed
+In
+.Va ce_flags ,
+.Dv CM_INVERT1
+and/or
+.Dv CM_INVERT2
+may be set
+to flip the first or second medium during the exchange operation,
+respectively.
+.Pp
+.Em This operation is untested .
+.It Dv CHIOPOSITION
+.Pq Vt "struct changer_position"
+Position the current picker in front of the specified element.
+The element is specified with a changer_position structure, which includes
+at least the following elements:
+.Bd -literal -offset indent
+u_int cp_type; /* element type */
+u_int cp_unit; /* logical unit of element */
+u_int cp_flags; /* misc. flags */
+.Ed
+The
+.Va cp_flags
+field may be set to
+.Dv CP_INVERT
+to invert the picker during the operation.
+.It Dv CHIOGPICKER
+.Pq Vt int
+Return the logical address of the current picker.
+.It Dv CHIOSPICKER
+.Pq Vt int
+Select the picker specified by the given logical address.
+.It Dv CHIOGPARAMS
+.Pq Vt "struct changer_params"
+Return the configuration parameters for the media changer.
+This ioctl
+fills the changer_params structure passed by the user with at least the
+following fields:
+.Bd -literal -offset indent
+u_int cp_npickers; /* number of pickers */
+u_int cp_nslots; /* number of slots */
+u_int cp_nportals; /* number of import/export portals */
+u_int cp_ndrives; /* number of drives */
+.Ed
+.Pp
+This call can be used by applications to query the dimensions of
+the jukebox before using the
+.Dv CHIGSTATUS
+ioctl to query the jukebox status.
+.It Dv CHIOIELEM
+Perform the
+.Sy INITIALIZE ELEMENT STATUS
+call on the media changer device.
+This forces the media changer to update its internal status
+information with respect to loaded media.
+It also scans any barcode labels provided that it has a label reader.
+The
+.Nm
+driver's status is not affected by this call.
+.It Dv CHIOGSTATUS
+.Pq Vt "struct changer_element_status_request"
+Perform the
+.Sy READ ELEMENT STATUS
+call on the media changer device.
+This call reads the element status information of the media
+changer and converts it to an array of
+.Vt changer_element_status
+structures.
+.Pp
+With each call to
+.Dv CHIOGSTATUS ,
+the status of one or more elements of one type may be queried.
+.Pp
+The application passes a
+.Vt changer_element_status_request
+structure to the
+.Nm
+driver which contains the following fields:
+.Bd -literal -offset indent
+u_int cesr_element_type;
+u_int cesr_element_base;
+u_int cesr_element_count;
+u_int cesr_flags;
+struct changer_element_status *cesr_element_status;
+.Ed
+.Pp
+This structure is read by the driver to determine the type, logical
+base address and number of elements for which information is to be
+returned in the array of
+.Vt changer_element_status
+structures pointed to by the
+.Va cesr_element_status
+field.
+The application must allocate enough
+memory for
+.Va cesr_element_count
+status structures (see below).
+The
+.Va cesr_flags
+can optionally be set to
+.Dv CESR_VOLTAGS
+to indicate that volume tag (bar code) information is to be read from
+the jukebox and returned.
+.Pp
+The
+.Va cesr_element_base
+and
+.Va cesr_element_count
+fields must be valid with respect to the physical configuration of the changer.
+If they are not, the
+.Dv CHIOGSTATUS
+ioctl returns the
+.Er EINVAL
+error code.
+.Pp
+The information about the elements is returned in an array of
+.Vt changer_element_status
+structures.
+This structure include at least the following fields:
+.Bd -literal -offset indent
+u_int ces_addr; /* element address in media changer */
+u_char ces_flags; /* see CESTATUS definitions below */
+u_char ces_sensecode; /* additional sense code for element */
+u_char ces_sensequal; /* additional sense code qualifier */
+u_char ces_invert; /* invert bit */
+u_char ces_svalid; /* source address (ces_source) valid */
+u_short ces_source; /* source address of medium */
+changer_voltag_t ces_pvoltag; /* primary volume tag */
+changer_voltag_t ces_avoltag; /* alternate volume tag */
+u_char ces_idvalid; /* ces_scsi_id is valid */
+u_char ces_scsi_id; /* SCSI id of element (if ces_idvalid is nonzero) */
+u_char ces_lunvalid; /* ces_scsi_lun is valid */
+u_char ces_scsi_lun; /* SCSI lun of element (if ces_lunvalid is nonzero) */
+.Ed
+.Pp
+The
+.Va ces_addr
+field contains the address of the element in the
+coordinate system of the media changer.
+It is not used by the driver,
+and should be used for diagnostic purposes only.
+.Pp
+The following flags are defined for the
+.Va ces_flags
+field:
+.Bl -tag -width CESTATUS_IMPEXP
+.It Dv CESTATUS_FULL
+A medium is present.
+.It Dv CESTATUS_IMPEXP
+The medium has been deposited by the operator (and not by a picker).
+.It Dv CESTATUS_EXCEPT
+The element is in an exceptional state (e.g.\& invalid barcode label,
+barcode not yet scanned).
+.It Dv CESTATUS_ACCESS
+The element is accessible by the picker.
+.It Dv CESTATUS_EXENAB
+The element supports medium export.
+.It Dv CESTATUS_INENAB
+The element supports medium import.
+.El
+.Pp
+Note that not all flags are valid for all element types.
+.El
+.Sh NOTES
+This version of the
+.Nm
+driver has been tested with a DEC TZ875 (5 slot, one DLT drive)
+and a Breece Hill Q47 (60 slot, four DLT drives, barcode reader).
+.Pp
+Many of the features the
+.Nm
+driver supports are not thoroughly tested due to the fact that the
+devices available for testing do not support the necessary commands.
+This is true for alternate volume tags, media flipping, import/export
+element handling, multiple picker operation and other things.
+.Sh FILES
+.Bl -tag -width /dev/ch[0-9] -compact
+.It Pa /dev/ch[0-9]
+device entries
+.El
+.Sh DIAGNOSTICS
+If the media changer does not support features requested by the
+.Nm
+driver, it will produce both console error messages and failure return
+codes to the ioctls described here.
+.Sh SEE ALSO
+.Xr cam 4 ,
+.Xr chio 1 ,
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4
+.Sh HISTORY
+The
+.Nm
+driver appeared in
+.Bx 386 0.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Jason R. Thorpe Aq thorpej@and.com
+for And Communications,
+.Pa http://www.and.com/ .
+It was added to the system by
+.An Stefan Grefen Aq grefen@goofy.zdv.uni-mainz.de
+who apparently had such a device.
+It was ported to CAM by
+.An Kenneth Merry Aq ken@FreeBSD.org .
+It was updated to support volume tags by
+.An Hans Huebner Aq hans@artcom.de .
diff --git a/share/man/man4/ciss.4 b/share/man/man4/ciss.4
new file mode 100644
index 0000000..284944b
--- /dev/null
+++ b/share/man/man4/ciss.4
@@ -0,0 +1,190 @@
+.\" $FreeBSD$
+.\" Written by Tom Rhodes
+.\" This file is in the public domain.
+.\"
+.Dd January 26, 2012
+.Dt CISS 4
+.Os
+.Sh NAME
+.Nm ciss
+.Nd Common Interface for SCSI-3 Support driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device ciss"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ciss_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver claims to provide a common interface between generic SCSI
+transports and intelligent host adapters.
+.Pp
+The
+.Nm
+driver supports
+.Em CISS
+as defined in the document entitled
+.%T "CISS Command Interface for SCSI-3 Support Open Specification, Version 1.04, Valence Number 1" ,
+dated 2000/11/27, produced by Compaq Computer Corporation.
+.Pp
+We provide a shim layer between the
+.Nm
+interface and
+.Xr CAM 4 ,
+offloading most of the queueing and being-a-disk chores onto CAM.
+Entry to the driver is via the PCI bus attachment
+.Fn ciss_probe ,
+.Fn ciss_attach ,
+etc.\& and via the CAM interface
+.Fn ciss_cam_action ,
+and
+.Fn ciss_cam_poll .
+The Compaq
+.Nm
+adapters require faked responses to get reasonable
+behavior out of them.
+In addition, the
+.Nm
+command set is by no means adequate to support the functionality
+of a RAID controller,
+and thus the supported Compaq adapters utilize portions of the
+control protocol from earlier Compaq adapter families.
+.Pp
+Currently
+.Nm
+supports the
+.Dq simple
+and
+.Dq performant
+transport layer.
+.Pp
+Non-disk devices (such as internal DATs and devices
+attached to the external SCSI bus) are supported as normal CAM devices
+provided that they are exported by the controller firmware and are not
+marked as being masked.
+Masked devices can be exposed by setting the
+.Va hw.ciss.expose_hidden_physical
+tunable to non-zero at boot time.
+Direct Access devices (such as disk
+drives) are only exposed as
+.Xr pass 4
+devices.
+Hot-insertion and removal of devices is supported and notification messages
+will be reported to the console and logs.
+.Pp
+The problem which adapter freezes with the message
+.Dq ADAPTER HEARTBEAT FAILED
+might be solved by updating the firmware and/or setting the
+.Va hw.ciss.nop_message_heartbeat
+tunable to non-zero at boot time.
+.Sh HARDWARE
+Controllers supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Compaq Smart Array 5300 (simple mode only)
+.It
+Compaq Smart Array 532
+.It
+Compaq Smart Array 5i
+.It
+HP Smart Array 5312
+.It
+HP Smart Array 6i
+.It
+HP Smart Array 641
+.It
+HP Smart Array 642
+.It
+HP Smart Array 6400
+.It
+HP Smart Array 6400 EM
+.It
+HP Smart Array E200
+.It
+HP Smart Array E200i
+.It
+HP Smart Array P212
+.It
+HP Smart Array P220i
+.It
+HP Smart Array P222
+.It
+HP Smart Array P230i
+.It
+HP Smart Array P400
+.It
+HP Smart Array P400i
+.It
+HP Smart Array P410
+.It
+HP Smart Array P410i
+.It
+HP Smart Array P411
+.It
+HP Smart Array P420
+.It
+HP Smart Array P420i
+.It
+HP Smart Array P421
+.It
+HP Smart Array P430
+.It
+HP Smart Array P430i
+.It
+HP Smart Array P431
+.It
+HP Smart Array P530
+.It
+HP Smart Array P531
+.It
+HP Smart Array P600
+.It
+HP Smart Array P721m
+.It
+HP Smart Array P731m
+.It
+HP Smart Array P800
+.It
+HP Smart Array P812
+.It
+HP Smart Array P830
+.It
+HP Smart Array P830i
+.It
+HP Modular Smart Array 20 (MSA20)
+.It
+HP Modular Smart Array 500 (MSA500)
+.El
+.Sh SEE ALSO
+.Xr cam 4 ,
+.Xr pass 4 ,
+.Xr xpt 4 ,
+.Xr loader.conf 5 ,
+.Xr camcontrol 8
+.Rs
+.%T "CISS Command Interface for SCSI-3 Support Open Specification, Version 1.04, Valence Number 1"
+.%D 2000/11/27
+.%Q "Compaq Computer Corporation"
+.Re
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Mike Smith Aq msmith@FreeBSD.org .
+.Pp
+This manual page is based on his comments and was written by
+.An Tom Rhodes Aq trhodes@FreeBSD.org .
diff --git a/share/man/man4/cm.4 b/share/man/man4/cm.4
new file mode 100644
index 0000000..bbeee52
--- /dev/null
+++ b/share/man/man4/cm.4
@@ -0,0 +1,173 @@
+.\"
+.\" Copyright (c) 2004 Tom Rhodes
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt CM 4
+.Os
+.Sh NAME
+.Nm cm
+.Nd "SMC Arcnet Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "device isa"
+.Cd "device cm"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_cm_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the
+.Tn Arcnet
+.Tn ISA
+network adapters.
+.Pp
+This driver also has quirks preset in the
+.Xr device.hints 5
+file for card detection.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following
+card models:
+.Pp
+.Bl -bullet -compact
+.It
+SMC90c26
+.It
+SMC90c56
+.It
+SMC90c66 in '56 compatibility mode.
+.El
+.Sh IMPLEMENTATION NOTES
+When the
+.Va NOARP
+flag is set on the
+.Nm
+interface,
+it does not employ the address resolution protocol described in
+.Xr arp 4
+to dynamically map between Internet and Ethernet addresses on
+the local network.
+Instead it uses the least significant 8 bits of the
+.Tn IP
+address as the hardware address
+like described in
+.Tn RFC
+1051
+and
+.Tn RFC
+1201.
+.Pp
+With the
+.Dv IFF_LINK0
+flag cleared
+.Tn IP/ARP/RARP
+encoding is done according to
+.Tn RFC
+1201
+that is, with Packet Header Definition Standard header and packet type
+212 / 213.
+The
+.Tn MTU
+is normally 1500.
+The
+.Dv IFF_LINK0
+flag is cleared by default.
+.Pp
+With the
+.Dv IFF_LINK0
+flag set,
+.Tn IP
+and
+.Tn ARP
+encoding is done according to the deprecated
+.Tn RFC
+1051 encoding, that is with simple header, packet type 240 / 241,
+and the
+.Tn MTU
+is 507.
+.Pp
+When switching between the two modes, use
+.Dl ifconfig interfacename down up
+to switch the
+.Tn MTU .
+.Sh DIAGNOSTICS
+The following driver specific error messages
+may be reported:
+.Bl -diag
+.It "reset: card reset, link addr = 0x%02x (cm%d)"
+The card is being reset and a new link address assigned.
+.It "srint: restarted rx on buf cm%d"
+The rx buffer has been emptied and will be reset.
+.El
+.Sh SEE ALSO
+.Xr netintro 4 ,
+.Xr watchdog 4 ,
+.Xr device.hints 5 ,
+.Xr ifconfig 8 ,
+.Xr watchdog 8
+.Sh HISTORY
+The
+.Nm
+device was ported from
+.Nx
+by
+.An Max Khon Aq fjoe@FreeBSD.org
+and first appeared in
+.Fx 4.6 .
+This manual page first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+This manual page was written by
+.An Tom Rhodes Aq trhodes@FreeBSD.org .
+The
+.Sx IMPLEMENTATION NOTES
+section was submitted by
+.An Max Khon Aq fjoe@FreeBSD.org
+and originated from
+.Nx .
+.Sh BUGS
+The
+.Nm
+driver code could do with a bit of improvement,
+it would be nice if some one could come along and take care of this.
+.Pp
+The
+.Sx IMPLEMENTATION NOTES
+section is specific to all Arcnet
+devices (see
+.Pa sys/net/if_arcsubr.c )
+and should be moved to a more generic location.
diff --git a/share/man/man4/cmx.4 b/share/man/man4/cmx.4
new file mode 100644
index 0000000..844e6c4
--- /dev/null
+++ b/share/man/man4/cmx.4
@@ -0,0 +1,120 @@
+.\"
+.\" Copyright (c) 2006-2007 Daniel Roethlisberger <daniel@roe.ch>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice unmodified, this list of conditions, and the following
+.\" disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 7, 2007
+.Dt CMX 4
+.Os
+.Sh NAME
+.Nm cmx
+.Nd Omnikey CardMan 4040 smartcard reader device driver
+.Sh SYNOPSIS
+.Cd device cmx
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the PCCARD based
+.Em Omnikey CardMan 4040
+smartcard reader.
+The driver provides a character device special file based
+.Em Chip/Smart Card Interface Devices (CCID)
+interface. The driver implements what the vendor calls the
+.Em Synchronous API
+onto the smartcard reader device.
+.Pp
+Reading and writing is synchronous, meaning that a call to
+.Xr write 2
+directly corresponds to a complete CCID command sent to the
+device, while the following
+.Xr read 2
+will return the complete answer from the reader. There is no
+support for partial reads or writes. There is no upper limit on
+CCID request or response sizes, but the complete CCID request
+must be sent to the driver in
+.Xr write 2
+and the complete CCID response must fit into the buffer
+supplied to
+.Xr read 2 .
+.Pp
+Non-blocking I/O,
+.Xr select 2
+and
+.Xr poll 2
+are supported and work as expected. An open file descriptor
+will always be ready for writing, but only ready for reading
+if the device indicates that it has data available.
+.Sh FILES
+.Bl -tag -width /usr/ports/security/openct -compact
+.It Pa /dev/cmx\fBn\fP
+Character device special file.
+.It Pa /usr/ports/security/openct
+OpenCT, a userspace smartcard daemon containing a
+.Em CCID
+driver which directly supports
+.Nm
+devices.
+.\".It Pa /usr/ports/devel/pcsc-lite
+.\"PC/SC-Lite, a userspace smartcard daemon.
+.\".It Pa /usr/ports/devel/libccid
+.\"libccid, a generic
+.\".Em CCID
+.\"driver for use by PC/SC-Lite to interface to
+.\".Nm
+.\"devices.
+.El
+.Sh COMPATIBILITY
+Userland smartcard code written for the vendor's Linux drivers
+should work with the
+.Nm
+driver without modification.
+.Sh SEE ALSO
+.Xr pccard 4
+.Sh HISTORY
+The
+.Nm cmx
+driver first appeared in
+.Fx 7.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Daniel Roethlisberger Aq daniel@roe.ch ,
+originally based on the Linux driver v1.1.0 by
+.An Omnikey GmbH Aq www.omnikey.com .
+Early testing and bug fixes by
+.An Marcin Cieslak Aq saper@system.pl .
+.Sh BUGS
+.An -nosplit
+The way the
+.Nm
+driver talks to the CardMan 4040 is a bit rough. Due to the
+complete lack of hardware documentation other than vendor drivers
+for other operating systems, the gory details of the device's
+I/O registers are not understood very well. There may be error
+conditions which can only be solved by physically reinserting the
+reader.
diff --git a/share/man/man4/coretemp.4 b/share/man/man4/coretemp.4
new file mode 100644
index 0000000..efae020
--- /dev/null
+++ b/share/man/man4/coretemp.4
@@ -0,0 +1,74 @@
+.\"-
+.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 23, 2007
+.Dt CORETEMP 4
+.Os
+.Sh NAME
+.Nm coretemp
+.Nd device driver for Intel Core on-die digital thermal sensor
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device coretemp"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+coretemp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the on-die digital thermal sensor present
+in Intel Core and newer CPUs.
+.Pp
+The
+.Nm
+driver reports each core's temperature through a sysctl node in the
+corresponding CPU device's sysctl tree, named
+.Va dev.cpu.%d.temperature .
+.Sh SEE ALSO
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 7.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Rui Paulo Aq rpaulo@FreeBSD.org
+as part of a Google Summer of Code project.
+This manual page was written by
+.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
diff --git a/share/man/man4/cpuctl.4 b/share/man/man4/cpuctl.4
new file mode 100644
index 0000000..3cc0138
--- /dev/null
+++ b/share/man/man4/cpuctl.4
@@ -0,0 +1,193 @@
+.\" Copyright (c) 2006-2008 Stanislav Sedov <stas@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 20, 2014
+.Dt CPUCTL 4
+.Os
+.Sh NAME
+.Nm cpuctl
+.Nd cpuctl pseudo device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "device cpuctl"
+.Ed
+.Pp
+Alternatively, to load the driver as a module
+at boot time, place the following in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+cpuctl_load="YES"
+.Ed
+.Sh DESCRIPTION
+The special device
+.Pa /dev/cpuctl
+presents interface to the system CPU.
+It provides functionality to retrieve
+CPUID information, read/write machine specific registers (MSR) and perform
+CPU firmware updates.
+.Pp
+For each CPU present in the system, the special device
+.Pa /dev/cpuctl%d
+with the appropriate index will be created.
+For multicore CPUs such a
+special device will be created for each core.
+.Pp
+Currently, only i386 and amd64 processors are
+supported.
+.Sh IOCTL INTERFACE
+All of the supported operations are invoked using the
+.Xr ioctl 2
+system call.
+Currently, the following ioctls are defined:
+.Bl -tag -width CPUCTL_CPUID_COUNT
+.It Dv CPUCTL_RDMSR Fa cpuctl_msr_args_t *args
+.It Dv CPUCTL_WRMSR Fa cpuctl_msr_args_t *args
+Read/write CPU machine specific register.
+The
+.Vt cpuctl_msr_args_t
+structure is defined in
+.In sys/cpuctl.h
+as:
+.Bd -literal
+typedef struct {
+ int msr; /* MSR to read */
+ uint64_t data;
+} cpuctl_msr_args_t;
+.Ed
+.It Dv CPUCTL_MSRSBIT Fa cpuctl_msr_args_t *args
+.It Dv CPUCTL_MSRCBIT Fa cpuctl_msr_args_t *args
+Set/clear MSR bits according to the mask given in the
+.Va data
+field.
+.It Dv CPUCTL_CPUID Fa cpuctl_cpuid_args_t *args
+Retrieve CPUID information.
+Arguments are supplied in the following structure:
+.Bd -literal
+typedef struct {
+ int level; /* CPUID level */
+ uint32_t data[4];
+} cpuctl_cpuid_args_t;
+.Ed
+It is equivalent to the
+.Dv CPUCTL_CPUID_COUNT
+request with
+.Va level_type
+set to 0.
+.It Dv CPUCTL_CPUID_COUNT Fa cpuctl_cpuid_count_args_t *args
+Retrieve CPUID information.
+Arguments are supplied in the following structure:
+.Bd -literal
+typedef struct {
+ int level; /* CPUID level */
+ int level_type; /* CPUID level type */
+ uint32_t data[4];
+} cpuctl_cpuid_count_args_t;
+.Ed
+The
+.Va level
+field indicates the CPUID level to retrieve,
+it is loaded into the
+.Va %eax
+register before the CPUID instruction is executed,
+The
+.Va level_type
+field indicates the CPUID level type to retrieve,
+it is loaded into the
+.Va %ecx
+register.
+.Pp
+The
+.Va data
+field is used to store the received CPUID data.
+That is,
+.Va data[0]
+contains the value of
+.Va %eax
+register after the CPUID instruction is executed,
+.Va data[1]
+is for
+.Va %ebx ,
+.Va data[2]
+for
+.Va %ecx ,
+and
+.Va data[3]
+for
+.Va %edx .
+.It Dv CPUCTL_UPDATE cpuctl_update_args_t *args
+Update CPU firmware (microcode).
+The structure is defined in
+.In sys/cpuctl.h
+as:
+.Bd -literal
+typedef struct {
+ void *data;
+ size_t size;
+} cpuctl_update_args_t;
+.Ed
+.Pp
+The
+.Va data
+field should point to the firmware image of size
+.Va size .
+.El
+.Pp
+For additional information refer to
+.Pa cpuctl.h .
+.Sh RETURN VALUES
+.Bl -tag -width Er
+.It Bq Er ENXIO
+The operation requested is not supported by the device (e.g., unsupported
+architecture or the CPU is disabled).
+.It Bq Er EINVAL
+Incorrect request was supplied, or microcode image is not correct.
+.It Bq Er ENOMEM
+No physical memory was available to complete the request.
+.It Bq Er EFAULT
+The firmware image address points outside the process address space.
+.El
+.Sh FILES
+.Bl -tag -width /dev/cpuctl -compact
+.It Pa /dev/cpuctl
+.El
+.Sh SEE ALSO
+.Xr hwpmc 4 ,
+.Xr cpucontrol 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 7.2 .
+.Sh AUTHORS
+The
+.Nm
+module and this manual page were written by
+.An Stanislav Sedov Aq stas@FreeBSD.org .
+.Sh BUGS
+Yes, probably, report if any.
diff --git a/share/man/man4/cpufreq.4 b/share/man/man4/cpufreq.4
new file mode 100644
index 0000000..850660e
--- /dev/null
+++ b/share/man/man4/cpufreq.4
@@ -0,0 +1,308 @@
+.\" Copyright (c) 2005 Nate Lawson
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 3, 2006
+.Dt CPUFREQ 4
+.Os
+.Sh NAME
+.Nm cpufreq
+.Nd CPU frequency control framework
+.Sh SYNOPSIS
+.Cd "device cpufreq"
+.Pp
+.In sys/cpu.h
+.Ft int
+.Fn cpufreq_levels "device_t dev" "struct cf_level *levels" "int *count"
+.Ft int
+.Fn cpufreq_set "device_t dev" "const struct cf_level *level" "int priority"
+.Ft int
+.Fn cpufreq_get "device_t dev" "struct cf_level *level"
+.Ft int
+.Fo cpufreq_drv_settings
+.Fa "device_t dev"
+.Fa "struct cf_setting *sets"
+.Fa "int *count"
+.Fc
+.Ft int
+.Fn cpufreq_drv_type "device_t dev" "int *type"
+.Ft int
+.Fn cpufreq_drv_set "device_t dev" "const struct cf_setting *set"
+.Ft int
+.Fn cpufreq_drv_get "device_t dev" "struct cf_setting *set"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides a unified kernel and user interface to CPU frequency
+control drivers.
+It combines multiple drivers offering different settings into a single
+interface of all possible levels.
+Users can access this interface directly via
+.Xr sysctl 8
+or by indicating to
+.Pa /etc/rc.d/power_profile
+that it should switch settings when the AC line state changes via
+.Xr rc.conf 5 .
+.Sh SYSCTL VARIABLES
+These settings may be overridden by kernel drivers requesting alternate
+settings.
+If this occurs, the original values will be restored once the condition
+has passed (e.g., the system has cooled sufficiently).
+If a sysctl cannot be set due to an override condition, it will return
+.Er EPERM .
+.Pp
+The frequency cannot be changed if TSC is in use as the timecounter.
+This is because the timecounter system needs to use a source that has a
+constant rate.
+The timecounter source can be changed with the
+.Pa kern.timecounter.hardware
+sysctl.
+Available modes are in
+.Pa kern.timecounter.choice
+sysctl entry.
+.Bl -tag -width indent
+.It Va dev.cpu.%d.freq
+Current active CPU frequency in MHz.
+.It Va dev.cpu.%d.freq_levels
+Currently available levels for the CPU (frequency/power usage).
+Values are in units of MHz and milliwatts.
+.It Va dev.DEVICE.%d.freq_settings
+Currently available settings for the driver (frequency/power usage).
+Values are in units of MHz and milliwatts.
+This is helpful for understanding which settings are offered by which
+driver for debugging purposes.
+.It Va debug.cpufreq.lowest
+Lowest CPU frequency in MHz to offer to users.
+This setting is also accessible via a tunable with the same name.
+This can be used to disable very low levels that may be unusable on
+some systems.
+.It Va debug.cpufreq.verbose
+Print verbose messages.
+This setting is also accessible via a tunable with the same name.
+.El
+.Sh SUPPORTED DRIVERS
+The following device drivers offer absolute frequency control via the
+.Nm
+interface.
+Usually, only one of these can be active at a time.
+.Pp
+.Bl -tag -compact -width ".Pa acpi_perf"
+.It Pa acpi_perf
+ACPI CPU performance states
+.It Pa est
+Intel Enhanced SpeedStep
+.It Pa ichss
+Intel SpeedStep for ICH
+.It Pa powernow
+AMD PowerNow!\& and Cool'n'Quiet for K7 and K8
+.It Pa smist
+Intel SMI-based SpeedStep for PIIX4
+.El
+.Pp
+The following device drivers offer relative frequency control and
+have an additive effect:
+.Pp
+.Bl -tag -compact -width ".Pa acpi_throttle"
+.It Pa acpi_throttle
+ACPI CPU throttling
+.It Pa p4tcc
+Pentium 4 Thermal Control Circuitry
+.El
+.Sh KERNEL INTERFACE
+Kernel components can query and set CPU frequencies through the
+.Nm
+kernel interface.
+This involves obtaining a
+.Nm
+device, calling
+.Fn cpufreq_levels
+to get the currently available frequency levels,
+checking the current level with
+.Fn cpufreq_get ,
+and setting a new one from the list with
+.Fn cpufreq_set .
+Each level may actually reference more than one
+.Nm
+driver but kernel components do not need to be aware of this.
+The
+.Va total_set
+element of
+.Vt "struct cf_level"
+provides a summary of the frequency and power for this level.
+Unknown or irrelevant values are set to
+.Dv CPUFREQ_VAL_UNKNOWN .
+.Pp
+The
+.Fn cpufreq_levels
+method takes a
+.Nm
+device and an empty array of
+.Fa levels .
+The
+.Fa count
+value should be set to the number of levels available and after the
+function completes, will be set to the actual number of levels returned.
+If there are more levels than
+.Fa count
+will allow, it should return
+.Er E2BIG .
+.Pp
+The
+.Fn cpufreq_get
+method takes a pointer to space to store a
+.Fa level .
+After successful completion, the output will be the current active level
+and is equal to one of the levels returned by
+.Fn cpufreq_levels .
+.Pp
+The
+.Fn cpufreq_set
+method takes a pointer a
+.Fa level
+and attempts to activate it.
+The
+.Fa priority
+(i.e.,
+.Dv CPUFREQ_PRIO_KERN )
+tells
+.Nm
+whether to override previous settings while activating this level.
+If
+.Fa priority
+is higher than the current active level, that level will be saved and
+overridden with the new level.
+If a level is already saved, the new level is set without overwriting
+the older saved level.
+If
+.Fn cpufreq_set
+is called with a
+.Dv NULL
+.Fa level ,
+the saved level will be restored.
+If there is no saved level,
+.Fn cpufreq_set
+will return
+.Er ENXIO .
+If
+.Fa priority
+is lower than the current active level's priority, this method returns
+.Er EPERM .
+.Sh DRIVER INTERFACE
+Kernel drivers offering hardware-specific CPU frequency control export
+their individual settings through the
+.Nm
+driver interface.
+This involves implementing these methods:
+.Fn cpufreq_drv_settings ,
+.Fn cpufreq_drv_type ,
+.Fn cpufreq_drv_set ,
+and
+.Fn cpufreq_drv_get .
+Additionally, the driver must attach a device as a child of a CPU
+device so that these methods can be called by the
+.Nm
+framework.
+.Pp
+The
+.Fn cpufreq_drv_settings
+method returns an array of currently available settings, each of type
+.Vt "struct cf_setting" .
+The driver should set unknown or irrelevant values to
+.Dv CPUFREQ_VAL_UNKNOWN .
+All the following elements for each setting should be returned:
+.Bd -literal
+struct cf_setting {
+ int freq; /* CPU clock in MHz or 100ths of a percent. */
+ int volts; /* Voltage in mV. */
+ int power; /* Power consumed in mW. */
+ int lat; /* Transition latency in us. */
+ device_t dev; /* Driver providing this setting. */
+};
+.Ed
+.Pp
+On entry to this method,
+.Fa count
+contains the number of settings that can be returned.
+On successful completion, the driver sets it to the actual number of
+settings returned.
+If the driver offers more settings than
+.Fa count
+will allow, it should return
+.Er E2BIG .
+.Pp
+The
+.Fn cpufreq_drv_type
+method indicates the type of settings it offers, either
+.Dv CPUFREQ_TYPE_ABSOLUTE
+or
+.Dv CPUFREQ_TYPE_RELATIVE .
+Additionally, the driver may set the
+.Dv CPUFREQ_FLAG_INFO_ONLY
+flag if the settings it provides are information for other drivers only
+and cannot be passed to
+.Fn cpufreq_drv_set
+to activate them.
+.Pp
+The
+.Fn cpufreq_drv_set
+method takes a driver setting and makes it active.
+If the setting is invalid or not currently available, it should return
+.Er EINVAL .
+.Pp
+The
+.Fn cpufreq_drv_get
+method returns the currently-active driver setting.
+The
+.Vt "struct cf_setting"
+returned must be valid for passing to
+.Fn cpufreq_drv_set ,
+including all elements being filled out correctly.
+If the driver cannot infer the current setting
+(even by estimating it with
+.Fn cpu_est_clockrate )
+then it should set all elements to
+.Dv CPUFREQ_VAL_UNKNOWN .
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr est 4 ,
+.Xr timecounters 4 ,
+.Xr powerd 8 ,
+.Xr sysctl 8
+.Sh AUTHORS
+.An Nate Lawson
+.An Bruno Ducrot
+contributed the
+.Pa powernow
+driver.
+.Sh BUGS
+The following drivers have not yet been converted to the
+.Nm
+interface:
+.Xr longrun 4 .
+.Pp
+Notification of CPU and bus frequency changes is not implemented yet.
+.Pp
+When multiple CPUs offer frequency control, they cannot be set to different
+levels and must all offer the same frequency settings.
diff --git a/share/man/man4/crypto.4 b/share/man/man4/crypto.4
new file mode 100644
index 0000000..4f3b24c
--- /dev/null
+++ b/share/man/man4/crypto.4
@@ -0,0 +1,125 @@
+.\" $OpenBSD: crypto.4,v 1.4 2002/09/12 07:15:03 deraadt Exp $
+.\"
+.\" Copyright (c) 2001 Theo de Raadt
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 7, 2010
+.Dt CRYPTO 4
+.Os
+.Sh NAME
+.Nm crypto ,
+.Nm cryptodev
+.Nd hardware crypto access driver
+.Sh SYNOPSIS
+.Cd device crypto
+.Cd device cryptodev
+.Sh DESCRIPTION
+The
+.Nm
+driver provides a device-independent framework to support
+cryptographic operations in the kernel.
+The
+.Nm cryptodev
+driver provides userland applications access to this support
+through the
+.Pa /dev/crypto
+device.
+This node primarily operates in an
+.Xr ioctl 2
+based model, permitting a variety of applications to query device capabilities,
+submit transactions, and get results.
+.Pp
+If
+.Ar count
+given in the specification, and is greater than 0, a maximum of one
+.Nm
+device is created.
+.Pp
+The following
+.Xr ioctl 2
+calls apply only to the
+.Nm
+devices:
+.Bl -tag -width ".Dv CIOCGSESSION"
+.It Dv CIOCGSESSION
+Setup a new crypto session for a new type of operation.
+.It Dv CIOCFSESSION
+Free a previously established session.
+.It Dv CIOCCRYPT
+Perform a crypto operation against a previously setup session.
+.El
+.Sh FEATURES
+Depending on hardware being present, the following symmetric and
+asymmetric cryptographic features are potentially available from
+.Pa /dev/crypto :
+.Pp
+.Bl -tag -width ".Dv CRYPTO_RIPEMD160_HMAC" -offset indent -compact
+.It Dv CRYPTO_DES_CBC
+.It Dv CRYPTO_3DES_CBC
+.It Dv CRYPTO_BLF_CBC
+.It Dv CRYPTO_CAMELLIA_CBC
+.It Dv CRYPTO_CAST_CBC
+.It Dv CRYPTO_SKIPJACK_CBC
+.It Dv CRYPTO_MD5_HMAC
+.It Dv CRYPTO_SHA1_HMAC
+.It Dv CRYPTO_RIPEMD160_HMAC
+.It Dv CRYPTO_MD5_KPDK
+.It Dv CRYPTO_SHA1_KPDK
+.It Dv CRYPTO_AES_CBC
+.It Dv CRYPTO_ARC4
+.It Dv CRYPTO_MD5
+.It Dv CRYPTO_SHA1
+.It Dv CRK_MOD_EXP
+.It Dv CRK_MOD_EXP_CRT
+.It Dv CRK_DSA_SIGN
+.It Dv CRK_DSA_VERIFY
+.It Dv CRK_DH_COMPUTE_KEY
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/crypto" -compact
+.It Pa /dev/crypto
+crypto access device
+.El
+.Sh SEE ALSO
+.Xr aesni 4 ,
+.Xr hifn 4 ,
+.Xr ipsec 4 ,
+.Xr padlock 4 ,
+.Xr safe 4 ,
+.Xr ubsec 4 ,
+.Xr geli 8 ,
+.Xr crypto 9
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 3.0 .
+The
+.Nm
+driver was imported to
+.Fx 5.0 .
diff --git a/share/man/man4/ctl.4 b/share/man/man4/ctl.4
new file mode 100644
index 0000000..7122a92
--- /dev/null
+++ b/share/man/man4/ctl.4
@@ -0,0 +1,93 @@
+.\" Copyright (c) 2013 Edward Tomasz Napierala
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.Dd April 2, 2013
+.Dt CTL 4
+.Os
+.Sh NAME
+.Nm ctl
+.Nd CAM Target Layer
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ctl"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ctl_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+subsystem provides SCSI disk and processor emulation.
+It supports features such as:
+.Pp
+.Bl -bullet -compact
+.It
+Disk and processor device emulation
+.It
+Tagged queueing
+.It
+SCSI task attribute support (ordered, head of queue, simple tags)
+.It
+SCSI implicit command ordering support.
+.It
+Full task management support (abort, LUN reset, target reset, etc.)
+.It
+Support for multiple ports
+.It
+Support for multiple simultaneous initiators
+.It
+Support for multiple simultaneous backing stores
+.It
+Persistent reservation support
+.It
+Mode sense/select support
+.It
+Error injection support
+.It
+All I/O handled in-kernel, no userland context switch overhead
+.El
+.Pp
+It also serves as a kernel component of the native iSCSI target.
+.Sh SEE ALSO
+.Xr ctladm 8 ,
+.Xr ctld 8 ,
+.Xr ctlstat 8
+.Sh HISTORY
+The
+.Nm
+subsystem first appeared in
+.Fx 9.1 .
+.Sh AUTHORS
+The
+.Nm
+subsystem was written by
+.An Kenneth Merry Aq ken@FreeBSD.org .
diff --git a/share/man/man4/cue.4 b/share/man/man4/cue.4
new file mode 100644
index 0000000..a27653c
--- /dev/null
+++ b/share/man/man4/cue.4
@@ -0,0 +1,113 @@
+.\" Copyright (c) 1997, 1998, 1999, 2000
+.\" Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt CUE 4
+.Os
+.Sh NAME
+.Nm cue
+.Nd "CATC USB-EL1210A USB Ethernet driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device cue"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_cue_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB Ethernet adapters based on the Computer
+Access Technology Corporation's USB-EL1210A chipset.
+.Pp
+The USB-EL1210A supports a 512-bit multicast hash filter, single perfect
+filter entry for the station address and promiscuous mode.
+Packets are
+received and transmitted over separate USB bulk transfer endpoints.
+.Pp
+The CATC chipset supports only 10Mbps half-duplex mode, hence there
+are no
+.Xr ifmedia 4
+modes to select.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports CATC USB-EL1210A based USB Ethernet
+adapters including:
+.Pp
+.Bl -bullet -compact
+.It
+Belkin F5U011/F5U111
+.It
+CATC Netmate
+.It
+CATC Netmate II
+.It
+SmartBridges SmartLink
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "cue%d: watchdog timeout"
+A packet was queued for transmission and a transmit command was
+issued, however the device failed to acknowledge the transmission
+before a timeout expired.
+.It "cue%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ee.columbia.edu .
diff --git a/share/man/man4/cxgb.4 b/share/man/man4/cxgb.4
new file mode 100644
index 0000000..97f72b5
--- /dev/null
+++ b/share/man/man4/cxgb.4
@@ -0,0 +1,134 @@
+.\" Copyright (c) 2007-2008, Chelsio Inc
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright notice,
+.\" this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" 3. Neither the name of the Chelsio Inc nor the names of its
+.\" contributors may be used to endorse or promote products derived from
+.\" this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" * Other names and brands may be claimed as the property of others.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 14, 2007
+.Dt CXGB 4
+.Os
+.Sh NAME
+.Nm cxgb
+.Nd "Chelsio T3 10 Gigabit Ethernet adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device firmware"
+.Cd "device cxgb"
+.Ed
+.Pp
+To load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_cxgb_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports Transmit/Receive checksum offload,
+Jumbo Frames, TCP segmentation offload (TSO), Large Receive Offload (LRO),
+VLAN hardware insertion / extraction, and VLAN checksum offload.
+For further hardware information, see
+.Pa http://www.chelsio.com/ .
+.Pp
+For questions related to hardware requirements,
+refer to the documentation supplied with your Chelsio T3 adapter.
+All hardware requirements listed apply to use with
+.Fx .
+.Pp
+Support for Jumbo Frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+The maximum MTU size for Jumbo Frames is 9000.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports 10 Gigabit and 1 Gigabit Ethernet adapters based on the T3 and T3B chipset:
+.Pp
+.Bl -bullet -compact
+.It
+Chelsio 10GBase-CX4
+.It
+Chelsio 10GBase-LR
+.It
+Chelsio 10GBase-SR
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "cxgb%d: Unable to allocate bus resource: memory"
+A fatal initialization error has occurred.
+.It "cxgb%d: Unable to allocate bus resource: interrupt"
+A fatal initialization error has occurred.
+.It "cxgb%d: Could not find firmware image %s"
+The appropriate firmware kld module was not installed.
+This is a fatal initialization error.
+.El
+.Sh SUPPORT
+For general information and support,
+go to the Chelsio support website at:
+.Pa http://www.chelsio.com/ .
+.Pp
+If an issue is identified with the released source code on the supported kernel
+with a supported adapter, email the specific information related to the
+issue to
+.Aq support@chelsio.com .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 6.3
+and
+.Fx 7.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Kip Macy Aq kmacy@FreeBSD.org
+with substantial support from
+.An Scott Long Aq scottl@FreeBSD.org .
diff --git a/share/man/man4/cxgbe.4 b/share/man/man4/cxgbe.4
new file mode 100644
index 0000000..af6a6a0
--- /dev/null
+++ b/share/man/man4/cxgbe.4
@@ -0,0 +1,317 @@
+.\" Copyright (c) 2011-2014, Chelsio Inc
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright notice,
+.\" this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" 3. Neither the name of the Chelsio Inc nor the names of its
+.\" contributors may be used to endorse or promote products derived from
+.\" this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" * Other names and brands may be claimed as the property of others.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 20, 2014
+.Dt CXGBE 4
+.Os
+.Sh NAME
+.Nm cxgbe
+.Nd "Chelsio T4 and T5 based 40Gb, 10Gb, and 1Gb Ethernet adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device cxgbe"
+.Ed
+.Pp
+To load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+t4fw_cfg_load="YES"
+t5fw_cfg_load="YES"
+if_cxgbe_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Express Ethernet adapters based on
+the Chelsio Terminator 4 and Terminator 5 ASICs (T4 and T5).
+The driver supports Jumbo Frames, Transmit/Receive checksum offload,
+TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN
+tag insertion/extraction, VLAN checksum offload, VLAN TSO, and
+Receive Side Steering (RSS).
+For further hardware information and questions related to hardware
+requirements, see
+.Pa http://www.chelsio.com/ .
+.Pp
+Note that ports of T5 cards are named cxl and attach to a t5nex parent device
+(in contrast to ports named cxgbe that attach to a t4nex parent for a T4 card).
+Loader tunables with the hw.cxgbe prefix apply to both T4 and T5 cards.
+The sysctl MIBs are at dev.t5nex and dev.cxl for T5 cards and at dev.t4nex and
+dev.cxgbe for T4 cards.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports 40Gb, 10Gb and 1Gb Ethernet adapters based on the T5 ASIC
+(ports will be named cxl):
+.Pp
+.Bl -bullet -compact
+.It
+Chelsio T580-CR
+.It
+Chelsio T580-LP-CR
+.It
+Chelsio T580-LP-SO-CR
+.It
+Chelsio T560-CR
+.It
+Chelsio T540-CR
+.It
+Chelsio T540-LP-CR
+.It
+Chelsio T522-CR
+.It
+Chelsio T520-LL-CR
+.It
+Chelsio T520-CR
+.It
+Chelsio T520-SO
+.It
+Chelsio T520-BT
+.It
+Chelsio T504-BT
+.El
+.Pp
+The
+.Nm
+driver supports 10Gb and 1Gb Ethernet adapters based on the T4 ASIC:
+.Pp
+.Bl -bullet -compact
+.It
+Chelsio T420-CR
+.It
+Chelsio T422-CR
+.It
+Chelsio T440-CR
+.It
+Chelsio T420-BCH
+.It
+Chelsio T440-BCH
+.It
+Chelsio T440-CH
+.It
+Chelsio T420-SO
+.It
+Chelsio T420-CX
+.It
+Chelsio T420-BT
+.It
+Chelsio T404-BT
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va hw.cxgbe.ntxq10g
+The number of tx queues to use for a 10Gb or 40Gb port.
+The default is 16 or the number
+of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.nrxq10g
+The number of rx queues to use for a 10Gb or 40Gb port.
+The default is 8 or the number
+of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.ntxq1g
+The number of tx queues to use for a 1Gb port.
+The default is 4 or the number
+of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.nrxq1g
+The number of rx queues to use for a 1Gb port.
+The default is 2 or the number
+of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.nofldtxq10g
+The number of TOE tx queues to use for a 10Gb or 40Gb port.
+The default is 8 or the
+number of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.nofldrxq10g
+The number of TOE rx queues to use for a 10Gb or 40Gb port.
+The default is 2 or the
+number of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.nofldtxq1g
+The number of TOE tx queues to use for a 1Gb port.
+The default is 2 or the
+number of CPU cores in the system, whichever is less.
+.It Va hw.cxgbe.nofldrxq1g
+The number of TOE rx queues to use for a 1Gb port.
+The default is 1.
+.It Va hw.cxgbe.holdoff_timer_idx_10G
+.It Va hw.cxgbe.holdoff_timer_idx_1G
+The timer index value to use to delay interrupts.
+The holdoff timer list has the values 1, 5, 10, 50, 100, and 200
+by default (all values are in microseconds) and the index selects a
+value from this list.
+The default value is 1 which means the timer value is 5us.
+Different interfaces can be assigned different values at any time via the
+dev.cxgbe.X.holdoff_tmr_idx or dev.cxl.X.holdoff_tmr_idx sysctl.
+.It Va hw.cxgbe.holdoff_pktc_idx_10G
+.It Va hw.cxgbe.holdoff_pktc_idx_1G
+The packet-count index value to use to delay interrupts.
+The packet-count list has the values 1, 8, 16, and 32 by default
+and the index selects a value from this list.
+The default value is -1 which means packet counting is disabled and interrupts
+are generated based solely on the holdoff timer value.
+Different interfaces can be assigned different values via the
+dev.cxgbe.X.holdoff_pktc_idx or dev.cxl.X.holdoff_pktc_idx sysctl.
+This sysctl works only when the interface has never been marked up (as done by
+ifconfig up).
+.It Va hw.cxgbe.qsize_txq
+The size, in number of entries, of the descriptor ring used for a tx
+queue.
+A buf_ring of the same size is also allocated for additional
+software queuing.
+See
+.Xr ifnet 9 .
+The default value is 1024.
+Different interfaces can be assigned different values via the
+dev.cxgbe.X.qsize_txq sysctl or dev.cxl.X.qsize_txq sysctl.
+This sysctl works only when the interface has never been marked up (as done by
+ifconfig up).
+.It Va hw.cxgbe.qsize_rxq
+The size, in number of entries, of the descriptor ring used for an
+rx queue.
+The default value is 1024.
+Different interfaces can be assigned different values via the
+dev.cxgbe.X.qsize_rxq or dev.cxl.X.qsize_rxq sysctl.
+This sysctl works only when the interface has never been marked up (as done by
+ifconfig up).
+.It Va hw.cxgbe.interrupt_types
+The interrupt types that the driver is allowed to use.
+Bit 0 represents INTx (line interrupts), bit 1 MSI, bit 2 MSI-X.
+The default is 7 (all allowed).
+The driver will select the best possible type out of the allowed types by
+itself.
+.It Va hw.cxgbe.fw_install
+0 prohibits the driver from installing a firmware on the card.
+1 allows the driver to install a new firmware if internal driver
+heuristics indicate that the new firmware is preferable to the one
+already on the card.
+2 instructs the driver to always install the new firmware on the card as
+long as it is compatible with the driver and is a different version than
+the one already on the card.
+The default is 1.
+.It Va hw.cxgbe.fl_pktshift
+The number of bytes of padding inserted before the begining of an Ethernet
+frame in the receive buffer.
+The default value of 2 ensures that the Ethernet payload (usually the IP header)
+is at a 4 byte aligned address.
+0-7 are all valid values.
+.It Va hw.cxgbe.fl_pad
+A non-zero value ensures that writes from the hardware to a receive buffer are
+padded up to the specified boundary.
+The default is -1 which lets the driver pick a pad boundary.
+0 disables trailer padding completely.
+.It Va hw.cxgbe.cong_drop
+Controls the hardware response to congestion.
+-1 disables congestion feedback and is not recommended.
+0 instructs the hardware to backpressure its pipeline on congestion.
+This usually results in the port emitting pause frames.
+1 instructs the hardware to drop frames destined for congested queues.
+.It Va hw.cxgbe.buffer_packing
+Allow the hardware to deliver multiple frames in the same receive buffer
+opportunistically.
+The default is -1 which lets the driver decide.
+0 or 1 explicitly disable or enable this feature.
+.It Va hw.cxgbe.allow_mbufs_in_cluster
+1 allows the driver to lay down one or more mbufs within the receive buffer
+opportunistically. This is the default.
+0 prohibits the driver from doing so.
+.It Va hw.cxgbe.largest_rx_cluster
+.It Va hw.cxgbe.safest_rx_cluster
+Sizes of rx clusters. Each of these must be set to one of the sizes available
+(usually 2048, 4096, 9216, and 16384) and largest_rx_cluster must be greater
+than or equal to safest_rx_cluster.
+The defaults are 16384 and 4096 respectively.
+The driver will never attempt to allocate a receive buffer larger than
+largest_rx_cluster and will fall back to allocating buffers of
+safest_rx_cluster size if an allocation larger than safest_rx_cluster fails.
+Note that largest_rx_cluster merely establishes a ceiling -- the driver is
+allowed to allocate buffers of smaller sizes.
+.It Va hw.cxgbe.config_file
+Select a pre-packaged device configuration file.
+A configuration file contains a recipe for partitioning and configuring the
+hardware resources on the card.
+This tunable is for specialized applications only and should not be used in
+normal operation.
+The configuration profile currently in use is available in the dev.t4nex.X.cf
+and dev.t4nex.X.cfcsum (dev.t5nex for T5 cards) sysctls.
+.It Va hw.cxgbe.linkcaps_allowed
+.It Va hw.cxgbe.niccaps_allowed
+.It Va hw.cxgbe.toecaps_allowed
+.It Va hw.cxgbe.rdmacaps_allowed
+.It Va hw.cxgbe.iscsicaps_allowed
+.It Va hw.cxgbe.fcoecaps_allowed
+Disallowing capabilities provides a hint to the driver and firmware to not
+reserve hardware resources for that feature.
+Each of these is a bit field with a bit for each sub-capability within the
+capability.
+This tunable is for specialized applications only and should not be used in
+normal operation.
+The capabilities for which hardware resources have been reserved are listed in
+dev.t4nex.X.*caps or dev.t5nex.X.*caps sysctls.
+.El
+.Sh SUPPORT
+For general information and support,
+go to the Chelsio support website at:
+.Pa http://www.chelsio.com/ .
+.Pp
+If an issue is identified with this driver with a supported adapter,
+email all the specific information related to the issue to
+.Aq support@chelsio.com .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr cxgb 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 9.0 .
+Support for T5 cards first appeared in
+.Fx 9.2
+and
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Navdeep Parhar Aq np@FreeBSD.org .
diff --git a/share/man/man4/cy.4 b/share/man/man4/cy.4
new file mode 100644
index 0000000..c0c8072
--- /dev/null
+++ b/share/man/man4/cy.4
@@ -0,0 +1,257 @@
+.\" Copyright (c) 1990, 1991 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" the Systems Programming Group of the University of Utah Computer
+.\" Science Department.
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" from: @(#)dca.4 5.2 (Berkeley) 3/27/91
+.\" from: com.4,v 1.1 1993/08/06 11:19:07 cgd Exp
+.\" from: sio.4,v 1.16 1995/06/26 06:05:30 bde Exp $
+.\" $FreeBSD$
+.\"
+.Dd May 24, 2004
+.Dt CY 4
+.Os
+.Sh NAME
+.Nm cy
+.Nd Cyclades Cyclom-Y serial driver
+.Sh SYNOPSIS
+For one ISA card:
+.Bd -ragged -offset indent -compact
+.Cd "device cy"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.cy.0.at="isa"
+.Cd hint.cy.0.irq="10"
+.Cd hint.cy.0.maddr="0xd4000"
+.Cd hint.cy.0.msize="0x2000"
+.Ed
+.Pp
+For two ISA cards:
+.Bd -ragged -offset indent -compact
+.Cd "device cy"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.cy.0.at="isa"
+.Cd hint.cy.0.irq="10"
+.Cd hint.cy.0.maddr="0xd4000"
+.Cd hint.cy.0.msize="0x2000"
+.Cd hint.cy.1.at="isa"
+.Cd hint.cy.1.irq="11"
+.Cd hint.cy.1.maddr="0xd6000"
+.Cd hint.cy.1.msize="0x2000"
+.Ed
+.Pp
+For PCI cards:
+.Bd -ragged -offset indent -compact
+.Cd "device cy"
+.Cd "options CY_PCI_FASTINTR"
+.Pp
+No lines are required in
+.Pa /boot/device.hints
+for PCI cards.
+.Ed
+.Pp
+Minor numbering:
+.Bd -literal -offset indent -compact
+0b\fIMMMMMMMMMMMMMMMMxxxxxxxxOLIMMMMM\fR
+ call\fBO\fRut
+ \fBL\fRock
+ \fBI\fRnitial
+ \fBMMMMMMMMMMMMMMMM MMMMMM\fRinor
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Cirrus Logic CD1400-based
+.Tn EIA
+.Tn RS-232C
+.Pf ( Tn CCITT
+.Tn V.24 )
+communications interfaces (ports) on Cyclades Cyclom-Y boards.
+Each CD1400 provides 4 ports.
+Cyclom-Y boards with various numbers of CD1400's are available.
+This driver supports up to 8 CD1400's (32 ports) per board.
+.Pp
+Input and output for each line may set independently
+to the following speeds:
+50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600,
+19200, 38400, 57600, or 115200 bps.
+Other speeds of up to 150000 are supported by the termios interface
+but not by the sgttyb compatibility interface.
+The CD1400 is not fast enough to handle speeds above 115200 bps
+effectively.
+It can transmit on a single line at slightly more than 115200 bps,
+but when 4 lines are active in both directions its limit is about
+90000 bps on each line.
+.\" XXX the following should be true for all serial drivers and
+.\" should not be repeated in the man pages for all serial drivers.
+.\" It was copied from sio.4. The only change was s/sio/cy/g.
+.Pp
+Serial ports controlled by the
+.Nm
+driver can be used for both `callin' and `callout'.
+For each port there is a callin device and a callout device.
+The minor number of the callout device is 128 higher
+than that of the corresponding callin port.
+The callin device is general purpose.
+Processes opening it normally wait for carrier
+and for the callout device to become inactive.
+The callout device is used to steal the port from
+processes waiting for carrier on the callin device.
+Processes opening it do not wait for carrier
+and put any processes waiting for carrier on the callin device into
+a deeper sleep so that they do not conflict with the callout session.
+The callout device is abused for handling programs that are supposed
+to work on general ports and need to open the port without waiting
+but are too stupid to do so.
+.Pp
+The
+.Nm
+driver also supports an initial-state and a lock-state control
+device for each of the callin and the callout "data" devices.
+The minor number of the initial-state device is 32 higher
+than that of the corresponding data device.
+The minor number of the lock-state device is 64 higher
+than that of the corresponding data device.
+The termios settings of a data device are copied
+from those of the corresponding initial-state device
+on first opens and are not inherited from previous opens.
+Use
+.Xr stty 1
+in the normal way on the initial-state devices to program
+initial termios states suitable for your setup.
+.Pp
+The lock termios state acts as flags to disable changing
+the termios state.
+E.g., to lock a flag variable such as
+CRTSCTS, use
+.Em "stty crtscts"
+on the lock-state device.
+Speeds and special characters
+may be locked by setting the corresponding value in the lock-state
+device to any nonzero value.
+.Pp
+Correct programs talking to correctly wired external devices
+work with almost arbitrary initial states and almost no locking,
+but other setups may benefit from changing some of the default
+initial state and locking the state.
+In particular, the initial states for non (POSIX) standard flags
+should be set to suit the devices attached and may need to be
+locked to prevent buggy programs from changing them.
+E.g., CRTSCTS should be locked on for devices that support
+RTS/CTS handshaking at all times and off for devices that do not
+support it at all.
+CLOCAL should be locked on for devices
+that do not support carrier.
+HUPCL may be locked off if you do not
+want to hang up for some reason.
+In general, very bad things happen
+if something is locked to the wrong state, and things should not
+be locked for devices that support more than one setting.
+The
+CLOCAL flag on callin ports should be locked off for logins
+to avoid certain security holes, but this needs to be done by
+getty if the callin port is used for anything else.
+.Ss Kernel Configuration Options
+The
+.Em CY_PCI_FASTINTR
+option should be used to avoid suboptimal interrupt handling for
+PCI Cyclades boards.
+The PCI BIOS must be configured with the
+.Nm
+interrupt not shared with any other active device
+for this option to work.
+This option is not the default because it is currently harmful in
+certain cases where it does not work.
+.Sh FILES
+.\" XXX more cloning: s/d/c/g and add a ? for the card number.
+.Bl -tag -width /dev/ttyic?? -compact
+.It Pa /dev/ttyc??
+for callin ports
+.It Pa /dev/ttyic??
+.It Pa /dev/ttylc??
+corresponding callin initial-state and lock-state devices
+.Pp
+.\" XXX more cloning: s/a/c/g. No consistency :-(.
+.It Pa /dev/cuac??
+for callout ports
+.It Pa /dev/cuaic??
+.It Pa /dev/cualc??
+corresponding callout initial-state and lock-state devices
+.El
+.Pp
+.Bl -tag -width /etc/rc.serial -compact
+.It Pa /etc/rc.serial
+examples of setting the initial-state and lock-state devices
+.El
+.Pp
+The first question mark in these device names is short for the
+card number
+(a decimal number between 0 and 65535 inclusive).
+The second question mark is short for the port number
+(a letter in the range [0-9a-v]).
+.Sh DIAGNOSTICS
+.Bl -diag
+.\" XXX back to s/sio/cy/g.
+.It cy%d: silo overflow.
+Problem in the interrupt handler.
+.El
+.Bl -diag
+.It cy%d: interrupt-level buffer overflow.
+Problem in the bottom half of the driver.
+.El
+.Bl -diag
+.It cy%d: tty-level buffer overflow.
+Problem in the application.
+Input has arrived faster than the given module could process it
+and some has been lost.
+.El
+.\" .Bl -diag
+.\" .It sio%d: reduced fifo trigger level to %d.
+.\" Attempting to avoid further silo overflows.
+.\" .El
+.Sh SEE ALSO
+.Xr stty 1 ,
+.Xr termios 4 ,
+.Xr tty 4 ,
+.Xr comcontrol 8 ,
+.Xr pstat 8
+.Sh HISTORY
+The
+.Nm
+driver is derived from the
+.Nm sio
+driver and the
+.Nx
+.Nm
+driver and is
+.Ud
+.Sh BUGS
+Serial consoles are not implemented.
diff --git a/share/man/man4/da.4 b/share/man/man4/da.4
new file mode 100644
index 0000000..39e1dba
--- /dev/null
+++ b/share/man/man4/da.4
@@ -0,0 +1,217 @@
+.\" Copyright (c) 1996
+.\" Julian Elischer <julian@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 8, 2012
+.Dt DA 4
+.Os
+.Sh NAME
+.Nm da
+.Nd SCSI Direct Access device driver
+.Sh SYNOPSIS
+.Cd device da
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for all
+.Tn SCSI
+devices of the direct access class that are attached to the system
+through a supported
+.Tn SCSI
+Host Adapter.
+The direct access class includes disk, magneto-optical,
+and solid-state devices.
+.Pp
+A
+.Tn SCSI
+Host
+adapter must also be separately configured into the system
+before a
+.Tn SCSI
+direct access device can be configured.
+.Sh CACHE EFFECTS
+Many direct access devices are equipped with read and/or write caches.
+Parameters affecting the device's cache are stored in mode page 8,
+the caching control page.
+Mode pages can be examined and modified via the
+.Xr camcontrol 8
+utility.
+.Pp
+The read cache is used to store data from device-initiated read ahead
+operations as well as frequently used data.
+The read cache is transparent
+to the user and can be enabled without any adverse effect.
+Most devices
+with a read cache come from the factory with it enabled.
+The read cache can be disabled by setting the
+.Tn RCD
+(Read Cache Disable) bit in the caching control mode page.
+.Pp
+The write cache can greatly decrease the latency of write operations
+and allows the device to reorganize writes to increase efficiency and
+performance.
+This performance gain comes at a price.
+Should the device
+lose power while its cache contains uncommitted write operations, these
+writes will be lost.
+The effect of a loss of write transactions on
+a file system is non-deterministic and can cause corruption.
+Most
+devices age write transactions to limit vulnerability to a few transactions
+recently reported as complete, but it is none-the-less recommended that
+systems with write cache enabled devices reside on an Uninterruptible
+Power Supply (UPS).
+The
+.Nm
+device driver ensures that the cache and media are synchronized upon
+final close of the device or an unexpected shutdown (panic) event.
+This ensures that it is safe to disconnect power once the operating system
+has reported that it has halted.
+The write cache can be enabled by setting the
+.Tn WCE
+(Write Cache Enable) bit in the caching control mode page.
+.Sh TAGGED QUEUING
+The
+.Nm
+device driver will take full advantage of the SCSI feature known as tagged
+queueing.
+Tagged queueing allows the device to process multiple transactions
+concurrently, often re-ordering them to reduce the number and length of
+seeks.
+To ensure that transactions to distant portions of the media,
+which may be deferred indefinitely by servicing requests nearer the current
+head position, are completed in a timely fashion, an ordered tagged
+transaction is sent every 15 seconds during continuous device operation.
+.Sh BAD BLOCK RECOVERY
+Direct Access devices have the capability of mapping out portions of
+defective media.
+Media recovery parameters are located in mode page 1,
+the Read-Write Error Recovery mode page.
+The most important media
+remapping features are 'Auto Write Reallocation' and 'Auto Read
+Reallocation' which can be enabled via the AWRE and ARRE bits,
+respectively, of the Read-Write Error Recovery page.
+Many devices do not ship from the factory with these feature enabled.
+Mode pages can be examined and modified
+via the
+.Xr camcontrol 8
+utility.
+.Sh KERNEL CONFIGURATION
+It is only necessary to explicitly configure one
+.Nm
+device; data structures are dynamically allocated as disks are found
+on the
+.Tn SCSI
+bus.
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width 12
+.It kern.cam.da.retry_count
+.Pp
+This variable determines how many times the
+.Nm
+driver will retry a READ or WRITE command.
+This does not affect the number of retries used during probe time or for
+the
+.Nm
+driver dump routine.
+This value currently defaults to 4.
+.It kern.cam.da.default_timeout
+.Pp
+This variable determines how long the
+.Nm
+driver will wait before timing out an outstanding command.
+The units for this value are seconds, and the default is currently 60
+seconds.
+.It kern.cam.da.%d.minimum_cmd_size
+.Pp
+This variable determines what the minimum READ/WRITE CDB size is for a
+given
+.Nm
+unit.
+(The %d above denotes the unit number of the
+.Nm
+driver instance, e.g.\& 1, 2, 4, 8, etc.)
+Valid minimum command size values are 6, 10, 12 and 16 bytes.
+The default is 6 bytes.
+.Pp
+The
+.Nm
+driver issues a CAM Path Inquiry CCB at probe time to determine whether the
+protocol the device in question speaks (e.g.\& ATAPI) typically does not allow
+6 byte commands.
+If it does not, the
+.Nm
+driver will default to using at least 10 byte CDBs.
+If a 6 byte READ or WRITE fails with an ILLEGAL REQUEST error, the
+.Nm
+driver will then increase the default CDB size for the device to 10 bytes and
+retry the command.
+CDB size is always
+chosen as the smallest READ/WRITE CDB that will satisfy the specified minimum
+command size, and the LBA and length of the READ or WRITE in question.
+(e.g., a write to an LBA larger than 2^32 will require a 16 byte CDB.)
+.El
+.Sh NOTES
+If a device becomes invalidated (media is removed, device becomes unresponsive)
+the disklabel and information held within the kernel about the device will
+be invalidated.
+To avoid corruption of a newly inserted piece of media or
+a replacement device, all accesses to the device will be discarded until
+the last file descriptor referencing the old device is closed.
+During this period, all new open attempts will be rejected.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/da*" -compact
+.It Pa /dev/da*
+SCSI disk device nodes
+.El
+.Sh DIAGNOSTICS
+None.
+.Sh SEE ALSO
+.Xr ada 4 ,
+.Xr cam 4 ,
+.Xr geom 4 ,
+.Xr bsdlabel 8 ,
+.Xr fdisk 8
+.Sh HISTORY
+The
+.Nm
+driver was written for the
+.Tn CAM
+.Tn SCSI
+subsystem by
+.An Justin T. Gibbs .
+Many ideas were gleaned from the
+.Nm sd
+device driver written and ported from
+.Tn Mach
+2.5
+by
+.An Julian Elischer .
diff --git a/share/man/man4/dc.4 b/share/man/man4/dc.4
new file mode 100644
index 0000000..cc6250c
--- /dev/null
+++ b/share/man/man4/dc.4
@@ -0,0 +1,450 @@
+.\" Copyright (c) 1997, 1998, 1999
+.\" Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 24, 2011
+.Dt DC 4
+.Os
+.Sh NAME
+.Nm dc
+.Nd "DEC/Intel 21143 and clone 10/100 Ethernet driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device dc"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_dc_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for several PCI Fast Ethernet adapters and
+embedded controllers based on the DEC/Intel 21143 chipset and clones.
+.Pp
+All of supported chipsets have the same general register layout, DMA
+descriptor format and method of operation.
+All of the clone chips
+are based on the 21143 design with various modifications.
+The
+21143 itself has support for 10baseT, BNC, AUI, MII and symbol
+media attachments, 10 and 100Mbps speeds in full or half duplex,
+built in NWAY autonegotiation and wake on LAN.
+The 21143 also
+offers several receive filter programming options including
+perfect filtering, inverse perfect filtering and hash table
+filtering.
+.Pp
+Some clone chips duplicate the 21143 fairly closely while others
+only maintain superficial similarities.
+Some support only MII
+media attachments.
+Others use different receiver filter programming
+mechanisms.
+At least one supports only chained DMA descriptors
+(most support both chained descriptors and contiguously allocated
+fixed size rings).
+Some chips (especially the PNIC) also have
+peculiar bugs.
+The
+.Nm
+driver does its best to provide generalized support for all
+of these chipsets in order to keep special case code to a minimum.
+.Pp
+These chips are used by many vendors which makes it
+difficult to provide a complete list of all supported cards.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to the
+.Pa /etc/rc.conf
+file.
+.Pp
+Note: the built-in NWAY autonegotiation on the original PNIC 82c168
+chip is horribly broken and is not supported by the
+.Nm
+driver at this time (see the
+.Sx BUGS
+section for details).
+The original 82c168 appears
+on very early revisions of the LinkSys LNE100TX and Matrox FastNIC.
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+The
+.Cm mediaopt
+option can also be used to enable
+.Cm full-duplex
+operation.
+Not specifying
+.Cm full-duplex
+implies
+.Cm half-duplex
+mode.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Cm mediaopt
+option can also be used to enable
+.Cm full-duplex
+operation.
+Not specifying
+.Cm full-duplex
+implies
+.Cm half-duplex
+mode.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+The interface will operate in
+half duplex mode if this media option is not specified.
+.El
+.Pp
+Note that the 100baseTX media type may not be available on certain
+Intel 21143 adapters which support 10Mbps media attachments only.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver provides support for the following chipsets:
+.Pp
+.Bl -bullet -compact
+.It
+DEC/Intel 21143
+.It
+ADMtek AL981 Comet, AN985 Centaur, ADM9511 Centaur II and ADM9513
+Centaur II
+.It
+ALi/ULi M5261 and M5263
+.It
+ASIX Electronics AX88140A and AX88141
+.It
+Conexant LANfinity RS7112 (miniPCI)
+.It
+Davicom DM9009, DM9100, DM9102 and DM9102A
+.It
+Lite-On 82c168 and 82c169 PNIC
+.It
+Lite-On/Macronix 82c115 PNIC II
+.It
+Macronix 98713, 98713A, 98715, 98715A, 98715AEC-C, 98725, 98727 and 98732
+.It
+Xircom X3201 (cardbus only)
+.El
+.Pp
+The
+following NICs are known to work with the
+.Nm
+driver at this time:
+.Pp
+.Bl -bullet -compact
+.It
+3Com OfficeConnect 10/100B (ADMtek AN985 Centaur-P)
+.It
+Abocom FE2500
+.It
+Accton EN1217 (98715A)
+.It
+Accton EN2242 MiniPCI
+.It
+Adico AE310TX (98715A)
+.It
+Alfa Inc GFC2204 (ASIX AX88140A)
+.It
+Built in 10Mbps only Ethernet on Compaq Presario 7900 series
+desktops (21143, non-MII)
+.It
+Built in Sun DMFE 10/100 Mbps Ethernet on Sun Netra X1 and Sun Fire V100
+(DM9102A, MII)
+.It
+Built in Ethernet on LinkSys EtherFast 10/100 Instant GigaDrive (DM9102, MII)
+.It
+CNet Pro110B (ASIX AX88140A)
+.It
+CNet Pro120A (98715A or 98713A) and CNet Pro120B (98715)
+.It
+Compex RL100-TX (98713 or 98713A)
+.It
+D-Link DFE-570TX (21143, MII, quad port)
+.It
+Digital DE500-BA 10/100 (21143, non-MII)
+.It
+ELECOM Laneed LD-CBL/TXA (ADMtek AN985)
+.It
+Hawking CB102 CardBus
+.It
+IBM EtherJet Cardbus Adapter
+.It
+Intel PRO/100 Mobile Cardbus (versions that use the X3201 chipset)
+.It
+Jaton XpressNet (Davicom DM9102)
+.It
+Kingston KNE100TX (21143, MII)
+.It
+Kingston KNE110TX (PNIC 82c169)
+.It
+LinkSys LNE100TX (PNIC 82c168, 82c169)
+.It
+LinkSys LNE100TX v2.0 (PNIC II 82c115)
+.It
+LinkSys LNE100TX v4.0/4.1 (ADMtek AN985 Centaur-P)
+.It
+Matrox FastNIC 10/100 (PNIC 82c168, 82c169)
+.It
+Melco LGY-PCI-TXL
+.It
+Microsoft MN-120 10/100 CardBus (ADMTek Centaur-C)
+.It
+Microsoft MN-130 10/100 PCI (ADMTek Centaur-P)
+.It
+NDC SOHOware SFA110A (98713A)
+.It
+NDC SOHOware SFA110A Rev B4 (98715AEC-C)
+.It
+NetGear FA310-TX Rev.\& D1, D2 or D3 (PNIC 82c169)
+.It
+Netgear FA511
+.It
+PlaneX FNW-3602-T (ADMtek AN985)
+.It
+SMC EZ Card 10/100 1233A-TX (ADMtek AN985)
+.It
+SVEC PN102-TX (98713)
+.It
+Xircom Cardbus Realport
+.It
+Xircom Cardbus Ethernet 10/100
+.It
+Xircom Cardbus Ethernet II 10/100
+.El
+.Sh NOTES
+On sparc64 the
+.Nm
+driver respects the
+.Va local-mac-address?
+system configuration variable for the built in Sun DMFE 10/100 Mbps Ethernet
+interfaces on Sun Netra X1 and Sun Fire V100.
+This system configuration variable can be set in the Open Firmware boot
+monitor using the
+.Ic setenv
+command or by
+.Xr eeprom 8 .
+If set to
+.Dq Li false
+(the default), the
+.Nm
+driver will use the system's default MAC address for both of the built in
+devices.
+If set to
+.Dq Li true ,
+the unique MAC address of each interface is used rather than the system's
+default MAC address.
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "dc%d: couldn't map ports/memory"
+A fatal initialization error has occurred.
+.It "dc%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "dc%d: watchdog timeout"
+A packet was queued for transmission and a transmit command was
+issued, but the device failed to acknowledge the transmission
+before a timeout expired.
+This can happen if the device is unable
+to deliver interrupts for some reason, of if there is a problem with
+the network connection (cable or network equipment) that results in a loss
+of link.
+.It "dc%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.It "dc%d: TX underrun -- increasing TX threshold"
+The device generated a transmit underrun error while attempting to
+DMA and transmit a packet.
+This happens if the host is not able to
+DMA the packet data into the NIC's FIFO fast enough.
+The driver
+will dynamically increase the transmit start threshold so that
+more data must be DMAed into the FIFO before the NIC will start
+transmitting it onto the wire.
+.It "dc%d: TX underrun -- using store and forward mode"
+The device continued to generate transmit underruns even after all
+possible transmit start threshold settings had been tried, so the
+driver programmed the chip for store and forward mode.
+In this mode,
+the NIC will not begin transmission until the entire packet has been
+transferred into its FIFO memory.
+.It "dc%d: chip is in D3 power state -- setting to D0"
+This message applies only to adapters which support power
+management.
+Some operating systems place the controller in low power
+mode when shutting down, and some PCI BIOSes fail to bring the chip
+out of this state before configuring it.
+The controller loses all of
+its PCI configuration in the D3 state, so if the BIOS does not set
+it back to full power mode in time, it will not be able to configure it
+correctly.
+The driver tries to detect this condition and bring
+the adapter back to the D0 (full power) state, but this may not be
+enough to return the driver to a fully operational condition.
+If
+you see this message at boot time and the driver fails to attach
+the device as a network interface, you will have to perform a second
+warm boot to have the device properly configured.
+.Pp
+Note that this condition only occurs when warm booting from another
+operating system.
+If you power down your system prior to booting
+.Fx ,
+the card should be configured correctly.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr eeprom 8 ,
+.Xr ifconfig 8
+.Rs
+.%T ADMtek AL981, AL983 and AL985 data sheets
+.%U http://www.admtek.com.tw
+.Re
+.Rs
+.%T ASIX Electronics AX88140A and AX88141 data sheets
+.%U http://www.asix.com.tw
+.Re
+.Rs
+.%T Davicom DM9102 data sheet
+.%U http://www.davicom.com.tw/userfile/24247/DM9102H-DS-F01-021508.pdf
+.Re
+.Rs
+.%T Intel 21143 Hardware Reference Manual
+.%U http://developer.intel.com
+.Re
+.Rs
+.%T Macronix 98713/A, 98715/A and 98725 data sheets
+.%U http://www.macronix.com
+.Re
+.Rs
+.%T Macronix 98713/A and 98715/A app notes
+.%U http://www.macronix.com
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ee.columbia.edu .
+.Sh BUGS
+The Macronix application notes claim that in order to put the
+chips in normal operation, the driver must write a certain magic
+number into the CSR16 register.
+The numbers are documented in
+the app notes, but the exact meaning of the bits is not.
+.Pp
+The 98713A seems to have a problem with 10Mbps full duplex mode.
+The transmitter works but the receiver tends to produce many
+unexplained errors leading to very poor overall performance.
+The
+98715A does not exhibit this problem.
+All other modes on the
+98713A seem to work correctly.
+.Pp
+The original 82c168 PNIC chip has built in NWAY support which is
+used on certain early LinkSys LNE100TX and Matrox FastNIC cards,
+however it is horribly broken and difficult to use reliably.
+Consequently, autonegotiation is not currently supported for this
+chipset: the driver defaults the NIC to 10baseT half duplex, and it is
+up to the operator to manually select a different mode if necessary.
+(Later cards use an external MII transceiver to implement NWAY
+autonegotiation and work correctly.)
+.Pp
+The
+.Nm
+driver programs 82c168 and 82c169 PNIC chips to use the store and
+forward setting for the transmit start threshold by default.
+This
+is to work around problems with some NIC/PCI bus combinations where
+the PNIC can transmit corrupt frames when operating at 100Mbps,
+probably due to PCI DMA burst transfer errors.
+.Pp
+The 82c168 and 82c169 PNIC chips also have a receiver bug that
+sometimes manifests during periods of heavy receive and transmit
+activity, where the chip will improperly DMA received frames to
+the host.
+The chips appear to upload several kilobytes of garbage
+data along with the received frame data, dirtying several RX buffers
+instead of just the expected one.
+The
+.Nm
+driver detects this condition and will salvage the frame; however,
+it incurs a serious performance penalty in the process.
+.Pp
+The PNIC chips also sometimes generate a transmit underrun error when
+the driver attempts to download the receiver filter setup frame, which
+can result in the receive filter being incorrectly programmed.
+The
+.Nm
+driver will watch for this condition and requeue the setup frame until
+it is transferred successfully.
+.Pp
+The ADMtek AL981 chip (and possibly the AN985 as well) has been observed
+to sometimes wedge on transmit: this appears to happen when the driver
+queues a sequence of frames which cause it to wrap from the end of the
+transmit descriptor ring back to the beginning.
+The
+.Nm
+driver attempts to avoid this condition by not queuing any frames past
+the end of the transmit ring during a single invocation of the
+.Fn dc_start
+routine.
+This workaround has a negligible impact on transmit performance.
diff --git a/share/man/man4/dcons.4 b/share/man/man4/dcons.4
new file mode 100644
index 0000000..91bb4b4
--- /dev/null
+++ b/share/man/man4/dcons.4
@@ -0,0 +1,125 @@
+.\" Copyright (c) 2003 Hidetoshi Shimokawa
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 26, 2008
+.Dt DCONS 4
+.Os
+.Sh NAME
+.Nm dcons
+.Nd dumb console device driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options GDB"
+.Cd "device firewire"
+.Cd "device dcons"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time,
+place the following line in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options GDB"
+.Ed
+.Pp
+and in
+.Xr loader.conf 5 :
+.Bd -ragged -offset indent
+dcons_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device is a simple console device which just reads from and writes to
+an allocated buffer for input and output respectively.
+It is of no use by itself and it is supposed that the buffer is accessed
+via a bus like
+.Xr firewire 4
+or
+.Xr kvm 3
+for interaction.
+.Pp
+The buffer consists of 4 channels.
+There are 2 ports, one for the console TTY and another is GDB port,
+then each port has an input channel and an output channel.
+.Sh FILES
+.Bl -tag -width indent -compact
+.It Pa /dev/dcons
+.It Pa /etc/ttys
+.El
+.Sh EXAMPLES
+If you want to run
+.Xr getty 8
+on
+.Nm ,
+insert the following line into
+.Xr ttys 5
+and send a
+.Dv HUP
+signal to
+.Xr init 8
+using
+.Xr kill 1 .
+.Bd -literal -offset indent
+dcons "/usr/libexec/getty std.9600" vt100 on secure
+.Ed
+.Pp
+Once the
+.Xr fwohci 4
+device is initialized to allow physical access,
+the buffer can be accessed from another host via a
+.Xr firewire 4
+bus using the
+.Xr dconschat 8
+application.
+See
+.Xr dconschat 8
+for more details.
+.Pp
+If you want to use
+.Xr dcons 4
+as a
+.Xr gdb 1
+port, add the following line into
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dcons_gdb="1"
+.Ed
+.Sh SEE ALSO
+.Xr dcons_crom 4 ,
+.Xr ddb 4 ,
+.Xr firewire 4 ,
+.Xr fwohci 4 ,
+.Xr gdb 4 ,
+.Xr ttys 5 ,
+.Xr conscontrol 8 ,
+.Xr dconschat 8 ,
+.Xr fwcontrol 8
+.Sh AUTHORS
+.An Hidetoshi Shimokawa Aq simokawa@FreeBSD.org
+.Sh BUGS
+This driver is
+.Ud
diff --git a/share/man/man4/dcons_crom.4 b/share/man/man4/dcons_crom.4
new file mode 100644
index 0000000..b9c5ca0
--- /dev/null
+++ b/share/man/man4/dcons_crom.4
@@ -0,0 +1,61 @@
+.\" Copyright (c) 2003 Hidetoshi Shimokawa
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 16, 2003
+.Dt DCONS_CROM 4
+.Os
+.Sh NAME
+.Nm dcons_crom
+.Nd Configuration ROM stub for
+.Xr dcons 4
+.Sh SYNOPSIS
+.Cd device dcons_crom
+.Cd device dcons
+.Cd device firewire
+.Sh DESCRIPTION
+The
+.Nm
+exposes the buffer address of
+.Xr dcons 4
+through the Configuration ROM of
+.Xr firewire 4 .
+This address is supposed to be used by
+.Xr dconschat 8 .
+.Sh SEE ALSO
+.Xr dcons 4 ,
+.Xr firewire 4 ,
+.Xr fwohci 4 ,
+.Xr dconschat 8 ,
+.Xr fwcontrol 8
+.Sh AUTHORS
+.An Hidetoshi Shimokawa Aq simokawa@FreeBSD.org
+.Sh BUGS
+If you load
+.Pa dcons_crom.ko
+manually after the system is booted, you may
+have to initiate a bus reset using
+.Dq Nm fwcontrol Fl r
+to update the Configuration ROM.
diff --git a/share/man/man4/ddb.4 b/share/man/man4/ddb.4
new file mode 100644
index 0000000..01f5135
--- /dev/null
+++ b/share/man/man4/ddb.4
@@ -0,0 +1,1468 @@
+.\"
+.\" Mach Operating System
+.\" Copyright (c) 1991,1990 Carnegie Mellon University
+.\" Copyright (c) 2007 Robert N. M. Watson
+.\" All Rights Reserved.
+.\"
+.\" Permission to use, copy, modify and distribute this software and its
+.\" documentation is hereby granted, provided that both the copyright
+.\" notice and this permission notice appear in all copies of the
+.\" software, derivative works or modified versions, and any portions
+.\" thereof, and that both notices appear in supporting documentation.
+.\"
+.\" CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+.\" CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+.\" ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+.\"
+.\" Carnegie Mellon requests users of this software to return to
+.\"
+.\" Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+.\" School of Computer Science
+.\" Carnegie Mellon University
+.\" Pittsburgh PA 15213-3890
+.\"
+.\" any improvements or extensions that they make and grant Carnegie Mellon
+.\" the rights to redistribute these changes.
+.\"
+.\" changed a \# to #, since groff choked on it.
+.\"
+.\" HISTORY
+.\" ddb.4,v
+.\" Revision 1.1 1993/07/15 18:41:02 brezak
+.\" Man page for DDB
+.\"
+.\" Revision 2.6 92/04/08 08:52:57 rpd
+.\" Changes from OSF.
+.\" [92/01/17 14:19:22 jsb]
+.\" Changes for OSF debugger modifications.
+.\" [91/12/12 tak]
+.\"
+.\" Revision 2.5 91/06/25 13:50:22 rpd
+.\" Added some watchpoint explanation.
+.\" [91/06/25 rpd]
+.\"
+.\" Revision 2.4 91/06/17 15:47:31 jsb
+.\" Added documentation for continue/c, match, search, and watchpoints.
+.\" I've not actually explained what a watchpoint is; maybe Rich can
+.\" do that (hint, hint).
+.\" [91/06/17 10:58:08 jsb]
+.\"
+.\" Revision 2.3 91/05/14 17:04:23 mrt
+.\" Correcting copyright
+.\"
+.\" Revision 2.2 91/02/14 14:10:06 mrt
+.\" Changed to new Mach copyright
+.\" [91/02/12 18:10:12 mrt]
+.\"
+.\" Revision 2.2 90/08/30 14:23:15 dbg
+.\" Created.
+.\" [90/08/30 dbg]
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 30, 2013
+.Dt DDB 4
+.Os
+.Sh NAME
+.Nm ddb
+.Nd interactive kernel debugger
+.Sh SYNOPSIS
+In order to enable kernel debugging facilities include:
+.Bd -ragged -offset indent
+.Cd options KDB
+.Cd options DDB
+.Ed
+.Pp
+To prevent activation of the debugger on kernel
+.Xr panic 9 :
+.Bd -ragged -offset indent
+.Cd options KDB_UNATTENDED
+.Ed
+.Pp
+In order to print a stack trace of the current thread on the console
+for a panic:
+.Bd -ragged -offset indent
+.Cd options KDB_TRACE
+.Ed
+.Pp
+To print the numerical value of symbols in addition to the symbolic
+representation, define:
+.Bd -ragged -offset indent
+.Cd options DDB_NUMSYM
+.Ed
+.Pp
+To enable the
+.Xr gdb 1
+backend, so that remote debugging with
+.Xr kgdb 1
+is possible, include:
+.Bd -ragged -offset indent
+.Cd options GDB
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+kernel debugger is an interactive debugger with a syntax inspired by
+.Xr gdb 1 .
+If linked into the running kernel,
+it can be invoked locally with the
+.Ql debug
+.Xr keymap 5
+action.
+The debugger is also invoked on kernel
+.Xr panic 9
+if the
+.Va debug.debugger_on_panic
+.Xr sysctl 8
+MIB variable is set non-zero,
+which is the default
+unless the
+.Dv KDB_UNATTENDED
+option is specified.
+.Pp
+The current location is called
+.Va dot .
+The
+.Va dot
+is displayed with
+a hexadecimal format at a prompt.
+The commands
+.Ic examine
+and
+.Ic write
+update
+.Va dot
+to the address of the last line
+examined or the last location modified, and set
+.Va next
+to the address of
+the next location to be examined or changed.
+Other commands do not change
+.Va dot ,
+and set
+.Va next
+to be the same as
+.Va dot .
+.Pp
+The general command syntax is:
+.Ar command Ns Op Li / Ns Ar modifier
+.Ar address Ns Op Li , Ns Ar count
+.Pp
+A blank line repeats the previous command from the address
+.Va next
+with
+count 1 and no modifiers.
+Specifying
+.Ar address
+sets
+.Va dot
+to the address.
+Omitting
+.Ar address
+uses
+.Va dot .
+A missing
+.Ar count
+is taken
+to be 1 for printing commands or infinity for stack traces.
+.Pp
+The
+.Nm
+debugger has a pager feature (like the
+.Xr more 1
+command)
+for the output.
+If an output line exceeds the number set in the
+.Va lines
+variable, it displays
+.Dq Li --More--
+and waits for a response.
+The valid responses for it are:
+.Pp
+.Bl -tag -compact -width ".Li SPC"
+.It Li SPC
+one more page
+.It Li RET
+one more line
+.It Li q
+abort the current command, and return to the command input mode
+.El
+.Pp
+Finally,
+.Nm
+provides a small (currently 10 items) command history, and offers
+simple
+.Nm emacs Ns -style
+command line editing capabilities.
+In addition to
+the
+.Nm emacs
+control keys, the usual
+.Tn ANSI
+arrow keys may be used to
+browse through the history buffer, and move the cursor within the
+current line.
+.Sh COMMANDS
+.Bl -tag -width indent -compact
+.It Ic examine
+.It Ic x
+Display the addressed locations according to the formats in the modifier.
+Multiple modifier formats display multiple locations.
+If no format is specified, the last format specified for this command
+is used.
+.Pp
+The format characters are:
+.Bl -tag -compact -width indent
+.It Cm b
+look at by bytes (8 bits)
+.It Cm h
+look at by half words (16 bits)
+.It Cm l
+look at by long words (32 bits)
+.It Cm g
+look at by quad words (64 bits)
+.It Cm a
+print the location being displayed
+.It Cm A
+print the location with a line number if possible
+.It Cm x
+display in unsigned hex
+.It Cm z
+display in signed hex
+.It Cm o
+display in unsigned octal
+.It Cm d
+display in signed decimal
+.It Cm u
+display in unsigned decimal
+.It Cm r
+display in current radix, signed
+.It Cm c
+display low 8 bits as a character.
+Non-printing characters are displayed as an octal escape code (e.g.,
+.Ql \e000 ) .
+.It Cm s
+display the null-terminated string at the location.
+Non-printing characters are displayed as octal escapes.
+.It Cm m
+display in unsigned hex with character dump at the end of each line.
+The location is also displayed in hex at the beginning of each line.
+.It Cm i
+display as an instruction
+.It Cm I
+display as an instruction with possible alternate formats depending on the
+machine, but none of the supported architectures have an alternate format.
+.It Cm S
+display a symbol name for the pointer stored at the address
+.El
+.Pp
+.It Ic xf
+Examine forward:
+execute an
+.Ic examine
+command with the last specified parameters to it
+except that the next address displayed by it is used as the start address.
+.Pp
+.It Ic xb
+Examine backward:
+execute an
+.Ic examine
+command with the last specified parameters to it
+except that the last start address subtracted by the size displayed by it
+is used as the start address.
+.Pp
+.It Ic print Ns Op Li / Ns Cm acdoruxz
+.It Ic p Ns Op Li / Ns Cm acdoruxz
+Print
+.Ar addr Ns s
+according to the modifier character (as described above for
+.Cm examine ) .
+Valid formats are:
+.Cm a , x , z , o , d , u , r ,
+and
+.Cm c .
+If no modifier is specified, the last one specified to it is used.
+The argument
+.Ar addr
+can be a string, in which case it is printed as it is.
+For example:
+.Bd -literal -offset indent
+print/x "eax = " $eax "\enecx = " $ecx "\en"
+.Ed
+.Pp
+will print like:
+.Bd -literal -offset indent
+eax = xxxxxx
+ecx = yyyyyy
+.Ed
+.Pp
+.It Xo
+.Ic write Ns Op Li / Ns Cm bhl
+.Ar addr expr1 Op Ar expr2 ...
+.Xc
+.It Xo
+.Ic w Ns Op Li / Ns Cm bhl
+.Ar addr expr1 Op Ar expr2 ...
+.Xc
+Write the expressions specified after
+.Ar addr
+on the command line at succeeding locations starting with
+.Ar addr .
+The write unit size can be specified in the modifier with a letter
+.Cm b
+(byte),
+.Cm h
+(half word) or
+.Cm l
+(long word) respectively.
+If omitted,
+long word is assumed.
+.Pp
+.Sy Warning :
+since there is no delimiter between expressions, strange
+things may happen.
+It is best to enclose each expression in parentheses.
+.Pp
+.It Ic set Li $ Ns Ar variable Oo Li = Oc Ar expr
+Set the named variable or register with the value of
+.Ar expr .
+Valid variable names are described below.
+.Pp
+.It Ic break Ns Op Li / Ns Cm u
+.It Ic b Ns Op Li / Ns Cm u
+Set a break point at
+.Ar addr .
+If
+.Ar count
+is supplied, continues
+.Ar count
+\- 1 times before stopping at the
+break point.
+If the break point is set, a break point number is
+printed with
+.Ql # .
+This number can be used in deleting the break point
+or adding conditions to it.
+.Pp
+If the
+.Cm u
+modifier is specified, this command sets a break point in user
+address space.
+Without the
+.Cm u
+option, the address is considered to be in the kernel
+space, and a wrong space address is rejected with an error message.
+This modifier can be used only if it is supported by machine dependent
+routines.
+.Pp
+.Sy Warning :
+If a user text is shadowed by a normal user space debugger,
+user space break points may not work correctly.
+Setting a break
+point at the low-level code paths may also cause strange behavior.
+.Pp
+.It Ic delete Ar addr
+.It Ic d Ar addr
+.It Ic delete Li # Ns Ar number
+.It Ic d Li # Ns Ar number
+Delete the break point.
+The target break point can be specified by a
+break point number with
+.Ql # ,
+or by using the same
+.Ar addr
+specified in the original
+.Ic break
+command.
+.Pp
+.It Ic watch Ar addr Ns Li , Ns Ar size
+Set a watchpoint for a region.
+Execution stops when an attempt to modify the region occurs.
+The
+.Ar size
+argument defaults to 4.
+If you specify a wrong space address, the request is rejected
+with an error message.
+.Pp
+.Sy Warning :
+Attempts to watch wired kernel memory
+may cause unrecoverable error in some systems such as i386.
+Watchpoints on user addresses work best.
+.Pp
+.It Ic hwatch Ar addr Ns Li , Ns Ar size
+Set a hardware watchpoint for a region if supported by the
+architecture.
+Execution stops when an attempt to modify the region occurs.
+The
+.Ar size
+argument defaults to 4.
+.Pp
+.Sy Warning :
+The hardware debug facilities do not have a concept of separate
+address spaces like the watch command does.
+Use
+.Ic hwatch
+for setting watchpoints on kernel address locations only, and avoid
+its use on user mode address spaces.
+.Pp
+.It Ic dhwatch Ar addr Ns Li , Ns Ar size
+Delete specified hardware watchpoint.
+.Pp
+.It Ic step Ns Op Li / Ns Cm p
+.It Ic s Ns Op Li / Ns Cm p
+Single step
+.Ar count
+times (the comma is a mandatory part of the syntax).
+If the
+.Cm p
+modifier is specified, print each instruction at each step.
+Otherwise, only print the last instruction.
+.Pp
+.Sy Warning :
+depending on machine type, it may not be possible to
+single-step through some low-level code paths or user space code.
+On machines with software-emulated single-stepping (e.g., pmax),
+stepping through code executed by interrupt handlers will probably
+do the wrong thing.
+.Pp
+.It Ic continue Ns Op Li / Ns Cm c
+.It Ic c Ns Op Li / Ns Cm c
+Continue execution until a breakpoint or watchpoint.
+If the
+.Cm c
+modifier is specified, count instructions while executing.
+Some machines (e.g., pmax) also count loads and stores.
+.Pp
+.Sy Warning :
+when counting, the debugger is really silently single-stepping.
+This means that single-stepping on low-level code may cause strange
+behavior.
+.Pp
+.It Ic until Ns Op Li / Ns Cm p
+Stop at the next call or return instruction.
+If the
+.Cm p
+modifier is specified, print the call nesting depth and the
+cumulative instruction count at each call or return.
+Otherwise,
+only print when the matching return is hit.
+.Pp
+.It Ic next Ns Op Li / Ns Cm p
+.It Ic match Ns Op Li / Ns Cm p
+Stop at the matching return instruction.
+If the
+.Cm p
+modifier is specified, print the call nesting depth and the
+cumulative instruction count at each call or return.
+Otherwise, only print when the matching return is hit.
+.Pp
+.It Xo
+.Ic trace Ns Op Li / Ns Cm u
+.Op Ar pid | tid
+.Op Li , Ns Ar count
+.Xc
+.It Xo
+.Ic t Ns Op Li / Ns Cm u
+.Op Ar pid | tid
+.Op Li , Ns Ar count
+.Xc
+.It Xo
+.Ic where Ns Op Li / Ns Cm u
+.Op Ar pid | tid
+.Op Li , Ns Ar count
+.Xc
+.It Xo
+.Ic bt Ns Op Li / Ns Cm u
+.Op Ar pid | tid
+.Op Li , Ns Ar count
+.Xc
+Stack trace.
+The
+.Cm u
+option traces user space; if omitted,
+.Ic trace
+only traces
+kernel space.
+The optional argument
+.Ar count
+is the number of frames to be traced.
+If
+.Ar count
+is omitted, all frames are printed.
+.Pp
+.Sy Warning :
+User space stack trace is valid
+only if the machine dependent code supports it.
+.Pp
+.It Xo
+.Ic search Ns Op Li / Ns Cm bhl
+.Ar addr
+.Ar value
+.Op Ar mask
+.Op Li , Ns Ar count
+.Xc
+Search memory for
+.Ar value .
+This command might fail in interesting
+ways if it does not find the searched-for value.
+This is because
+.Nm
+does not always recover from touching bad memory.
+The optional
+.Ar count
+argument limits the search.
+.\"
+.Pp
+.It Xo
+.Ic findstack
+.Ar addr
+.Xc
+Prints the thread address for a thread kernel-mode stack of which contains the
+specified address.
+If the thread is not found, search the thread stack cache and prints the
+cached stack address.
+Otherwise, prints nothing.
+.Pp
+.It Ic show Cm all procs Ns Op Li / Ns Cm m
+.It Ic ps Ns Op Li / Ns Cm m
+Display all process information.
+The process information may not be shown if it is not
+supported in the machine, or the bottom of the stack of the
+target process is not in the main memory at that time.
+The
+.Cm m
+modifier will alter the display to show VM map
+addresses for the process and not show other information.
+.\"
+.Pp
+.It Ic show Cm all ttys
+Show all TTY's within the system.
+Output is similar to
+.Xr pstat 8 ,
+but also includes the address of the TTY structure.
+.\"
+.Pp
+.It Ic show Cm allchains
+Show the same information like "show lockchain" does, but
+for every thread in the system.
+.\"
+.Pp
+.It Ic show Cm alllocks
+Show all locks that are currently held.
+This command is only available if
+.Xr witness 4
+is included in the kernel.
+.\"
+.Pp
+.It Ic show Cm allpcpu
+The same as "show pcpu", but for every CPU present in the system.
+.\"
+.Pp
+.It Ic show Cm allrman
+Show information related with resource management, including
+interrupt request lines, DMA request lines, I/O ports and I/O memory
+addresses.
+.\"
+.Pp
+.It Ic show Cm apic
+Dump data about APIC IDT vector mappings.
+.\"
+.Pp
+.It Ic show Cm breaks
+Show breakpoints set with the "break" command.
+.\"
+.Pp
+.It Ic show Cm buffer
+Show buffer structure of
+.Vt struct buf
+type.
+Such a structure is used within the
+.Fx
+kernel for the I/O subsystem
+implementation.
+For an exact interpretation of the output, please see the
+.Pa sys/buf.h
+header file.
+.\"
+.Pp
+.It Ic show Cm cbstat
+Show brief information about the TTY subsystem.
+.\"
+.Pp
+.It Ic show Cm cdev
+Without argument, show the list of all created cdev's, consisting of devfs
+node name and struct cdev address.
+When address of cdev is supplied, show some internal devfs state of the cdev.
+.\"
+.Pp
+.It Ic show Cm conifhk
+Lists hooks currently waiting for completion in
+run_interrupt_driven_config_hooks().
+.\"
+.Pp
+.It Ic show Cm cpusets
+Print numbered root and assigned CPU affinity sets.
+See
+.Xr cpuset 2
+for more details.
+.\"
+.Pp
+.It Ic show Cm cyrixreg
+Show registers specific to the Cyrix processor.
+.\"
+.Pp
+.It Ic show Cm domain Ar addr
+Print protocol domain structure
+.Vt struct domain
+at address
+.Ar addr .
+See the
+.Pa sys/domain.h
+header file for more details on the exact meaning of the structure fields.
+.\"
+.Pp
+.It Ic show Cm ffs Op Ar addr
+Show brief information about ffs mount at the address
+.Ar addr ,
+if argument is given.
+Otherwise, provides the summary about each ffs mount.
+.\"
+.Pp
+.It Ic show Cm file Ar addr
+Show information about the file structure
+.Vt struct file
+present at address
+.Ar addr .
+.\"
+.Pp
+.It Ic show Cm files
+Show information about every file structure in the system.
+.\"
+.Pp
+.It Ic show Cm freepages
+Show the number of physical pages in each of the free lists.
+.\"
+.Pp
+.It Ic show Cm geom Op Ar addr
+If the
+.Ar addr
+argument is not given, displays the entire GEOM topology.
+If
+.Ar addr
+is given, displays details about the given GEOM object (class, geom,
+provider or consumer).
+.\"
+.Pp
+.It Ic show Cm idt
+Show IDT layout.
+The first column specifies the IDT vector.
+The second one is the name of the interrupt/trap handler.
+Those functions are machine dependent.
+.\"
+.Pp
+.It Ic show Cm inodedeps Op Ar addr
+Show brief information about each inodedep structure.
+If
+.Ar addr
+is given, only inodedeps belonging to the fs located at the
+supplied address are shown.
+.\"
+.Pp
+.It Ic show Cm inpcb Ar addr
+Show information on IP Control Block
+.Vt struct in_pcb
+present at
+.Ar addr .
+.\"
+.Pp
+.It Ic show Cm intr
+Dump information about interrupt handlers.
+.\"
+.Pp
+.It Ic show Cm intrcnt
+Dump the interrupt statistics.
+.\"
+.Pp
+.It Ic show Cm irqs
+Show interrupt lines and their respective kernel threads.
+.\"
+.Pp
+.It Ic show Cm jails
+Show the list of
+.Xr jail 8
+instances.
+In addition to what
+.Xr jls 8
+shows, also list kernel internal details.
+.\"
+.Pp
+.It Ic show Cm lapic
+Show information from the local APIC registers for this CPU.
+.\"
+.Pp
+.It Ic show Cm lock Ar addr
+Show lock structure.
+The output format is as follows:
+.Bl -tag -width "flags"
+.It Ic class:
+Class of the lock.
+Possible types include
+.Xr mutex 9 ,
+.Xr rmlock 9 ,
+.Xr rwlock 9 ,
+.Xr sx 9 .
+.It Ic name:
+Name of the lock.
+.It Ic flags:
+Flags passed to the lock initialization function.
+For exact possibilities see manual pages of possible lock types.
+.It Ic state:
+Current state of a lock.
+As well as
+.Ic flags
+it's lock-specific.
+.It Ic owner:
+Lock owner.
+.El
+.\"
+.Pp
+.It Ic show Cm lockchain Ar addr
+Show all threads a particular thread at address
+.Ar addr
+is waiting on based on non-sleepable and non-spin locks.
+.\"
+.Pp
+.It Ic show Cm lockedbufs
+Show the same information as "show buf", but for every locked
+.Vt struct buf
+object.
+.\"
+.Pp
+.It Ic show Cm lockedvnods
+List all locked vnodes in the system.
+.\"
+.Pp
+.It Ic show Cm locks
+Prints all locks that are currently acquired.
+This command is only available if
+.Xr witness 4
+is included in the kernel.
+.\"
+.Pp
+.It Ic show Cm locktree
+.\"
+.Pp
+.It Ic show Cm malloc
+Prints
+.Xr malloc 9
+memory allocator statistics.
+The output format is as follows:
+.Pp
+.Bl -tag -compact -offset indent -width "Requests"
+.It Ic Type
+Specifies a type of memory.
+It is the same as a description string used while defining the
+given memory type with
+.Xr MALLOC_DECLARE 9 .
+.It Ic InUse
+Number of memory allocations of the given type, for which
+.Xr free 9
+has not been called yet.
+.It Ic MemUse
+Total memory consumed by the given allocation type.
+.It Ic Requests
+Number of memory allocation requests for the given
+memory type.
+.El
+.Pp
+The same information can be gathered in userspace with
+.Dq Nm vmstat Fl m .
+.\"
+.Pp
+.It Ic show Cm map Ns Oo Li / Ns Cm f Oc Ar addr
+Prints the VM map at
+.Ar addr .
+If the
+.Cm f
+modifier is specified the
+complete map is printed.
+.\"
+.Pp
+.It Ic show Cm msgbuf
+Print the system's message buffer.
+It is the same output as in the
+.Dq Nm dmesg
+case.
+It is useful if you got a kernel panic, attached a serial cable
+to the machine and want to get the boot messages from before the
+system hang.
+.\"
+.It Ic show Cm mount
+Displays short info about all currently mounted file systems.
+.Pp
+.It Ic show Cm mount Ar addr
+Displays details about the given mount point.
+.\"
+.Pp
+.It Ic show Cm object Ns Oo Li / Ns Cm f Oc Ar addr
+Prints the VM object at
+.Ar addr .
+If the
+.Cm f
+option is specified the
+complete object is printed.
+.\"
+.Pp
+.It Ic show Cm page
+Show statistics on VM pages.
+.\"
+.Pp
+.It Ic show Cm pageq
+Show statistics on VM page queues.
+.\"
+.Pp
+.It Ic show Cm pciregs
+Print PCI bus registers.
+The same information can be gathered in userspace by running
+.Dq Nm pciconf Fl lv .
+.\"
+.Pp
+.It Ic show Cm pcpu
+Print current processor state.
+The output format is as follows:
+.Pp
+.Bl -tag -compact -offset indent -width "spin locks held:"
+.It Ic cpuid
+Processor identifier.
+.It Ic curthread
+Thread pointer, process identifier and the name of the process.
+.It Ic curpcb
+Control block pointer.
+.It Ic fpcurthread
+FPU thread pointer.
+.It Ic idlethread
+Idle thread pointer.
+.It Ic APIC ID
+CPU identifier coming from APIC.
+.It Ic currentldt
+LDT pointer.
+.It Ic spin locks held
+Names of spin locks held.
+.El
+.\"
+.Pp
+.It Ic show Cm pgrpdump
+Dump process groups present within the system.
+.\"
+.Pp
+.It Ic show Cm proc Op Ar addr
+If no
+.Op Ar addr
+is specified, print information about the current process.
+Otherwise, show information about the process at address
+.Ar addr .
+.\"
+.Pp
+.It Ic show Cm procvm
+Show process virtual memory layout.
+.\"
+.Pp
+.It Ic show Cm protosw Ar addr
+Print protocol switch structure
+.Vt struct protosw
+at address
+.Ar addr .
+.\"
+.Pp
+.It Ic show Cm registers Ns Op Li / Ns Cm u
+Display the register set.
+If the
+.Cm u
+modifier is specified, it displays user registers instead of
+kernel registers or the currently saved one.
+.Pp
+.Sy Warning :
+The support of the
+.Cm u
+modifier depends on the machine.
+If not supported, incorrect information will be displayed.
+.\"
+.Pp
+.It Ic show Cm rman Ar addr
+Show resource manager object
+.Vt struct rman
+at address
+.Ar addr .
+Addresses of particular pointers can be gathered with "show allrman"
+command.
+.\"
+.Pp
+.It Ic show Cm rtc
+Show real time clock value.
+Useful for long debugging sessions.
+.\"
+.Pp
+.It Ic show Cm sleepchain
+Show all the threads a particular thread is waiting on based on
+sleepable locks.
+.\"
+.Pp
+.It Ic show Cm sleepq
+.It Ic show Cm sleepqueue
+Both commands provide the same functionality.
+They show sleepqueue
+.Vt struct sleepqueue
+structure.
+Sleepqueues are used within the
+.Fx
+kernel to implement sleepable
+synchronization primitives (thread holding a lock might sleep or
+be context switched), which at the time of writing are:
+.Xr condvar 9 ,
+.Xr sx 9
+and standard
+.Xr msleep 9
+interface.
+.\"
+.Pp
+.It Ic show Cm sockbuf Ar addr
+.It Ic show Cm socket Ar addr
+Those commands print
+.Vt struct sockbuf
+and
+.Vt struct socket
+objects placed at
+.Ar addr .
+Output consists of all values present in structures mentioned.
+For exact interpretation and more details, visit
+.Pa sys/socket.h
+header file.
+.\"
+.Pp
+.It Ic show Cm sysregs
+Show system registers (e.g.,
+.Li cr0-4
+on i386.)
+Not present on some platforms.
+.\"
+.Pp
+.It Ic show Cm tcpcb Ar addr
+Print TCP control block
+.Vt struct tcpcb
+lying at address
+.Ar addr .
+For exact interpretation of output, visit
+.Pa netinet/tcp.h
+header file.
+.\"
+.Pp
+.It Ic show Cm thread Op Ar addr
+If no
+.Ar addr
+is specified, show detailed information about current thread.
+Otherwise, information about thread at
+.Ar addr
+is printed.
+.\"
+.Pp
+.It Ic show Cm threads
+Show all threads within the system.
+Output format is as follows:
+.Pp
+.Bl -tag -compact -offset indent -width "Second column"
+.It Ic First column
+Thread identifier (TID)
+.It Ic Second column
+Thread structure address
+.It Ic Third column
+Backtrace.
+.El
+.\"
+.Pp
+.It Ic show Cm tty Ar addr
+Display the contents of a TTY structure in a readable form.
+.\"
+.Pp
+.It Ic show Cm turnstile Ar addr
+Show turnstile
+.Vt struct turnstile
+structure at address
+.Ar addr .
+Turnstiles are structures used within the
+.Fx
+kernel to implement
+synchronization primitives which, while holding a specific type of lock, cannot
+sleep or context switch to another thread.
+Currently, those are:
+.Xr mutex 9 ,
+.Xr rwlock 9 ,
+.Xr rmlock 9 .
+.\"
+.Pp
+.It Ic show Cm uma
+Show UMA allocator statistics.
+Output consists five columns:
+.Pp
+.Bl -tag -compact -offset indent -width "Requests"
+.It Cm "Zone"
+Name of the UMA zone.
+The same string that was passed to
+.Xr uma_zcreate 9
+as a first argument.
+.It Cm "Size"
+Size of a given memory object (slab).
+.It Cm "Used"
+Number of slabs being currently used.
+.It Cm "Free"
+Number of free slabs within the UMA zone.
+.It Cm "Requests"
+Number of allocations requests to the given zone.
+.El
+.Pp
+The very same information might be gathered in the userspace
+with the help of
+.Dq Nm vmstat Fl z .
+.\"
+.Pp
+.It Ic show Cm unpcb Ar addr
+Shows UNIX domain socket private control block
+.Vt struct unpcb
+present at the address
+.Ar addr .
+.\"
+.Pp
+.It Ic show Cm vmochk
+Prints, whether the internal VM objects are in a map somewhere
+and none have zero ref counts.
+.\"
+.Pp
+.It Ic show Cm vmopag
+This is supposed to show physical addresses consumed by a
+VM object.
+Currently, it is not possible to use this command when
+.Xr witness 4
+is compiled in the kernel.
+.\"
+.Pp
+.It Ic show Cm vnode Op Ar addr
+Prints vnode
+.Vt struct vnode
+structure lying at
+.Op Ar addr .
+For the exact interpretation of the output, look at the
+.Pa sys/vnode.h
+header file.
+.\"
+.Pp
+.It Ic show Cm vnodebufs Ar addr
+Shows clean/dirty buffer lists of the vnode located at
+.Ar addr .
+.\"
+.Pp
+.It Ic show Cm watches
+Displays all watchpoints.
+Shows watchpoints set with "watch" command.
+.\"
+.Pp
+.It Ic show Cm witness
+Shows information about lock acquisition coming from the
+.Xr witness 4
+subsystem.
+.\"
+.Pp
+.It Ic gdb
+Toggles between remote GDB and DDB mode.
+In remote GDB mode, another machine is required that runs
+.Xr gdb 1
+using the remote debug feature, with a connection to the serial
+console port on the target machine.
+Currently only available on the
+i386
+architecture.
+.Pp
+.It Ic halt
+Halt the system.
+.Pp
+.It Ic kill Ar sig pid
+Send signal
+.Ar sig
+to process
+.Ar pid .
+The signal is acted on upon returning from the debugger.
+This command can be used to kill a process causing resource contention
+in the case of a hung system.
+See
+.Xr signal 3
+for a list of signals.
+Note that the arguments are reversed relative to
+.Xr kill 2 .
+.Pp
+.It Ic reboot Op Ar seconds
+.It Ic reset Op Ar seconds
+Hard reset the system.
+If the optional argument
+.Ar seconds
+is given, the debugger will wait for this long, at most a week,
+before rebooting.
+.Pp
+.It Ic help
+Print a short summary of the available commands and command
+abbreviations.
+.Pp
+.It Ic capture on
+.It Ic capture off
+.It Ic capture reset
+.It Ic capture status
+.Nm
+supports a basic output capture facility, which can be used to retrieve the
+results of debugging commands from userpsace using
+.Xr sysctl 2 .
+.Ic capture on
+enables output capture;
+.Ic capture off
+disables capture.
+.Ic capture reset
+will clear the capture buffer and disable capture.
+.Ic capture status
+will report current buffer use, buffer size, and disposition of output
+capture.
+.Pp
+Userspace processes may inspect and manage
+.Nm
+capture state using
+.Xr sysctl 8 :
+.Pp
+.Dv debug.ddb.capture.bufsize
+may be used to query or set the current capture buffer size.
+.Pp
+.Dv debug.ddb.capture.maxbufsize
+may be used to query the compile-time limit on the capture buffer size.
+.Pp
+.Dv debug.ddb.capture.bytes
+may be used to query the number of bytes of output currently in the capture
+buffer.
+.Pp
+.Dv debug.ddb.capture.data
+returns the contents of the buffer as a string to an appropriately privileged
+process.
+.Pp
+This facility is particularly useful in concert with the scripting and
+.Xr textdump 4
+facilities, allowing scripted debugging output to be captured and
+committed to disk as part of a textdump for later analysis.
+The contents of the capture buffer may also be inspected in a kernel core dump
+using
+.Xr kgdb 1 .
+.Pp
+.It Ic run
+.It Ic script
+.It Ic scripts
+.It Ic unscript
+Run, define, list, and delete scripts.
+See the
+.Sx SCRIPTING
+section for more information on the scripting facility.
+.Pp
+.It Ic textdump dump
+.It Ic textdump set
+.It Ic textdump status
+.It Ic textdump unset
+Use the
+.Ic textdump dump
+command to immediately perform a textdump.
+More information may be found in
+.Xr textdump 4 .
+The
+.Ic textdump set
+command may be used to force the next kernel core dump to be a textdump
+rather than a traditional memory dump or minidump.
+.Ic textdump status
+reports whether a textdump has been scheduled.
+.Ic textdump unset
+cancels a request to perform a textdump as the next kernel core dump.
+.El
+.Sh VARIABLES
+The debugger accesses registers and variables as
+.Li $ Ns Ar name .
+Register names are as in the
+.Dq Ic show Cm registers
+command.
+Some variables are suffixed with numbers, and may have some modifier
+following a colon immediately after the variable name.
+For example, register variables can have a
+.Cm u
+modifier to indicate user register (e.g.,
+.Dq Li $eax:u ) .
+.Pp
+Built-in variables currently supported are:
+.Pp
+.Bl -tag -width ".Va tabstops" -compact
+.It Va radix
+Input and output radix.
+.It Va maxoff
+Addresses are printed as
+.Dq Ar symbol Ns Li + Ns Ar offset
+unless
+.Ar offset
+is greater than
+.Va maxoff .
+.It Va maxwidth
+The width of the displayed line.
+.It Va lines
+The number of lines.
+It is used by the built-in pager.
+.It Va tabstops
+Tab stop width.
+.It Va work Ns Ar xx
+Work variable;
+.Ar xx
+can take values from 0 to 31.
+.El
+.Sh EXPRESSIONS
+Most expression operators in C are supported except
+.Ql ~ ,
+.Ql ^ ,
+and unary
+.Ql & .
+Special rules in
+.Nm
+are:
+.Bl -tag -width ".No Identifiers"
+.It Identifiers
+The name of a symbol is translated to the value of the symbol, which
+is the address of the corresponding object.
+.Ql \&.
+and
+.Ql \&:
+can be used in the identifier.
+If supported by an object format dependent routine,
+.Sm off
+.Oo Ar filename : Oc Ar func : lineno ,
+.Sm on
+.Oo Ar filename : Oc Ns Ar variable ,
+and
+.Oo Ar filename : Oc Ns Ar lineno
+can be accepted as a symbol.
+.It Numbers
+Radix is determined by the first two letters:
+.Ql 0x :
+hex,
+.Ql 0o :
+octal,
+.Ql 0t :
+decimal; otherwise, follow current radix.
+.It Li \&.
+.Va dot
+.It Li +
+.Va next
+.It Li ..
+address of the start of the last line examined.
+Unlike
+.Va dot
+or
+.Va next ,
+this is only changed by
+.Ic examine
+or
+.Ic write
+command.
+.It Li '
+last address explicitly specified.
+.It Li $ Ns Ar variable
+Translated to the value of the specified variable.
+It may be followed by a
+.Ql \&:
+and modifiers as described above.
+.It Ar a Ns Li # Ns Ar b
+A binary operator which rounds up the left hand side to the next
+multiple of right hand side.
+.It Li * Ns Ar expr
+Indirection.
+It may be followed by a
+.Ql \&:
+and modifiers as described above.
+.El
+.Sh SCRIPTING
+.Nm
+supports a basic scripting facility to allow automating tasks or responses to
+specific events.
+Each script consists of a list of DDB commands to be executed sequentially,
+and is assigned a unique name.
+Certain script names have special meaning, and will be automatically run on
+various
+.Nm
+events if scripts by those names have been defined.
+.Pp
+The
+.Ic script
+command may be used to define a script by name.
+Scripts consist of a series of
+.Nm
+commands separated with the
+.Ql \&;
+character.
+For example:
+.Bd -literal -offset indent
+script kdb.enter.panic=bt; show pcpu
+script lockinfo=show alllocks; show lockedvnods
+.Ed
+.Pp
+The
+.Ic scripts
+command lists currently defined scripts.
+.Pp
+The
+.Ic run
+command execute a script by name.
+For example:
+.Bd -literal -offset indent
+run lockinfo
+.Ed
+.Pp
+The
+.Ic unscript
+command may be used to delete a script by name.
+For example:
+.Bd -literal -offset indent
+unscript kdb.enter.panic
+.Ed
+.Pp
+These functions may also be performed from userspace using the
+.Xr ddb 8
+command.
+.Pp
+Certain scripts are run automatically, if defined, for specific
+.Nm
+events.
+The follow scripts are run when various events occur:
+.Bl -tag -width kdb.enter.powerfail
+.It Dv kdb.enter.acpi
+The kernel debugger was entered as a result of an
+.Xr acpi 4
+event.
+.It Dv kdb.enter.bootflags
+The kernel debugger was entered at boot as a result of the debugger boot
+flag being set.
+.It Dv kdb.enter.break
+The kernel debugger was entered as a result of a serial or console break.
+.It Dv kdb.enter.cam
+The kernel debugger was entered as a result of a
+.Xr CAM 4
+event.
+.It Dv kdb.enter.mac
+The kernel debugger was entered as a result of an assertion failure in the
+.Xr mac_test 4
+module of the
+TrustedBSD MAC Framework.
+.It Dv kdb.enter.ndis
+The kernel debugger was entered as a result of an
+.Xr ndis 4
+breakpoint event.
+.It Dv kdb.enter.netgraph
+The kernel debugger was entered as a result of a
+.Xr netgraph 4
+event.
+.It Dv kdb.enter.panic
+.Xr panic 9
+was called.
+.It Dv kdb.enter.powerfail
+The kernel debugger was entered as a result of a powerfail NMI on the sparc64
+platform.
+.It Dv kdb.enter.powerpc
+The kernel debugger was entered as a result of an unimplemented interrupt
+type on the powerpc platform.
+.It Dv kdb.enter.sysctl
+The kernel debugger was entered as a result of the
+.Dv debug.kdb.enter
+sysctl being set.
+.It Dv kdb.enter.trapsig
+The kernel debugger was entered as a result of a trapsig event on the sparc64
+platform.
+.It Dv kdb.enter.unionfs
+The kernel debugger was entered as a result of an assertion failure in the
+union file system.
+.It Dv kdb.enter.unknown
+The kernel debugger was entered, but no reason has been set.
+.It Dv kdb.enter.vfslock
+The kernel debugger was entered as a result of a VFS lock violation.
+.It Dv kdb.enter.watchdog
+The kernel debugger was entered as a result of a watchdog firing.
+.It Dv kdb.enter.witness
+The kernel debugger was entered as a result of a
+.Xr witness 4
+violation.
+.El
+.Pp
+In the event that none of these scripts is found,
+.Nm
+will attempt to execute a default script:
+.Bl -tag -width kdb.enter.powerfail
+.It Dv kdb.enter.default
+The kernel debugger was entered, but a script exactly matching the reason for
+entering was not defined.
+This can be used as a catch-all to handle cases not specifically of interest;
+for example,
+.Dv kdb.enter.witness
+might be defined to have special handling, and
+.Dv kdb.enter.default
+might be defined to simply panic and reboot.
+.El
+.Sh HINTS
+On machines with an ISA expansion bus, a simple NMI generation card can be
+constructed by connecting a push button between the A01 and B01 (CHCHK# and
+GND) card fingers.
+Momentarily shorting these two fingers together may cause the bridge chipset to
+generate an NMI, which causes the kernel to pass control to
+.Nm .
+Some bridge chipsets do not generate a NMI on CHCHK#, so your mileage may vary.
+The NMI allows one to break into the debugger on a wedged machine to
+diagnose problems.
+Other bus' bridge chipsets may be able to generate NMI using bus specific
+methods.
+.Sh FILES
+Header files mention in this manual page can be found below
+.Pa /usr/include
+directory.
+.Pp
+.Bl -dash -compact
+.It
+.Pa sys/buf.h
+.It
+.Pa sys/domain.h
+.It
+.Pa netinet/in_pcb.h
+.It
+.Pa sys/socket.h
+.It
+.Pa sys/vnode.h
+.El
+.Sh SEE ALSO
+.Xr gdb 1 ,
+.Xr kgdb 1 ,
+.Xr acpi 4 ,
+.Xr CAM 4 ,
+.Xr mac_test 4 ,
+.Xr ndis 4 ,
+.Xr netgraph 4 ,
+.Xr textdump 4 ,
+.Xr witness 4 ,
+.Xr ddb 8 ,
+.Xr sysctl 8 ,
+.Xr panic 9
+.Sh HISTORY
+The
+.Nm
+debugger was developed for Mach, and ported to
+.Bx 386 0.1 .
+This manual page translated from
+.Xr man 7
+macros by
+.An Garrett Wollman .
+.Pp
+.An Robert N. M. Watson
+added support for
+.Nm
+output capture,
+.Xr textdump 4
+and scripting in
+.Fx 7.1 .
diff --git a/share/man/man4/de.4 b/share/man/man4/de.4
new file mode 100644
index 0000000..c9f25ad
--- /dev/null
+++ b/share/man/man4/de.4
@@ -0,0 +1,149 @@
+.\"
+.\" Copyright (c) 1997 David E. O'Brien
+.\"
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt DE 4
+.Os
+.Sh NAME
+.Nm de
+.Nd "DEC DC21x4x Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device de"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_de_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Ethernet adapters based on the Digital
+Equipment DC21x4x based self-contained Ethernet and Fast Ethernet
+chips.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width xxxxxxxxxxxxxxx
+.It autoselect
+Enable autoselection of the media type and options
+.It 10baseT/UTP
+Set 10Mbps operation on the 10baseT port
+.It 10base2/BNC
+Set 10Mbps operation on the BNC port
+.It 10base5/AUI
+Set 10Mbps operation on the AUI port
+.It 100baseTX
+Set 100Mbps (Fast Ethernet) operation
+.It 100baseFX
+Set 100Mbps operation
+.It 100baseT4
+Set 100Mbps operation (4-pair cat-3 cable)
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width xxxxxxxxxxxxxxx
+.It full-duplex
+Set full duplex operation
+.El
+.Pp
+Note that the media types available depend on the particular card in use.
+Some cards are explicitly programmed to a particular media type by a
+setup utility and are not changeable.
+.Pp
+Use the
+.Xr ifconfig 8
+command and in particular the
+.Fl m
+flag to list the supported media types for your particular card.
+.Pp
+The old
+.Dq ifconfig linkN
+method of configuration is not supported.
+.Sh HARDWARE
+Adapters supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Adaptec ANA-6944/TX
+.It
+Cogent EM100FX and EM440TX
+.It
+Corega FastEther PCI-TX
+.It
+D-Link DFE-500TX
+.It
+DEC DE435, DEC DE450, and DEC DE500
+.It
+ELECOM LD-PCI2T, LD-PCITS
+.It
+I-O DATA LA2/T-PCI
+.It
+SMC Etherpower 8432, 9332 and 9334
+.It
+ZNYX ZX3xx
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "de%d: waking device from sleep/snooze mode"
+The 21041 and 21140A chips support suspending the operation of the card.
+.It "de%d: error: desired IRQ of %d does not match device's actual IRQ of %d"
+The device probe detected that the board is configured for a different
+interrupt than the one specified in the kernel configuration file.
+.It "de%d: not configured; limit of %d reached or exceeded"
+There is a limit of 32
+.Nm
+devices allowed in a single machine.
+.It "de%d: not configured; 21040 pass 2.0 required (%d.%d found)"
+.It "de%d: not configured; 21140 pass 1.1 required (%d.%d found)"
+Certain revisions of the chipset are not supported by this driver.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An Matt Thomas .
+This manual page was written by
+.An David E. O'Brien .
diff --git a/share/man/man4/devctl.4 b/share/man/man4/devctl.4
new file mode 100644
index 0000000..b86cf23
--- /dev/null
+++ b/share/man/man4/devctl.4
@@ -0,0 +1,128 @@
+.\"
+.\" Copyright (c) 2002 M. Warner Losh
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 26, 2014
+.Dt DEVCTL 4
+.Os
+.Sh NAME
+.Nm devctl
+.Nd "device event reporting and device control interface"
+.Sh DESCRIPTION
+The
+.Nm
+device is used to report device events from the kernel.
+Future versions will allow for some device control as well.
+.Sh IMPLEMENTATION NOTES
+This design allows only one reader for
+.Pa /dev/devctl .
+This is not desirable
+in the long run, but will get a lot of hair out of this implementation.
+Maybe we should make this device a clonable device.
+.Pp
+Also note: we specifically do not attach a device to the
+.Vt device_t
+tree
+to avoid potential chicken and egg problems.
+One could argue that all of this belongs to the root node.
+One could also further argue that the
+.Xr sysctl 3
+interface that we have now might more properly be an
+.Xr ioctl 2
+interface.
+.Pp
+.Dv SIGIO
+support is included in the driver.
+However, the author is not sure that the
+.Dv SIGIO
+support is done correctly.
+It was copied from a driver that had
+.Dv SIGIO
+support that likely has not been
+tested since
+.Fx 3.4
+or
+.Fx 2.2.8 !
+.Pp
+The read channel for this device is used to report changes to
+userland in realtime.
+We return one record at a time.
+If you try to read this device a character at a time, you will lose
+the rest of the data.
+Listening programs are expected to cope.
+.Pp
+The sysctl
+.Va hw.bus.devctl_queue
+can be used to control queue length. It is set to 0 to disable
+.Nm
+when no
+.Xr devd 8
+is running.
+.Sh PROTOCOL
+The
+.Nm
+device
+uses an
+.Tn ASCII
+protocol.
+The driver returns one record at a time to its readers.
+Each record is terminated with a newline.
+The first character of the record is the event type.
+.Pp
+.Bl -column -compact "Type" "Description"
+.Em "Type Description"
+! A notify event, such as a link state change.
++ Device node in tree attached.
+- Device node in tree detached.
+? Unknown device detected.
+.El
+.Ss Message Formats
+Except for the first character in the record, attach and detach
+messages have the same format.
+.Pp
+.D1 Ar T Ns Ar dev Li at Ar parent Li on Ar location
+.Pp
+.Bl -column -compact "location" "Description"
+.Em "Part Description"
+.It Ar T Ta "+ or -"
+.It Ar dev Ta "The device name that was attached/detached."
+.It Ar parent Ta "The device name of the parent bus that attached the device."
+.It Ar location Ta "Bus specific location information."
+.El
+.Pp
+The nomatch messages can be used to load devices driver.
+If you load a device driver, then one of two things can happen.
+If the device driver attaches to something, you will get a device
+attached message.
+If it does not, then nothing will happen.
+.Pp
+The attach and detach messages arrive after the event.
+This means one cannot use the attach message to load an alternate
+driver.
+The attach message driver has already claimed this device.
+One cannot use the detach messages to flush data to the device.
+The device is already gone.
+.Sh SEE ALSO
+.Xr devd 8
diff --git a/share/man/man4/digi.4 b/share/man/man4/digi.4
new file mode 100644
index 0000000..1e34119
--- /dev/null
+++ b/share/man/man4/digi.4
@@ -0,0 +1,377 @@
+.\" Copyright (c) 1990, 1991 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" the Systems Programming Group of the University of Utah Computer
+.\" Science Department.
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" from: @(#)dca.4 5.2 (Berkeley) 3/27/91
+.\" from: com.4,v 1.1 1993/08/06 11:19:07 cgd Exp
+.\" from: sio.4,v 1.15 1994/12/06 20:14:30 bde Exp
+.\" $FreeBSD$
+.\"
+.Dd December 7, 2003
+.Dt DIGI 4
+.Os
+.Sh NAME
+.Nm digi
+.Nd DigiBoard intelligent serial cards driver
+.Sh SYNOPSIS
+.Cd "device digi"
+.Pp
+This man page was originally written for the dgb driver, and should
+likely be gone over with a fine tooth comb to reflect differences
+with the digi driver.
+.Pp
+When not defined the number is computed:
+.Bd -ragged -offset 4n
+default
+.Dv NDGBPORTS
+= number_of_described_DigiBoard_cards * 16
+.Ed
+.Pp
+If it is less than the actual number of ports
+the system will be able to use only the
+first
+.Dv NDGBPORTS
+ports.
+If it is greater then all ports will be usable
+but some memory will be wasted.
+.Pp
+Meaning of
+.Cm flags :
+.Bl -tag -width indent -compact
+.It 0x0001
+use alternate pinout (exchange DCD and DSR lines)
+.It 0x0002
+do not use 8K window mode of PC/Xe
+.El
+.Pp
+Device numbering:
+.Bd -literal -compact
+0b\fICC\fPmmmmmmmm\fIOLIPPPPP\fP
+ \fBCC\fPard number
+ \fRmmmmmmmm\fPajor number
+ call\fBO\fPut
+ \fBL\fPock
+ \fBI\fPnitial
+ \fBPPPPP\fPort number
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for DigiBoard PC/Xe and PC/Xi series intelligent
+serial multiport cards with asynchronous interfaces based on the
+.Tn EIA
+.Tn RS-232C
+.Pf ( Tn CCITT
+.Tn V.24 )
+standard.
+.Pp
+Input and output for each line may set to one of following baud rates;
+50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600,
+19200, 38400, 57600, or for newer versions of cards 115200.
+.Pp
+The driver does not use any interrupts, it is
+.Dq polling-based .
+This means that
+it uses clock interrupts instead of interrupts generated by DigiBoard cards and
+checks the state of cards 25 times per second.
+This is practical because the
+DigiBoard cards have large input and output buffers (more than 1Kbyte per
+port) and hardware that allows efficiently finding the port that needs
+attention.
+The only problem seen with this policy is slower
+SLIP and PPP response.
+.Pp
+Each line in the kernel configuration file describes one card, not one port
+as in the
+.Xr sio 4
+driver.
+.Pp
+The
+.Cm flags
+keyword may be used on each
+.Dq Li "device dgb"
+line in the kernel configuration file
+to change the pinout of the interface or to use new PC/Xe cards
+which can work with an 8K memory window in compatibility mode
+(with a 64K memory window).
+Note
+that using 8K memory window does not mean shorter input/output buffers, it means
+only that all buffers will be mapped to the same memory address and switched as
+needed.
+.Pp
+The
+.Cm port
+value must be the same
+as the
+port
+set on the card by jumpers.
+For PC/Xi cards the same rule is applicable to the
+.Cm iomem
+value.
+It must be the same as the memory address set on the card
+by jumpers.
+.\"Some documentation gives the address as a ``paragraph'' or ``segment'';
+.\"you can get the value of address by adding the digit "0" at end of
+.\"paragraph value, e.g., 0xfc000 -> 0xfc0000.
+For PC/Xe cards there is no need to use jumpers for this purpose.
+In fact there are no jumpers to do it.
+Just
+write the address you want as the
+.Cm iomem
+value in kernel config file and the card will be programmed
+to use this address.
+.Pp
+The same range of memory addresses may be used
+for all the DigiBoards installed
+(but not for any other card or real memory).
+DigiBoards
+with a large amount of memory (256K or 512K and perhaps
+even 128K) must be mapped
+to memory addresses outside of the first megabyte.
+If the computer
+has more than 15 megabytes of memory then there is no free address space
+outside of the first megabyte where such DigiBoards can be mapped.
+In this case you
+may need to reduce the amount of memory in the computer.
+But many machines provide a better solution.
+They have the ability to
+.Dq "turn off"
+the memory in the 16th megabyte (addresses 0xF00000 - 0xFFFFFF)
+using the
+BIOS setup.
+Then the DigiBoard's address space can be set to this
+.Dq hole .
+.\" XXX the following should be true for all serial drivers and
+.\" should not be repeated in the man pages for all serial drivers.
+.\" It was copied from sio.4. The only changes were s/sio/dgb/g.
+.Pp
+Serial ports controlled by the
+.Nm
+driver can be used for both
+.Dq callin
+and
+.Dq callout .
+For each port there is a callin device and a callout device.
+The minor number of the callout device is 128 higher
+than that of the corresponding callin port.
+The callin device is general purpose.
+Processes opening it normally wait for carrier
+and for the callout device to become inactive.
+The callout device is used to steal the port from
+processes waiting for carrier on the callin device.
+Processes opening it do not wait for carrier
+and put any processes waiting for carrier on the callin device into
+a deeper sleep so that they do not conflict with the callout session.
+The callout device is abused for handling programs that are supposed
+to work on general ports and need to open the port without waiting
+but are too stupid to do so.
+.Pp
+The
+.Nm
+driver also supports an initial-state and a lock-state control
+device for each of the callin and the callout
+.Dq data
+devices.
+The minor number of the initial-state device is 32 higher
+than that of the corresponding data device.
+The minor number of the lock-state device is 64 higher
+than that of the corresponding data device.
+The termios settings of a data device are copied
+from those of the corresponding initial-state device
+on first opens and are not inherited from previous opens.
+Use
+.Xr stty 1
+in the normal way on the initial-state devices to program
+initial termios states suitable for your setup.
+.Pp
+The lock termios state acts as flags to disable changing
+the termios state.
+E.g., to lock a flag variable such as
+.Dv CRTSCTS ,
+use
+.Dq Li "stty crtscts"
+on the lock-state device.
+Speeds and special characters
+may be locked by setting the corresponding value in the lock-state
+device to any nonzero value.
+.Pp
+Correct programs talking to correctly wired external devices
+.\" XXX change next line in other man pages too, and rewrite this paragraph.
+work with almost arbitrary initial states and no locking,
+but other setups may benefit from changing some of the default
+initial state and locking the state.
+In particular, the initial states for non (POSIX) standard flags
+should be set to suit the devices attached and may need to be
+locked to prevent buggy programs from changing them.
+E.g.,
+.Dv CRTSCTS
+should be locked on for devices that support
+RTS/CTS handshaking at all times and off for devices that do not
+support it at all.
+.Dv CLOCAL
+should be locked on for devices
+that do not support carrier.
+.Dv HUPCL
+may be locked off if you do not
+want to hang up for some reason.
+In general, very bad things happen
+if something is locked to the wrong state, and things should not
+be locked for devices that support more than one setting.
+The
+.Dv CLOCAL
+flag on callin ports should be locked off for logins
+to avoid certain security holes, but this needs to be done by
+getty if the callin port is used for anything else.
+.Sh FILES
+.Bl -tag -width /dev/ttyiD?? -compact
+.It Pa /dev/ttyD??
+for callin ports
+.It Pa /dev/ttyiD??
+.It Pa /dev/ttylD??
+corresponding callin initial-state and lock-state devices
+.Pp
+.It Pa /dev/cuaD??
+for callout ports
+.It Pa /dev/cuaiD??
+.It Pa /dev/cualD??
+corresponding callout initial-state and lock-state devices
+.El
+.Pp
+.Bl -tag -width /etc/rc.serial -compact
+.It Pa /etc/rc.serial
+examples of setting the initial-state and lock-state devices
+.El
+.Pp
+The first question mark in these device names is short for the
+card number
+(a decimal number between 0 and 65535 inclusive).
+The second question mark is short for the port number
+(a letter in the range [0-9a-v]).
+.Sh DIAGNOSTICS
+You may enable extended diagnostics by defining DEBUG at the
+start of the source file
+.Pa dgb.c .
+.Bl -diag
+.It dgb\fIX\fP: warning: address \fIN\fP truncated to \fIM\fP
+The memory address for the PC/Xe's 8K window is misaligned (it should be
+on an 8K boundary) or outside of the first megabyte.
+.It dgb\fIX\fP: 1st reset failed
+Problems with accessing I/O port of the card, probably
+the wrong
+.Cm port
+value is specified in the kernel config file.
+.It dgb\fIX\fP: 2nd reset failed
+Problems with hardware.
+.It dgb\fIX\fP: \fIN\fP[st,nd,rd,th] memory test failed
+Problems with accessing the memory of the card, probably
+the wrong
+.Cm iomem
+value is specified in the kernel config file.
+.It dgb\fIX\fP: BIOS start failed
+Problems with starting the on-board BIOS.
+Probably the memory addresses of the
+DigiBoard overlap with some other device or with RAM.
+.It dgb\fIX\fP: BIOS download failed
+Problems with the on-board BIOS.
+Probably the memory addresses of the
+DigiBoard overlap with some other device or with RAM.
+.It dgb\fIX\fP: FEP code download failed
+Problems with downloading of the Front-End Processor's micro-OS.
+Probably the memory addresses of the
+DigiBoard overlap with some other device or with RAM.
+.It dgb\fIX\fP: FEP/OS start failed
+Problems with starting of the Front-End Processor's micro-OS.
+Probably the memory addresses of the
+DigiBoard overlap with some other device or with RAM.
+.It dgb\fIX\fP: too many ports
+This DigiBoard reports that it has more than 32 ports.
+Perhaps a hardware problem or
+the memory addresses of the
+DigiBoard overlap with some other device or with RAM.
+.It dgb\fIX\fP: only \fIN\fP ports are usable
+The
+.Dv NDGBPORTS
+parameter is too small and there is only enough space allocated
+for
+.Ar N
+ports on this card.
+.It dgb\fIX\fP: port \fIY\fP is broken
+The on-board diagnostic has reported that the specified port has hardware
+problems.
+.It dgb\fIX\fP: polling of disabled board stopped
+Internal problems in the polling logic of driver.
+.It dgb\fIX\fP: event queue's head or tail is wrong!
+Internal problems in the driver or hardware.
+.It dgb\fIX\fP: port \fIY\fP: got event on nonexisting port
+Some status changed on a port that is physically present but is
+unusable due to misconfiguration.
+.It dgb\fIX\fP: port \fIY\fP: event \fIN\fP mstat \fIM\fP lstat \fIK\fP
+The driver got a strange event from card.
+Probably this means that you have a
+newer card with an extended list of events or some other hardware problem.
+.It dgb\fIX\fP: port \fIY\fP: overrun
+Input buffer has filled up.
+Problems in polling logic of driver.
+.It dgb\fIX\fP: port \fIY\fP: FEP command on disabled port
+Internal problems in driver.
+.It dgb\fIX\fP: port \fIY\fP: timeout on FEP command
+Problems in hardware.
+.El
+.Sh SEE ALSO
+.Xr stty 1 ,
+.Xr termios 4 ,
+.Xr tty 4 ,
+.Xr comcontrol 8
+.\" XXX add next line to many other drivers.
+.Sh HISTORY
+The
+.Nm
+driver is derived from the
+.Xr sio 4
+driver and the DigiBoard driver from
+.Tn Linux
+and is
+.Ud
+.Sh BUGS
+The implementation of sending
+.Dv BREAK
+is broken.
+.Dv BREAK
+of fixed length of 1/4 s
+is sent anyway.
+.Pp
+There was a bug in implementation of
+.Xr select 2 .
+It is fixed now but not widely tested yet.
+.Pp
+There is no ditty command.
+Most of its functions (alternate pinout,
+speed up to 115200 baud, etc.) are implemented in the driver itself.
+Some
+other functions are missing.
diff --git a/share/man/man4/disc.4 b/share/man/man4/disc.4
new file mode 100644
index 0000000..1a4eae1
--- /dev/null
+++ b/share/man/man4/disc.4
@@ -0,0 +1,76 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" From: @(#)lo.4 8.1 (Berkeley) 6/5/93
+.\" $FreeBSD$
+.\"
+.Dd May 25, 2002
+.Dt DISC 4
+.Os
+.Sh NAME
+.Nm disc
+.Nd software discard network interface
+.Sh SYNOPSIS
+.Cd "device disc"
+.Sh DESCRIPTION
+The
+.Nm
+interface is a software discard mechanism which may be
+used for performance analysis and/or software testing.
+As with other network interfaces, the discard interface must have
+network addresses assigned for each address family with which it is to be used.
+These addresses
+may be set or changed with the
+.Dv SIOCSIFADDR
+.Xr ioctl 2 .
+.Pp
+Each
+.Nm
+interface is created at runtime using interface cloning.
+This is
+most easily done with the
+.Xr ifconfig 8
+.Cm create
+command or using the
+.Va cloned_interfaces
+variable in
+.Xr rc.conf 5 .
+.Sh SEE ALSO
+.Xr inet 4 ,
+.Xr intro 4
+.\" .Xr ns 4
+.Sh HISTORY
+The
+.Nm
+device appears to have been derived from the
+.Xr lo 4
+device around the time of
+.Bx 4.4 .
+This manpage was adapted from
+.Xr lo 4
+and first appeared in
+.Fx 5.0 .
diff --git a/share/man/man4/divert.4 b/share/man/man4/divert.4
new file mode 100644
index 0000000..d22275e
--- /dev/null
+++ b/share/man/man4/divert.4
@@ -0,0 +1,192 @@
+.\" $FreeBSD$
+.\"
+.Dd December 17, 2004
+.Dt DIVERT 4
+.Os
+.Sh NAME
+.Nm divert
+.Nd kernel packet diversion mechanism
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In netinet/in.h
+.Ft int
+.Fn socket PF_INET SOCK_RAW IPPROTO_DIVERT
+.Pp
+To enable support for divert sockets, place the following lines in the
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options IPFIREWALL"
+.Cd "options IPDIVERT"
+.Ed
+.Pp
+Alternatively, to load
+the driver
+as a module at boot time, add the following lines into the
+.Xr loader.conf 5
+file:
+.Bd -literal -offset indent
+ipfw_load="YES"
+ipdivert_load="YES"
+.Ed
+.Sh DESCRIPTION
+Divert sockets are similar to raw IP sockets, except that they
+can be bound to a specific
+.Nm
+port via the
+.Xr bind 2
+system call.
+The IP address in the bind is ignored; only the port
+number is significant.
+A divert socket bound to a divert port will receive all packets diverted
+to that port by some (here unspecified) kernel mechanism(s).
+Packets may also be written to a divert port, in which case they
+re-enter kernel IP packet processing.
+.Pp
+Divert sockets are normally used in conjunction with
+.Fx Ns 's
+packet filtering implementation and the
+.Xr ipfw 8
+program.
+By reading from and writing to a divert socket, matching packets
+can be passed through an arbitrary ``filter'' as they travel through
+the host machine, special routing tricks can be done, etc.
+.Sh READING PACKETS
+Packets are diverted either as they are ``incoming'' or ``outgoing.''
+Incoming packets are diverted after reception on an IP interface,
+whereas outgoing packets are diverted before next hop forwarding.
+.Pp
+Diverted packets may be read unaltered via
+.Xr read 2 ,
+.Xr recv 2 ,
+or
+.Xr recvfrom 2 .
+In the latter case, the address returned will have its port set to
+some tag supplied by the packet diverter, (usually the ipfw rule number)
+and the IP address set to the (first) address of
+the interface on which the packet was received (if the packet
+was incoming) or
+.Dv INADDR_ANY
+(if the packet was outgoing).
+The interface name (if defined
+for the packet) will be placed in the 8 bytes following the address,
+if it fits.
+.Sh WRITING PACKETS
+Writing to a divert socket is similar to writing to a raw IP socket;
+the packet is injected ``as is'' into the normal kernel IP packet
+processing using
+.Xr sendto 2
+and minimal error checking is done.
+Packets are distinguished as either incoming or outgoing.
+If
+.Xr sendto 2
+is used with a destination IP address of
+.Dv INADDR_ANY ,
+then the packet is treated as if it were outgoing, i.e., destined
+for a non-local address.
+Otherwise, the packet is assumed to be
+incoming and full packet routing is done.
+.Pp
+In the latter case, the
+IP address specified must match the address of some local interface,
+or an interface name
+must be found after the IP address.
+If an interface name is found,
+that interface will be used and the value of the IP address will be
+ignored (other than the fact that it is not
+.Dv INADDR_ANY ) .
+This is to indicate on which interface the packet
+.Dq arrived .
+.Pp
+Normally, packets read as incoming should be written as incoming;
+similarly for outgoing packets.
+When reading and then writing back
+packets, passing the same socket address supplied by
+.Xr recvfrom 2
+unmodified to
+.Xr sendto 2
+simplifies things (see below).
+.Pp
+The port part of the socket address passed to the
+.Xr sendto 2
+contains a tag that should be meaningful to the diversion module.
+In the
+case of
+.Xr ipfw 8
+the tag is interpreted as the rule number
+.Em after which
+rule processing should restart.
+.Sh LOOP AVOIDANCE
+Packets written into a divert socket
+(using
+.Xr sendto 2 )
+re-enter the packet filter at the rule number
+following the tag given in the port part of the socket address, which
+is usually already set at the rule number that caused the diversion
+(not the next rule if there are several at the same number).
+If the 'tag'
+is altered to indicate an alternative re-entry point, care should be taken
+to avoid loops, where the same packet is diverted more than once at the
+same rule.
+.Sh DETAILS
+If a packet is diverted but no socket is bound to the
+port, or if
+.Dv IPDIVERT
+is not enabled or loaded in the kernel, the packet is dropped.
+.Pp
+Incoming packet fragments which get diverted are fully reassembled
+before delivery; the diversion of any one fragment causes the entire
+packet to get diverted.
+If different fragments divert to different ports,
+then which port ultimately gets chosen is unpredictable.
+.Pp
+Note that packets arriving on the divert socket by the
+.Xr ipfw 8
+.Cm tee
+action are delivered as-is and packet fragments do not get reassembled
+in this case.
+.Pp
+Packets are received and sent unchanged, except that
+packets read as outgoing have invalid IP header checksums, and
+packets written as outgoing have their IP header checksums overwritten
+with the correct value.
+Packets written as incoming and having incorrect checksums will be dropped.
+Otherwise, all header fields are unchanged (and therefore in network order).
+.Pp
+Binding to port numbers less than 1024 requires super-user access, as does
+creating a socket of type SOCK_RAW.
+.Sh ERRORS
+Writing to a divert socket can return these errors, along with
+the usual errors possible when writing raw packets:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+The packet had an invalid header, or the IP options in the packet
+and the socket options set were incompatible.
+.It Bq Er EADDRNOTAVAIL
+The destination address contained an IP address not equal to
+.Dv INADDR_ANY
+that was not associated with any interface.
+.El
+.Sh SEE ALSO
+.Xr bind 2 ,
+.Xr recvfrom 2 ,
+.Xr sendto 2 ,
+.Xr socket 2 ,
+.Xr ipfw 4 ,
+.Xr ipfw 8
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@FreeBSD.org ,
+Whistle Communications Corp.
+.Sh BUGS
+This is an attempt to provide a clean way for user mode processes
+to implement various IP tricks like address translation, but it
+could be cleaner, and it is too dependent on
+.Xr ipfw 8 .
+.Pp
+It is questionable whether incoming fragments should be reassembled
+before being diverted.
+For example, if only some fragments of a
+packet destined for another machine do not get routed through the
+local machine, the packet is lost.
+This should probably be
+a settable socket option in any case.
diff --git a/share/man/man4/dpms.4 b/share/man/man4/dpms.4
new file mode 100644
index 0000000..7f7af3e
--- /dev/null
+++ b/share/man/man4/dpms.4
@@ -0,0 +1,57 @@
+.\" Copyright (c) 2008 Yahoo!, Inc.
+.\" All rights reserved.
+.\" Written by: John Baldwin <jhb@FreeBSD.org>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 23, 2008
+.Dt DPMS 4
+.Os
+.Sh NAME
+.Nm dpms
+.Nd VESA BIOS DPMS driver
+.Sh SYNOPSIS
+.Cd "device dpms"
+.Sh DESCRIPTION
+The
+.Nm
+driver uses the VESA BIOS to manage an external display during suspend and
+resume.
+When the machine suspends,
+the
+.Nm
+driver turns the external display off.
+When the machine resumes,
+it restores the display to its state when the driver was first loaded.
+.Sh SEE ALSO
+.Xr acpi_video 4
+.Sh BUGS
+The VESA BIOS DPMS calls do not provide any way to identify a particular
+display or adapter to manipulate.
+As a result,
+this driver may have unexpected results on systems with multiple displays
+and/or adapters.
diff --git a/share/man/man4/dpt.4 b/share/man/man4/dpt.4
new file mode 100644
index 0000000..fecb7a5
--- /dev/null
+++ b/share/man/man4/dpt.4
@@ -0,0 +1,115 @@
+.\"
+.\" Copyright (c) 1998 Justin T. Gibbs
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 18, 2006
+.Dt DPT 4
+.Os
+.Sh NAME
+.Nm dpt
+.Nd DPT RAID Controller SCSI driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device dpt"
+.Pp
+For one or more EISA cards:
+.Cd "device eisa"
+.Pp
+For one or more ISA cards:
+.Cd "device isa"
+.Pp
+For one or more PCI cards:
+.Cd "device pci"
+.Pp
+To allow PCI adapters to use memory mapped I/O if enabled:
+.Cd options DPT_ALLOW_MEMIO
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dpt_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports DPT RAID SCSI controllers.
+.Pp
+SmartRAID (PM3???) are "Enterprise" class cards,
+and SmartCache (PM2???) cards are in the "Workstation" class.
+The Gen 4 Smart Cache IV products were a re-issue of the Gen 3 utilizing
+upgraded (and cheaper to produce) silicon.
+The PM3334 (Smart RAID III) was not revamped as there was no upgraded silicon
+(68040 processor) and it was using the best DPT made.
+Note there has been customer confusion over the faster enterprise class card
+supported by this driver being an older generation.
+The Gen5 cards are supported by the
+.Xr asr 4
+driver.
+.Sh HARDWARE
+The
+.Nm
+driver provides support for the following RAID adapters:
+.Pp
+.Bl -bullet -compact
+.It
+DPT Smart Cache Plus
+.It
+Smart Cache II (PM2?2?, PM2022 [EISA], PM2024/PM2124 [PCI]) (Gen2)
+.It
+Smart RAID II (PM3?2?, PM3021, PM3222)
+.It
+Smart Cache III (PM2?3?)
+.It
+Smart RAID III (PM3?3?, PM3332 [EISA], PM3334UW [PCI]) (Gen3)
+.It
+Smart Cache IV (PM2?4?, PM2042 [EISA], PM2044/PM2144 [PCI]) (Gen4)
+.It
+Smart RAID IV
+.El
+.Sh SEE ALSO
+.Xr asr 4 ,
+.Xr cd 4 ,
+.Xr ch 4 ,
+.Xr da 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 2.2.6 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Simon Shapiro
+and ported to the CAM SCSI system by
+.An Justin T. Gibbs .
diff --git a/share/man/man4/dummynet.4 b/share/man/man4/dummynet.4
new file mode 100644
index 0000000..a5d0e6c
--- /dev/null
+++ b/share/man/man4/dummynet.4
@@ -0,0 +1,79 @@
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 28, 2002
+.Dt DUMMYNET 4
+.Os
+.Sh NAME
+.Nm dummynet
+.Nd traffic shaper, bandwidth manager and delay emulator
+.Sh DESCRIPTION
+The
+.Nm
+system facility permits the control of traffic
+going through the various network interfaces, by applying bandwidth
+and queue size limitations, implementing different scheduling and queue
+management policies, and emulating delays and losses.
+.Pp
+The user interface for
+.Nm
+is implemented by the
+.Xr ipfw 8
+utility, so please refer to the
+.Xr ipfw 8
+manpage for a complete description of the
+.Nm
+capabilities and how to use it.
+.Ss Kernel Options
+The following options in the kernel configuration file are related to
+.Nm
+operation:
+.Pp
+.Bl -tag -width ".Dv IPFIREWALL_VERBOSE_LIMIT" -offset indent -compact
+.It Dv IPFIREWALL
+enable ipfirewall (required for
+.Nm )
+.It Dv IPFIREWALL_VERBOSE
+enable firewall output
+.It Dv IPFIREWALL_VERBOSE_LIMIT
+limit firewall output
+.It Dv DUMMYNET
+enable
+.Nm
+operation
+.It Dv HZ
+set the timer granularity
+.El
+.Pp
+Generally, the following options are required:
+.Bd -literal -offset indent
+options IPFIREWALL
+options DUMMYNET
+options HZ=1000 # strongly recommended
+.Ed
+.Pp
+Additionally, one may want to increase the number
+of mbuf clusters (used to store network packets) according to the
+sum of the bandwidth-delay products and queue sizes of all configured
+pipes.
+.Sh SEE ALSO
+.Xr setsockopt 2 ,
+.Xr if_bridge 4 ,
+.Xr ip 4 ,
+.Xr ipfw 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+facility
+was initially implemented as a testing tool for
+.Tn TCP
+congestion control by
+.An Luigi Rizzo Aq luigi@iet.unipi.it ,
+as described on ACM Computer Communication Review, Jan.97 issue.
+Later it has been modified to work at the
+.Tn IP
+and bridging levels, integrated with the
+.Xr ipfw 4
+packet filter, and extended to
+support multiple queueing and scheduling policies.
diff --git a/share/man/man4/ed.4 b/share/man/man4/ed.4
new file mode 100644
index 0000000..bfa5972
--- /dev/null
+++ b/share/man/man4/ed.4
@@ -0,0 +1,448 @@
+.\"
+.\" Copyright (c) 1994, David Greenman
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by David Greenman.
+.\" 4. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 25, 2012
+.Dt ED 4
+.Os
+.Sh NAME
+.Nm ed
+.Nd "NE-2000 and WD-80x3 Ethernet driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device ed"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ed_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for 8 and 16bit Ethernet cards that are based on
+the National Semiconductor DS8390 and similar NICs manufactured by
+other companies.
+The
+.Nm
+driver also supports many PC Card chips which interface via MII to a PHY.
+Axiom's AX88790, AX88190 and AX88190A;
+DLink's DL10019 and DL10022; and
+Tamarack's TC5299J chips all support internal or external MII/PHY combinations.
+Realtek's PCI and ISA RTL80x9-based cards are also supported.
+For these chipsets, autonegotiation and status reporting are supported.
+.Pp
+In addition to the standard port and IRQ specifications, the
+.Nm
+driver also supports a number of
+.Cd flags
+which can force 8/16bit mode, enable/disable multi-buffering, and select the default
+interface type (AUI/BNC, and for cards with twisted pair, AUI/10BaseT).
+.Pp
+The
+.Cd flags
+are a bit field, and are summarized as follows:
+.Bl -tag -width indent
+.It Li 0x01
+Disable transceiver.
+On those cards which support it, this flag causes the transceiver to
+be disabled and the AUI connection to be used by default.
+.It Li 0x02
+Force 8bit mode.
+This flag forces the card to 8bit mode regardless of how the
+card identifies itself.
+This may be needed for some clones which incorrectly
+identify themselves as 16bit, even though they only have an 8bit interface.
+This flag takes precedence over force 16bit mode.
+.It Li 0x04
+Force 16bit mode.
+This flag forces the card to 16bit mode regardless of how the
+card identifies itself.
+This may be needed for some clones which incorrectly
+identify themselves as 8bit, even though they have a 16bit ISA interface.
+.It Li 0x08
+Disable transmitter multi-buffering.
+This flag disables the use of multiple
+transmit buffers and may be necessary in rare cases where packets are sent out
+faster than a machine on the other end can handle (as evidenced by severe packet
+lossage).
+Some
+.No ( non- Ns Fx
+:-)) machines have terrible Ethernet performance
+and simply cannot cope with 1100K+ data rates.
+Use of this flag also provides
+one more packet worth of receiver buffering, and on 8bit cards, this may help
+reduce receiver lossage.
+.El
+.Pp
+When using a 3c503 card, the AUI connection may be selected by specifying the
+.Cm link2
+option to
+.Xr ifconfig 8
+(BNC is the default).
+.Sh HARDWARE
+The
+.Nm
+driver supports the following Ethernet NICs:
+.Pp
+.Bl -bullet -compact
+.It
+3Com 3c503 Etherlink II
+.Pq Cd "options ED_3C503"
+.It
+AR-P500 Ethernet
+.It
+Accton EN1644 (old model), EN1646 (old model), EN2203 (old model) (110pin)
+(flags 0xd00000)
+.It
+Accton EN2212/EN2216/UE2216
+.It
+Allied Telesis CentreCOM LA100-PCM_V2
+.It
+Allied Telesis LA-98 (flags 0x000000) (PC-98)
+.It
+Allied Telesis SIC-98, SIC-98NOTE (110pin), SIU-98 (flags 0x600000) (PC-98)
+.It
+Allied Telesis SIU-98-D (flags 0x610000) (PC-98)
+.It
+AmbiCom 10BaseT card (8002, 8002T, 8010 and 8610)
+.It
+Bay Networks NETGEAR FA410TXC Fast Ethernet
+.It
+Belkin F5D5020 PC Card Fast Ethernet
+.It
+Billionton LM5LT-10B Ethernet/Modem PC Card
+.It
+Billionton LNT-10TB, LNT-10TN Ethernet PC Card
+.It
+Bromax iPort 10/100 Ethernet PC Card
+.It
+Bromax iPort 10 Ethernet PC Card
+.It
+Buffalo LPC2-CLT, LPC3-CLT, LPC3-CLX, LPC4-TX, LPC-CTX PC Card
+.It
+Buffalo LPC-CF-CLT CF Card
+.It
+CNet BC40 adapter
+.It
+Compex Net-A adapter
+.It
+Compex RL2000
+.It
+Contec C-NET(98), RT-1007(98), C-NET(9N) (110pin) (flags 0xa00000) (PC-98)
+.It
+Contec C-NET(98)E-A, C-NET(98)L-A, C-NET(98)P (flags 0x300000) (PC-98)
+.It
+Corega Ether98-T (flags 0x000000) (PC-98)
+.It
+Corega Ether PCC-T/EtherII PCC-T/FEther PCC-TXF/PCC-TXD PCC-T/Fether II TXD
+.It
+Corega LAPCCTXD (TC5299J)
+.It
+CyQ've ELA-010
+.It
+DEC EtherWorks DE305
+.It
+Danpex EN-6200P2
+.It
+D-Link DE-298, DE-298P (flags 0x500000) (PC-98)
+.It
+D-Link DE-660, DE-660+
+.It
+D-Link IC-CARD/IC-CARD+ Ethernet
+.It
+ELECOM LD-98P (flags 0x500000) (PC-98)
+.It
+ELECOM LD-BDN, LD-NW801G (flags 0x200000) (PC-98)
+.It
+ELECOM Laneed LD-CDL/TX, LD-CDF, LD-CDS, LD-10/100CD, LD-CDWA (DP83902A)
+.It
+Hawking PN652TX PC Card (AX88790)
+.It
+HP PC Lan+ 27247B and 27252A
+.Pq Cd "options ED_HPP"
+.It
+IBM Creditcard Ethernet I/II
+.It
+ICM AD-ET2-T, DT-ET-25, DT-ET-T5, IF-2766ET, IF-2771ET, NB-ET-T (110pin)
+(flags 0x500000) (PC-98)
+.It
+I-O DATA LA/T-98, LA/T-98SB, LA2/T-98, ET/T-98 (flags 0x900000) (PC-98)
+.It
+I-O DATA ET2/T-PCI
+.It
+I-O DATA PCLATE
+.It
+Kansai KLA-98C/T (flags 0x900000) (PC-98)
+.It
+Kingston KNE-PC2, CIO10T, KNE-PCM/x Ethernet
+.It
+KTI ET32P2 PCI
+.It
+Linksys EC2T/PCMPC100/PCM100, PCMLM56
+.It
+Linksys EtherFast 10/100 PC Card, Combo PCMCIA Ethernet Card (PCMPC100 V2)
+.It
+Logitec LAN-98T (flags 0xb00000) (PC-98)
+.It
+MACNICA Ethernet ME1 for JEIDA
+.It
+MACNICA ME98 (flags 0x900000) (PC-98)
+.It
+MACNICA NE2098 (flags 0x400000) (PC-98)
+.It
+MELCO EGY-98 (flags 0x300000) (PC-98)
+.It
+MELCO LGH-98, LGY-98, LGY-98-N (110pin), IND-SP, IND-SS (flags 0x400000) (PC-98)
+.It
+MELCO LGY-PCI-TR
+.It
+MELCO LPC-T/LPC2-T/LPC2-CLT/LPC2-TX/LPC3-TX/LPC3-CLX
+.It
+NDC Ethernet Instant-Link
+.It
+NEC PC-9801-77, PC-9801-78 (flags 0x910000) (PC-98)
+.It
+NEC PC-9801-107, PC-9801-108 (flags 0x800000) (PC-98)
+.It
+National Semiconductor InfoMover NE4100
+.It
+NetGear FA-410TX
+.It
+NetVin NV5000SC
+.It
+Network Everywhere Ethernet 10BaseT PC Card
+.It
+Networld 98X3 (flags 0xd00000) (PC-98)
+.It
+Networld EC-98X, EP-98X (flags 0xd10000) (PC-98)
+.It
+New Media LANSurfer 10+56 Ethernet/Modem
+.It
+New Media LANSurfer
+.It
+Novell NE1000/NE2000/NE2100
+.It
+PLANEX ENW-8300-T
+.It
+PLANEX EN-2298-C (flags 0x200000) (PC-98)
+.It
+PLANEX EN-2298P-T, EN-2298-T (flags 0x500000) (PC-98)
+.It
+PLANEX FNW-3600-T
+.It
+Psion 10/100 LANGLOBAL Combine iT
+.It
+RealTek 8019
+.It
+RealTek 8029
+.It
+Relia Combo-L/M-56k PC Card
+.It
+SMC Elite 16 WD8013
+.It
+SMC Elite Ultra
+.It
+SMC EtherEZ98 (flags 0x000000) (PC-98)
+.It
+SMC WD8003E/WD8003EBT/WD8003S/WD8003SBT/WD8003W/WD8013EBT/WD8013W and clones
+.It
+SMC EZCard PC Card, 8040-TX, 8041-TX (AX88x90), 8041-TX V.2 (TC5299J)
+.It
+Socket LP-E, ES-1000 Ethernet/Serial, LP-E CF, LP-FE CF
+.It
+Surecom EtherPerfect EP-427
+.It
+Surecom NE-34
+.It
+TDK 3000/3400/5670 Fast Ethernet/Modem
+.It
+TDK LAK-CD031, Grey Cell GCS2000 Ethernet Card
+.It
+TDK DFL5610WS Ethernet/Modem PC Card
+.It
+Telecom Device SuperSocket RE450T
+.It
+Toshiba LANCT00A PC Card
+.It
+VIA VT86C926
+.It
+Winbond W89C940
+.It
+Winbond W89C940F
+.El
+.Pp
+C-Bus, ISA, PCI and PC Card devices are supported.
+.Pp
+The
+.Nm
+driver does not support the following Ethernet NICs:
+.Pp
+.Bl -bullet -compact
+.It
+Mitsubishi LAN Adapter B8895
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ed%d: failed to clear shared memory at %x - check configuration."
+When the card was probed at system boot time, the
+.Nm
+driver found that it could not clear the card's shared memory.
+This is most commonly
+caused by a BIOS extension ROM being configured in the same address space as the
+Ethernet card's shared memory.
+Either find the offending card and change its BIOS
+ROM to be at an address that does not conflict, or change the
+settings in
+.Xr device.hints 5
+that the card's shared memory is mapped at a
+non-conflicting address.
+.It "ed%d: Invalid irq configuration (%d) must be 2-5 for 3c503."
+The IRQ number that was specified in the
+.Xr device.hints 5
+file is not valid for the 3Com 3c503 card.
+The 3c503 can only be assigned to IRQs 2 through 5.
+.It "ed%d: Cannot find start of RAM."
+.It "ed%d: Cannot find any RAM, start : %d, x = %d."
+The probe of a Gateway card was unsuccessful in configuring the card's packet memory.
+This likely indicates that the card was improperly recognized as a Gateway or that
+the card is defective.
+.It "ed: packets buffered, but transmitter idle."
+Indicates a logic problem in the driver.
+Should never happen.
+.It "ed%d: device timeout"
+Indicates that an expected transmitter interrupt did not occur.
+Usually caused by an
+interrupt conflict with another card on the ISA bus.
+This condition could also be caused if the kernel is configured for a
+different IRQ channel than the one the card is actually using.
+If that is the case, you will have to either reconfigure the card
+using a DOS utility or set the jumpers on the card appropriately.
+.It "ed%d: NIC memory corrupt - invalid packet length %d."
+Indicates that a packet was received with a packet length that was either larger than
+the maximum size or smaller than the minimum size allowed by the IEEE 802.3 standard.
+Usually
+caused by a conflict with another card on the ISA bus, but in some cases may also
+indicate faulty cabling.
+.It "ed%d: remote transmit DMA failed to complete."
+This indicates that a programmed I/O transfer to an NE1000 or NE2000 style card
+has failed to properly complete.
+Usually caused by the ISA bus speed being set
+too fast.
+.It "ed%d: Invalid irq configuration (%ld) must be %s for %s"
+Indicates the device has a different IRQ than supported or expected.
+.It "ed%d: Cannot locate my ports!"
+The device is using a different I/O port than the driver knows about.
+.It "ed%d: Cannot extract MAC address"
+Attempts to get the MAC address failed.
+.It "ed%d: Missing mii!"
+Probing for an MII bus has failed.
+This indicates a coding error in the PC Card attachment, because a PHY
+is required for the chips that generate this error message.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr device.hints 5 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 1.0 .
+.Sh AUTHORS
+The
+.Nm
+device driver and this manual page were written by
+.An David Greenman .
+.Sh CAVEATS
+Early revision DS8390 chips have problems.
+They lock up whenever the receive
+ring-buffer overflows.
+They occasionally switch the byte order
+of the length field in the packet ring header (several different causes
+of this related to an off-by-one byte alignment) - resulting in
+.Qq Li "NIC memory corrupt - invalid packet length"
+messages.
+The card is reset
+whenever these problems occur, but otherwise there is no problem with
+recovering from these conditions.
+.Pp
+The NIC memory access to 3Com and Novell cards is much slower than it is on
+WD/SMC cards; it is less than 1MB/second on 8bit boards and less than 2MB/second
+on the 16bit cards.
+This can lead to ring-buffer overruns resulting in
+dropped packets during heavy network traffic.
+.Pp
+The Mitsubishi B8895 PC Card uses a DP83902, but its ASIC part is
+undocumented.
+Neither the NE2000 nor the WD83x0 drivers work with this card.
+.Sh BUGS
+The
+.Nm
+driver is a bit too aggressive about resetting the card whenever any bad
+packets are received.
+As a result, it may throw out some good packets which
+have been received but not yet transferred from the card to main memory.
+.Pp
+The
+.Nm
+driver is slow by today's standards.
+.Pp
+PC Card attachment supports the D-Link DMF650TX LAN/Modem card's Ethernet
+port only at this time.
+.Pp
+Some devices supported by
+.Nm
+do not generate the link state change events used by
+.Xr devd 8
+to start
+.Xr dhclient 8 .
+If you have problems with
+.Xr dhclient 8
+not starting and the device is always attached to the network it may
+be possible to work around this by changing
+.Dq Li DHCP
+to
+.Dq Li SYNCDHCP
+in the
+.Va ifconfig_ed0
+entry in
+.Pa /etc/rc.conf .
diff --git a/share/man/man4/edsc.4 b/share/man/man4/edsc.4
new file mode 100644
index 0000000..a25cee3
--- /dev/null
+++ b/share/man/man4/edsc.4
@@ -0,0 +1,107 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" From: @(#)lo.4 8.1 (Berkeley) 6/5/93
+.\" $FreeBSD$
+.\"
+.Dd March 25, 2007
+.Dt EDSC 4
+.Os
+.Sh NAME
+.Nm edsc
+.Nd Ethernet discard network interface
+.Sh SYNOPSIS
+.Cd "device edsc"
+.Sh DESCRIPTION
+The
+.Nm
+interface is a software discard mechanism which may be
+used for performance analysis and software testing.
+It imitates an Ethernet device, which
+allows for its use in conjunction with such drivers as
+.Xr if_bridge 4
+and
+.Xr vlan 4 .
+.Pp
+As with other network interfaces, an
+.Nm
+interface must have network addresses assigned for each address family
+with which it is to be used.
+These addresses may be set or changed with the
+.Dv SIOCSIFADDR
+.Xr ioctl 2
+or
+.Xr ifconfig 8
+utility.
+.Pp
+Each
+.Nm
+interface is created at runtime using interface cloning.
+This is most easily done with the
+.Xr ifconfig 8
+.Cm create
+command or using the
+.Va cloned_interfaces
+variable in
+.Xr rc.conf 5 .
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr arp 4 ,
+.Xr if_bridge 4 ,
+.Xr inet 4 ,
+.Xr intro 4 ,
+.Xr vlan 4 ,
+.Xr rc.conf 5 ,
+.Xr arp 8 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device was derived from the
+.Xr disc 4
+device and first appeared in
+.Fx 6.3 .
+This manpage was adapted from
+.Xr disc 4 .
+.Sh CAVEATS
+Since outgoing packets are just discarded by
+.Nm ,
+ARP requests stay unreplied.
+Consequently, an IP packet cannot be sent via
+.Nm
+until a static
+.Xr arp 4
+entry is created for its next hop using
+.Xr arp 8 .
+.Pp
+Initially an
+.Nm
+interface has a zero link level address.
+It can be changed with
+.Xr ifconfig 8
+.Cm lladdr
+if needed.
diff --git a/share/man/man4/ehci.4 b/share/man/man4/ehci.4
new file mode 100644
index 0000000..1d06bf9
--- /dev/null
+++ b/share/man/man4/ehci.4
@@ -0,0 +1,101 @@
+.\" $NetBSD: ehci.4,v 1.8 2001/11/21 17:22:56 augustss Exp $
+.\"
+.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 4, 2012
+.Dt EHCI 4
+.Os
+.Sh NAME
+.Nm ehci
+.Nd USB Enhanced Host Controller driver
+.Sh SYNOPSIS
+.Cd "device ehci"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the
+.Tn USB
+Enhanced Host Controller Interface,
+which is used by
+.Tn USB
+2.0 controllers.
+.Pp
+.Tn EHCI
+controllers are peculiar in that they can only handle the
+.Tn USB
+2.0 protocol.
+This means that they normally have one or more companion controllers
+(i.e.,
+.Xr ohci 4
+or
+.Xr uhci 4 )
+handling USB 1.x devices.
+Consequently each
+.Tn USB
+connector is electrically connected to two
+.Tn USB
+controllers.
+The handling of this is totally automatic,
+but can be noticed since
+.Tn USB
+1.x and
+.Tn USB
+2.0 devices plugged in to the same
+connector appear to connect to different USB busses.
+.Sh SEE ALSO
+.Xr xhci 4 ,
+.Xr ohci 4 ,
+.Xr uhci 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.1 .
+.Sh LOADER TUNABLES
+When the kernel has been compiled with
+.Cd options USB_DEBUG ,
+some tunables become available that affect the behavior of
+.Nm .
+These tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "xxxxxx"
+.It Va hw.usb.ehci.lostintrbug
+This tunable enables the lost interrupt quirk.
+The default value is 0 (off).
+.It Va hw.usb.ehci.iaadbug
+This tunable enables the EHCI doorbell quirk.
+The default value is 0 (off).
+.It Va hw.usb.ehci.no_hs
+This tunable disables USB devices to attach like HIGH-speed ones and will force all attached devices to attach to the FULL- or LOW-speed companion controller.
+The default value is 0 (off).
+.El
diff --git a/share/man/man4/em.4 b/share/man/man4/em.4
new file mode 100644
index 0000000..9c95286
--- /dev/null
+++ b/share/man/man4/em.4
@@ -0,0 +1,289 @@
+.\" Copyright (c) 2001-2003, Intel Corporation
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright notice,
+.\" this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" 3. Neither the name of the Intel Corporation nor the names of its
+.\" contributors may be used to endorse or promote products derived from
+.\" this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" * Other names and brands may be claimed as the property of others.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 11, 2011
+.Dt EM 4
+.Os
+.Sh NAME
+.Nm em
+.Nd "Intel(R) PRO/1000 Gigabit Ethernet adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device em"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_em_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Gigabit Ethernet adapters based on
+the Intel 82540, 82541ER, 82541PI, 82542, 82543, 82544, 82545, 82546,
+82546EB, 82546GB, 82547, 82571, 81572, 82573, and 82574 Ethernet
+controller chips.
+The driver supports Transmit/Receive checksum offload
+and Jumbo Frames on all but 82542-based adapters.
+Furthermore it supports TCP segmentation offload (TSO) on all adapters but
+those based on the 82543, 82544 and 82547 controller chips.
+The identification LEDs of the adapters supported by the
+.Nm
+driver can be controlled via the
+.Xr led 4
+API for localization purposes.
+For further hardware information, see the
+.Pa README
+included with the driver.
+.Pp
+For questions related to hardware requirements,
+refer to the documentation supplied with your Intel PRO/1000 adapter.
+All hardware requirements listed apply to use with
+.Fx .
+.Pp
+Support for Jumbo Frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+The maximum MTU size for Jumbo Frames is 16114.
+.Pp
+This driver version supports VLANs.
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enables auto-negotiation for speed and duplex.
+.It Cm 10baseT/UTP
+Sets 10Mbps operation.
+Use the
+.Cm mediaopt
+option to select
+.Cm full-duplex
+mode.
+.It Cm 100baseTX
+Sets 100Mbps operation.
+Use the
+.Cm mediaopt
+option to select
+.Cm full-duplex
+mode.
+.It Cm 1000baseSX
+Sets 1000Mbps operation.
+Only
+.Cm full-duplex
+mode is supported at this speed.
+.It Cm 1000baseTX
+Sets 1000Mbps operation.
+Only
+.Cm full-duplex
+mode is supported at this speed.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Forces full-duplex operation
+.It Cm half-duplex
+Forces half-duplex operation.
+.El
+.Pp
+Only use
+.Cm mediaopt
+to set the driver to
+.Cm full-duplex .
+If
+.Cm mediaopt
+is not specified, the driver defaults to
+.Cm half-duplex .
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Gigabit Ethernet adapters based on the Intel
+82540, 82541ER, 82541PI, 82542, 82543, 82544, 82545, 82546, 82546EB,
+82546GB, 82547, 82571, 82572, 82573, and 82574 controller chips:
+.Pp
+.Bl -bullet -compact
+.It
+Intel PRO/1000 CT Network Connection (82547)
+.It
+Intel PRO/1000 F Server Adapter (82543)
+.It
+Intel PRO/1000 Gigabit Server Adapter (82542)
+.It
+Intel PRO/1000 GT Desktop Adapter (82541PI)
+.It
+Intel PRO/1000 MF Dual Port Server Adapter (82546)
+.It
+Intel PRO/1000 MF Server Adapter (82545)
+.It
+Intel PRO/1000 MF Server Adapter (LX) (82545)
+.It
+Intel PRO/1000 MT Desktop Adapter (82540)
+.It
+Intel PRO/1000 MT Desktop Adapter (82541)
+.It
+Intel PRO/1000 MT Dual Port Server Adapter (82546)
+.It
+Intel PRO/1000 MT Quad Port Server Adapter (82546EB)
+.It
+Intel PRO/1000 MT Server Adapter (82545)
+.It
+Intel PRO/1000 PF Dual Port Server Adapter (82571)
+.It
+Intel PRO/1000 PF Quad Port Server Adapter (82571)
+.It
+Intel PRO/1000 PF Server Adapter (82572)
+.It
+Intel PRO/1000 PT Desktop Adapter (82572)
+.It
+Intel PRO/1000 PT Dual Port Server Adapter (82571)
+.It
+Intel PRO/1000 PT Quad Port Server Adapter (82571)
+.It
+Intel PRO/1000 PT Server Adapter (82572)
+.It
+Intel PRO/1000 T Desktop Adapter (82544)
+.It
+Intel PRO/1000 T Server Adapter (82543)
+.It
+Intel PRO/1000 XF Server Adapter (82544)
+.It
+Intel PRO/1000 XT Server Adapter (82544)
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va hw.em.rxd
+Number of receive descriptors allocated by the driver.
+The default value is 1024 for adapters newer than 82547,
+and 256 for older ones.
+The 82542 and 82543-based adapters can handle up to 256 descriptors,
+while others can have up to 4096.
+.It Va hw.em.txd
+Number of transmit descriptors allocated by the driver.
+The default value is 1024 for adapters newer than 82547,
+and 256 for older ones.
+The 82542 and 82543-based adapters can handle up to 256 descriptors,
+while others can have up to 4096.
+.It Va hw.em.rx_int_delay
+This value delays the generation of receive interrupts in units of
+1.024 microseconds.
+The default value is 0, since adapters may hang with this feature
+being enabled.
+.It Va hw.em.rx_abs_int_delay
+If
+.Va hw.em.rx_int_delay
+is non-zero, this tunable limits the maximum delay in which a receive
+interrupt is generated.
+.It Va hw.em.tx_int_delay
+This value delays the generation of transmit interrupts in units of
+1.024 microseconds.
+The default value is 64.
+.It Va hw.em.tx_abs_int_delay
+If
+.Va hw.em.tx_int_delay
+is non-zero, this tunable limits the maximum delay in which a transmit
+interrupt is generated.
+.El
+.Sh FILES
+.Bl -tag -width /dev/led/em*
+.It Pa /dev/led/em*
+identification LED device nodes
+.El
+.Sh EXAMPLES
+Make the identification LED of em0 blink:
+.Pp
+.Dl "echo f2 > /dev/led/em0"
+.Pp
+Turn the identification LED of em0 off again:
+.Pp
+.Dl "echo 0 > /dev/led/em0"
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "em%d: Unable to allocate bus resource: memory"
+A fatal initialization error has occurred.
+.It "em%d: Unable to allocate bus resource: interrupt"
+A fatal initialization error has occurred.
+.It "em%d: watchdog timeout -- resetting"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Sh SUPPORT
+For general information and support,
+go to the Intel support website at:
+.Pa http://support.intel.com .
+.Pp
+If an issue is identified with the released source code on the supported kernel
+with a supported adapter, email the specific information related to the
+issue to
+.Aq freebsd@intel.com .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr igb 4 ,
+.Xr led 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.4 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Intel Corporation Aq freebsd@intel.com .
+.Sh BUGS
+Hardware-assisted VLAN processing is disabled by default.
+You can enable it on an
+.Nm
+interface using
+.Xr ifconfig 8 .
diff --git a/share/man/man4/en.4 b/share/man/man4/en.4
new file mode 100644
index 0000000..f9281fa
--- /dev/null
+++ b/share/man/man4/en.4
@@ -0,0 +1,78 @@
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt EN 4
+.Os
+.Sh NAME
+.Nm en
+.Nd "device driver for Midway-based ATM interfaces"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device en"
+.Cd "device atm"
+.Cd "device utopia"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_en_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver supports Midway-based ATM interfaces including the
+Efficient Networks, Inc.\& ENI-155 and Adaptec ANA-59x0.
+Midway is an AAL5 SAR (Segmentation and Reassembly) chip.
+.Pp
+For configuring the card for IP see
+.Xr natmip 4 .
+.Pp
+The following sysctls are recognized by the driver additionally to those
+handled by
+.Xr utopia 4 :
+.Bl -tag -width indent
+.It Va hw.atm.enX.istats
+Contains an array of
+.Vt uint32_t
+with internal driver statistics.
+.It Va hw.atm.enX.debug
+This is a bit map of debugging options.
+This variable is only available when the driver is compiled with debugging
+support.
+.El
+.Pp
+The driver supports the media options
+.Cm sdh ,
+.Cm noscramb
+and
+.Cm unassigned
+(see
+.Xr utopia 4 ) .
+.Sh DIAGNOSTICS
+.Bd -literal
+en0 <Efficient Networks ENI-155p> rev 0 int a irq 5 on pci0:16
+en0: ATM midway v0, board IDs 6.0, Utopia (pipelined), 512KB on-board RAM
+en0: maximum DMA burst length = 64 bytes
+en0: 7 32KB receive buffers, 8 32KB transmit buffers allocated
+.Ed
+.Sh SEE ALSO
+.Xr natm 4 ,
+.Xr natmip 4 ,
+.Xr utopia 4 ,
+.Xr ifconfig 8 ,
+.Xr route 8
+.Sh AUTHORS
+.An Chuck Cranor
+of Washington University implemented
+.Nm
+driver in 1996 for
+.Nx .
+.Sh CAVEATS
+The driver extensively uses DMA on PCI.
+The first
+generation PCI chipsets do not work or exhibit poor performance.
diff --git a/share/man/man4/enc.4 b/share/man/man4/enc.4
new file mode 100644
index 0000000..edbc488
--- /dev/null
+++ b/share/man/man4/enc.4
@@ -0,0 +1,133 @@
+.\" $OpenBSD: enc.4,v 1.22 2006/05/26 08:51:29 jmc Exp $
+.\"
+.\" Copyright (c) 1999 Angelos D. Keromytis
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Angelos D. Keromytis.
+.\" 4. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 28, 2007
+.Dt ENC 4
+.Os
+.Sh NAME
+.Nm enc
+.Nd Encapsulating Interface
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device enc"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+interface is a software loopback mechanism that allows hosts or
+firewalls to filter
+.Xr ipsec 4
+traffic using any firewall package that hooks in via the
+.Xr pfil 9
+framework.
+.Pp
+The
+.Nm
+interface allows an administrator to see incoming and outgoing packets
+before and after they will be or have been processed by
+.Xr ipsec 4
+via
+.Xr tcpdump 1 .
+.Pp
+The
+.Dq Li enc0
+interface inherits all IPsec traffic.
+Thus all IPsec traffic can be filtered based on
+.Dq Li enc0 ,
+and all IPsec traffic could be seen by invoking
+.Xr tcpdump 1
+on the
+.Dq Li enc0
+interface.
+.Pp
+What can be seen with
+.Xr tcpdump 1
+and what will be passed on to the firewalls via the
+.Xr pfil 9
+framework can be independently controlled using the following
+.Xr sysctl 8
+variables:
+.Bl -column net.enc.out.ipsec_filter_mask 0x00000000 0x00000000
+.It Sy "Name Defaults Suggested"
+.It "net.enc.out.ipsec_bpf_mask 0x00000003 0x00000001"
+.It "net.enc.out.ipsec_filter_mask 0x00000001 0x00000001"
+.It "net.enc.in.ipsec_bpf_mask 0x00000001 0x00000002"
+.It "net.enc.in.ipsec_filter_mask 0x00000001 0x00000002"
+.El
+.Pp
+For the incoming path a value of
+.Li 0x1
+means
+.Dq Li before stripping off the outer header
+and
+.Li 0x2
+means
+.Dq Li after stripping off the outer header .
+For the outgoing path
+.Li 0x1
+means
+.Dq Li with only the inner header
+and
+.Li 0x2
+means
+.Dq Li with outer and inner headers .
+.Bd -literal
+incoming path |------|
+---- IPsec processing ---- (before) ---- (after) ----> | |
+ | Host |
+<--- IPsec processing ---- (after) ----- (before) ---- | |
+outgoing path |------|
+.Ed
+.Pp
+Most people will want to run with the suggested defaults for
+.Cm ipsec_filter_mask
+and rely on the security policy database for the outer headers.
+.Sh EXAMPLES
+To see the packets the processed via
+.Xr ipsec 4 ,
+adjust the
+.Xr sysctl 8
+variables according to your need and run:
+.Pp
+.Dl "tcpdump -i enc0"
+.Sh SEE ALSO
+.Xr tcpdump 1 ,
+.Xr bpf 4 ,
+.Xr ipf 4 ,
+.Xr ipfw 4 ,
+.Xr ipsec 4 ,
+.Xr pf 4 ,
+.Xr tcpdump 8
diff --git a/share/man/man4/epair.4 b/share/man/man4/epair.4
new file mode 100644
index 0000000..85e2ea01
--- /dev/null
+++ b/share/man/man4/epair.4
@@ -0,0 +1,119 @@
+.\"-
+.\" Copyright (c) 2008 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This software was developed by CK Software GmbH under sponsorship
+.\" from the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 26, 2009
+.Dt EPAIR 4
+.Os
+.Sh NAME
+.Nm epair
+.Nd A pair of virtual back-to-back connected Ethernet interfaces
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device epair"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_epair_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+is a pair of Ethernet-like software interfaces,
+which are connected back-to-back with a virtual cross-over cable.
+.Pp
+Each
+.Nm
+interface pair is created at runtime using interface cloning.
+This is most easily done with the
+.Xr ifconfig 8
+.Cm create
+command or using the
+.Va cloned_interfaces
+variable in
+.Xr rc.conf 5 .
+While for cloning you only give either
+.Pa epair
+or
+.Pa epair<n>
+the
+.Nm
+pair will be named like
+.Pa epair<n>[ab] .
+This means the names of the first
+.Nm
+interfaces will be
+.Pa epair0a
+and
+.Pa epair0b .
+.Pp
+Like any other Ethernet interface, an
+.Nm
+needs to have a network address.
+Each
+.Nm
+will be assigned a locally administered address by default,
+that is only guaranteed to be unique within one network stack.
+To change the default addresses one may use the SIOCSIFADDR ioctl(2) or
+ifconfig(8) utility.
+.Pp
+The basic intend is to provide connectivity between two virtual
+network stack instances.
+When connected to a
+.Xr if_bridge 4
+one end of the interface pair can also be part of another (virtual) LAN.
+As with any other Ethernet interface one can configure
+.Xr vlan 4
+support on top of it.
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr altq 4 ,
+.Xr bpf 4 ,
+.Xr if_bridge 4 ,
+.Xr vlan 4 ,
+.Xr loader.conf 5 ,
+.Xr rc.conf 5 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+interface first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+The
+.Nm
+interface was written by
+.An Bjoern A. Zeeb, CK Software GmbH,
+under sponsorship from the FreeBSD Foundation.
diff --git a/share/man/man4/esp.4 b/share/man/man4/esp.4
new file mode 100644
index 0000000..6ebc85b
--- /dev/null
+++ b/share/man/man4/esp.4
@@ -0,0 +1,115 @@
+.\"
+.\" Copyright (c) 2011 Marius Strobl <marius@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 1, 2011
+.Dt ESP 4
+.Os
+.Sh NAME
+.Nm esp
+.Nd Emulex ESP, NCR 53C9x and QLogic FAS families based SCSI controllers
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device esp"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_esp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the
+.Tn AMD
+Am53C974, the
+.Tn Emulex
+ESP100, ESP100A, ESP200 and ESP406, the
+.Tn NCR
+53C90, 53C94 and 53C96 as well as the
+.Tn QLogic
+FAS100A, FAS216, FAS366 and FAS408
+.Tn SCSI
+controller chips found in a wide variety of systems and peripheral boards.
+.Sh HARDWARE
+Controllers supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+MELCO IFC-DP (PC-98)
+.It
+Sun ESP family
+.It
+Sun FAS family
+.It
+Tekram DC390
+.It
+Tekram DC390T
+.El
+.Sh SEE ALSO
+.Xr cd 4 ,
+.Xr ch 4 ,
+.Xr da 4 ,
+.Xr intro 4 ,
+.Xr pci 4 ,
+.Xr sa 4 ,
+.Xr sbus 4 ,
+.Xr scsi 4 ,
+.Xr camcontrol 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Nx 1.3 .
+The first
+.Fx
+version to include it was
+.Fx 5.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was ported to
+.Fx
+by
+.An Scott Long
+.Aq scottl@FreeBSD.org
+and later on considerably improved by
+.An Marius Strobl
+.Aq marius@FreeBSD.org .
+.Sh BUGS
+The
+.Nm
+driver should read the EEPROM settings of
+.Tn Tekram
+controllers.
diff --git a/share/man/man4/est.4 b/share/man/man4/est.4
new file mode 100644
index 0000000..4d230e0
--- /dev/null
+++ b/share/man/man4/est.4
@@ -0,0 +1,120 @@
+.\"
+.\" Copyright (c) 2012 Sean Bruno <sbruno@freebsd.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 18, 2012
+.Dt EST 4
+.Os
+.Sh NAME
+.Nm est
+.Nd Enhanced Speedstep Technology
+.Sh SYNOPSIS
+To compile this capability into your kernel
+place the following line in your kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "device cpufreq"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+interface provides support for the Intel Enhanced Speedstep Technology.
+.Pp
+Note that
+.Nm
+capabilities are automatically loaded by the
+.Xr cpufreq 4
+driver.
+.Sh LOADER TUNABLES
+The
+.Nm
+interface is intended to allow
+.Xr cpufreq 4
+to access and implement Intel Enhanced SpeedStep Technology via
+.Xr acpi 4
+and the acpi_perf interface accessors.
+If the default settings are not optimal, the following sysctls can be
+used to modify or monitor
+.Nm
+behavior.
+.Bl -tag -width indent
+.It hw.est.msr_info
+Attempt to infer information from direct probing of the msr.
+Should only be used in diagnostic cases.
+.Pq default 0
+.It hw.est.strict
+Validate frequency requested is accepted by the cpu when set.
+It appears that this will only work on single core cpus.
+.Pq default 0
+.El
+.Sh SYSCTL VARIABLES
+The following
+.Xr sysctl 8
+values are available
+.Bl -tag -width indent
+.It Va dev.est.%d.\%desc
+Description of support, almost always Enhanced SpeedStep Frequency Control.
+.It dev.est.0.%desc: Enhanced SpeedStep Frequency Control
+.It Va dev.est.%d.\%driver
+Driver in use, always est.
+.It dev.est.0.%driver: est
+.It Va dev.est.%d.\%parent
+.It dev.est.0.%parent: cpu0
+The cpu that is exposing these frequencies.
+For example
+.Va cpu0 .
+.It Va dev.est.%d.freq_settings .
+The valid frequencies that are allowed by this CPU and their step values.
+.It dev.est.0.freq_settings: 2201/45000 2200/45000 2000/39581 1900/37387
+1800/34806 1700/32703 1600/30227 1500/28212 1400/25828 1300/23900 1200/21613
+1100/19775 1000/17582 900/15437 800/13723
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "est%d: <Enhanced SpeedStep Frequency Control> on cpu%d"
+.Pp
+Indicates normal startup of this interface.
+.It "est: CPU supports Enhanced Speedstep, but is not recognized."
+.It "est: cpu_vendor GenuineIntel, msr 471c471c0600471c"
+.It "device_attach: est%d attach returned 6"
+.Pp
+Indicates all attempts to attach to this interface have failed.
+This usually indicates an improper BIOS setting restricting O/S
+control of the CPU speeds.
+Consult your BIOS documentation for more details.
+.El
+.Sh COMPATIBILITY
+.Nm
+is only found on supported Intel CPUs.
+.Sh SEE ALSO
+.Xr cpufreq 4
+.Rs
+.%T "Intel 64 and IA-32 Architectures Software Developer Manuals"
+.%U "http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html"
+.Re
+.Sh AUTHORS
+This manual page was written by
+.An Sean Bruno Aq sbruno@FreeBSD.org .
diff --git a/share/man/man4/et.4 b/share/man/man4/et.4
new file mode 100644
index 0000000..9b99470
--- /dev/null
+++ b/share/man/man4/et.4
@@ -0,0 +1,186 @@
+.\"
+.\" Copyright (c) 2007 The DragonFly Project. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in
+.\" the documentation and/or other materials provided with the
+.\" distribution.
+.\" 3. Neither the name of The DragonFly Project nor the names of its
+.\" contributors may be used to endorse or promote products derived
+.\" from this software without specific, prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
+.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 9, 2011
+.Dt ET 4
+.Os
+.Sh NAME
+.Nm et
+.Nd "Agere ET1310 10/100/Gigabit Ethernet driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device et"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_et_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports PCI Express Ethernet adapters based on the Agere ET1310 chip.
+.\".Pp
+.\"Support for Jumbo Frames is provided via the interface MTU setting.
+.\"Selecting an MTU larger than 1500 bytes with the
+.\".Xr ifconfig 8
+.\"utility configures the adapter to receive and transmit Jumbo Frames.
+.\"The maximum MTU setting for Jumbo Frames is 15572.
+.\"This value coincides with the maximum Jumbo Frames size of 15594.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Pp
+.Bl -tag -width 10baseT/UTP -compact
+.It autoselect
+Enable autoselection of the media types and options.
+The user can manually override
+the autoselected mode by adding media options to the
+.Pa /etc/rc.conf
+file.
+.Pp
+.It 10baseT/UTP
+Set 10Mbps operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.Pp
+.It 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.Pp
+.It 1000baseT
+Set 1000Mbps (Gigabit Ethernet) operation.
+The
+.Ar mediaopt
+option can only be set to
+.Ar full-duplex
+mode.
+.El
+.Pp
+The
+.Nm
+driver supports the following
+.Ar media
+options:
+.Pp
+.Bl -tag -width full-duplex -compact
+.It full-duplex
+Force full-duplex operation.
+.Pp
+.It half-duplex
+Force half-duplex operation.
+.El
+.Pp
+Note that the 1000baseT media type is only available
+if it is supported by the adapter.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Agere ET1310 10/100/Gigabit
+Ethernet adapters.
+.Sh TUNABLES
+.Bl -tag -width ".Va hw.et.rx_intr_npkts"
+.It Va hw.et.rx_intr_npkts
+This value controls how many packets should be received
+before a receive interrupt is generated.
+The default value is 32.
+It is recommended to set this value above 38 to prevent the host from being
+livelocked under a high degree of stress.
+.It Va hw.et.rx_intr_delay
+This value delays the generation of receive interrupts
+in units of ~4 microseconds.
+It is used together with
+.Va hw.et.rx_intr_npkts
+to achieve RX interrupt moderation.
+The default value is 20.
+.It Va hw.et.tx_intr_nsegs
+This value controls how many segments (not packets) should be transmitted
+before a transmit interrupt is generated.
+The default value is 126.
+It is recommended to set this value below 280 to prevent
+the TX ring from underflowing.
+.It Va hw.et.timer
+This value controls how often a timer interrupt should be generated.
+It is used together with
+.Va hw.et.tx_intr_nsegs
+to achieve TX interrupt moderation.
+The default value is 1000000000 (nanoseconds).
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Dx 1.11 .
+The first
+.Fx
+release to include it was
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Sepherosa Ziehau Aq sepherosa@gmail.com
+for
+.Dx .
+It was ported to
+.Fx
+by
+.An Xin LI Aq delphij@FreeBSD.org .
diff --git a/share/man/man4/eventtimers.4 b/share/man/man4/eventtimers.4
new file mode 100644
index 0000000..656c8e0
--- /dev/null
+++ b/share/man/man4/eventtimers.4
@@ -0,0 +1,153 @@
+.\" Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 13, 2012
+.Dt EVENTTIMERS 4
+.Os
+.Sh NAME
+.Nm eventtimers
+.Nd kernel event timers subsystem
+.Sh SYNOPSIS
+Kernel uses several types of time-related devices, such as: real time clocks,
+time counters and event timers.
+Real time clocks responsible for tracking real world time, mostly when system
+is down.
+Time counters are responsible for generation of monotonically increasing
+timestamps for precise uptime tracking purposes, when system is running.
+Event timers are responsible for generating interrupts at specified time or
+periodically, to run different time-based events.
+This page is about the last.
+.Sh DESCRIPTION
+Kernel uses time-based events for many different purposes: scheduling,
+statistics, time keeping, profiling and many other things, based on
+.Xr callout 9
+mechanism.
+These purposes now grouped into three main callbacks:
+.Bl -tag -width ".Fn hardclock"
+.It Fn hardclock
+.Xr callout 9
+and timekeeping events entry.
+Called with frequency defined by
+.Va hz
+variable,
+usually 1000Hz.
+.It Fn statclock
+statistics and scheduler events entry.
+Called with frequency about 128Hz.
+.It Fn profclock
+profiler events entry.
+When enabled, called with frequency about 8KHz.
+.El
+.Pp
+Different platforms provide different kinds of timer hardware.
+The goal of the event timers subsystem is to provide unified way to control
+that hardware, and to use it, supplying kernel with all required time-based
+events.
+.Pp
+Each driver implementing event timers, registers them at the subsystem.
+It is possible to see the list of present event timers, like this, via
+.Va kern.eventtimer
+sysctl:
+.Bd -literal
+kern.eventtimer.choice: HPET(550) LAPIC(400) i8254(100) RTC(0)
+kern.eventtimer.et.LAPIC.flags: 15
+kern.eventtimer.et.LAPIC.frequency: 0
+kern.eventtimer.et.LAPIC.quality: 400
+kern.eventtimer.et.i8254.flags: 1
+kern.eventtimer.et.i8254.frequency: 1193182
+kern.eventtimer.et.i8254.quality: 100
+kern.eventtimer.et.RTC.flags: 17
+kern.eventtimer.et.RTC.frequency: 32768
+kern.eventtimer.et.RTC.quality: 0
+kern.eventtimer.et.HPET.flags: 7
+kern.eventtimer.et.HPET.frequency: 14318180
+kern.eventtimer.et.HPET.quality: 550
+.Ed
+.Pp
+where:
+.Bl -inset
+.It Va kern.eventtimer.et. Ns Ar X Ns Va .flags
+is a
+bitmask, defining event timer capabilities:
+.Bl -tag -offset indent -width indent -compact
+.It 1
+periodic mode supported,
+.It 2
+one-shot mode supported,
+.It 4
+timer is per-CPU,
+.It 8
+timer may stop when CPU goes to sleep state,
+.It 16
+timer supports only power-of-2 divisors.
+.El
+.It Va kern.eventtimer.et. Ns Ar X Ns Va .frequency
+is a
+timer base frequency,
+.It Va kern.eventtimer.et. Ns Ar X Ns Va .quality
+is an
+integral value, defining how good is this timer, comparing to others.
+.El
+.Pp
+Timers management code of the kernel chooses one timer from that list.
+Current choice can be read and affected via
+.Va kern.eventtimer.timer
+tunable/sysctl.
+Several other tunables/sysctls are affecting how exactly this timer is used:
+.Bl -inset
+.It Va kern.eventtimer.periodic
+allows to choose periodic and one-shot operation mode.
+In periodic mode, periodic interrupts from timer hardware are taken as the
+only source of time for time events.
+One-shot mode instead uses currently selected time counter to precisely
+schedule all needed events and programs event timer to generate interrupt
+exactly in specified time.
+Default value depends of chosen timer capabilities, but one-shot mode is
+preferred, until other is forced by user or hardware.
+.It Va kern.eventtimer.singlemul
+in periodic mode specifies how much times higher timer frequency should be,
+to not strictly alias
+.Fn hardclock
+and
+.Fn statclock
+events.
+Default values are
+1, 2 or 4, depending on configured HZ value.
+.It Va kern.eventtimer.idletick
+makes each CPU to receive every timer interrupt independently of whether they
+busy or not.
+By default this options is disabled.
+If chosen timer is per-CPU
+and runs in periodic mode, this option has no effect - all interrupts are
+always generating.
+.El
+.Sh SEE ALSO
+.Xr apic 4 ,
+.Xr atrtc 4 ,
+.Xr attimer 4 ,
+.Xr hpet 4 ,
+.Xr timecounters 4 ,
+.Xr eventtimers 9
diff --git a/share/man/man4/exca.4 b/share/man/man4/exca.4
new file mode 100644
index 0000000..90b1330
--- /dev/null
+++ b/share/man/man4/exca.4
@@ -0,0 +1,40 @@
+.\"
+.\" Copyright (c) 2003 M. Warner Losh
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 23, 2003
+.Dt EXCA 4
+.Os
+.Sh NAME
+.Nm exca
+.Nd helper module for PC Card and CardBus systems
+.Sh DESCRIPTION
+The
+.Nm
+module is used to implement the Intel ExCA interface to
+PC Cards.
+.Sh SEE ALSO
+.Xr pccbb 4 ,
+.Xr pcic 4
diff --git a/share/man/man4/faith.4 b/share/man/man4/faith.4
new file mode 100644
index 0000000..f0a2df6
--- /dev/null
+++ b/share/man/man4/faith.4
@@ -0,0 +1,133 @@
+.\" $KAME: faith.4,v 1.9 2001/04/27 17:26:35 itojun Exp $
+.\"
+.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the project nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 23, 2012
+.Dt FAITH 4
+.Os
+.Sh NAME
+.Nm faith
+.Nd IPv6-to-IPv4 TCP relay capturing interface
+.Sh SYNOPSIS
+.Cd "device faith"
+.Sh DESCRIPTION
+The
+.Nm
+interface captures IPv6 TCP traffic,
+for implementing userland IPv6-to-IPv4 TCP relay
+like
+.Xr faithd 8 .
+.Pp
+Each
+.Nm
+interface is created at runtime using interface cloning.
+This is
+most easily done with the
+.Xr ifconfig 8
+.Cm create
+command or using the
+.Va cloned_interfaces
+variable in
+.Xr rc.conf 5 .
+.Pp
+Special action will be taken when IPv6 TCP traffic is seen on a router,
+and the default routing table suggests to route it to the
+.Nm
+interface.
+In this case, the packet will be accepted by the router,
+regardless of the list of IPv6 interface addresses assigned to the router.
+The packet will be captured by an IPv6 TCP socket, if it has the
+.Dv IN6P_FAITH
+flag turned on and matching address/port pairs.
+As a result,
+.Nm
+will let you capture IPv6 TCP traffic to some specific destination addresses.
+Userland programs, such as
+.Xr faithd 8
+can use this behavior to relay IPv6 TCP traffic to IPv4 TCP traffic.
+The program can accept some specific IPv6 TCP traffic, perform
+.Xr getsockname 2
+to get the IPv6 destination address specified by the client,
+and perform application-specific address mapping to relay IPv6 TCP to IPv4 TCP.
+.Pp
+The
+.Dv IN6P_FAITH
+flag on a IPv6 TCP socket can be set by using
+.Xr setsockopt 2 ,
+with level
+.Dv IPPROTO_IPV6
+and optname
+.Dv IPv6_FAITH .
+.Pp
+To handle error reports by ICMPv6, some ICMPv6 packets routed to an
+.Nm
+interface will be delivered to IPv6 TCP, as well.
+.Pp
+To understand how
+.Nm
+can be used, take a look at the source code of
+.Xr faithd 8 .
+.Pp
+As the
+.Nm
+interface implements potentially dangerous operations,
+great care must be taken when configuring it.
+To avoid possible misuse, the
+.Xr sysctl 8
+variable
+.Li net.inet6.ip6.keepfaith
+must be set to
+.Li 1
+prior to using the interface.
+When
+.Li net.inet6.ip6.keepfaith
+is
+.Li 0 ,
+no packets will be captured by the
+.Nm
+interface.
+.Pp
+The
+.Nm
+interface is intended to be used on routers, not on hosts.
+.\"
+.Sh SEE ALSO
+.Xr inet 4 ,
+.Xr inet6 4 ,
+.Xr faithd 8
+.Rs
+.%A Jun-ichiro itojun Hagino
+.%A Kazu Yamamoto
+.%T "An IPv6-to-IPv4 transport relay translator"
+.%O RFC3142
+.Re
+.Sh HISTORY
+The FAITH IPv6-to-IPv4 TCP relay translator first appeared in the
+WIDE hydrangea IPv6 stack.
diff --git a/share/man/man4/fatm.4 b/share/man/man4/fatm.4
new file mode 100644
index 0000000..51dc6fc
--- /dev/null
+++ b/share/man/man4/fatm.4
@@ -0,0 +1,115 @@
+.\"
+.\" Copyright (c) 2001-2003
+.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Author: Hartmut Brandt <harti@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.\" fatm(4) man page
+.\"
+.Dd May 15, 2003
+.Dt FATM 4
+.Os
+.Sh NAME
+.Nm fatm
+.Nd "device driver for Fore PCA200E ATM interfaces"
+.Sh SYNOPSIS
+.Cd device fatm
+.Cd device utopia
+.Cd device atm
+.Pp
+.Cd options NATM
+.Sh DESCRIPTION
+The
+.Nm
+device driver supports the FORE (now Marconi) PCA200E ATM interface cards.
+The driver interfaces with the
+.Xr natm 4
+framework,
+.Xr netgraph 4
+and HARP.
+It provides only PVC services.
+Signalling, ATMARP, ILMI and other
+higher layer protocols are implemented using
+.Xr netgraph 4
+or HARP.
+.Pp
+For configuring the card for IP see
+.Xr natmip 4 .
+The following sysctls are recognized by the driver additionally to those
+handled by
+.Xr utopia 4 :
+.Bl -tag -width indent
+.It Va hw.atm.fatm Ns Ar N Ns Va .stats
+Returns a device specific statistic list of
+.Vt uint32_t
+statistic counters.
+.It Va hw.atm.fatm Ns Ar N Ns Va .istats
+Returns a list of
+.Vt uint32_t
+with internal driver statistics.
+.It Va hw.atm.fatm Ns Ar N Ns Va .retry_tx
+If this is set packets are stuffed back into the interface's send queue when
+the cards transmit queue is found to be full.
+They are transmitted later.
+If this is not set the packets are dropped.
+It may be useful to set this
+if only UBR traffic is sent.
+.It Va hw.atm.fatm Ns Ar N Ns Va .debug
+.Bf Em
+(Only if debugging enabled.)
+.Ef
+These are debugging flags.
+See
+.Pa src/sys/dev/fatm/if_fatmvar.h
+for the possible flags.
+.El
+.Pp
+The driver supports the media options
+.Cm sdh , noscramb
+and
+.Cm unassigned
+(see
+.Xr utopia 4 ) .
+.Sh DIAGNOSTICS
+.Bd -literal
+fatm0: <FORE PCA200E> mem 0xd5800000-0xd59fffff irq 9 at device 9.0 on pci0
+.Ed
+.Sh SEE ALSO
+.Xr natm 4 ,
+.Xr natmip 4 ,
+.Xr utopia 4
+.Sh AUTHORS
+.An Harti Brandt Aq harti@FreeBSD.org
+.Sh BUGS
+These cards can CBR shape a single VCC only.
+It is currently possible to
+request more than one CBR connection.
+In this case all the timing will be
+wrong.
+See
+.Xr hatm 4
+for a better card.
diff --git a/share/man/man4/fd.4 b/share/man/man4/fd.4
new file mode 100644
index 0000000..0becf51
--- /dev/null
+++ b/share/man/man4/fd.4
@@ -0,0 +1,101 @@
+.\" Copyright (c) 1990, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)fd.4 8.1 (Berkeley) 6/9/93
+.\" $FreeBSD$
+.\"
+.Dd June 9, 1993
+.Dt FD 4
+.Os
+.Sh NAME
+.Nm fd ,
+.Nm stdin ,
+.Nm stdout ,
+.Nm stderr
+.Nd file descriptor files
+.Sh DESCRIPTION
+The files
+.Pa /dev/fd/0
+through
+.Pa /dev/fd/#
+refer to file descriptors which can be accessed through the file
+system.
+If the file descriptor is open and the mode the file is being opened
+with is a subset of the mode of the existing descriptor, the call:
+.Bd -literal -offset indent
+fd = open("/dev/fd/0", mode);
+.Ed
+.Pp
+and the call:
+.Bd -literal -offset indent
+fd = fcntl(0, F_DUPFD, 0);
+.Ed
+.Pp
+are equivalent.
+.Pp
+Opening the files
+.Pa /dev/stdin ,
+.Pa /dev/stdout
+and
+.Pa /dev/stderr
+is equivalent to the following calls:
+.Bd -literal -offset indent
+fd = fcntl(STDIN_FILENO, F_DUPFD, 0);
+fd = fcntl(STDOUT_FILENO, F_DUPFD, 0);
+fd = fcntl(STDERR_FILENO, F_DUPFD, 0);
+.Ed
+.Pp
+Flags to the
+.Xr open 2
+call other than
+.Dv O_RDONLY ,
+.Dv O_WRONLY
+and
+.Dv O_RDWR
+are ignored.
+.Sh IMPLEMENTATION NOTES
+By default,
+.Pa /dev/fd
+is provided by
+.Xr devfs 5 ,
+which provides nodes for the first three file descriptors.
+Some sites may require nodes for additional file descriptors; these can be
+made available by mounting
+.Xr fdescfs 5
+on
+.Pa /dev/fd .
+.Sh FILES
+.Bl -tag -width /dev/stderr -compact
+.It Pa /dev/fd/#
+.It Pa /dev/stdin
+.It Pa /dev/stdout
+.It Pa /dev/stderr
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr devfs 5 ,
+.Xr fdescfs 5
diff --git a/share/man/man4/fdc.4 b/share/man/man4/fdc.4
new file mode 100644
index 0000000..7fadf0a
--- /dev/null
+++ b/share/man/man4/fdc.4
@@ -0,0 +1,343 @@
+.\"
+.\" Copyright (c) 1994 Wilko Bulte
+.\" Copyright (c) 2001 Joerg Wunsch
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 11, 2006
+.Dt FDC 4
+.Os
+.Sh NAME
+.Nm fdc
+.Nd "PC architecture floppy disk controller driver"
+.Sh SYNOPSIS
+.Cd device fdc
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.fdc.0.at="isa"
+.Cd hint.fdc.0.port="0x3F0"
+.Cd hint.fdc.0.irq="6"
+.Cd hint.fdc.0.drq="2"
+.Cd hint.fdc.0.flags="0x0"
+.Cd hint.fd.0.at="fdc0"
+.Cd hint.fd.0.drive="0"
+.Cd hint.fd.0.flags="0x0"
+.Cd hint.fd.1.at="fdc0"
+.Cd hint.fd.1.drive="1"
+.Cd hint.fd.1.flags="0x0"
+.Sh DESCRIPTION
+.Ss Device Usage
+This driver provides access to floppy disk drives.
+Floppy disks using
+either FM (single-density) or MFM (double or high-density) recording
+can be handled.
+.Pp
+Floppy disk controllers can connect up to four drives each.
+The
+.Nm
+driver can currently handle up to two drives per controller (or four
+drives on ACPI).
+Upon
+driver initialization, an attempt is made to find out the type of the
+floppy controller in use.
+The known controller types are either the
+original NE765 or i8272 chips, or alternatively
+.Em enhanced
+controllers that are compatible with the NE72065 or i82077 chips.
+These enhanced controllers (among other enhancements) implement a FIFO
+for floppy data transfers that will automatically be enabled once an
+enhanced chip has been detected.
+This FIFO activation can be disabled
+using the per-controller flags value of
+.Ar 0x1 .
+.Pp
+By default, this driver creates a single device node
+.Pa /dev/fd Ns Ar N
+for each attached drive with number
+.Ar N .
+For historical reasons, device nodes that use a trailing UFS-style
+partition letter (ranging from
+.Sq a
+through
+.Sq h )
+can also be accessed, which will be implemented as symbolic links to
+the main device node.
+.Pp
+Accessing the main device node will attempt to autodetect the density
+of the available medium for multi-density devices.
+Thus it is
+possible to use either a 720 KB medium or a 1440 KB medium in a
+high-density 3.5 inch standard floppy drive.
+Normally, this
+autodetection will only happen once at the first call to
+.Xr open 2
+for the device after inserting the medium.
+This assumes the drive
+offers proper changeline support so media changes can be detected by
+the driver.
+To indicate a drive that does not have the changeline support,
+this can be overridden using the per-drive device flags value of
+.Ar 0x10
+(causing each call to
+.Xr open 2
+to perform the autodetection).
+.Pp
+When trying to use a floppy device with special-density media, other
+device nodes can be created, of the form
+.Pa /dev/fd Ns Ar N . Ns Ar MMMM ,
+where
+.Ar N
+is the drive number, and
+.Ar MMMM
+is a number between one and four digits describing the device density.
+Up to 15 additional subdevices per drive can be created that way.
+The
+administrator is free to decide on a policy how to assign these
+numbers.
+The two common policies are to either implement subdevices
+numbered 1 through 15, or to use a number that describes the medium
+density in kilobytes.
+Initially, each of those devices will be
+configured to the maximal density that is possible for the drive type
+(like 1200 KB for 5.25 inch HD drives or 1440 KB for 3.5 inch HD
+drives).
+The desired density to be used on that subdevice needs to be
+configured using
+.Xr fdcontrol 8 .
+.Pp
+Drive types are configured using the lower four bits of the per-drive
+device flags.
+The following values can be specified:
+.Bl -tag -width 2n -offset indent
+.It Ar 1
+5.25 inch double-density device with 40 cylinders (360 KB native
+capacity)
+.It Ar 2
+5.25 inch high-density device with 80 cylinders (1200 KB native
+capacity)
+.It Ar 3
+3.5 inch double-density device with 80 cylinders (720 KB native
+capacity)
+.It Ar 4
+3.5 inch high-density device with 80 cylinders (1440 KB native
+capacity)
+.It Ar 5
+3.5 inch extra-density device with 80 cylinders (2880 KB native
+capacity, usage currently restricted to at most 1440 KB media)
+.It Ar 6
+Same as type 5, available for compatibility with some BIOSes
+.El
+.Pp
+On IA32 architectures, the drive type can be specified as 0 for the
+drives.
+In that case, the CMOS configuration memory will be
+consulted to obtain the value for that drive.
+The ACPI probe automatically determines these values via the _FDE and
+_FDI methods, but this can be overridden by specifying a drive type hint.
+.Pp
+Normally, each configured drive will be probed at initialization
+time, using a short seek sequence.
+This is intended to find out about
+drives that have been configured but are actually missing or
+otherwise not responding.
+(The ACPI probe method does not perform this seek.)
+In some environments (like laptops with
+detachable drives), it might be desirable to bypass this drive probe,
+and pretend a drive to be there so the driver autoconfiguration will
+work even if the drive is currently not present.
+For that purpose, a
+per-drive device flags value of
+.Ar 0x20
+needs to be specified.
+.Ss Programming Interface
+In addition to the normal read and write functionality, the
+.Nm
+driver offers a number of configurable options using
+.Xr ioctl 2 .
+In order to access any of this functionality, programmers need to
+include the header file
+.In sys/fdcio.h
+into their programs.
+The call to
+.Xr open 2
+can be performed in two possible ways.
+When opening the device
+without the
+.Dv O_NONBLOCK
+flag set, the device is opened in a normal way, which would cause the
+main device nodes to perform automatic media density selection, and which
+will yield a file descriptor that is fully available for any I/O operation
+or any of the following
+.Xr ioctl 2
+commands.
+.Pp
+When opening the device with
+.Dv O_NONBLOCK
+set, automatic media density selection will be bypassed, and the device
+remains in a half-opened state.
+No actual I/O operations are possible, but
+many of the
+.Xr ioctl 2
+commands described below can be performed.
+This mode is intended for
+access to the device without the requirement to have an accessible
+media present, like for status inquiries to the drive, or in order to
+format a medium.
+.Dv O_NONBLOCK
+needs to be cleared before I/O operations are possible on the descriptor,
+which requires a prior specification of the density using the
+.Dv FD_STYPE
+command (see below).
+Operations that are not allowed on the half-opened
+descriptor will cause an error value of
+.Er EAGAIN .
+.Pp
+The following
+.Xr ioctl 2
+commands are currently available:
+.Bl -tag -width ".Dv FD_READID"
+.It Dv FD_FORM
+Used to format a floppy disk medium.
+Third argument is a pointer to a
+.Vt "struct fd_formb"
+specifying which track to format, and which parameters to fill into
+the ID fields of the floppy disk medium.
+.It Dv FD_GTYPE
+Returns the current density definition record for the selected device.
+Third argument is a pointer to
+.Vt "struct fd_type" .
+.It Dv FD_STYPE
+Adjusts the density definition of the selected device.
+Third argument
+is a pointer to
+.Vt "struct fd_type" .
+For the fixed-density subdevices (1 through 15 per drive), this
+operation is restricted to a process with superuser privileges.
+For
+the auto-selecting subdevice 0, the operation is temporarily allowed
+to any process, but this setting will be lost again upon the next
+autoselection.
+This can be used when formatting a new medium (which
+will require to open the device using
+.Dv O_NONBLOCK ,
+and thus to later adjust the density using
+.Dv FD_STYPE ) .
+.It Dv FD_GOPTS
+Obtain the current drive options.
+Third argument is a pointer to
+.Vt int ,
+containing a bitwise union of the following possible flag values:
+.Bl -tag -width ".Dv FDOPT_NOERRLOG"
+.It Dv FDOPT_NORETRY
+Do not automatically retry operations upon failure.
+.It Dv FDOPT_NOERRLOG
+Do not cause
+.Dq "hard error"
+kernel logs for failed I/O operations.
+.It Dv FDOPT_NOERROR
+Do not indicate I/O errors when returning from
+.Xr read 2
+or
+.Xr write 2
+system calls.
+The caller is assumed to use
+.Dv FD_GSTAT
+calls in order to inquire about the success of each operation.
+This
+is intended to allow even erroneous data from bad blocks to be
+retrieved using normal I/O operations.
+.It Dv FDOPT_AUTOSEL
+Device performs automatic density selection.
+Unlike the above flags,
+this one is read-only.
+.El
+.It Dv FD_SOPTS
+Set device options, see above for their meaning.
+Third argument is a
+pointer to
+.Vt int .
+Drive options will always be cleared when closing the descriptor.
+.It Dv FD_DEBUG
+Set the driver debug level.
+Third argument is a pointer to
+.Vt int ,
+level 0 turns off all debugging.
+Only applicable if the driver has
+been configured with
+.Cd "options FDC_DEBUG" .
+.It Dv FD_CLRERR
+Clear the internal low-level error counter.
+Normally, controller-level
+I/O errors are only logged up to
+.Dv FDC_ERRMAX
+errors (currently defined to 100).
+This command resets the counter.
+Requires superuser privileges.
+.It Dv FD_READID
+Read one sector ID field from the floppy disk medium.
+Third argument is
+a pointer to
+.Vt "struct fdc_readid" ,
+where the read data will be returned.
+Can be used to analyze a floppy
+disk medium.
+.It Dv FD_GSTAT
+Return the recent floppy disk controller status, if available.
+Third
+argument is a pointer to
+.Vt "struct fdc_status" ,
+where the status registers (ST0, ST1, ST2, C, H, R, and N) are being
+returned.
+.Er EINVAL
+will be caused if no recent status is available.
+.It Dv FD_GDTYPE
+Returns the floppy disk drive type.
+Third argument is a pointer to
+.Vt "enum fd_drivetype" .
+This type is the same as being used in the per-drive configuration
+flags, or in the CMOS configuration data or ACPI namespace on IA32 systems.
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/fd*" -compact
+.It Pa /dev/fd*
+floppy disk device nodes
+.El
+.Sh SEE ALSO
+.Xr fdformat 1 ,
+.Xr fdread 1 ,
+.Xr fdwrite 1 ,
+.Xr ioctl 2 ,
+.Xr open 2 ,
+.Xr read 2 ,
+.Xr write 2 ,
+.Xr fdcontrol 8
+.Sh AUTHORS
+.An -nosplit
+This man page was initially written by
+.An Wilko Bulte ,
+and later vastly rewritten by
+.An J\(:org Wunsch .
diff --git a/share/man/man4/fdt.4 b/share/man/man4/fdt.4
new file mode 100644
index 0000000..12542d0
--- /dev/null
+++ b/share/man/man4/fdt.4
@@ -0,0 +1,186 @@
+.\"
+.\" Copyright (c) 2010 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This software was developed by Semihalf under sponsorship from
+.\" the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 12, 2010
+.Dt FDT 4
+.Os
+.Sh NAME
+.Nm fdt
+.Nd Flattened Device Tree support
+.Sh SYNOPSIS
+.Cd "options FDT"
+.Cd "makeoptions FDT_DTS_FILE=<board name>.dts"
+.Cd "options FDT_DTB_STATIC"
+.Sh DESCRIPTION
+.Em Flattened Device Tree
+is a mechanism for describing computer hardware resources, which cannot be
+probed or self enumerated, in a uniform and portable way. The primary
+consumers of this technology are
+.Em embedded systems,
+where a lot of designs are based on similar chips, but have different
+assignment of pins, memory layout, addresses bindings, interrupts routing and
+other resources.
+.Pp
+Configuration data, which cannot be self discovered in run-time, has to be
+supplied from external source. The concept of a flattened device tree is a
+platform and architecture independent approach for resolving such problems.
+The idea is inherited from Open Firmware IEEE 1275 device-tree notion, and has
+been successfully adopted by the embedded industry. The scheme works in the
+following way:
+.Bl -bullet
+.It
+Hardware platform resources are
+.Em manually
+described in a human readable text source format, where all non
+self-enumerating information is gathered.
+.It
+This source description is converted
+.Em (compiled)
+into a binary object i.e. a flattened device tree
+.Em blob
+which is passed to the kernel at boot time.
+.It
+The kernel (driver) learns about hardware resources details and dependencies
+from this [externally supplied] blob, which eliminates the need for embedding
+any information about the underlying platform hardware resources in the kernel.
+.It
+The flattened device tree mechanism in principle does not depend on any
+particular first-stage bootloader or firmware features. The only overall
+requirement for the environment is to provide a complete device tree
+description to the kernel.
+.El
+.Pp
+The
+.Nm
+layer allows any platform code in the kernel to retrieve information about
+hardware resources from a unified origin, which brings advantages to the
+embedded applications (eliminates hard-coded configuration approach, enforces
+code to be data driven and extensible) leading to easier porting and
+maintenance.
+.Sh DEFINITIONS
+.Bl -tag -width Ar
+.It Va Device tree source (DTS)
+The device tree source is a text file which describes hardware resources of a
+computer system in a human-readable form, with certain hierarchical structure
+(a tree). The default location for DTS files
+in the
+.Fx
+source repository is
+.Pa sys/boot/fdt/dts
+directory.
+.It Va Device tree blob (DTB)
+The textual device tree description (DTS file) is first converted (compiled)
+into a binary object (the device tree blob) i.e. the DTB, which is handed over
+to the final consumer (typically kernel) for parsing and processing of its
+contents.
+.It Va Device tree compiler (DTC)
+A utility program executed on the host, which transforms (compiles) a textual
+description of a device tree (DTS) into a binary object (DTB).
+.It Va Device tree bindings
+While the device tree textual description and the binary object are media to
+convey the hardware configuration information, an actual meaning and
+interpretation of the contents are defined by the device tree
+.Pa bindings .
+They are certain conventions describing definitions (encoding) of particular
+nodes in a device tree and their properties, allowed values, ranges and so on.
+Such reference conventions were provided by the legacy Open Firmware bindings,
+further supplemented by the ePAPR specification.
+.El
+.Sh "BUILDING THE WORLD"
+In order for the system to support
+.Nm
+it is required that
+.Fx
+world be built with the
+.Pa WITH_FDT
+build knob supplied either via
+.Xr src.conf 5
+or command line defined with -D.
+.Pp
+This creates the user space
+.Pa dtc
+compiler and enables
+.Nm
+support in
+.Xr loader 8 .
+.Sh "BUILDING KERNEL"
+There is a couple of options for managing
+.Nm
+support at the
+.Fx
+kernel level.
+.Bl -tag -width Ar
+.It Va options FDT
+The primary option for enabling
+.Nm
+support in the kernel. It covers all low-level and infrastructure parts of
+.Nm
+kernel support, which primarily are the
+.Xr fdtbus 4
+and
+.Xr simplebus 4
+drivers, as well as helper routines and libraries.
+.It Va makeoptions FDT_DTS_FILE=<board name>.dts
+Specifies a preferred (default) device tree source (DTS) file for a given
+kernel. The indicated DTS file will be converted (compiled) into a binary form
+along with building the kernel itself. The DTS file name is relative
+to the default location of DTS sources i.e.
+.Pa sys/boot/fdt/dts .
+This makeoption is not mandatory unless FDT_DTB_STATIC is also defined (see
+below).
+.It Va options FDT_DTB_STATIC
+Typically, the device tree blob (DTB) is a stand-alone file, physically
+separate from the kernel, but this option lets statically embed a
+DTB file into a kernel image. Note that when this is specified the
+FDT_DTS_FILE makeoption becomes mandatory (as there needs to be a DTS file
+specified in order to embed it into the kernel image).
+.El
+.Sh SEE ALSO
+.Xr fdtbus 4 ,
+.Xr openfirm 4 ,
+.Xr simplebus 4
+.Sh STANDARDS
+IEEE Std 1275: IEEE Standard for Boot (Initialization Configuration) Firmware:
+Core Requirements and Practices
+.Pq Vt Open Firmware .
+.Pp
+Power.org Standard for Embedded Power Architecture Platform Requirements
+.Pq Vt ePAPR .
+.Sh HISTORY
+The
+.Nm
+support first appeared in
+.Fx 9.0 .
+.Sh AUTHORS
+The
+.Nm
+support was developed by Semihalf under sponsorship from the FreeBSD
+Foundation. This manual page was written by
+.An Rafal Jaworowski .
diff --git a/share/man/man4/fdtbus.4 b/share/man/man4/fdtbus.4
new file mode 100644
index 0000000..7141655
--- /dev/null
+++ b/share/man/man4/fdtbus.4
@@ -0,0 +1,88 @@
+.\"
+.\" Copyright (c) 2010 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This software was developed by Semihalf under sponsorship from
+.\" the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 12, 2010
+.Dt FDTBUS 4
+.Os
+.Sh NAME
+.Nm fdtbus
+.Nd Flattened Device Tree bus driver
+.Sh SYNOPSIS
+.Cd "options FDT"
+.Sh DESCRIPTION
+The
+.Nm
+abstract bus driver is the primary connection and translation layer between
+.Xr fdt 4
+hardware resources description and
+.Fx
+native newbus device drivers framework. For an embedded system
+.Nm
+represents peripherals typically found on a highly integrated chip
+(system-on-chip).
+.Pp
+The
+.Nm
+driver provides generic, common infrastructure for all
+.Xr fdt 4
+oriented device drivers, and its main responsibilities are the
+following:
+.Bl -bullet
+.It
+Creating newbus children that reflect
+.Xr fdt 4
+nodes in the flattened device tree.
+.It
+Managing SYS_RES_IRQ resources.
+.It
+Managing SYS_RES_MEMORY, SYS_RES_IOPORT resources.
+.El
+.Sh SEE ALSO
+.Xr fdt 4 ,
+.Xr openfirm 4 ,
+.Xr simplebus 4
+.Sh STANDARDS
+IEEE Std 1275: IEEE Standard for Boot (Initialization Configuration) Firmware:
+Core Requirements and Practices
+.Pq Vt Open Firmware .
+.Pp
+Power.org Standard for Embedded Power Architecture Platform Requirements
+.Pq Vt ePAPR .
+.Sh HISTORY
+The
+.Nm
+support first appeared in
+.Fx 9.0 .
+.Sh AUTHORS
+The
+.Nm
+support was developed by Semihalf under sponsorship from the FreeBSD
+Foundation. This manual page was written by
+.An Rafal Jaworowski .
diff --git a/share/man/man4/ffclock.4 b/share/man/man4/ffclock.4
new file mode 100644
index 0000000..9110c16
--- /dev/null
+++ b/share/man/man4/ffclock.4
@@ -0,0 +1,129 @@
+.\" Copyright (c) 2011 The University of Melbourne
+.\" All rights reserved.
+.\"
+.\" This documentation was written by Julien Ridoux at the University of
+.\" Melbourne under sponsorship from the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 1, 2011
+.Dt FFCLOCK 4
+.Os
+.Sh NAME
+.Nm FFCLOCK
+.Nd Feed-forward system clock
+.Sh SYNOPSIS
+.Cd options FFCLOCK
+.Sh DESCRIPTION
+The
+.Xr ntpd 8
+daemon has been the dominant solution for system clock synchronisation for many
+years, which has in turn influenced the design of the system clock.
+The ntpd daemon implements a feedback control algorithm which has been
+demonstrated to perform poorly in common use cases.
+.Pp
+Feed-forward clock synchronisation algorithms implemented by an appropriate
+daemon, in concert with the
+.Nm
+kernel support, have been shown to provide highly robust and accurate clock
+synchronisation.
+In addition to time keeping, the
+.Nm
+kernel mechanism provides new timestamping capabilities and the ability to
+use specialised clocks.
+Feed-forward synchronisation is also very well suited for virtualised
+environments, reducing the overhead of timekeeping in guests and ensuring
+continued smooth operation of the system clock during guest live migration.
+.Pp
+The
+.Nm
+kernel support provides feed-forward timestamping functions within the kernel
+and system calls to support feed-forward synchronisation daemons
+.Po see
+.Xr ffclock 2
+.Pc .
+.Ss Kernel Options
+The following kernel configuration options are related to
+.Nm :
+.Pp
+.Bl -tag -width ".Dv FFCLOCK" -compact
+.It Dv FFCLOCK
+Enable feed-forward clock support.
+.El
+.Ss Configuration
+When feed-forward clock support is compiled into the kernel, multiple system
+clocks become available to choose from.
+System clock configuration is possible via the
+.Va kern.sysclock
+.Xr sysctl 8
+tree which provides the following variables:
+.Bl -tag -width " " -offset indent
+.It Va kern.sysclock.active
+Name of the current active system clock which is serving time.
+Set to one of the names in
+.Va kern.sysclock.available
+in order to change the default active system clock.
+.It Va kern.sysclock.available
+Lists the names of available system clocks
+.Po
+read only
+.Pc .
+.El
+.Pp
+Feed-forward system clock configuration is possible via the
+.Va kern.sysclock.ffclock
+sysctl tree which provides the following variables:
+.Bl -tag -width " " -offset indent
+.It Va kern.sysclock.ffclock.version
+Feed-forward clock kernel version
+.Po
+read only
+.Pc .
+.It Va kern.sysclock.ffclock.ffcounter_bypass
+Use reliable hardware timecounter as the feed-forward counter.
+Will eventually be useful for virtualised environment like
+.Xr xen 4 ,
+but currently does nothing.
+.El
+.Sh SEE ALSO
+.Xr clock_gettime 2 ,
+.Xr ffclock 2 ,
+.Xr bpf 4 ,
+.Xr timecounters 4 ,
+.Xr sysctl 8
+.Sh HISTORY
+Feed-forward clock support first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The feed-forward clock support was written by
+.An Julien Ridoux Aq jridoux@unimelb.edu.au
+in collaboration with
+.An Darryl Veitch Aq dveitch@unimelb.edu.au
+at the University of Melbourne under sponsorship from the FreeBSD Foundation.
+.Pp
+This manual page was written by
+.An Julien Ridoux Aq jridoux@unimelb.edu.au
+and
+.An Lawrence Stewart Aq lstewart@FreeBSD.org .
diff --git a/share/man/man4/filemon.4 b/share/man/man4/filemon.4
new file mode 100644
index 0000000..585428b
--- /dev/null
+++ b/share/man/man4/filemon.4
@@ -0,0 +1,174 @@
+.\" Copyright (c) 2012
+.\" David E. O'Brien <obrien@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgment:
+.\" This product includes software developed by David E. O'Brien and
+.\" contributors.
+.\" 4. Neither the name of the author nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 14, 2013
+.Dt FILEMON 4
+.Os
+.Sh NAME
+.Nm filemon
+.Nd the filemon device
+.Sh SYNOPSIS
+.In dev/filemon/filemon.h
+.Sh DESCRIPTION
+The
+.Nm
+device allows a process to collect file operations data of its children.
+The device
+.Pa /dev/filemon
+responds to two
+.Xr ioctl 2
+calls.
+.Pp
+System calls are denoted using the following single letters:
+.Pp
+.Bl -tag -width indent -compact
+.It Ql C
+.Xr chdir 2
+.It Ql D
+.Xr unlink 2
+.It Ql E
+.Xr exec 2
+.It Ql F
+.Xr fork 2 ,
+.Xr vfork 2
+.It Ql L
+.Xr link 2 ,
+.Xr linkat 2 ,
+.Xr symlink 2 ,
+.Xr symlinkat 2
+.It Ql M
+.Xr rename 2
+.It Ql R
+.Xr open 2
+for read
+.It Ql S
+.Xr stat 2
+.It Ql W
+.Xr open 2
+for write
+.It Ql X
+.Xr _exit 2
+.El
+.Pp
+Note that
+.Ql R
+following
+.Ql W
+records can represent a single
+.Xr open 2
+for R/W,
+or two separate
+.Xr open 2
+calls, one for
+.Ql R
+and one for
+.Ql W .
+Note that only successful system calls are captured.
+.Sh IOCTLS
+User mode programs communicate with the
+.Nm
+driver through a number of ioctls which are described below.
+Each takes a single argument.
+.Bl -tag -width ".Dv FILEMON_SET_PID"
+.It Dv FILEMON_SET_FD
+Write the internal tracing buffer to the supplied open file descriptor.
+.It Dv FILEMON_SET_PID
+Child process ID to trace.
+.El
+.Sh RETURN VALUES
+.\" .Rv -std ioctl
+The
+.Fn ioctl
+function returns the value 0 if successful;
+otherwise the value \-1 is returned and the global variable
+.Va errno
+is set to indicate the error.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/filemon"
+.It Pa /dev/filemon
+.El
+.Sh EXAMPLES
+.Bd -literal
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <sys/ioctl.h>
+#include <dev/filemon/filemon.h>
+#include <fcntl.h>
+#include <err.h>
+#include <unistd.h>
+
+static void
+open_filemon(void)
+{
+ pid_t child;
+ int fm_fd, fm_log;
+
+ if ((fm_fd = open("/dev/filemon", O_RDWR | O_CLOEXEC)) == -1)
+ err(1, "open(\e"/dev/filemon\e", O_RDWR)");
+ if ((fm_log = open("filemon.out",
+ O_CREAT | O_WRONLY | O_TRUNC | O_CLOEXEC, DEFFILEMODE)) == -1)
+ err(1, "open(filemon.out)");
+
+ if (ioctl(fm_fd, FILEMON_SET_FD, &fm_log) == -1)
+ err(1, "Cannot set filemon log file descriptor");
+
+ if ((child = fork()) == 0) {
+ child = getpid();
+ if (ioctl(fm_fd, FILEMON_SET_PID, &child) == -1)
+ err(1, "Cannot set filemon PID");
+ /* Do something here. */
+ } else {
+ wait(&child);
+ close(fm_fd);
+ }
+}
+.Ed
+.Pp
+Creates a file named
+.Pa filemon.out
+and configures the
+.Nm
+device to write the
+.Nm
+buffer contents to it.
+.Sh SEE ALSO
+.Xr dtrace 1 ,
+.Xr ktrace 1 ,
+.Xr truss 1 ,
+.Xr ioctl 2
+.Sh HISTORY
+A
+.Nm
+device appeared in
+.Fx 9.1 .
diff --git a/share/man/man4/firewire.4 b/share/man/man4/firewire.4
new file mode 100644
index 0000000..9ec5dfa
--- /dev/null
+++ b/share/man/man4/firewire.4
@@ -0,0 +1,127 @@
+.\" Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the acknowledgement as bellow:
+.\"
+.\" This product includes software developed by K. Kobayashi and H. Shimokawa
+.\"
+.\" 4. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 11, 2012
+.Dt FIREWIRE 4
+.Os
+.Sh NAME
+.Nm firewire
+.Nd IEEE1394 High-performance Serial Bus
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device firewire"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+firewire_load="YES"
+.Ed
+.Sh DESCRIPTION
+.Fx
+provides machine-independent bus support and raw drivers for
+.Nm
+interfaces.
+.Pp
+The
+.Nm
+driver consists of two layers: the controller and the
+bus layer.
+The controller attaches to a physical bus
+(like
+.Xr pci 4 ) .
+The
+.Nm
+bus attaches to the controller.
+Additional drivers can be attached to the bus.
+.Pp
+Up to 63 devices, including the host itself, can be attached to
+a
+.Nm
+bus.
+The root node is dynamically assigned with a PHY device function.
+Also, the other
+.Nm
+bus specific parameters,
+e.g., node ID, cycle master, isochronous resource manager and bus
+manager, are dynamically assigned, after bus reset is initiated.
+On the
+.Nm
+bus, every device is identified by an EUI 64 address.
+.Pp
+Debugging over the firewire interace is possible with the
+.Xr dcons 4
+driver.
+Please see
+.Pa http://wiki.freebsd.org/DebugWithDcons
+for details on how to setup debugging with firewire.
+.Sh FILES
+.Bl -tag -width "Pa /dev/fwmem0.0" -compact
+.It Pa /dev/fw0.0
+.It Pa /dev/fwmem0.0
+.El
+.Sh SEE ALSO
+.Xr dcons 4 ,
+.Xr fwe 4 ,
+.Xr fwip 4 ,
+.Xr fwohci 4 ,
+.Xr pci 4 ,
+.Xr sbp 4 ,
+.Xr eui64 5 ,
+.Xr fwcontrol 8 ,
+.Xr kldload 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Katsushi Kobayashi
+and
+.An Hidetoshi Shimokawa
+for the
+.Fx
+project.
+.Sh BUGS
+See
+.Xr fwohci 4
+for security notes.
diff --git a/share/man/man4/fpa.4 b/share/man/man4/fpa.4
new file mode 100644
index 0000000..0974429
--- /dev/null
+++ b/share/man/man4/fpa.4
@@ -0,0 +1,58 @@
+.\"
+.\" Copyright (c) 1995, Matt Thomas
+.\" All rights reserved.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 13, 1995
+.Dt FPA 4
+.Os
+.Sh NAME
+.Nm fpa ,
+.Nm fea
+.Nd device drivers for DEC FDDI controllers
+.Sh SYNOPSIS
+.Cd "device fpa"
+.Cd "device fea"
+.Pp
+.Fx
+only:
+.Cd "device fddi"
+.Sh DESCRIPTION
+The
+.Nm
+and
+.Nm fea
+device drivers provide support for the DEC DEFPA PCI FDDI Controller and
+the DEC DEFEA EISA FDDI Controller, respectively.
+All variants of either
+controller are supported including the DAS and SAS configurations.
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "fea%d: error: desired IRQ of %d does not match device's actual IRQ (%d)"
+The device probe detected that the DEFEA board is configured for a different
+interrupt than the one specified in the kernel configuration file.
+.It "fea%d: error: memory not enabled! ECU reconfiguration required"
+The device probe found that no device memory had been configured on the
+DEFEA.
+Although the DEFEA can be configured with no device memory, this driver
+requires a minimum of 1K device memory to be set up.
+The ECU (EISA Configuration
+Utility) will need to be run to change the settings.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ifconfig 8
+.Sh AUTHORS
+The
+.Nm
+and
+.Nm fea
+device drivers and this manual page were written by
+.An Matt Thomas .
+.Sh CAVEATS
+Normally, the device driver will not enable the reception of SMT frames.
+However if the IFF_LINK1 flag is set, the device driver will enable the
+reception of SMT frames and pass them up to the Berkeley Packet Filter for
+processing.
diff --git a/share/man/man4/full.4 b/share/man/man4/full.4
new file mode 100644
index 0000000..a71eb92
--- /dev/null
+++ b/share/man/man4/full.4
@@ -0,0 +1,47 @@
+.\" Copyright (c) 2014
+.\" Eitan Adler <eadler@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 29, 2014
+.Dt FULL 4
+.Os
+.Sh NAME
+.Nm full
+.Nd the full device
+.Sh DESCRIPTION
+The
+.Nm
+device supplies an endless stream of zeros when read.
+However, it will always be full when writing to it.
+.Sh FILES
+.Bl -tag -width /dev/full
+.It Pa /dev/full
+.El
+.Sh SEE ALSO
+.Xr null 4 ,
+.Xr zero 4
+.Sh Author
+This device and man page was written by
+.An Eitan Adler Aq eadler@FreeBSD.org .
diff --git a/share/man/man4/fwe.4 b/share/man/man4/fwe.4
new file mode 100644
index 0000000..76fc1ac
--- /dev/null
+++ b/share/man/man4/fwe.4
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2002 Hidetoshi Shimokawa
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.\"
+.Dd July 16, 2005
+.Dt FWE 4
+.Os
+.Sh NAME
+.Nm fwe
+.Nd "Ethernet emulation driver for FireWire"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device firewire"
+.Cd "device fwe"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_fwe_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides non-standard Ethernet emulation over FireWire (IEEE 1394).
+.Pp
+.Xr firewire 4
+and
+.Xr fwohci 4
+must be configured in the kernel as well.
+.Pp
+This driver exploits asynchronous stream over IEEE 1394 to carry Ethernet
+frames.
+The stream channel can be specified by
+the
+.Va hw.firewire.fwe.stream_ch
+.Xr sysctl 8 .
+.Pp
+This driver supports
+.Xr polling 4
+as well if it is compiled with the
+.Dv DEVICE_POLLING
+option.
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr firewire 4 ,
+.Xr fwip 4 ,
+.Xr fwohci 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr ifconfig 8 ,
+.Xr kldload 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.0 .
+.Sh AUTHORS
+The
+.Nm
+driver and this manual page were written by
+.An Hidetoshi Shimokawa .
+.Sh BUGS
+This driver emulates Ethernet in a very adhoc way and it does not reserve a
+stream channel using an isochronous manager.
+Note that this driver uses a protocol which is very different from RFC 2734
+(IPv4 over IEEE 1394).
diff --git a/share/man/man4/fwip.4 b/share/man/man4/fwip.4
new file mode 100644
index 0000000..c2c9f05
--- /dev/null
+++ b/share/man/man4/fwip.4
@@ -0,0 +1,95 @@
+.\" Copyright (c) 2004 Doug Rabson
+.\" Copyright (c) 2002 Hidetoshi Shimokawa
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt FWIP 4
+.Os
+.Sh NAME
+.Nm fwip
+.Nd "IP over FireWire driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device firewire"
+.Cd "device fwip"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+firewire_load="YES"
+if_fwip_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides standard IP over FireWire (IEEE 1394) based on the
+protocols described in RFC 2734 and RFC 3146.
+.Pp
+The
+.Xr firewire 4
+and
+.Xr fwohci 4
+drivers
+must be configured in the kernel as well.
+.Pp
+This driver supports
+.Xr polling 4
+as well if it is compiled with the
+.Dv DEVICE_POLLING
+option.
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr firewire 4 ,
+.Xr fwe 4 ,
+.Xr fwohci 4 ,
+.Xr netintro 4 ,
+.Xr polling 4 ,
+.Xr ifconfig 8 ,
+.Xr kldload 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver and this manual page were written by
+.An Doug Rabson ,
+based on earlier work by
+.An Hidetoshi Shimokawa .
+.Sh BUGS
+This driver currently does not support the MCAP protocol for multicast
+IP over FireWire.
+Multicast packets are treated as broadcast packets which is sufficient
+for most trivial uses of multicast.
diff --git a/share/man/man4/fwohci.4 b/share/man/man4/fwohci.4
new file mode 100644
index 0000000..aa9aff3
--- /dev/null
+++ b/share/man/man4/fwohci.4
@@ -0,0 +1,158 @@
+.\" Copyright (c) 1998,1999,2000 Katsushi Kobayashi and Hidetoshi Shimokawa
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the acknowledgement as bellow:
+.\"
+.\" This product includes software developed by K. Kobayashi and H. Shimokawa
+.\"
+.\" 4. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.\"
+.Dd March 3, 2008
+.Dt FWOHCI 4
+.Os
+.Sh NAME
+.Nm fwohci
+.Nd OHCI FireWire chipset device driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device firewire"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+firewire_load="YES"
+.Ed
+.Pp
+To disable physical access (see
+.Sx BUGS
+section for detail), put the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hw.firewire.phydma_enable=0
+.Ed
+.Sh HARDWARE
+The
+.Nm
+driver provides support for PCI/CardBus FireWire interface cards.
+The driver supports the following IEEE 1394 OHCI chipsets:
+.Pp
+.Bl -bullet -compact
+.It
+Adaptec AHA-894x/AIC-5800
+.It
+Apple Pangea
+.It
+Apple UniNorth
+.It
+Intel 82372FB
+.It
+IOGEAR GUF320
+.It
+Lucent / Agere FW322/323
+.It
+NEC uPD72861
+.It
+NEC uPD72870
+.It
+NEC uPD72871/2
+.It
+NEC uPD72873
+.It
+NEC uPD72874
+.It
+National Semiconductor CS4210
+.It
+Ricoh R5C551
+.It
+Ricoh R5C552
+.It
+Sony CX3022
+.It
+Sony i.LINK (CXD3222)
+.It
+Sun PCIO-2 (RIO 1394)
+.It
+Texas Instruments PCI4410A
+.It
+Texas Instruments PCI4450
+.It
+Texas Instruments PCI4451
+.It
+Texas Instruments TSB12LV22
+.It
+Texas Instruments TSB12LV23
+.It
+Texas Instruments TSB12LV26
+.It
+Texas Instruments TSB43AA22
+.It
+Texas Instruments TSB43AB21/A/AI/A-EP
+.It
+Texas Instruments TSB43AB22/A
+.It
+Texas Instruments TSB43AB23
+.It
+Texas Instruments TSB82AA2
+.It
+VIA Fire II (VT6306)
+.El
+.Sh SEE ALSO
+.Xr firewire 4 ,
+.Xr fwe 4 ,
+.Xr fwip 4 ,
+.Xr sbp 4 ,
+.Xr fwcontrol 8 ,
+.Xr kldload 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An Katsushi Kobayashi
+and
+.An Hidetoshi Shimokawa .
+.Sh BUGS
+The driver allows physical access from any nodes on the bus by default.
+This means that any devices on the bus can read and modify any memory space
+which can be accessed by an IEEE 1394 OHCI chip.
+It is allowed mostly for
+.Xr sbp 4
+devices.
+This should be changed to allow it only for specific devices.
+Anyway, FireWire is a bus and not expected to be connected with
+un-trustable devices because a node can monitor all the traffic.
diff --git a/share/man/man4/fxp.4 b/share/man/man4/fxp.4
new file mode 100644
index 0000000..521c326
--- /dev/null
+++ b/share/man/man4/fxp.4
@@ -0,0 +1,220 @@
+.\"
+.\" Copyright (c) 1997 David E. O'Brien
+.\"
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 26, 2010
+.Dt FXP 4
+.Os
+.Sh NAME
+.Nm fxp
+.Nd "Intel EtherExpress PRO/100 Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device fxp"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_fxp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Ethernet adapters based on the Intel
+i82557, i82558, i82559, i82550, and i82562 chips.
+The driver supports TCP/UDP/IP checksum offload for both transmit
+and receive on i82550 and i82551.
+On i82559 only TCP/UDP checksum offload for receive is supported.
+TCP segmentation offload (TSO) for IPv4 as well as VLAN hardware
+tag insertion/stripping is supported on i82550 and i82551.
+Wake On Lan (WOL) support is provided on all controllers
+except i82557, i82259ER and early i82558 revisions.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width "10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The autoselected mode can be overridden by adding the media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width "full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+Note that 100baseTX media type is not available on the Pro/10.
+For further information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+The
+.Nm
+driver supports reception and transmission of extended frames
+for
+.Xr vlan 4 .
+This capability of
+.Nm
+can be controlled by means of the
+.Cm vlanmtu
+parameter
+to
+.Xr ifconfig 8 .
+.Pp
+The
+.Nm
+driver also supports a special link option:
+.Bl -tag -width link0
+.It Cm link0
+Some chip revisions have loadable microcode which can be used to reduce the
+interrupt load on the host cpu.
+Not all boards have microcode support.
+Setting the
+.Cm link0
+flag with
+.Xr ifconfig 8
+will download the microcode to the chip if it is available.
+.El
+.Sh HARDWARE
+Adapters supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Intel EtherExpress PRO/10
+.It
+Intel InBusiness 10/100
+.It
+Intel PRO/100B / EtherExpressPRO/100 B PCI Adapter
+.It
+Intel PRO/100+ Management Adapter
+.It
+Intel PRO/100 VE Desktop Adapter
+.It
+Intel PRO/100 VM Network Connection
+.It
+Intel PRO/100 M Desktop Adapter
+.It
+Intel PRO/100 S Desktop, Server and Dual-Port Server Adapters
+.It
+Contec C-NET(PI)-100TX (PC-98)
+.It
+NEC PC-9821Ra20, Rv20, Xv13, Xv20 internal 100Base-TX (PC-98)
+.It
+NEC PC-9821X-B06 (PC-98)
+.It
+Many on-board network interfaces on Intel motherboards
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+The following variables are available as both
+.Xr loader 8
+tunables and
+.Xr sysctl 8
+variables:
+.Bl -tag -width "xxxxxx"
+.It Va dev.fxp.%d.int_delay
+Maximum amount of time, in microseconds, that an interrupt may
+be delayed in an attempt to coalesce interrupts.
+This is only effective if the Intel microcode is loaded.
+The accepted range is 300 to 3000, the default is 1000.
+.It Va dev.fxp.%d.bundle_max
+Number of packets that will be bundled, before an interrupt is
+generated.
+This is only effective if the Intel microcode is loaded.
+The accepted range is 1 to 65535, the default is 6.
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as
+.Xr sysctl 8
+variables.
+.Bl -tag -width "xxxxxx"
+.It Va dev.fxp.%d.rnr
+This is a read-only variable and shows the number of events of
+RNR (resource not ready).
+.It Va dev.fxp.%d.stats
+This is a read-only variable and displays useful MAC counters
+maintained in the driver.
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "fxp%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "fxp%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "fxp%d: Failed to malloc memory"
+There are not enough mbuf's available for allocation.
+.It "fxp%d: device timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.It "fxp%d: Microcode loaded, int_delay: %d usec bundle_max: %d"
+The chip has successfully downloaded the microcode, and changed the
+parameterized values to the given settings.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 2.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An David Greenman .
+It has then been updated to use the busdma API and made endian-clean by
+.An Maxime Henrion .
+This manual page was written by
+.An David E. O'Brien .
diff --git a/share/man/man4/gbde.4 b/share/man/man4/gbde.4
new file mode 100644
index 0000000..2b868e5
--- /dev/null
+++ b/share/man/man4/gbde.4
@@ -0,0 +1,304 @@
+.\"
+.\" Copyright (c) 2002 Poul-Henning Kamp
+.\" Copyright (c) 2002 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Poul-Henning Kamp
+.\" and NAI Labs, the Security Research Division of Network Associates, Inc.
+.\" under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 19, 2002
+.Dt GBDE 4
+.Os
+.Sh NAME
+.Nm gbde
+.Nd Geom Based Disk Encryption
+.Sh SYNOPSIS
+.Cd "options GEOM_BDE"
+.Sh DESCRIPTION
+.Bf -symbolic
+NOTICE:
+Please be aware that this code has not yet received much review
+and analysis by qualified cryptographers and therefore should be considered
+a slightly suspect experimental facility.
+.Pp
+We cannot at this point guarantee that the on-disk format will not change
+in response to reviews or bug-fixes, so potential users are advised to
+be prepared that
+.Xr dump 8 Ns / Ns Xr restore 8
+based migrations may be called for in the future.
+.Ef
+.Pp
+The objective of this facility is to provide a high degree of
+denial of access to the contents of a
+.Dq cold
+storage device.
+.Pp
+Be aware that if the computer is compromised while up and running
+.Em and
+the storage device is actively attached and opened with a valid
+pass-phrase, this facility offers no protection or denial of access
+to the contents of the storage device.
+.Pp
+If, on the other hand, the device is
+.Dq cold ,
+it should present a formidable
+challenge for an attacker to gain access to the contents in the absence of
+a valid pass-phrase.
+.Pp
+Four cryptographic barriers must be passed to gain access to the data,
+and only a valid pass-phrase will yield this access.
+.Pp
+When the pass-phrase is entered, it is hashed with SHA2 into a 512 bit
+.Dq key-material .
+This is a way of producing cryptographic usable keys from a typically
+.No all- Ns Tn ASCII
+pass-phrase of an unpredictable user-selected length.
+.Ss First barrier: the location of the \&"lock-sector".
+During initialization, up to four independent but mutually aware
+.Dq lock
+sectors are written to the device in randomly chosen
+locations.
+These lock-sectors contain the 2048 random bit master-key and a number
+of parameters of the layout geometry (more on this later).
+Since the entire device will contain isotropic data, there is no
+short-cut to rapidly determine which sequence of bytes contain a lock-sector.
+.Pp
+To locate a lock-sector, a small piece of data called the
+.Dq metadata
+and the key-material must be available.
+The key-material decrypts the
+metadata, which contains the byte offset on the device where the
+corresponding lock-sector is located.
+If the metadata is lost or unavailable but the key-material is at
+hand, it would be feasible to do a brute force scan where each byte offset
+of the device is checked to see if it contains the lock-sector data.
+.Ss Second barrier: decryption of the master-key using key-material.
+The lock-sector contains an encrypted copy of an architecture neutral
+byte-sequence which encodes the fields of the lock-structure.
+The order in which these fields are encoded is determined from the key-material.
+The encoded byte stream is encrypted with 256bit AES in CBC mode.
+.Ss Third barrier: decryption of the sector key.
+For each sector, an MD5 hash over a
+.Dq salt
+from the lock-sector and the sector number is used to
+.Dq cherry-pick
+a subset of the master key,
+which hashed together with the sector offset through MD5 produces the
+.Dq kkey ,
+the key which encrypts the sector key.
+.Ss Fourth barrier: decryption of the sector data.
+The actual payload of the sector is encrypted with 128 bit AES in CBC mode
+using a single-use random bits key.
+.Ss Examining the reverse path
+Assuming an attacker knows an amount of plaintext and has managed to
+locate the corresponding encrypted sectors on the device, gaining access
+to the plaintext context of other sectors is a daunting task:
+.Pp
+First he will have to derive from the encrypted sector and the known plain
+text the sector key(s) used.
+At the time of writing, it has been speculated that it could maybe be
+possible to break open AES in only 2^80 operations; even so, that is still
+a very impossible task.
+.Pp
+Armed with one or more sector keys, our patient attacker will then go
+through essentially the same exercise, using the sector key and the
+encrypted sector key to find the key used to encrypt the sector key.
+.Pp
+Armed with one or more of these
+.Dq kkeys ,
+our attacker has to
+run them backwards through MD5.
+Even though he knows that the input to MD5 was 24 bytes and has the value
+of 8 of these bytes from the sector number, he is still faced with 2^128
+equally likely possibilities.
+.Pp
+Having successfully done that, our attacker has successfully discovered
+up to 16 bytes of the master-key, but is still unaware which 16 bytes,
+and in which other sectors any of these known bytes contribute to the kkey.
+.Pp
+To unravel the last bit, the attacker has to guess the 16 byte random-bits
+salt stored in the lock-sector to recover the indexes into the masterkey.
+.Pp
+Any attacker with access to the necessary machine power to even attempt
+this attack will be better off attempting to brute-force the pass-phrase.
+.Ss Positive denial facilities
+Considering the infeasibility of the above attack,
+gaining access to the pass-phrase will be of paramount importance for an
+attacker,
+and a number of scenarios can be imagined where undue pressure will be
+applied to an individual to divulge the pass-phrase.
+.Pp
+A
+.Dq Blackening
+feature provides a way for the user, given a moment of
+opportunity, to destroy the master-key in such a way that the pass-phrase
+will be acknowledged as good but access to the data will still be
+denied.
+.Ss A practical analogy
+For persons who think cryptography is only slightly more interesting than
+watching silicon sublimate the author humbly offers this analogy to the
+keying scheme for a protected device:
+.Pp
+Imagine an installation with a vault with walls of several hundred meters
+thick solid steel.
+This vault can only be feasibly accessed using the
+single key, which has a complexity comparable to a number with 600 digits.
+.Pp
+This key exists in four copies, each of which is stored in one of
+four small safes, each of which can be opened
+with unique key which has a complexity comparable to an 80 digit
+number.
+.Pp
+In addition to the masterkey, each of the four safes also contains
+the exact locations of all four key-safes which are located in
+randomly chosen places on the outside surface of the vault where they
+are practically impossible to detect when they are closed.
+.Pp
+Finally, each safe contains four switches which are wired to a bar
+of dynamite inside each of the four safes.
+.Pp
+In addition to this, a keyholder after opening his key-safe is
+also able to install a copy of the master-key and re-key any of
+key-safes (including his own).
+.Pp
+In normal use, the user will open the safe for which he has the key,
+take out the master-key and access the vault.
+When done, he will lock up the master-key in the safe again.
+.Pp
+If a keyholder-X for some reason distrusts keyholder-Y, she
+has the option of opening her own safe, flipping one of the switches
+and detonating the bar of dynamite in safe-Y.
+This will obliterate the master-key in that safe and thereby deny
+keyholder-Y access to the vault.
+.Pp
+Should the facility come under attack, any of the keyholders can detonate
+all four bars of dynamite and thereby make sure that access to the
+vault is denied to everybody, keyholders and attackers alike.
+Should the facility fall to the enemy, and a keyholder be forced to apply
+his personal key, he can do so in confidence that the contents of his safe
+will not yield access to the vault, and the enemy will hopefully realize
+that applying further pressure on the personnel will not give access to
+the vault.
+.Pp
+The final point to make here is that it is perfectly possible to
+make a detached copy of any one of these keys, including the master
+key, and deposit or hide it as one sees fit.
+.Ss Steganography support
+When the device is initialized, it is possible to restrict the encrypted
+data to a single contiguous area of the device.
+If configured with care, this area could masquerade as some sort of
+valid data or as random trash left behind by the systems operation.
+.Pp
+This can be used to offer a plausible deniability of existence, where
+it will be impossible to prove that this specific area of the device
+is in fact used to store encrypted data and not just random junk.
+.Pp
+The main obstacle in this is that the output from any encryption algorithm
+worth its salt is so totally random looking that it stands out like a sore
+thumb amongst practically any other sort of data which contains at least
+some kind of structure or identifying byte sequences.
+.Pp
+Certain file formats like ELF contain multiple distinct sections, and it
+would be possible to locate things just right in such a way that a device
+contains a partition with a file system with a large executable,
+.Pq Dq "a backup copy of my kernel"
+where a non-loaded ELF section is laid out
+consecutively on the device and thereby could be used to contain a
+.Nm
+encrypted device.
+.Pp
+Apart from the ability to instruct
+.Nm
+which those sectors are, no support is provided for creating such a setup.
+.Ss Deployment suggestions
+For personal use, it may be wise to make a backup copy of the masterkey
+or use one of the four keys as a backup.
+Fitting protection of this key is up to yourself, your local circumstances and
+your imagination.
+.Pp
+For company or institutional use, it is strongly advised to make a copy
+of the master-key and put it under whatever protection you have at your
+means.
+If you fail to do this, a disgruntled employee can deny you access to
+the data
+.Dq "by accident" .
+(The employee can still intentionally deny access by applying another
+encryption scheme to the data, but that problem has no technical solution.)
+.Ss Cryptographic strength
+This section lists the specific components which contribute to the cryptographic
+strength of
+.Nm .
+.Pp
+The payload is encrypted with AES in CBC mode using a 128 bit random
+single-use key
+.Pq Dq "the skey" .
+AES is well documented.
+.Pp
+No IV is used in the encryption of the sectors, the assumption being
+that since the key is random bits and single-use, an IV adds nothing to the
+security of AES.
+.Pp
+The random key is produced with
+.Xr arc4rand 9
+which is believed to do a respectable job at producing unpredictable bytes.
+.Pp
+The skey is stored on the device in a location which can be derived from
+the location of the encrypted payload data.
+The stored copy is encrypted with AES in CBC mode using a 128 bit key
+.Pq Dq "the kkey"
+derived
+from a subset of the master key chosen by the output of an MD5 hash
+over a 16 byte random bit static salt and the sector offset.
+Up to 6.25% of the masterkey (16 bytes out of 2048 bits) will be selected
+and hashed through MD5 with the sector offset to generate the kkey.
+.Pp
+Up to four copies of the master-key and associated geometry information
+is stored on the device in static randomly chosen sectors.
+The exact location inside the sector is randomly chosen.
+The order in which the fields are encoded depends on the key-material.
+The encoded byte-stream is encrypted with AES in CBC mode using 256 bit
+key-material.
+.Pp
+The key-material is derived from the user-entered pass-phrase using
+512 bit SHA2.
+.Pp
+No chain is stronger than its weakest link, which usually is poor pass-phrases.
+.Sh SEE ALSO
+.Xr gbde 8
+.Sh HISTORY
+This software was developed for the
+.Fx
+Project by
+.An Poul-Henning Kamp
+and NAI Labs, the Security Research Division of Network Associates, Inc.\&
+under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the
+DARPA CHATS research program.
+.Sh AUTHORS
+.An "Poul-Henning Kamp" Aq phk@FreeBSD.org
diff --git a/share/man/man4/gdb.4 b/share/man/man4/gdb.4
new file mode 100644
index 0000000..f81ef40
--- /dev/null
+++ b/share/man/man4/gdb.4
@@ -0,0 +1,603 @@
+.\" Copyright (c) 2003 Greg Lehey
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 8, 2005
+.Dt GDB 4
+.Os
+.Sh NAME
+.Nm gdb
+.Nd external kernel debugger
+.Sh SYNOPSIS
+.Cd "makeoptions DEBUG=-g"
+.Cd "options DDB"
+.Sh DESCRIPTION
+The
+.Nm
+kernel debugger is a variation of
+.Xr gdb 1
+which understands some aspects of the
+.Fx
+kernel environment.
+It can be used in a number of ways:
+.Bl -bullet
+.It
+It can be used to examine the memory of the processor on which it runs.
+.It
+It can be used to analyse a processor dump after a panic.
+.It
+It can be used to debug another system interactively via a serial or firewire
+link.
+In this mode, the processor can be stopped and single stepped.
+.It
+With a firewire link, it can be used to examine the memory of a remote system
+without the participation of that system.
+In this mode, the processor cannot be stopped and single stepped, but it can be
+of use when the remote system has crashed and is no longer responding.
+.El
+.Pp
+When used for remote debugging,
+.Nm
+requires the presence of the
+.Xr ddb 4
+kernel debugger.
+Commands exist to switch between
+.Nm
+and
+.Xr ddb 4 .
+.Sh PREPARING FOR DEBUGGING
+When debugging kernels, it is practically essential to have built a kernel with
+debugging symbols
+.Pq Cd "makeoptions DEBUG=-g" .
+It is easiest to perform operations from the kernel build directory, by default
+.Pa /usr/obj/usr/src/sys/GENERIC .
+.Pp
+First, ensure you have a copy of the debug macros in the directory:
+.Pp
+.Dl "make gdbinit"
+.Pp
+This command performs some transformations on the macros installed in
+.Pa /usr/src/tools/debugscripts
+to adapt them to the local environment.
+.Ss "Inspecting the environment of the local machine"
+To look at and change the contents of the memory of the system you are running
+on,
+.Pp
+.Dl "gdb -k -wcore kernel.debug /dev/mem"
+.Pp
+In this mode, you need the
+.Fl k
+flag to indicate to
+.Xr gdb 1
+that the
+.Dq "dump file"
+.Pa /dev/mem
+is a kernel data file.
+You can look at live data, and if you include the
+.Fl wcore
+option, you can change it at your peril.
+The system does not stop (obviously), so a number of things will not work.
+You can set breakpoints, but you cannot
+.Dq continue
+execution, so they will not work.
+.Ss "Debugging a crash dump"
+By default, crash dumps are stored in the directory
+.Pa /var/crash .
+Investigate them from the kernel build directory with:
+.Pp
+.Dl "gdb -k kernel.debug /var/crash/vmcore.29"
+.Pp
+In this mode, the system is obviously stopped, so you can only look at it.
+.Ss "Debugging a live system with a remote link"
+In the following discussion, the term
+.Dq "local system"
+refers to the system running the debugger, and
+.Dq "remote system"
+refers to the live system being debugged.
+.Pp
+To debug a live system with a remote link, the kernel must be compiled with the
+option
+.Cd "options DDB" .
+The option
+.Cd "options BREAK_TO_DEBUGGER"
+enables the debugging machine stop the debugged machine once a connection has
+been established by pressing
+.Ql ^C .
+.Ss "Debugging a live system with a remote serial link"
+When using a serial port for the remote link on the i386 platform, the serial
+port must be identified by setting the flag bit
+.Li 0x80
+for the specified interface.
+Generally, this port will also be used as a serial console (flag bit
+.Li 0x10 ) ,
+so the entry in
+.Pa /boot/device.hints
+should be:
+.Pp
+.Dl hint.sio.0.flags="0x90"
+.Ss "Debugging a live system with a remote firewire link"
+As with serial debugging, to debug a live system with a firewire link, the
+kernel must be compiled with the option
+.Cd "options DDB" .
+.Pp
+A number of steps must be performed to set up a firewire link:
+.Bl -bullet
+.It
+Ensure that both systems have
+.Xr firewire 4
+support, and that the kernel of the remote system includes the
+.Xr dcons 4
+and
+.Xr dcons_crom 4
+drivers.
+If they are not compiled into the kernel, load the KLDs:
+.Pp
+.Dl "kldload firewire"
+.Pp
+On the remote system only:
+.Bd -literal -offset indent
+kldload dcons
+kldload dcons_crom
+.Ed
+.Pp
+You should see something like this in the
+.Xr dmesg 8
+output of the remote system:
+.Bd -literal -offset indent
+fwohci0: BUS reset
+fwohci0: node_id=0x8800ffc0, gen=2, non CYCLEMASTER mode
+firewire0: 2 nodes, maxhop <= 1, cable IRM = 1
+firewire0: bus manager 1
+firewire0: New S400 device ID:00c04f3226e88061
+dcons_crom0: <dcons configuration ROM> on firewire0
+dcons_crom0: bus_addr 0x22a000
+.Ed
+.Pp
+It is a good idea to load these modules at boot time with the following entry in
+.Pa /boot/loader.conf :
+.Pp
+.Dl dcons_crom_enable="YES"
+.Pp
+This ensures that all three modules are loaded.
+There is no harm in loading
+.Xr dcons 4
+and
+.Xr dcons_crom 4
+on the local system, but if you only want to load the
+.Xr firewire 4
+module, include the following in
+.Pa /boot/loader.conf :
+.Pp
+.Dl firewire_enable="YES"
+.It
+Next, use
+.Xr fwcontrol 8
+to find the firewire node corresponding to the remote machine.
+On the local machine you might see:
+.Bd -literal -offset indent
+# fwcontrol
+2 devices (info_len=2)
+node EUI64 status
+ 1 0x00c04f3226e88061 0
+ 0 0x000199000003622b 1
+.Ed
+.Pp
+The first node is always the local system, so in this case, node 0 is the remote
+system.
+If there are more than two systems, check from the other end to find which node
+corresponds to the remote system.
+On the remote machine, it looks like this:
+.Bd -literal -offset indent
+# fwcontrol
+2 devices (info_len=2)
+node EUI64 status
+ 0 0x000199000003622b 0
+ 1 0x00c04f3226e88061 1
+.Ed
+.It
+Next, establish a firewire connection with
+.Xr dconschat 8 :
+.Pp
+.Dl "dconschat -br -G 5556 -t 0x000199000003622b"
+.Pp
+.Li 0x000199000003622b
+is the EUI64 address of the remote node, as determined from the output of
+.Xr fwcontrol 8
+above.
+When started in this manner,
+.Xr dconschat 8
+establishes a local tunnel connection from port
+.Li localhost:5556
+to the remote debugger.
+You can also establish a console port connection with the
+.Fl C
+option to the same invocation
+.Xr dconschat 8 .
+See the
+.Xr dconschat 8
+manpage for further details.
+.Pp
+The
+.Xr dconschat 8
+utility
+does not return control to the user.
+It displays error messages and console output for the remote system, so it is a
+good idea to start it in its own window.
+.It
+Finally, establish connection:
+.Bd -literal -offset indent
+# gdb kernel.debug
+GNU gdb 5.2.1 (FreeBSD)
+.Em "(political statements omitted)"
+Ready to go. Enter 'tr' to connect to the remote target
+with /dev/cuau0, 'tr /dev/cuau1' to connect to a different port
+or 'trf portno' to connect to the remote target with the firewire
+interface. portno defaults to 5556.
+
+Type 'getsyms' after connection to load kld symbols.
+
+If you are debugging a local system, you can use 'kldsyms' instead
+to load the kld symbols. That is a less obnoxious interface.
+(gdb) trf
+0xc21bd378 in ?? ()
+.Ed
+.Pp
+The
+.Ic trf
+macro assumes a connection on port 5556.
+If you want to use a different port (by changing the invocation of
+.Xr dconschat 8
+above), use the
+.Ic tr
+macro instead.
+For example, if you want to use port 4711, run
+.Xr dconschat 8
+like this:
+.Pp
+.Dl "dconschat -br -G 4711 -t 0x000199000003622b"
+.Pp
+Then establish connection with:
+.Bd -literal -offset indent
+(gdb) tr localhost:4711
+0xc21bd378 in ?? ()
+.Ed
+.El
+.Ss "Non-cooperative debugging a live system with a remote firewire link"
+In addition to the conventional debugging via firewire described in the previous
+section, it is possible to debug a remote system without its cooperation, once
+an initial connection has been established.
+This corresponds to debugging a local machine using
+.Pa /dev/mem .
+It can be very useful if a system crashes and the debugger no longer responds.
+To use this method, set the
+.Xr sysctl 8
+variables
+.Va hw.firewire.fwmem.eui64_hi
+and
+.Va hw.firewire.fwmem.eui64_lo
+to the upper and lower halves of the EUI64 ID of the remote system,
+respectively.
+From the previous example, the remote machine shows:
+.Bd -literal -offset indent
+# fwcontrol
+2 devices (info_len=2)
+node EUI64 status
+ 0 0x000199000003622b 0
+ 1 0x00c04f3226e88061 1
+.Ed
+.Pp
+Enter:
+.Bd -literal -offset indent
+# sysctl -w hw.firewire.fwmem.eui64_hi=0x00019900
+hw.firewire.fwmem.eui64_hi: 0 -> 104704
+# sysctl -w hw.firewire.fwmem.eui64_lo=0x0003622b
+hw.firewire.fwmem.eui64_lo: 0 -> 221739
+.Ed
+.Pp
+Note that the variables must be explicitly stated in hexadecimal.
+After this, you can examine the remote machine's state with the following input:
+.Bd -literal -offset indent
+# gdb -k kernel.debug /dev/fwmem0.0
+GNU gdb 5.2.1 (FreeBSD)
+.Em "(messages omitted)"
+Reading symbols from /boot/kernel/dcons.ko...done.
+Loaded symbols for /boot/kernel/dcons.ko
+Reading symbols from /boot/kernel/dcons_crom.ko...done.
+Loaded symbols for /boot/kernel/dcons_crom.ko
+#0 sched_switch (td=0xc0922fe0) at /usr/src/sys/kern/sched_4bsd.c:621
+0xc21bd378 in ?? ()
+.Ed
+.Pp
+In this case, it is not necessary to load the symbols explicitly.
+The remote system continues to run.
+.Sh COMMANDS
+The user interface to
+.Nm
+is via
+.Xr gdb 1 ,
+so
+.Xr gdb 1
+commands also work.
+This section discusses only the extensions for kernel debugging that get
+installed in the kernel build directory.
+.Ss "Debugging environment"
+The following macros manipulate the debugging environment:
+.Bl -tag -width indent
+.It Ic ddb
+Switch back to
+.Xr ddb 4 .
+This command is only meaningful when performing remote debugging.
+.It Ic getsyms
+Display
+.Ic kldstat
+information for the target machine and invite user to paste it back in.
+This is required because
+.Nm
+does not allow data to be passed to shell scripts.
+It is necessary for remote debugging and crash dumps; for local memory debugging
+use
+.Ic kldsyms
+instead.
+.It Ic kldsyms
+Read in the symbol tables for the debugging machine.
+This does not work for
+remote debugging and crash dumps; use
+.Ic getsyms
+instead.
+.It Ic tr Ar interface
+Debug a remote system via the specified serial or firewire interface.
+.It Ic tr0
+Debug a remote system via serial interface
+.Pa /dev/cuau0 .
+.It Ic tr1
+Debug a remote system via serial interface
+.Pa /dev/cuau1 .
+.It Ic trf
+Debug a remote system via firewire interface at default port 5556.
+.El
+.Pp
+The commands
+.Ic tr0 , tr1
+and
+.Ic trf
+are convenience commands which invoke
+.Ic tr .
+.Ss "The current process environment"
+The following macros are convenience functions intended to make things easier
+than the standard
+.Xr gdb 1
+commands.
+.Bl -tag -width indent
+.It Ic f0
+Select stack frame 0 and show assembler-level details.
+.It Ic f1
+Select stack frame 1 and show assembler-level details.
+.It Ic f2
+Select stack frame 2 and show assembler-level details.
+.It Ic f3
+Select stack frame 3 and show assembler-level details.
+.It Ic f4
+Select stack frame 4 and show assembler-level details.
+.It Ic f5
+Select stack frame 5 and show assembler-level details.
+.It Ic xb
+Show 12 words in hex, starting at current
+.Va ebp
+value.
+.It Ic xi
+List the next 10 instructions from the current
+.Va eip
+value.
+.It Ic xp
+Show the register contents and the first four parameters of the current stack
+frame.
+.It Ic xp0
+Show the first parameter of current stack frame in various formats.
+.It Ic xp1
+Show the second parameter of current stack frame in various formats.
+.It Ic xp2
+Show the third parameter of current stack frame in various formats.
+.It Ic xp3
+Show the fourth parameter of current stack frame in various formats.
+.It Ic xp4
+Show the fifth parameter of current stack frame in various formats.
+.It Ic xs
+Show the last 12 words on stack in hexadecimal.
+.It Ic xxp
+Show the register contents and the first ten parameters.
+.It Ic z
+Single step 1 instruction (over calls) and show next instruction.
+.It Ic zs
+Single step 1 instruction (through calls) and show next instruction.
+.El
+.Ss "Examining other processes"
+The following macros access other processes.
+The
+.Nm
+debugger
+does not understand the concept of multiple processes, so they effectively
+bypass the entire
+.Nm
+environment.
+.Bl -tag -width indent
+.It Ic btp Ar pid
+Show a backtrace for the process
+.Ar pid .
+.It Ic btpa
+Show backtraces for all processes in the system.
+.It Ic btpp
+Show a backtrace for the process previously selected with
+.Ic defproc .
+.It Ic btr Ar ebp
+Show a backtrace from the
+.Ar ebp
+address specified.
+.It Ic defproc Ar pid
+Specify the PID of the process for some other commands in this section.
+.It Ic fr Ar frame
+Show frame
+.Ar frame
+of the stack of the process previously selected with
+.Ic defproc .
+.It Ic pcb Ar proc
+Show some PCB contents of the process
+.Ar proc .
+.El
+.Ss "Examining data structures"
+You can use standard
+.Xr gdb 1
+commands to look at most data structures.
+The macros in this section are
+convenience functions which typically display the data in a more readable
+format, or which omit less interesting parts of the structure.
+.Bl -tag -width indent
+.It Ic bp
+Show information about the buffer header pointed to by the variable
+.Va bp
+in the current frame.
+.It Ic bpd
+Show the contents
+.Pq Vt "char *"
+of
+.Va bp->data
+in the current frame.
+.It Ic bpl
+Show detailed information about the buffer header
+.Pq Vt "struct bp"
+pointed at by the local variable
+.Va bp .
+.It Ic bpp Ar bp
+Show summary information about the buffer header
+.Pq Vt "struct bp"
+pointed at by the parameter
+.Ar bp .
+.It Ic bx
+Print a number of fields from the buffer header pointed at in by the pointer
+.Ar bp
+in the current environment.
+.It Ic vdev
+Show some information of the
+.Vt vnode
+pointed to by the local variable
+.Va vp .
+.El
+.Ss "Miscellaneous macros"
+.Bl -tag -width indent
+.It Ic checkmem
+Check unallocated memory for modifications.
+This assumes that the kernel has been compiled with
+.Cd "options DIAGNOSTIC" .
+This causes the contents of free memory to be set to
+.Li 0xdeadc0de .
+.It Ic dmesg
+Print the system message buffer.
+This corresponds to the
+.Xr dmesg 8
+utility.
+This macro used to be called
+.Ic msgbuf .
+It can take a very long time over a serial line,
+and it is even slower via firewire
+or local memory due to inefficiencies in
+.Nm .
+When debugging a crash dump or over firewire, it is not necessary to start
+.Nm
+to access the message buffer: instead, use an appropriate variation of
+.Bd -literal -offset indent
+dmesg -M /var/crash/vmcore.0 -N kernel.debug
+dmesg -M /dev/fwmem0.0 -N kernel.debug
+.Ed
+.It Ic kldstat
+Equivalent of the
+.Xr kldstat 8
+utility without options.
+.It Ic pname
+Print the command name of the current process.
+.It Ic ps
+Show process status.
+This corresponds in concept, but not in appearance, to the
+.Xr ps 1
+utility.
+When debugging a crash dump or over firewire, it is not necessary to start
+.Nm
+to display the
+.Xr ps 1
+output: instead, use an appropriate variation of
+.Bd -literal -offset indent
+ps -M /var/crash/vmcore.0 -N kernel.debug
+ps -M /dev/fwmem0.0 -N kernel.debug
+.Ed
+.It Ic y
+Kludge for writing macros.
+When writing macros, it is convenient to paste them
+back into the
+.Nm
+window.
+Unfortunately, if the macro is already defined,
+.Nm
+insists on asking
+.Pp
+.Dl "Redefine foo?"
+.Pp
+It will not give up until you answer
+.Ql y .
+This command is that answer.
+It does nothing else except to print a warning
+message to remind you to remove it again.
+.El
+.Sh SEE ALSO
+.Xr gdb 1 ,
+.Xr ps 1 ,
+.Xr ddb 4 ,
+.Xr firewire 4 ,
+.Xr dconschat 8 ,
+.Xr dmesg 8 ,
+.Xr fwcontrol 8 ,
+.Xr kldload 8
+.Sh AUTHORS
+This man page was written by
+.An "Greg Lehey" Aq grog@FreeBSD.org .
+.Sh BUGS
+The
+.Xr gdb 1
+debugger
+was never designed to debug kernels, and it is not a very good match.
+Many problems exist.
+.Pp
+The
+.Nm
+implementation is very inefficient, and many operations are slow.
+.Pp
+Serial debugging is even slower, and race conditions can make it difficult to
+run the link at more than 9600 bps.
+Firewire connections do not have this problem.
+.Pp
+The debugging macros
+.Dq "just grown" .
+In general, the person who wrote them did so while looking for a specific
+problem, so they may not be general enough, and they may behave badly when used
+in ways for which they were not intended, even if those ways make sense.
+.Pp
+Many of these commands only work on the ia32 architecture.
diff --git a/share/man/man4/gem.4 b/share/man/man4/gem.4
new file mode 100644
index 0000000..e4ebeb0
--- /dev/null
+++ b/share/man/man4/gem.4
@@ -0,0 +1,148 @@
+.\" $NetBSD: gem.4,v 1.2 2003/02/14 15:20:18 grant Exp $
+.\"
+.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 25, 2009
+.Dt GEM 4
+.Os
+.Sh NAME
+.Nm gem
+.Nd ERI/GEM/GMAC Ethernet device driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device gem"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_gem_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the GMAC Ethernet hardware found mostly in
+the last Apple PowerBooks G3s and most G4-based Apple hardware, as
+well as Sun UltraSPARC machines.
+.Pp
+All controllers supported by the
+.Nm
+driver have TCP checksum offload capability for both receive and transmit,
+support for the reception and transmission of extended frames for
+.Xr vlan 4
+and a 512-bit multicast hash filter.
+.Sh HARDWARE
+Chips supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Apple GMAC
+.It
+Sun ERI 10/100 Mbps Ethernet
+.It
+Sun GEM Gigabit Ethernet
+.El
+.Pp
+The
+following add-on cards are known to work with the
+.Nm
+driver at this time:
+.Pp
+.Bl -bullet -compact
+.It
+Sun Gigabit Ethernet PCI 2.0/3.0 (GBE/P)
+(part no.\& 501-4373)
+.It
+Sun Gigabit Ethernet SBus 2.0/3.0 (GBE/S)
+(part no.\& 501-4375)
+.El
+.Sh NOTES
+On sparc64 the
+.Nm
+driver respects the
+.Va local-mac-address?
+system configuration variable which can be set in the Open Firmware boot
+monitor using the
+.Ic setenv
+command or by
+.Xr eeprom 8 .
+If set to
+.Dq Li false
+(the default), the
+.Nm
+driver will use the system's default MAC address for all of its devices.
+If set to
+.Dq Li true ,
+the unique MAC address of each interface is used if present rather than
+the system's default MAC address.
+.Pp
+Supported interfaces having their own MAC address include the on-board
+Sun ERI 10/100 Mbps on boards equipped with more than one Ethernet interface
+and the Sun Gigabit Ethernet 2.0/3.0 GBE add-on cards.
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr vlan 4 ,
+.Xr eeprom 8 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Nx 1.6 .
+The first
+.Fx
+version to include it was
+.Fx 5.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written for
+.Nx
+by
+.An Eduardo Horvath
+.Aq eeh@NetBSD.org .
+It was ported to
+.Fx
+by
+.An Thomas Moestl
+.Aq tmm@FreeBSD.org
+and later on improved by
+.An Marius Strobl
+.Aq marius@FreeBSD.org .
+The man page was written by
+.An Thomas Klausner
+.Aq wiz@NetBSD.org .
diff --git a/share/man/man4/geom.4 b/share/man/man4/geom.4
new file mode 100644
index 0000000..3cfc283
--- /dev/null
+++ b/share/man/man4/geom.4
@@ -0,0 +1,484 @@
+.\"
+.\" Copyright (c) 2002 Poul-Henning Kamp
+.\" Copyright (c) 2002 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Poul-Henning Kamp
+.\" and NAI Labs, the Security Research Division of Network Associates, Inc.
+.\" under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The names of the authors may not be used to endorse or promote
+.\" products derived from this software without specific prior written
+.\" permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 10, 2013
+.Dt GEOM 4
+.Os
+.Sh NAME
+.Nm GEOM
+.Nd "modular disk I/O request transformation framework"
+.Sh SYNOPSIS
+.Cd options GEOM_AES
+.Cd options GEOM_BDE
+.Cd options GEOM_BSD
+.Cd options GEOM_CACHE
+.Cd options GEOM_CONCAT
+.Cd options GEOM_ELI
+.Cd options GEOM_FOX
+.Cd options GEOM_GATE
+.Cd options GEOM_JOURNAL
+.Cd options GEOM_LABEL
+.Cd options GEOM_LINUX_LVM
+.Cd options GEOM_MBR
+.Cd options GEOM_MIRROR
+.Cd options GEOM_MULTIPATH
+.Cd options GEOM_NOP
+.Cd options GEOM_PART_APM
+.Cd options GEOM_PART_BSD
+.Cd options GEOM_PART_EBR
+.Cd options GEOM_PART_EBR_COMPAT
+.Cd options GEOM_PART_GPT
+.Cd options GEOM_PART_LDM
+.Cd options GEOM_PART_MBR
+.Cd options GEOM_PART_PC98
+.Cd options GEOM_PART_VTOC8
+.Cd options GEOM_PC98
+.Cd options GEOM_RAID
+.Cd options GEOM_RAID3
+.Cd options GEOM_SHSEC
+.Cd options GEOM_STRIPE
+.Cd options GEOM_SUNLABEL
+.Cd options GEOM_UZIP
+.Cd options GEOM_VIRSTOR
+.Cd options GEOM_VOL
+.Cd options GEOM_ZERO
+.Sh DESCRIPTION
+The
+.Nm
+framework provides an infrastructure in which
+.Dq classes
+can perform transformations on disk I/O requests on their path from
+the upper kernel to the device drivers and back.
+.Pp
+Transformations in a
+.Nm
+context range from the simple geometric
+displacement performed in typical disk partitioning modules over RAID
+algorithms and device multipath resolution to full blown cryptographic
+protection of the stored data.
+.Pp
+Compared to traditional
+.Dq "volume management" ,
+.Nm
+differs from most
+and in some cases all previous implementations in the following ways:
+.Bl -bullet
+.It
+.Nm
+is extensible.
+It is trivially simple to write a new class
+of transformation and it will not be given stepchild treatment.
+If
+someone for some reason wanted to mount IBM MVS diskpacks, a class
+recognizing and configuring their VTOC information would be a trivial
+matter.
+.It
+.Nm
+is topologically agnostic.
+Most volume management implementations
+have very strict notions of how classes can fit together, very often
+one fixed hierarchy is provided, for instance, subdisk - plex -
+volume.
+.El
+.Pp
+Being extensible means that new transformations are treated no differently
+than existing transformations.
+.Pp
+Fixed hierarchies are bad because they make it impossible to express
+the intent efficiently.
+In the fixed hierarchy above, it is not possible to mirror two
+physical disks and then partition the mirror into subdisks, instead
+one is forced to make subdisks on the physical volumes and to mirror
+these two and two, resulting in a much more complex configuration.
+.Nm
+on the other hand does not care in which order things are done,
+the only restriction is that cycles in the graph will not be allowed.
+.Sh "TERMINOLOGY AND TOPOLOGY"
+.Nm
+is quite object oriented and consequently the terminology
+borrows a lot of context and semantics from the OO vocabulary:
+.Pp
+A
+.Dq class ,
+represented by the data structure
+.Vt g_class
+implements one
+particular kind of transformation.
+Typical examples are MBR disk
+partition, BSD disklabel, and RAID5 classes.
+.Pp
+An instance of a class is called a
+.Dq geom
+and represented by the data structure
+.Vt g_geom .
+In a typical i386
+.Fx
+system, there
+will be one geom of class MBR for each disk.
+.Pp
+A
+.Dq provider ,
+represented by the data structure
+.Vt g_provider ,
+is the front gate at which a geom offers service.
+A provider is
+.Do
+a disk-like thing which appears in
+.Pa /dev
+.Dc - a logical
+disk in other words.
+All providers have three main properties:
+.Dq name ,
+.Dq sectorsize
+and
+.Dq size .
+.Pp
+A
+.Dq consumer
+is the backdoor through which a geom connects to another
+geom provider and through which I/O requests are sent.
+.Pp
+The topological relationship between these entities are as follows:
+.Bl -bullet
+.It
+A class has zero or more geom instances.
+.It
+A geom has exactly one class it is derived from.
+.It
+A geom has zero or more consumers.
+.It
+A geom has zero or more providers.
+.It
+A consumer can be attached to zero or one providers.
+.It
+A provider can have zero or more consumers attached.
+.El
+.Pp
+All geoms have a rank-number assigned, which is used to detect and
+prevent loops in the acyclic directed graph.
+This rank number is
+assigned as follows:
+.Bl -enum
+.It
+A geom with no attached consumers has rank=1.
+.It
+A geom with attached consumers has a rank one higher than the
+highest rank of the geoms of the providers its consumers are
+attached to.
+.El
+.Sh "SPECIAL TOPOLOGICAL MANEUVERS"
+In addition to the straightforward attach, which attaches a consumer
+to a provider, and detach, which breaks the bond, a number of special
+topological maneuvers exists to facilitate configuration and to
+improve the overall flexibility.
+.Bl -inset
+.It Em TASTING
+is a process that happens whenever a new class or new provider
+is created, and it provides the class a chance to automatically configure an
+instance on providers which it recognizes as its own.
+A typical example is the MBR disk-partition class which will look for
+the MBR table in the first sector and, if found and validated, will
+instantiate a geom to multiplex according to the contents of the MBR.
+.Pp
+A new class will be offered to all existing providers in turn and a new
+provider will be offered to all classes in turn.
+.Pp
+Exactly what a class does to recognize if it should accept the offered
+provider is not defined by
+.Nm ,
+but the sensible set of options are:
+.Bl -bullet
+.It
+Examine specific data structures on the disk.
+.It
+Examine properties like
+.Dq sectorsize
+or
+.Dq mediasize
+for the provider.
+.It
+Examine the rank number of the provider's geom.
+.It
+Examine the method name of the provider's geom.
+.El
+.It Em ORPHANIZATION
+is the process by which a provider is removed while
+it potentially is still being used.
+.Pp
+When a geom orphans a provider, all future I/O requests will
+.Dq bounce
+on the provider with an error code set by the geom.
+Any
+consumers attached to the provider will receive notification about
+the orphanization when the event loop gets around to it, and they
+can take appropriate action at that time.
+.Pp
+A geom which came into being as a result of a normal taste operation
+should self-destruct unless it has a way to keep functioning whilst
+lacking the orphaned provider.
+Geoms like disk slicers should therefore self-destruct whereas
+RAID5 or mirror geoms will be able to continue as long as they do
+not lose quorum.
+.Pp
+When a provider is orphaned, this does not necessarily result in any
+immediate change in the topology: any attached consumers are still
+attached, any opened paths are still open, any outstanding I/O
+requests are still outstanding.
+.Pp
+The typical scenario is:
+.Pp
+.Bl -bullet -offset indent -compact
+.It
+A device driver detects a disk has departed and orphans the provider for it.
+.It
+The geoms on top of the disk receive the orphanization event and
+orphan all their providers in turn.
+Providers which are not attached to will typically self-destruct
+right away.
+This process continues in a quasi-recursive fashion until all
+relevant pieces of the tree have heard the bad news.
+.It
+Eventually the buck stops when it reaches geom_dev at the top
+of the stack.
+.It
+Geom_dev will call
+.Xr destroy_dev 9
+to stop any more requests from
+coming in.
+It will sleep until any and all outstanding I/O requests have
+been returned.
+It will explicitly close (i.e.: zero the access counts), a change
+which will propagate all the way down through the mesh.
+It will then detach and destroy its geom.
+.It
+The geom whose provider is now detached will destroy the provider,
+detach and destroy its consumer and destroy its geom.
+.It
+This process percolates all the way down through the mesh, until
+the cleanup is complete.
+.El
+.Pp
+While this approach seems byzantine, it does provide the maximum
+flexibility and robustness in handling disappearing devices.
+.Pp
+The one absolutely crucial detail to be aware of is that if the
+device driver does not return all I/O requests, the tree will
+not unravel.
+.It Em SPOILING
+is a special case of orphanization used to protect
+against stale metadata.
+It is probably easiest to understand spoiling by going through
+an example.
+.Pp
+Imagine a disk,
+.Pa da0 ,
+on top of which an MBR geom provides
+.Pa da0s1
+and
+.Pa da0s2 ,
+and on top of
+.Pa da0s1
+a BSD geom provides
+.Pa da0s1a
+through
+.Pa da0s1e ,
+and that both the MBR and BSD geoms have
+autoconfigured based on data structures on the disk media.
+Now imagine the case where
+.Pa da0
+is opened for writing and those
+data structures are modified or overwritten: now the geoms would
+be operating on stale metadata unless some notification system
+can inform them otherwise.
+.Pp
+To avoid this situation, when the open of
+.Pa da0
+for write happens,
+all attached consumers are told about this and geoms like
+MBR and BSD will self-destruct as a result.
+When
+.Pa da0
+is closed, it will be offered for tasting again
+and, if the data structures for MBR and BSD are still there, new
+geoms will instantiate themselves anew.
+.Pp
+Now for the fine print:
+.Pp
+If any of the paths through the MBR or BSD module were open, they
+would have opened downwards with an exclusive bit thus rendering it
+impossible to open
+.Pa da0
+for writing in that case.
+Conversely,
+the requested exclusive bit would render it impossible to open a
+path through the MBR geom while
+.Pa da0
+is open for writing.
+.Pp
+From this it also follows that changing the size of open geoms can
+only be done with their cooperation.
+.Pp
+Finally: the spoiling only happens when the write count goes from
+zero to non-zero and the retasting happens only when the write count goes
+from non-zero to zero.
+.It Em CONFIGURE
+is the process where the administrator issues instructions
+for a particular class to instantiate itself.
+There are multiple
+ways to express intent in this case - a particular provider may be
+specified with a level of override forcing, for instance, a BSD
+disklabel module to attach to a provider which was not found palatable
+during the TASTE operation.
+.Pp
+Finally, I/O is the reason we even do this: it concerns itself with
+sending I/O requests through the graph.
+.It Em "I/O REQUESTS" ,
+represented by
+.Vt "struct bio" ,
+originate at a consumer,
+are scheduled on its attached provider and, when processed, are returned
+to the consumer.
+It is important to realize that the
+.Vt "struct bio"
+which enters through the provider of a particular geom does not
+.Do
+come out on the other side
+.Dc .
+Even simple transformations like MBR and BSD will clone the
+.Vt "struct bio" ,
+modify the clone, and schedule the clone on their
+own consumer.
+Note that cloning the
+.Vt "struct bio"
+does not involve cloning the
+actual data area specified in the I/O request.
+.Pp
+In total, four different I/O requests exist in
+.Nm :
+read, write, delete, and
+.Dq "get attribute".
+.Pp
+Read and write are self explanatory.
+.Pp
+Delete indicates that a certain range of data is no longer used
+and that it can be erased or freed as the underlying technology
+supports.
+Technologies like flash adaptation layers can arrange to erase
+the relevant blocks before they will become reassigned and
+cryptographic devices may want to fill random bits into the
+range to reduce the amount of data available for attack.
+.Pp
+It is important to recognize that a delete indication is not a
+request and consequently there is no guarantee that the data actually
+will be erased or made unavailable unless guaranteed by specific
+geoms in the graph.
+If
+.Dq "secure delete"
+semantics are required, a
+geom should be pushed which converts delete indications into (a
+sequence of) write requests.
+.Pp
+.Dq "Get attribute"
+supports inspection and manipulation
+of out-of-band attributes on a particular provider or path.
+Attributes are named by
+.Tn ASCII
+strings and they will be discussed in
+a separate section below.
+.El
+.Pp
+(Stay tuned while the author rests his brain and fingers: more to come.)
+.Sh DIAGNOSTICS
+Several flags are provided for tracing
+.Nm
+operations and unlocking
+protection mechanisms via the
+.Va kern.geom.debugflags
+sysctl.
+All of these flags are off by default, and great care should be taken in
+turning them on.
+.Bl -tag -width indent
+.It 0x01 Pq Dv G_T_TOPOLOGY
+Provide tracing of topology change events.
+.It 0x02 Pq Dv G_T_BIO
+Provide tracing of buffer I/O requests.
+.It 0x04 Pq Dv G_T_ACCESS
+Provide tracing of access check controls.
+.It 0x08 (unused)
+.It 0x10 (allow foot shooting)
+Allow writing to Rank 1 providers.
+This would, for example, allow the super-user to overwrite the MBR on the root
+disk or write random sectors elsewhere to a mounted disk.
+The implications are obvious.
+.It 0x40 Pq Dv G_F_DISKIOCTL
+This is unused at this time.
+.It 0x80 Pq Dv G_F_CTLDUMP
+Dump contents of gctl requests.
+.El
+.Sh SEE ALSO
+.Xr libgeom 3 ,
+.Xr disk 9 ,
+.Xr DECLARE_GEOM_CLASS 9 ,
+.Xr g_access 9 ,
+.Xr g_attach 9 ,
+.Xr g_bio 9 ,
+.Xr g_consumer 9 ,
+.Xr g_data 9 ,
+.Xr g_event 9 ,
+.Xr g_geom 9 ,
+.Xr g_provider 9 ,
+.Xr g_provider_by_name 9
+.Sh HISTORY
+This software was developed for the
+.Fx
+Project by
+.An Poul-Henning Kamp
+and NAI Labs, the Security Research Division of Network Associates, Inc.\&
+under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the
+DARPA CHATS research program.
+.Pp
+The first precursor for
+.Nm
+was a gruesome hack to Minix 1.2 and was
+never distributed.
+An earlier attempt to implement a less general scheme
+in
+.Fx
+never succeeded.
+.Sh AUTHORS
+.An "Poul-Henning Kamp" Aq phk@FreeBSD.org
diff --git a/share/man/man4/geom_fox.4 b/share/man/man4/geom_fox.4
new file mode 100644
index 0000000..8010d24
--- /dev/null
+++ b/share/man/man4/geom_fox.4
@@ -0,0 +1,214 @@
+.\"
+.\" Copyright (c) 2006 Wilko Bulte
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 2, 2005
+.Dt GEOM_FOX 4
+.Os
+.Sh NAME
+.Nm geom_fox
+.Nd "GEOM based basic disk multipathing"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options GEOM_FOX"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+geom_fox_load="YES"
+.Ed
+.Sh DESCRIPTION
+The intent of the
+.Nm
+framework is to provide basic multipathing support to access direct
+access devices.
+Basic in the above sentence should be read as:
+.Nm
+only provides path failover functionality, not load balancing over
+the available paths etc.
+Using suitable hardware like SCSI or FibreChannel disks it is
+possible to have multiple (typically 2) host bus adapters access
+the same physical disk drive.
+.Pp
+Without a multipathing driver the
+.Fx
+kernel would probe the disks multiple times, resulting in the creation of
+multiple
+.Pa /dev
+entries for the same underlying physical device.
+A unique label written in the GEOM label area allows
+.Nm
+to detect multiple paths.
+Using this information it creates a unique
+.Pa da#.fox
+device.
+.Pp
+The
+.Nm
+device is subsequently used by the
+.Fx
+kernel to access the disks.
+Multiple physical access paths ensure that even in case of a path failure the
+.Fx
+kernel can continue to access the data.
+.Pp
+The
+.Nm
+driver will disallow write operations to the underlying devices once the
+fox device has been opened for writing.
+.Sh EXAMPLES
+.Bl -bullet -compact
+.It
+.Nm
+needs a label on the disk as follows in order to work properly:
+.Bd -literal
+"0123456789abcdef0123456789abcdef"
+"GEOM::FOX <--unique--id-->"
+.Ed
+.Pp
+For the unique ID 16 bytes are available.
+The
+.Dq Li GEOM::FOX
+is the magic to mark a
+.Nm
+device.
+.Pp
+The actual labelling is accomplished by
+.Bd -literal
+echo "GEOM::FOX someid" | dd of=/dev/da2 conv=sync
+.Ed
+.Pp
+For FibreChannel devices it is suggested to use the Node World Wide
+Name (Node WWN) as this is guaranteed by the FibreChannel standard to
+be worldwide unique.
+The use of the Port WWN not recommended as each port of a given
+device has a different WWN, thereby confusing things.
+.Pp
+The Node WWN can be obtained from a verbose boot as in for example
+.Bd -literal
+isp1: Target 1 (Loop 0x1) Port ID 0xe8 (role Target) Arrived
+ Port WWN 0x21000004cfc8aca2
+ Node WWN 0x20000004cfc8aca2
+.Ed
+.Pp
+This Node WWN would then be used like so:
+.Bd -literal
+echo "GEOM::FOX 20000004cfc8aca2" | dd of=/dev/da2 conv=sync
+.Ed
+.Pp
+For non-FibreChannel devices you could for example use the serial
+number of the device.
+Regardless of what you use, make sure the label is unique.
+.Pp
+Once the labelling has been performed and assuming the
+.Nm
+module is loaded the kernel will inform you that it has found a new
+.Nm
+device with a message similar to
+.Bd -literal
+Creating new fox (da2)
+fox da2.fox lock 0xfffffc0000fdba20
+.Ed
+.Pp
+.It
+To check which physical devices match a given
+.Nm
+device:
+.Bd -literal -offset indent
+# geom fox list
+Geom name: da2.fox
+Providers:
+1. Name: da2.fox
+ Mediasize: 73407865344 (68G)
+ Sectorsize: 512
+ Mode: r0w0e0
+Consumers:
+1. Name: da2
+ Mediasize: 73407865856 (68G)
+ Sectorsize: 512
+ Mode: r0w0e0
+2. Name: da6
+ Mediasize: 73407865856 (68G)
+ Sectorsize: 512
+ Mode: r0w0e0
+.Ed
+.Pp
+.It
+To check the status of the
+.Nm
+components:
+.Bd -literal
+# geom fox status
+ Name Status Components
+da2.fox N/A da2
+ da6
+.Ed
+.El
+.Sh SEE ALSO
+.Xr GEOM 4 ,
+.Xr geom 8 ,
+.Xr gmultipath 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An "Poul-Henning Kamp" Aq phk@FreeBSD.org .
+This manual page was written by
+.An "Wilko Bulte" Aq wilko@FreeBSD.org .
+.Sh CAVEATS
+The
+.Nm
+driver depends on the underlying hardware drivers to do the right thing in case
+of a path failure.
+If for example a hardware driver continues to retry forever,
+.Nm
+is not able to re-initiate the I/O to an alternative physical path.
+.Pp
+You have to be very sure to provide a unique label for each of the
+.Nm
+devices.
+Safety belts are not provided.
+For FibreChannel devices it is suggested to use the Port WWN of the device.
+The World Wide Name is guaranteed to be worldwide unique per the
+FibreChannel standard.
+.Sh BUGS
+The
+.Nm
+framework has only seen light testing.
+There definitely might be dragons here.
+.Pp
+The name
+.Nm
+is completely obscure.
+Just remember that any sly fox has multiple exits from its hole.
+.Pp
+The examples provided are too FibreChannel-centric.
diff --git a/share/man/man4/geom_linux_lvm.4 b/share/man/man4/geom_linux_lvm.4
new file mode 100644
index 0000000..7dee047
--- /dev/null
+++ b/share/man/man4/geom_linux_lvm.4
@@ -0,0 +1,88 @@
+.\"
+.\" Copyright (c) 2008 Andrew Thompson
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 1, 2013
+.Dt GEOM_LINUX_LVM 4
+.Os
+.Sh NAME
+.Nm geom_linux_lvm
+.Nd "GEOM based Linux LVM logical volume mapping"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options GEOM_LINUX_LVM"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+geom_linux_lvm_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+framework provides support for mapping Linux LVM volumes to GEOM providers.
+.Nm
+currently supports linear stripes with segments on one or more physical disks.
+The parser is able to read LVM2 Text Format metadata, the logical volumes will
+be assembled and made available under
+.Pa /dev/linux_lvm/ .
+The metadata is read-only, logical volumes cannot be allocated or resized.
+.Sh EXAMPLES
+To view which
+.Nm
+devices are available:
+.Bd -literal -offset indent
+# geom linux_lvm list
+Geom name: vg1
+Providers:
+1. Name: linux_lvm/vg1-home
+ Mediasize: 4294967296 (4.0G)
+ Sectorsize: 512
+ Mode: r0w0e0
+2. Name: linux_lvm/vg1-logs
+ Mediasize: 4294967296 (4.0G)
+ Sectorsize: 512
+ Mode: r0w0e0
+Consumers:
+1. Name: ada0s1
+ Mediasize: 80023716864 (75G)
+ Sectorsize: 512
+ Mode: r0w0e0
+.Ed
+.Sh SEE ALSO
+.Xr GEOM 4 ,
+.Xr geom 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An "Andrew Thompson" Aq thompsa@FreeBSD.org .
diff --git a/share/man/man4/geom_map.4 b/share/man/man4/geom_map.4
new file mode 100644
index 0000000..6af91be
--- /dev/null
+++ b/share/man/man4/geom_map.4
@@ -0,0 +1,211 @@
+.\"
+.\" Copyright (c) 2011 Aleksandr Rybalko
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 17, 2011
+.Dt GEOM_MAP 4
+.Os
+.Sh NAME
+.Nm geom_map
+.Nd "GEOM module that maps defined items as separate partitions"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device geom_map"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+framework provides support for mapping defined parts of the media.
+Basically it is helpful for embedded devices where in the one continuous
+flash are loader, kernel and rootfs parts.
+.Nm
+allows making them available as separate parts and protects the loader from
+being overwritten.
+.Pp
+At boot time
+.Nm
+partitions are listed (only with bootverbose) as:
+.Bd -literal -offset indent
+MAP: 0x30000, data=0x30000 "/dev/map/bootloader"
+MAP: 30000x10000, data=0x10000 "/dev/map/factory"
+MAP: 40000x7a0000, data=0x7a0000 "/dev/map/upgrade"
+MAP: search key ".!/bin/sh" from 0x100000, step 0x10000
+MAP: 40000x110000, data=0x110000 "/dev/map/kernel"
+MAP: search key ".!/bin/sh" from 0x100000, step 0x10000
+MAP: 150000x690000, data=0x690000 "/dev/map/rootfs"
+MAP: 7e0000x20000, data=0x20000 "/dev/map/config"
+.Ed
+.Pp
+The current
+.Nm
+configuration can be accessed with the following
+.Xr sysctl 8
+nodes:
+.Va kern.geom.conftxt , kern.geom.confxml ,
+and
+.Va kern.geom.confdot
+or by using
+.Dq Li "geom map list" .
+.Bd -literal -offset indent
+# sysctl -n kern.geom.conftxt
+0 MD md0 10485760 512 u 0 s 512 f 0 fs 0 l 10485760 t malloc
+0 DISK cfid0 8388608 4 hd 0 sc 0
+1 MAP map/config 131072 4 i 5 o 8257536 entry 0 dsize 131072
+1 MAP map/rootfs 6881280 4 i 4 o 1376256 entry 0 dsize 6881280
+2 UNCOMPRESS map/rootfs.uncompress 18677760 512
+1 MAP map/kernel 1114112 4 i 3 o 262144 entry 0 dsize 1114112
+1 MAP map/upgrade 7995392 4 i 2 o 262144 entry 0 dsize 7995392
+1 MAP map/factory 65536 4 i 1 o 196608 entry 0 dsize 65536
+1 MAP map/bootloader 196608 4 i 0 o 0 entry 0 dsize 196608
+.Ed
+.Pp
+Driver configuration can be done in
+.Xr device.hints 5 .
+List of used parameters:
+.Bl -tag -width indent
+.It Va at
+select media to attach
+.It Va name
+name of partition (will create device
+.Pa /dev/map/ Ns Ar that_name )
+.It Va start
+offset from the beginning of the parent media to start of the mapped partition.
+This field can also have a special value
+.Qq Li search: Ns Ar searchstart Ns Li : Ns Ar searchstep Ns Li : Ns Ar searchkey ,
+where:
+.Bl -tag -width indent
+.It Ar searchstart
+offset from the beginning of the parent media where search will be started
+.It Ar searchstep
+value of the increment used while searching for the partition boundary markers
+.It Ar searchkey
+key which will be used to find partition boundary markers.
+The wildcard
+.Ql .\&
+can be used to match any character on that position
+.El
+.It Va end
+offset from the beginning of the parent media to the end of the mapped partition.
+This field can also have the special value
+.Qq Li search: Ns Ar searchstart Ns Li : Ns Ar searchstep Ns Li : Ns Ar searchkey ,
+as described above.
+.It Va offset
+offset where the data of the mapped partition begins
+.El
+.Pp
+Each record contains the start address (in bytes) from the media begin, size
+(in bytes), offset where the data of mapped partition begins, and the name of
+new device.
+.Bd -literal -offset indent
+MAP: 150000x690000, data=0x690000 "/dev/map/rootfs"
+.Ed
+.Bd -literal
+00150000 - start address
+00690000 - size
+00000000 - data begin from zero offset
+00690000 - data size
+"map/rootfs" - new media will be accessible via /dev/map/rootfs dev.
+.Ed
+.Sh EXAMPLES
+If we need to implement layout shown above, we need to define the following
+hints:
+.Bd -literal -offset indent
+hint.map.0.at="cfid0"
+hint.map.0.start=0x00000000
+hint.map.0.end=0x00030000
+hint.map.0.name="bootloader"
+hint.map.0.readonly=1
+.Ed
+.Pp
+This defines
+.Pa /dev/map/bootloader
+at disk
+.Pa cfid0
+starting at
+.Li 0x00000000
+and ending at
+.Li 0x00030000 ,
+it is also marked as readonly.
+.Bd -literal -offset indent
+hint.map.1.at="cfid0"
+hint.map.1.start=0x00030000
+hint.map.1.end=0x00040000
+hint.map.1.name="factory"
+
+hint.map.2.at="cfid0"
+hint.map.2.start=0x00040000
+hint.map.2.end=0x007e0000
+hint.map.2.name="upgrade"
+
+hint.map.3.at="cfid0"
+hint.map.3.name="kernel"
+hint.map.3.start=0x00040000
+hint.map.3.end="search:0x00100000:0x10000:.!/bin/sh"
+.Ed
+.Pp
+This defines
+.Pa /dev/map/kernel
+at disk
+.Pa cfid0
+starting at
+.Li 0x00040000 ,
+but the end position must be searched by finding the key
+.Dq Li ".!/bin/sh" ,
+from offset
+.Li 0x00100000
+to the end of media with step
+.Li 0x10000 .
+The real marker in this case is
+.Dq Li "#!/bin/sh" ,
+but
+.Ql #
+terminates the line when the hints file is parsed, so we need to use wildcard
+.Ql .\&
+instead of
+.Ql # .
+.Bd -literal -offset indent
+hint.map.4.at="cfid0"
+hint.map.4.name="rootfs"
+hint.map.4.start="search:0x00100000:0x10000:.!/bin/sh"
+hint.map.4.end=0x007e0000
+
+hint.map.5.at="cfid0"
+hint.map.5.start=0x007e0000
+hint.map.5.end=0x00800000
+hint.map.5.name="config"
+.Ed
+.Sh SEE ALSO
+.Xr geom 4 ,
+.Xr geom 8 ,
+.Xr sysctl 8
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An "Aleksandr Rybalko" Aq ray@ddteam.net .
diff --git a/share/man/man4/geom_uncompress.4 b/share/man/man4/geom_uncompress.4
new file mode 100644
index 0000000..6e848d4
--- /dev/null
+++ b/share/man/man4/geom_uncompress.4
@@ -0,0 +1,107 @@
+.\" Copyright (c) 2014, Luiz Otavio O Souza <loos@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 9, 2014
+.Dt GEOM_UNCOMPRESS 4
+.Os
+.Sh NAME
+.Nm geom_uncompress
+.Nd "GEOM based compressed disk images"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options GEOM_UNCOMPRESS"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+geom_uncompress_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+framework provides support for compressed read only disk images.
+This allows significant storage savings at the expense of a little CPU
+time on each read.
+Data written in the GEOM label area allows
+.Nm
+to detect compressed images which have been created with
+.Xr mkulzma 8
+or
+.Xr mkuzip 8
+and presented to the kernel as a logical disk device via
+.Xr md 4 .
+.Nm
+creates a unique
+.Pa md#.uncompress
+device for each image.
+.Pp
+The
+.Nm
+device is subsequently used by the
+.Fx
+kernel to access the disk images.
+The
+.Nm
+driver does not allow write operations to the underlying disk image.
+To check which
+.Xr md 4
+devices match a given
+.Nm
+device:
+.Bd -literal -offset indent
+# geom uncompress list
+Geom name: md0.uncompress
+Providers:
+1. Name: md0.uncompress
+ Mediasize: 52428800 (50M)
+ Sectorsize: 512
+ Mode: r1w0e0
+Consumers:
+1. Name: md0
+ Mediasize: 20864000 (20M)
+ Sectorsize: 512
+ Mode: r1w0e0
+.Ed
+.Sh SEE ALSO
+.Xr GEOM 4 ,
+.Xr md 4 ,
+.Xr geom 8 ,
+.Xr mkulzma 8 ,
+.Xr mkuzip 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An "Maxim Sobolev" Aq sobomax@FreeBSD.org
+and
+.An "Aleksandr Rybalko" Aq ray@FreeBSD.org .
+This manual page was written by
+.An "Luiz Otavio O Souza" Aq loos@FreeBSD.org .
diff --git a/share/man/man4/geom_uzip.4 b/share/man/man4/geom_uzip.4
new file mode 100644
index 0000000..8d27673
--- /dev/null
+++ b/share/man/man4/geom_uzip.4
@@ -0,0 +1,105 @@
+.\"
+.\" Copyright (c) 2006 Ceri Davies
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 9, 2006
+.Dt GEOM_UZIP 4
+.Os
+.Sh NAME
+.Nm geom_uzip
+.Nd "GEOM based compressed disk images"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options GEOM_UZIP"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+geom_uzip_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+framework provides support for compressed read only
+disk images.
+This allows significant storage savings at the expense of
+a little CPU time on each read.
+Data written in the GEOM label area allows
+.Nm
+to detect compressed images which have been created with
+.Xr mkuzip 8
+and presented to the kernel as a logical disk device via
+.Xr md 4 .
+.Nm
+creates a unique
+.Pa md#.uzip
+device for each image.
+.Pp
+The
+.Nm
+device is subsequently used by the
+.Fx
+kernel to access the disk images.
+The
+.Nm
+driver does not allow write operations to the underlying disk image.
+To check which
+.Xr md 4
+devices match a given
+.Nm
+device:
+.Bd -literal -offset indent
+# geom uzip list
+Geom name: md1.uzip
+Providers:
+1. Name: md1.uzip
+ Mediasize: 22003712 (21M)
+ Sectorsize: 512
+ Mode: r1w0e1
+Consumers:
+1. Name: md1
+ Mediasize: 9563648 (9.1M)
+ Sectorsize: 512
+ Mode: r1w0e1
+.Ed
+.Sh SEE ALSO
+.Xr GEOM 4 ,
+.Xr md 4 ,
+.Xr geom 8 ,
+.Xr mkuzip 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An "Max Khon" Aq fjoe@FreeBSD.org .
+This manual page was written by
+.An "Ceri Davies" Aq ceri@FreeBSD.org .
diff --git a/share/man/man4/gif.4 b/share/man/man4/gif.4
new file mode 100644
index 0000000..453b4bd
--- /dev/null
+++ b/share/man/man4/gif.4
@@ -0,0 +1,287 @@
+.\" $KAME: gif.4,v 1.28 2001/05/18 13:15:56 itojun Exp $
+.\"
+.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the project nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 1, 2011
+.Dt GIF 4
+.Os
+.Sh NAME
+.Nm gif
+.Nd generic tunnel interface
+.Sh SYNOPSIS
+.Cd "device gif"
+.Sh DESCRIPTION
+The
+.Nm
+interface is a generic tunnelling device for IPv4 and IPv6.
+It can tunnel IPv[46] traffic over IPv[46].
+Therefore, there can be four possible configurations.
+The behavior of
+.Nm
+is mainly based on RFC2893 IPv6-over-IPv4 configured tunnel.
+On
+.Nx ,
+.Nm
+can also tunnel ISO traffic over IPv[46] using EON encapsulation.
+Note that
+.Nm
+does not perform GRE encapsulation; use
+.Xr gre 4
+for GRE encapsulation.
+.Pp
+Each
+.Nm
+interface is created at runtime using interface cloning.
+This is
+most easily done with the
+.Dq Nm ifconfig Cm create
+command or using the
+.Va ifconfig_ Ns Aq Ar interface
+variable in
+.Xr rc.conf 5 .
+.Pp
+To use
+.Nm ,
+the administrator needs to configure the protocol and addresses used for the outer
+header.
+This can be done by using
+.Xr ifconfig 8
+.Cm tunnel ,
+or
+.Dv SIOCSIFPHYADDR
+ioctl.
+The administrator also needs to configure the protocol and addresses for the
+inner header, with
+.Xr ifconfig 8 .
+Note that IPv6 link-local addresses
+(those that start with
+.Li fe80:: )
+will be automatically configured whenever possible.
+You may need to remove IPv6 link-local addresses manually using
+.Xr ifconfig 8 ,
+if you want to disable the use of IPv6 as the inner header
+(for example, if you need a pure IPv4-over-IPv6 tunnel).
+Finally, you must modify the routing table to route the packets through the
+.Nm
+interface.
+.Pp
+The
+.Nm
+device can be configured to be ECN friendly.
+This can be configured by
+.Dv IFF_LINK1 .
+.Ss ECN friendly behavior
+The
+.Nm
+device can be configured to be ECN friendly, as described in
+.Dv draft-ietf-ipsec-ecn-02.txt .
+This is turned off by default, and can be turned on by the
+.Dv IFF_LINK1
+interface flag.
+.Pp
+Without
+.Dv IFF_LINK1 ,
+.Nm
+will show normal behavior, as described in RFC2893.
+This can be summarized as follows:
+.Bl -tag -width "Ingress" -offset indent
+.It Ingress
+Set outer TOS bit to
+.Dv 0 .
+.It Egress
+Drop outer TOS bit.
+.El
+.Pp
+With
+.Dv IFF_LINK1 ,
+.Nm
+will copy ECN bits
+.Dv ( 0x02
+and
+.Dv 0x01
+on IPv4 TOS byte or IPv6 traffic class byte)
+on egress and ingress, as follows:
+.Bl -tag -width "Ingress" -offset indent
+.It Ingress
+Copy TOS bits except for ECN CE
+(masked with
+.Dv 0xfe )
+from
+inner to outer.
+Set ECN CE bit to
+.Dv 0 .
+.It Egress
+Use inner TOS bits with some change.
+If outer ECN CE bit is
+.Dv 1 ,
+enable ECN CE bit on the inner.
+.El
+.Pp
+Note that the ECN friendly behavior violates RFC2893.
+This should be used in mutual agreement with the peer.
+.Ss Security
+A malicious party may try to circumvent security filters by using
+tunnelled packets.
+For better protection,
+.Nm
+performs both martian and ingress filtering against the outer source address
+on egress.
+Note that martian/ingress filters are in no way complete.
+You may want to secure your node by using packet filters.
+Ingress filtering can break tunnel operation in an asymmetrically
+routed network.
+It can be turned off by
+.Dv IFF_LINK2
+bit.
+.Ss Route caching
+Processing each packet requires two route lookups: first on the
+packet itself, and second on the tunnel destination.
+This second route can be cached, increasing tunnel performance.
+However, in a dynamically routed network, the tunnel will stick
+to the cached route, ignoring routing table updates.
+Route caching can be enabled with the
+.Dv IFF_LINK0
+flag.
+.\"
+.Ss Miscellaneous
+By default,
+.Nm
+tunnels may not be nested.
+This behavior may be modified at runtime by setting the
+.Xr sysctl 8
+variable
+.Va net.link.gif.max_nesting
+to the desired level of nesting.
+Additionally,
+.Nm
+tunnels are restricted to one per pair of end points.
+Parallel tunnels may be enabled by setting the
+.Xr sysctl 8
+variable
+.Va net.link.gif.parallel_tunnels
+to 1.
+.Sh SEE ALSO
+.Xr gre 4 ,
+.Xr inet 4 ,
+.Xr inet6 4 ,
+.Xr ifconfig 8
+.Rs
+.%A R. Gilligan
+.%A E. Nordmark
+.%B RFC2893
+.%T Transition Mechanisms for IPv6 Hosts and Routers
+.%D August 2000
+.%U http://tools.ietf.org/html/rfc2893
+.Re
+.Rs
+.%A Sally Floyd
+.%A David L. Black
+.%A K. K. Ramakrishnan
+.%T "IPsec Interactions with ECN"
+.%D December 1999
+.%O draft-ietf-ipsec-ecn-02.txt
+.Re
+.\"
+.Sh HISTORY
+The
+.Nm
+device first appeared in the WIDE hydrangea IPv6 kit.
+.\"
+.Sh BUGS
+There are many tunnelling protocol specifications, all
+defined differently from each other.
+The
+.Nm
+device may not interoperate with peers which are based on different specifications,
+and are picky about outer header fields.
+For example, you cannot usually use
+.Nm
+to talk with IPsec devices that use IPsec tunnel mode.
+.Pp
+The current code does not check if the ingress address
+(outer source address)
+configured in the
+.Nm
+interface makes sense.
+Make sure to specify an address which belongs to your node.
+Otherwise, your node will not be able to receive packets from the peer,
+and it will generate packets with a spoofed source address.
+.Pp
+If the outer protocol is IPv4,
+.Nm
+does not try to perform path MTU discovery for the encapsulated packet
+(DF bit is set to 0).
+.Pp
+If the outer protocol is IPv6, path MTU discovery for encapsulated packets
+may affect communication over the interface.
+The first bigger-than-pmtu packet may be lost.
+To avoid the problem, you may want to set the interface MTU for
+.Nm
+to 1240 or smaller, when the outer header is IPv6 and the inner header is IPv4.
+.Pp
+The
+.Nm
+device does not translate ICMP messages for the outer header into the inner header.
+.Pp
+In the past,
+.Nm
+had a multi-destination behavior, configurable via
+.Dv IFF_LINK0
+flag.
+The behavior is obsolete and is no longer supported.
+.Pp
+On
+.Fx
+6.1, 6.2, 6.3, 7.0, 7.1, and 7.2
+the
+.Nm
+sends and receives incorrect EtherIP packets with reversed version
+field when
+.Xr if_bridge 4
+is used together. As a workaround on this interoperability issue, the
+following two
+.Xr ifconfig 8
+flags can be used:
+.Bl -tag -width "accept_rev_ethip_ver" -offset indent
+.It accept_rev_ethip_ver
+accepts both correct EtherIP packets and ones with reversed version
+field, if enabled. If disabled, the
+.Nm
+accepts the correct packets only. This flag is enabled by default.
+.It send_rev_ethip_ver
+sends EtherIP packets with reversed version field intentionally, if
+enabled. If disabled, the
+.Nm
+sends the correct packets only. This flag is disabled by default.
+.El
+.Pp
+If interoperability with the older
+.Fx
+machines is needed, both of these two flags must be enabled.
diff --git a/share/man/man4/gpib.4 b/share/man/man4/gpib.4
new file mode 100644
index 0000000..b5f29cd
--- /dev/null
+++ b/share/man/man4/gpib.4
@@ -0,0 +1,100 @@
+.\" Copyright (c) 2010, Joerg Wunsch
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 24, 2010
+.Dt GPIB 4
+.Os
+.Sh NAME
+.Nm gpib
+.Nd General-Purpose Instrument Bus (GPIB) driver
+.Sh SYNOPSIS
+Either of the
+.Xr pcii 4
+or
+.Xr tnt4882 4
+drivers use this driver as the backend.
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for driving an IEEE-488 bus, also called
+IEC-625 (or just "IEC bus"), or HP-IB (Hewlett Packard Instrument
+Bus), or GPIB (General Purpose Instrument Bus).
+The device can become either a listener, talker, controller, and
+in particular a master controller on the bus.
+.Ss Example
+The following example code queries the device provided as
+.Va argv[1]
+for its identification response.
+.Bd -literal
+/* compile with: cc -O -o ibtest ibtest.c -lgpib */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <err.h>
+#include <vis.h>
+
+#include <gpib/gpib.h>
+
+int
+main(int argc, char **argv)
+{
+ int dmm;
+ unsigned char buf[100];
+ char vbuf[sizeof(buf) * 4];
+
+ /* DVM */
+ dmm = ibdev(0, (argc > 1? atoi(argv[1]): 7), 0,
+ T10s, 1, 0);
+ if (dmm < 0)
+ errx(1, "ibdev = %d\\n", dmm);
+ ibwrt(dmm, "*IDN?\\r\\n", 7);
+ ibrd(dmm, buf, sizeof(buf) - 1);
+ strvisx(vbuf, buf, ibcnt, VIS_WHITE | VIS_CSTYLE);
+ printf("%s\\n", vbuf);
+ return (0);
+}
+.Ed
+.Sh FILES
+.Bl -tag -width /dev/gpibNNib
+.It Pa /dev/gpib Ns Em N Ns "ib"
+Main device node to access the driver.
+.It Pa /dev/gpib Ns Em N Ns "l"
+Listen-only entry to the driver.
+When opening, an instrument can send data to this device on the
+bus in an unaddressed mode, for example hard-copy printer data.
+.El
+.Sh SEE ALSO
+.Xr gpib 3 ,
+.Xr pcii 4 ,
+.Xr tnt4882 4
+.Sh HISTORY
+The
+.Nm
+driver was written by Poul-Henning Kamp, and first appeared in
+.Fx 5.4 .
+.Sh AUTHORS
+This manual page was written by
+.An J\(:org Wunsch .
diff --git a/share/man/man4/gpio.4 b/share/man/man4/gpio.4
new file mode 100644
index 0000000..119f938
--- /dev/null
+++ b/share/man/man4/gpio.4
@@ -0,0 +1,145 @@
+.\" Copyright (c) 2013, Sean Bruno <sbruno@freebsd.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 5, 2013
+.Dt GPIO 4
+.Os
+.Sh NAME
+.Nm gpiobus
+.Nd GPIO bus system
+.Sh SYNOPSIS
+To compile these devices into your kernel and use the device hints, place the
+following lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device gpio"
+.Cd "device gpioc"
+.Cd "device gpioiic"
+.Cd "device gpioled"
+.Ed
+.Pp
+Additional device entries for the
+.Li ARM
+architecture include:
+.Bd -ragged -offset indent
+.Cd "device a10_gpio"
+.Cd "device bcm_gpio"
+.Cd "device imx51_gpio"
+.Cd "device lpcgpio"
+.Cd "device mv_gpio"
+.Cd "device ti_gpio"
+.Cd "device gpio_avila"
+.Cd "device gpio_cambria"
+.Cd "device zy7_gpio"
+.Cd "device pxagpio"
+.Ed
+.Pp
+Additional device entries for the
+.Li MIPS
+architecture include:
+.Bd -ragged -offset indent
+.Cd "device ar71xxx_gpio"
+.Cd "device octeon_gpio"
+.Cd "device rt305_gpio"
+.Ed
+.Pp
+Additional device entries for the
+.Li POWERPC
+architecture include:
+.Bd -ragged -offset indent
+.Cd "device wiigpio"
+.Cd "device macgpio"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+system provides a simple interface to the GPIO pins that are usually
+available on embedded architectures and can provide bit banging style
+devices to the system.
+.Pp
+The acronym
+.Li GPIO
+means
+.Dq General-Purpose Input/Output.
+.Pp
+The BUS physically consists of multiple pins that can be configured
+for input/output, IRQ delivery, SDA/SCL
+.Em iicbus
+use, etc.
+.Pp
+On some embedded architectures (like MIPS), discovery of the bus and
+configuration of the pins is done via
+.Xr device.hints 5
+in the platform's kernel
+.Xr config 5
+file.
+.Pp
+On some others (like ARM), where
+.Xr FDT 4
+is used to describe the device tree, the bus discovery is done via the DTS
+passed to the kernel, being either statically compiled in, or by a variety
+of ways where the boot loader (or Open Firmware enabled system) passes the
+DTS blob to the kernel at boot.
+.Pp
+The following
+.Xr device.hints 5
+are only provided by the
+.Cd ar71xx_gpio
+driver:
+.Bl -tag -width ".Va hint.gpioiic.%d.atXXX"
+.It Va hint.gpio.%d.pinmask
+This is a bitmask of pins on the GPIO board that we would like to expose
+for use to the host operating system.
+To expose pin 0, 4 and 7, use the bitmask of
+10010001 converted to the hexadecimal value 0x0091.
+.It Va hint.gpio.%d.pinon
+This is a bitmask of pins on the GPIO board that will be set to ON at host
+start.
+To set pin 2, 5 and 13 to be set ON at boot, use the bitmask of
+10000000010010 converted to the hexadecimal value 0x2012.
+.It Va hint.gpio.function_set
+.It Va hint.gpio.function_clear
+These are bitmasks of pins that will remap a pin to handle a specific
+function (USB, UART TX/RX, etc) in the Atheros function registers.
+This is mainly used to set/clear functions that we need when they are set up or
+not set up by uBoot.
+.El
+.Pp
+Simply put, each pin of the GPIO interface is connected to an input/output
+of some device in a system.
+.Sh SEE ALSO
+.Xr gpioiic 4 ,
+.Xr gpioled 4 ,
+.Xr iicbus 4 ,
+.Xr gpioctl 8
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Sean Bruno Aq sbruno@FreeBSD.org .
diff --git a/share/man/man4/gpioiic.4 b/share/man/man4/gpioiic.4
new file mode 100644
index 0000000..2a9c8ef
--- /dev/null
+++ b/share/man/man4/gpioiic.4
@@ -0,0 +1,171 @@
+.\" Copyright (c) 2013, Luiz Otavio O Souza <loos@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 14, 2014
+.Dt GPIOIIC 4
+.Os
+.Sh NAME
+.Nm gpioiic
+.Nd GPIO I2C bit-banging device driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device gpio"
+.Cd "device gpioiic"
+.Cd "device iic"
+.Cd "device iicbb"
+.Cd "device iicbus"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides an IIC bit-banging interface using two GPIO pins for the
+SCL and SDA on the
+.Nm gpiobus .
+.Nm
+implements an open collector kind of output, as recommended by the standard,
+when driving the pins on the
+.Nm gpiobus ,
+i.e, they are never switched to the logical value of '1',
+or they are '0' or simply open (Hi-Z/tri-state).
+So the pullup resistors are required so
+.Nm
+can work.
+.Pp
+On a
+.Xr device.hints 5
+based system, like
+.Li MIPS ,
+these values are configurable for the
+.Nm :
+.Bl -tag -width ".Va hint.gpioiic.%d.atXXX"
+.It Va hint.gpioiic.%d.at
+The
+.Nm gpiobus
+you are attaching to.
+Normally just gpiobus0.
+.It Va hint.gpioiic.%d.pins
+This is a bitmask of the pins on the
+.Nm gpiobus
+that are to be used for SCLOCK and SDATA from the GPIO IIC
+bit-banging bus.
+To configure pin 0 and 7, use the bitmask of
+0b10000001 and convert it to a hexadecimal value of 0x0081.
+Please note that this mask should only ever have two bits set
+(any other bits - i.e., pins - will be ignored).
+.It Va hint.gpioiic.%d.scl
+Indicates which bit in the
+.Va hint.gpioiic.%d.pins
+should be used as the SCLOCK
+source.
+Optional, defaults to 0.
+.It Va hint.gpioiic.%d.sda
+Indicates which bit in the
+.Va hint.gpioiic.%d.pins
+should be used as the SDATA
+source.
+Optional, defaults to 1.
+.El
+.Pp
+On a
+.Xr FDT 4
+based system, like
+.Li ARM ,
+the DTS part for a
+.Nm gpioiic
+device usually looks like:
+.Bd -literal
+gpio: gpio {
+
+ gpio-controller;
+ ...
+
+ gpioiic0 {
+ compatible = "gpioiic";
+ /*
+ * Attach to GPIO pins 21 and 22. Set them
+ * initially as inputs.
+ */
+ gpios = <&gpio 21 1 0
+ &gpio 22 1 0>;
+ scl = <0>; /* GPIO pin 21 - optional */
+ sda = <1>; /* GPIO pin 22 - optional */
+
+ /* This is an example of a gpioiic child. */
+ gpioiic-child0 {
+ compatible = "lm75";
+ i2c-address = <0x4f>;
+ };
+ };
+};
+.Ed
+.Pp
+Where:
+.Bl -tag -width ".Va compatible"
+.It Va compatible
+Should always be set to "gpioiic".
+.It Va gpios
+The
+.Va gpios
+property indicates which GPIO pins should be used for SCLOCK and SDATA
+on the GPIO IIC bit-banging bus.
+For more details about the
+.Va gpios
+property, please consult
+.Pa /usr/src/sys/boot/fdt/dts/bindings-gpio.txt .
+.It Va scl
+The
+.Va scl
+option indicates which bit in the
+.Va gpios
+should be used as the SCLOCK source.
+Optional, defaults to 0.
+.It Va sda
+The
+.Va sda
+option indicates which bit in the
+.Va gpios
+should be used as the SDATA source.
+Optional, defaults to 1.
+.El
+.Sh SEE ALSO
+.Xr fdt 4 ,
+.Xr gpio 4 ,
+.Xr gpioled 4 ,
+.Xr iic 4 ,
+.Xr iicbb 4 ,
+.Xr iicbus 4
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 10.1 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Luiz Otavio O Souza .
diff --git a/share/man/man4/gpioled.4 b/share/man/man4/gpioled.4
new file mode 100644
index 0000000..6d1b41e
--- /dev/null
+++ b/share/man/man4/gpioled.4
@@ -0,0 +1,156 @@
+.\" Copyright (c) 2013, Luiz Otavio O Souza <loos@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 14, 2014
+.Dt GPIOLED 4
+.Os
+.Sh NAME
+.Nm gpioled
+.Nd GPIO LED generic device driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device gpio"
+.Cd "device gpioled"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides glue to attach a
+.Xr led 4
+compatible device to a GPIO pin.
+Each LED in the system has a
+.Pa name
+which is used to export a device as
+.Pa /dev/led/<name> .
+The GPIO pin can then be controlled by writing to this device as described
+in
+.Xr led 4 .
+.Pp
+On a
+.Xr device.hints 5
+based system, like
+.Li MIPS ,
+these values are configurable for
+.Nm :
+.Bl -tag -width ".Va hint.gpioiic.%d.atXXX"
+.It Va hint.gpioled.%d.at
+The gpiobus you are attaching to.
+Normally assigned to gpiobus0.
+.It Va hint.gpioled.%d.name
+Arbitrary name of device in
+.Pa /dev/led/
+to create for
+.Xr led 4 .
+.It Va hint.gpioled.%d.pins
+Which pin on the GPIO interface to map to this instance.
+Please note that this mask should only ever have one bit set
+(any other bits - i.e., pins - will be ignored).
+.El
+.Pp
+On a
+.Xr FDT 4
+based system, like
+.Li ARM ,
+the DTS part for a
+.Nm gpioled
+device usually looks like:
+.Bd -literal
+gpio: gpio {
+
+ gpio-controller;
+ ...
+
+ led0 {
+ compatible = "gpioled";
+ gpios = <&gpio 16 2 0>; /* GPIO pin 16. */
+ name = "ok";
+ };
+
+ led1 {
+ compatible = "gpioled";
+ gpios = <&gpio 17 2 0>; /* GPIO pin 17. */
+ name = "user-led1";
+ };
+};
+.Ed
+.Pp
+Optionally, you can choose to combine all the LEDs under a single
+.Dq gpio-leds
+compatible node:
+.Bd -literal
+simplebus0 {
+
+ ...
+
+ leds {
+ compatible = "gpio-leds";
+
+ led0 {
+ gpios = <&gpio 16 2 0>;
+ name = "ok"
+ };
+
+ led1 {
+ gpios = <&gpio 17 2 0>;
+ name = "user-led1"
+ };
+ };
+};
+.Ed
+.Pp
+Both methods are equally supported and it is possible to have the LEDs
+defined with any sort of mix between the methods.
+The only restriction is that a GPIO pin cannot be mapped by two different
+(gpio)leds.
+.Pp
+For more details about the
+.Va gpios
+property, please consult
+.Pa /usr/src/sys/boot/fdt/dts/bindings-gpio.txt .
+.Pp
+The property
+.Va name
+is the arbitrary name of the device in
+.Pa /dev/led/
+to create for
+.Xr led 4 .
+.Sh SEE ALSO
+.Xr fdt 4 ,
+.Xr gpio 4 ,
+.Xr gpioiic 4 ,
+.Xr led 4
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 10.1 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Luiz Otavio O Souza .
diff --git a/share/man/man4/gre.4 b/share/man/man4/gre.4
new file mode 100644
index 0000000..a9267c9
--- /dev/null
+++ b/share/man/man4/gre.4
@@ -0,0 +1,336 @@
+.\" $NetBSD: gre.4,v 1.28 2002/06/10 02:49:35 itojun Exp $
+.\"
+.\" Copyright 1998 (c) The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Heiko W.Rupp <hwr@pilhuhn.de>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 20, 2008
+.Dt GRE 4
+.Os
+.Sh NAME
+.Nm gre
+.Nd encapsulating network device
+.Sh SYNOPSIS
+To compile the
+driver into the kernel, place the following line in the kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "device gre"
+.Ed
+.Pp
+Alternatively, to load the
+driver as a module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_gre_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+network interface pseudo device encapsulates datagrams
+into IP.
+These encapsulated datagrams are routed to a destination host,
+where they are decapsulated and further routed to their final destination.
+The
+.Dq tunnel
+appears to the inner datagrams as one hop.
+.Pp
+.Nm
+interfaces are dynamically created and destroyed with the
+.Xr ifconfig 8
+.Cm create
+and
+.Cm destroy
+subcommands.
+.Pp
+This driver currently supports the following modes of operation:
+.Bl -tag -width indent
+.It "GRE encapsulation (IP protocol number 47)"
+Encapsulated datagrams are
+prepended an outer datagram and a GRE header.
+The GRE header specifies
+the type of the encapsulated datagram and thus allows for tunneling other
+protocols than IP.
+GRE mode is also the default tunnel mode on Cisco routers.
+This is also the default mode of operation of the
+.Nm
+interfaces.
+As part of the GRE mode,
+.Nm
+also supports Cisco WCCP protocol, both version 1 and version 2.
+Since there is no reliable way to distinguish between WCCP versions, it
+should be configured manually using the
+.Cm link2
+flag.
+If the
+.Cm link2
+flag is not set (default), then WCCP version 1 is selected.
+.It "MOBILE encapsulation (IP protocol number 55)"
+Datagrams are
+encapsulated into IP, but with a shorter encapsulation.
+The original
+IP header is modified and the modifications are inserted between the
+so modified header and the original payload.
+Like
+.Xr gif 4 ,
+only for IP-in-IP encapsulation.
+.El
+.Pp
+The
+.Nm
+interfaces support a number of
+.Xr ioctl 2 Ns s ,
+such as:
+.Bl -tag -width ".Dv GRESADDRS"
+.It Dv GRESADDRS
+Set the IP address of the local tunnel end.
+This is the source address
+set by or displayed by
+.Xr ifconfig 8
+for the
+.Nm
+interface.
+.It Dv GRESADDRD
+Set the IP address of the remote tunnel end.
+This is the destination address
+set by or displayed by
+.Xr ifconfig 8
+for the
+.Nm
+interface.
+.It Dv GREGADDRS
+Query the IP address that is set for the local tunnel end.
+This is the
+address the encapsulation header carries as local address (i.e., the real
+address of the tunnel start point).
+.It Dv GREGADDRD
+Query the IP address that is set for the remote tunnel end.
+This is the
+address the encapsulated packets are sent to (i.e., the real address of
+the remote tunnel endpoint).
+.It Dv GRESPROTO
+Set the operation mode to the specified IP protocol value.
+The
+protocol is passed to the interface in
+.Po Vt "struct ifreq" Pc Ns Li -> Ns Va ifr_flags .
+The operation mode can also be given as
+.Pp
+.Bl -tag -width ".Cm -link0" -compact
+.It Cm link0
+.Dv IPPROTO_GRE
+.It Cm -link0
+.Dv IPPROTO_MOBILE
+.El
+.Pp
+to
+.Xr ifconfig 8 .
+.Pp
+The
+.Cm link1
+flag is not used to choose encapsulation, but to modify the
+internal route search for the remote tunnel endpoint, see the
+.Sx BUGS
+section below.
+.It Dv GREGPROTO
+Query operation mode.
+.It Dv GRESKEY
+Set the GRE key used for outgoing packets.
+A value of 0 disables the key option.
+.It Dv GREGKEY
+Get the GRE key currently used for outgoing packets.
+0 means no outgoing key.
+.El
+.Pp
+Note that the IP addresses of the tunnel endpoints may be the same as the
+ones defined with
+.Xr ifconfig 8
+for the interface (as if IP is encapsulated), but need not be.
+.Sh EXAMPLES
+Configuration example:
+.Bd -literal
+Host X-- Host A ----------------tunnel---------- Cisco D------Host E
+ \\ |
+ \\ /
+ +------Host B----------Host C----------+
+.Ed
+.Pp
+On host A
+.Pq Fx :
+.Bd -literal -offset indent
+route add default B
+ifconfig greN create
+ifconfig greN A D netmask 0xffffffff linkX up
+ifconfig greN tunnel A D
+route add E D
+.Ed
+.Pp
+On Host D (Cisco):
+.Bd -literal -offset indent
+Interface TunnelX
+ ip unnumbered D ! e.g. address from Ethernet interface
+ tunnel source D ! e.g. address from Ethernet interface
+ tunnel destination A
+ip route C <some interface and mask>
+ip route A mask C
+ip route X mask tunnelX
+.Ed
+.Pp
+OR
+.Pp
+On Host D
+.Pq Fx :
+.Bd -literal -offset indent
+route add default C
+ifconfig greN create
+ifconfig greN D A
+ifconfig greN tunnel D A
+.Ed
+.Pp
+If all goes well, you should see packets flowing ;-)
+.Pp
+If you want to reach Host A over the tunnel (from Host D (Cisco)), then
+you have to have an alias on Host A for e.g.\& the Ethernet interface like:
+.Pp
+.Dl "ifconfig <etherif> alias Y"
+.Pp
+and on the Cisco:
+.Pp
+.Dl "ip route Y mask tunnelX"
+.Pp
+A similar setup can be used to create a link between two private networks
+(for example in the 192.168 subnet) over the Internet:
+.Bd -literal
+192.168.1.* --- Router A -------tunnel-------- Router B --- 192.168.2.*
+ \\ /
+ \\ /
+ +------ the Internet ------+
+.Ed
+.Pp
+Assuming router A has the (external) IP address A and the internal address
+192.168.1.1, while router B has external address B and internal address
+192.168.2.1, the following commands will configure the tunnel:
+.Pp
+On router A:
+.Bd -literal -offset indent
+ifconfig greN create
+ifconfig greN 192.168.1.1 192.168.2.1 link1
+ifconfig greN tunnel A B
+route add -net 192.168.2 -netmask 255.255.255.0 192.168.2.1
+.Ed
+.Pp
+On router B:
+.Bd -literal -offset indent
+ifconfig greN create
+ifconfig greN 192.168.2.1 192.168.1.1 link1
+ifconfig greN tunnel B A
+route add -net 192.168.1 -netmask 255.255.255.0 192.168.1.1
+.Ed
+.Pp
+Note that this is a safe situation where the
+.Cm link1
+flag (as discussed in the
+.Sx BUGS
+section below) may (and probably should) be set.
+.Sh NOTES
+The MTU of
+.Nm
+interfaces is set to 1476 by default, to match the value used by Cisco routers.
+If grekey is set this is lowered to 1472.
+This may not be an optimal value, depending on the link between the two tunnel
+endpoints.
+It can be adjusted via
+.Xr ifconfig 8 .
+.Pp
+For correct operation, the
+.Nm
+device needs a route to the destination that is less specific than the
+one over the tunnel.
+(Basically, there needs to be a route to the decapsulating host that
+does not run over the tunnel, as this would be a loop.)
+If the addresses are ambiguous, doing the
+.Nm ifconfig Cm tunnel
+step before the
+.Xr ifconfig 8
+call to set the
+.Nm
+IP addresses will help to find a route outside the tunnel.
+.Pp
+In order to tell
+.Xr ifconfig 8
+to actually mark the interface as
+.Dq up ,
+the keyword
+.Cm up
+must be given last on its command line.
+.Pp
+The kernel must be set to forward datagrams by setting the
+.Va net.inet.ip.forwarding
+.Xr sysctl 8
+variable to non-zero.
+.Sh SEE ALSO
+.Xr gif 4 ,
+.Xr inet 4 ,
+.Xr ip 4 ,
+.Xr netintro 4 ,
+.\" Xr options 4 ,
+.Xr protocols 5 ,
+.Xr ifconfig 8 ,
+.Xr sysctl 8
+.Pp
+A description of GRE encapsulation can be found in RFC 1701 and RFC 1702.
+.Pp
+A description of MOBILE encapsulation can be found in RFC 2004.
+.Sh AUTHORS
+.An Heiko W.Rupp Aq hwr@pilhuhn.de
+.Sh BUGS
+The
+.Fn compute_route
+code in
+.Pa if_gre.c
+toggles the last bit of the
+IP-address to provoke the search for a less specific route than the
+one directly over the tunnel to prevent loops.
+This is possibly not the best solution.
+.Pp
+To avoid the address munging described above, turn on the
+.Cm link1
+flag on the
+.Xr ifconfig 8
+command line.
+This implies that the GRE packet destination and the ifconfig remote host
+are not the same IP addresses, and that the GRE destination does not route
+over the
+.Nm
+interface itself.
+.Pp
+The current implementation uses the key only for outgoing packets.
+Incoming packets with a different key or without a key will be treated as if they
+would belong to this interface.
+.Pp
+RFC1701 is not fully supported, however all unsupported features have been
+deprecated in RFC2784.
diff --git a/share/man/man4/h_ertt.4 b/share/man/man4/h_ertt.4
new file mode 100644
index 0000000..3dbedab
--- /dev/null
+++ b/share/man/man4/h_ertt.4
@@ -0,0 +1,143 @@
+.\"
+.\" Copyright (c) 2010-2011 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This documentation was written at the Centre for Advanced Internet
+.\" Architectures, Swinburne University of Technology, Melbourne, Australia by
+.\" David Hayes under sponsorship from the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 18, 2012
+.Dt H_ERTT 4
+.Os
+.Sh NAME
+.Nm h_ertt
+.Nd Enhanced Round Trip Time Khelp module
+.Sh SYNOPSIS
+.In netinet/khelp/h_ertt.h
+.Sh DESCRIPTION
+The
+.Nm
+Khelp module works within the
+.Xr khelp 9
+framework to provide TCP with a per-connection, low noise estimate of the
+instantaneous RTT.
+The implementation attempts to be robust in the face of delayed
+acknowledgements, TCP Segmentation Offload (TSO), receivers who manipulate TCP
+timestamps and lack of the TCP timestamp option altogether.
+.Pp
+TCP receivers using delayed acknowledgements either acknowledge every second packet
+(reflecting the time stamp of the first) or use a timeout to trigger the
+acknowledgement if no second packet arrives.
+If the heuristic used by
+.Nm
+determines that the receiver is using delayed acknowledgements, it measures the
+RTT using the second packet (the one that triggers the acknowledgement).
+It does not measure the RTT if the acknowledgement is for the
+first packet, since it cannot be accurately determined.
+.Pp
+When TSO is in use,
+.Nm
+will momentarily disable TSO whilst marking a packet to use for a new
+measurement.
+The process has negligible impact on the connection.
+.Pp
+.Nm
+associates the following struct with each connection's TCP control block:
+.Bd -literal
+struct ertt {
+ TAILQ_HEAD(txseginfo_head, txseginfo) txsegi_q; /* Private. */
+ long bytes_tx_in_rtt; /* Private. */
+ long bytes_tx_in_marked_rtt;
+ unsigned long marked_snd_cwnd;
+ int rtt;
+ int maxrtt;
+ int minrtt;
+ int dlyack_rx; /* Private. */
+ int timestamp_errors; /* Private. */
+ int markedpkt_rtt; /* Private. */
+ uint32_t flags;
+};
+.Ed
+.Pp
+The fields marked as private should not be manipulated by any code outside of
+the
+.Nm
+implementation.
+The non-private fields provide the following data:
+.Bl -tag -width ".Va bytes_tx_in_marked_rtt" -offset indent
+.It Va bytes_tx_in_marked_rtt
+The number of bytes transmitted in the
+.Va markedpkt_rtt .
+.It Va marked_snd_cwnd
+The value of cwnd for the marked rtt measurement.
+.It Va rtt
+The most recent RTT measurement.
+.It Va maxrtt
+The longest RTT measurement that has been taken.
+.It Va minrtt
+The shortest RTT measurement that has been taken.
+.It Va flags
+The ERTT_NEW_MEASUREMENT flag will be set by the implementation when a new
+measurement is available.
+It is the responsibility of
+.Nm
+consumers to unset the flag if they wish to use it as a notification method for
+new measurements.
+.El
+.Sh SEE ALSO
+.Xr cc_chd 4 ,
+.Xr cc_hd 4 ,
+.Xr cc_vegas 4 ,
+.Xr mod_cc 4 ,
+.Xr hhook 9 ,
+.Xr khelp 9
+.Sh ACKNOWLEDGEMENTS
+Development and testing of this software were made possible in part by grants
+from the FreeBSD Foundation and Cisco University Research Program Fund at
+Community Foundation Silicon Valley.
+.Sh HISTORY
+The
+.Nm
+module first appeared in
+.Fx 9.0 .
+.Pp
+The module was first released in 2010 by David Hayes whilst working on the
+NewTCP research project at Swinburne University of Technology's Centre for
+Advanced Internet Architectures, Melbourne, Australia.
+More details are available at:
+.Pp
+http://caia.swin.edu.au/urp/newtcp/
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+Khelp module and this manual page were written by
+.An David Hayes Aq david.hayes@ieee.org .
+.Sh BUGS
+The module maintains enhanced RTT estimates for all new TCP connections created
+after the time at which the module was loaded.
+It might be beneficial to see if it is possible to have the module only affect
+connections which actually care about ERTT estimates.
diff --git a/share/man/man4/hatm.4 b/share/man/man4/hatm.4
new file mode 100644
index 0000000..59de800
--- /dev/null
+++ b/share/man/man4/hatm.4
@@ -0,0 +1,282 @@
+.\"
+.\" Copyright (c) 2001-2003
+.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Author: Hartmut Brandt <harti@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.\" hatm(4) man page
+.\"
+.Dd May 15, 2003
+.Dt HATM 4
+.Os
+.Sh NAME
+.Nm hatm
+.Nd "device driver for Fore/Marconi HE155 and HE622 ATM interfaces"
+.Sh SYNOPSIS
+.Cd device hatm
+.Cd device utopia
+.Cd device atm
+.Pp
+.Cd options NATM
+.Sh DESCRIPTION
+The
+.Nm
+device driver supports the FORE (now Marconi) HE155 and HE622 ATM interface
+cards.
+The driver interfaces with the
+.Xr natm 4
+framework,
+.Xr netgraph 4
+and the HARP ATM stack.
+It provides only PVC services.
+Signalling, ATMARP, ILMI and other
+higher layer protocols are implemented using
+.Xr netgraph 4
+or HARP.
+.Pp
+For configuring the card for IP see
+.Xr natmip 4 .
+.Pp
+The following sysctls are recognized by the driver additionally to those
+handled by
+.Xr utopia 4 :
+.Bl -tag -width indent
+.It Va hw.atm.hatm.natm_traffic
+This is the traffic type to be used for NATM pvc connections.
+The type of
+this variable is integer and it must have one of the values 0 (UBR) or 1 (CBR).
+.It Va hw.atm.hatm.natm_pcr
+This is the peak cell rate to be used for NATM CBR connections.
+.It Va hw.atm.hatm Ns Ar N Ns Va .stats
+Contains an array of
+.Vt uint32_t
+with device specific statistics.
+.It Va hw.atm.hatm Ns Ar N Ns Va .istats
+Contains an array of
+.Vt uint32_t
+with internal driver statistics.
+.It Va hw.atm.hatm Ns Ar N Ns Va .debug
+.Bf Em
+(Only if debugging enabled.)
+.Ef
+These are the debugging flags.
+See
+.Pa src/sys/dev/hatm/if_hatmvar.h
+for the possible flags.
+.It Va hw.atm.hatm Ns Ar N Ns Va .tsr
+.Bf Em
+(Only if debugging enabled.)
+.Ef
+This is an array containing all transmission status registers.
+For each of the
+4096 possible VCCs there are 15 32-bit registers.
+.It Va hw.atm.hatm Ns Ar N Ns Va .tpd
+.Bf Em
+(Only if debugging enabled.)
+.Ef
+This is an array containing all on card current transmission packet descriptors.
+For each of the 4096 possible VCCs there are 16 32-bit registers.
+.It Va hw.atm.hatm Ns Ar N Ns Va .mbox
+.Bf Em
+(Only if debugging enabled.)
+.Ef
+This is an array containing the mbox registers.
+.It Va hw.atm.hatm Ns Ar N Ns Va .cm
+.Bf Em
+(Only if debugging enabled.)
+.Ef
+This is an array containing all connection memory registers.
+The first 32-bit integer of this array is the ABR base address.
+.It Va hw.atm.hatm Ns Ar N Ns Va .heregs
+.Bf Em
+(Only if debugging enabled.)
+.Ef
+This is an array containing all card registers including SUNI and the FLASH ROM.
+.It Va hw.atm.hatm Ns Ar N Ns Va .lbmem
+.Bf Em
+(Only if debugging enabled.)
+.Ef
+Returns the contents of the local memory.
+.El
+.Pp
+The driver supports the media options
+.Cm sdh , noscramb
+and
+.Cm unassigned
+(see
+.Xr utopia 4 ) .
+.Sh ENVIRONMENT
+When attaching to a device the driver checks the kernel environment
+(see
+.Xr kenv 1 )
+to see if the default queues sizes should be overwritten or not.
+The
+following variables are checked and interpreted as unsigned integer
+values (in either radix):
+.Bl -tag -width indent
+.It Va hw.hatm Ns Ar N Ns Va .rbps0_size
+Size of the small receive buffer pool 0.
+This pool is used for all
+except raw AAL connections.
+The pool size must be a power of two between
+4 and 8192 inclusive.
+When attaching the driver allocates this number
+of mbufs.
+.It Va hw.hatm Ns Ar N Ns Va .rbps0_thresh
+Interrupt threshold for small receive buffer pool 0.
+When the number of free
+buffers in the pool falls below this threshold it generates an interrupt
+so that the driver can refill the pool.
+.It Va hw.hatm Ns Ar N Ns Va .rbpl0_thresh
+Size of the large receive buffer pool 0.
+This pool is used for all
+except raw AAL connections.
+The pool size must be a power of two between
+4 and 8192 inclusive.
+When attaching the driver allocates this number
+of mbufs with clusters.
+.It Va hw.hatm Ns Ar N Ns Va .rbpl0_thresh
+Interrupt threshold for large receive buffer pool 0.
+When the number of free
+buffers in the pool falls below this threshold it generates an interrupt
+so that the driver can refill the pool.
+.It Va hw.hatm Ns Ar N Ns Va .rbrq0_size
+Size of receive buffer return queue 0.
+This queue is used to return buffers
+filled with received frames to the driver.
+The size must be a power of 2
+between 1 and 16384 inclusive.
+.It Va hw.hatm Ns Ar N Ns Va .rbrq0_thresh
+Interrupt threshold for receive buffer return queue 0.
+This threshold
+should only be triggered in exceptional cases.
+.It Va hw.hatm Ns Ar N Ns Va .rbrq0_tout
+Interrupt timeout for receive buffer return queue 0.
+An interrupt is generated
+after this time if the queue is not empty.
+The number is in internal card
+ticks.
+.It Va hw.hatm Ns Ar N Ns Va .rbrq0_pcnt
+Packet count threshold for receive buffer return queue 0.
+An interrupt
+is generated if this number of packets is in the queue.
+.It Va hw.hatm Ns Ar N Ns Va .rbps1_size
+Size of the small receive buffer pool 1.
+This pool is used for all
+raw AAL connections.
+The pool size must be a power of two between
+4 and 8192 inclusive.
+When attaching the driver allocates this number
+of mbufs.
+.It Va hw.hatm Ns Ar N Ns Va .rbps1_thresh
+Interrupt threshold for small receive buffer pool 1.
+When the number of free
+buffers in the pool falls below this threshold it generates an interrupt
+so that the driver can refill the pool.
+.It Va hw.hatm Ns Ar N Ns Va .rbrq1_size
+Size of receive buffer return queue 1.
+This queue is used to return buffers
+filled with received cells to the driver.
+The size must be a power of 2
+between 1 and 16384 inclusive.
+.It Va hw.hatm Ns Ar N Ns Va .rbrq1_thresh
+Interrupt threshold for receive buffer return queue 1.
+This threshold
+should only be triggered in exceptional cases.
+.It Va hw.hatm Ns Ar N Ns Va .rbrq1_tout
+Interrupt timeout for receive buffer return queue 1.
+An interrupt is generated
+after this time if the queue is not empty.
+The number is in internal card
+ticks.
+.It Va hw.hatm Ns Ar N Ns Va .rbrq1_pcnt
+Packet count threshold for receive buffer return queue 0.
+An interrupt
+is generated if this number of cells is in the queue.
+.It Va hw.hatm Ns Ar N Ns Va .irq0_size
+Size of interrupt queue 0.
+This must be a number between 1 and 1023 inclusive.
+.It Va hw.hatm Ns Ar N Ns Va .irq0_thresh
+Interrupt retrigger threshold of interrupt queue 0.
+A new interrupt is trigger
+if the queue fill state reaches this threshold and the interrupt was no
+served.
+.It Va hw.hatm Ns Ar N Ns Va .tbrq0_size
+Transmit buffer return queue 0 size.
+This queue is used to feed back empty
+buffers of transmitted frames back to the driver.
+It must be a power of 2
+between 1 and 4096 inclusive.
+.It Va hw.hatm Ns Ar N Ns Va .tbrq0_thresh
+Transmit buffer return queue 0 threshold.
+An interrupt is generated if the
+queue fill state reaches this point.
+.It Va hw.hatm Ns Ar N Ns Va .tpdrq_size
+Transmit descriptor ready queue size.
+This queue is used by the driver
+to feed transmit descriptors into the card.
+The size must be a power of 2
+between 1 and 16384 inclusive.
+.It Va hw.hatm Ns Ar N Ns Va .tpdmax
+Maximum number of active TPDs per connection.
+This controls the maximum
+number of outstanding packet chunks per connection and thus the maximum
+delay packets can have because of queueing on the adapter.
+If set to 0,
+a connection can eat up all available TPDs.
+.It Va hw.hatm Ns Ar N Ns Va .mbuf_max_pages
+Maximum number of memory pages allocated to small external mbufs.
+This must not be zero and not larger than 65536.
+.El
+.Sh DIAGNOSTICS
+.Bd -literal
+hatm0: <FORE HE> mem 0xd2600000-0xd26fffff irq 9 at device 15.0 on pci2
+hatm0: ForeRunnerHE 622, Rev. D, S/N 2949834, MAC=00:20:48:2d:02:ca
+.Ed
+.Sh SEE ALSO
+.Xr natm 4 ,
+.Xr natmip 4 ,
+.Xr utopia 4 ,
+.Xr ifconfig 8 ,
+.Xr route 8
+.Sh AUTHORS
+.An Harti Brandt Aq harti@FreeBSD.org
+.Sh CAVEATS
+When putting a HE155 into a 64-bit 66MHz PCI slot the machine may hang.
+This occurs very early in the POST so that even the display does not turn on.
+The HE155 runs only in 33MHz slots (either 32 or 64-bit).
+HE622 cards work just fine in 64-bit slots.
+.Pp
+The driver may not work with bounce buffer, because of
+.Xr bus_dmamap_sync 9
+missing the
+.Fa offset
+and
+.Fa len
+arguments the
+.Nx
+function has.
diff --git a/share/man/man4/hifn.4 b/share/man/man4/hifn.4
new file mode 100644
index 0000000..a53bac3
--- /dev/null
+++ b/share/man/man4/hifn.4
@@ -0,0 +1,134 @@
+.\" $OpenBSD: hifn.4,v 1.32 2002/09/26 07:55:40 miod Exp $
+.\"
+.\" Copyright (c) 2000 Theo de Raadt
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 19, 2009
+.Dt HIFN 4
+.Os
+.Sh NAME
+.Nm hifn
+.Nd Hifn 7751/7951/7811/7955/7956 crypto accelerator
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device crypto"
+.Cd "device cryptodev"
+.Cd "device hifn"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hifn_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports various cards containing the Hifn 7751, 7951,
+7811, 7955, and 7956 chipsets.
+.Pp
+The
+.Nm
+driver registers itself to accelerate DES, Triple-DES,
+AES (7955 and 7956 only), ARC4, MD5,
+MD5-HMAC, SHA1, and SHA1-HMAC operations for
+.Xr ipsec 4
+and
+.Xr crypto 4 .
+.Pp
+The Hifn
+.Tn 7951 ,
+.Tn 7811 ,
+.Tn 7955 ,
+and
+.Tn 7956
+will also supply data to the kernel
+.Xr random 4
+subsystem.
+.Sh HARDWARE
+The
+.Nm
+driver supports various cards containing the Hifn 7751, 7951,
+7811, 7955, and 7956
+chipsets, such as:
+.Bl -tag -width namenamenamena -offset indent
+.It Invertex AEON
+No longer being made.
+Came as 128KB SRAM model, or 2MB DRAM model.
+.It Hifn 7751
+Reference board with 512KB SRAM.
+.It PowerCrypt
+Comes with 512KB SRAM.
+.It XL-Crypt
+Only board based on 7811 (which is faster than 7751 and has
+a random number generator).
+.It NetSec 7751
+Supports the most IPsec sessions, with 1MB SRAM.
+.It Soekris Engineering vpn1201 and vpn1211
+See
+.Pa http://www.soekris.com/ .
+Contains a 7951 and supports symmetric and random number operations.
+.It Soekris Engineering vpn1401 and vpn1411
+See
+.Pa http://www.soekris.com/ .
+Contains a 7955 and supports symmetric and random number operations.
+.El
+.Sh SEE ALSO
+.Xr crypt 3 ,
+.Xr crypto 4 ,
+.Xr intro 4 ,
+.Xr ipsec 4 ,
+.Xr random 4 ,
+.Xr crypto 9
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Ox 2.7 .
+The
+.Nm
+device driver was imported to
+.Fx 5.0 .
+.Sh CAVEATS
+The Hifn 9751 shares the same PCI ID.
+This chip is basically a 7751, but with the cryptographic functions missing.
+Instead, the 9751 is only capable of doing compression.
+Since we do not currently attempt to use any of these chips to do
+compression, the 9751-based cards are not useful.
+.Pp
+Support for the 7955 and 7956 is incomplete; the asymmetric crypto
+facilities are to be added and the performance is suboptimal.
+.Sh BUGS
+The 7751 chip starts out at initialization by only supporting compression.
+A proprietary algorithm, which has been reverse engineered, is required to
+unlock the cryptographic functionality of the chip.
+It is possible for vendors to make boards which have a lock ID not known
+to the driver, but all vendors currently just use the obvious ID which is
+13 bytes of 0.
diff --git a/share/man/man4/hme.4 b/share/man/man4/hme.4
new file mode 100644
index 0000000..2bdc72a
--- /dev/null
+++ b/share/man/man4/hme.4
@@ -0,0 +1,151 @@
+.\" $NetBSD: hme.4,v 1.4 2003/02/14 15:20:18 grant Exp $
+.\"
+.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Klaus Klein.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 14, 2009
+.Dt HME 4
+.Os
+.Sh NAME
+.Nm hme
+.Nd "Sun Microelectronics STP2002-STQ Ethernet interfaces device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device hme"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_hme_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports Sun Microelectronics STP2002-STQ
+.Dq Happy Meal Ethernet
+Fast Ethernet interfaces.
+.Pp
+All controllers supported by the
+.Nm
+driver have TCP checksum offload capability for both receive and transmit,
+support for the reception and transmission of extended frames for
+.Xr vlan 4
+and a 128-bit multicast hash filter.
+.Sh HARDWARE
+The
+.Nm
+driver supports the on-board Ethernet interfaces of many
+Sun
+.Tn UltraSPARC
+workstation and server models.
+.Pp
+Cards supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Sun PCI SunSwift Adapter
+.Pq Dq SUNW,hme
+.It
+Sun SBus SunSwift Adapter
+.Dq ( hme
+and
+.Dq SUNW,hme )
+.It
+Sun PCI Sun100BaseT Adapter 2.0
+.Pq Dq SUNW,hme
+.It
+Sun SBus Sun100BaseT 2.0
+.Pq Dq SUNW,hme
+.It
+Sun PCI Quad FastEthernet Controller
+.Pq Dq SUNW,qfe
+.It
+Sun SBus Quad FastEthernet Controller
+.Pq Dq SUNW,qfe
+.El
+.Sh NOTES
+On sparc64 the
+.Nm
+driver respects the
+.Va local-mac-address?
+system configuration variable which can be set in the Open Firmware boot
+monitor using the
+.Ic setenv
+command or by
+.Xr eeprom 8 .
+If set to
+.Dq Li false
+(the default), the
+.Nm
+driver will use the system's default MAC address for all of its devices.
+If set to
+.Dq Li true ,
+the unique MAC address of each interface is used if present rather than
+the system's default MAC address.
+.Pp
+Supported interfaces having their own MAC address include on-board versions
+on boards equipped with more than one Ethernet interface and all add-on cards
+except the single-port SBus versions.
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr intro 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr vlan 4 ,
+.Xr eeprom 8 ,
+.Xr ifconfig 8
+.Rs
+.%T "STP2002QFP Fast Ethernet, Parallel Port, SCSI (FEPS) User's Guide"
+.%D April 1996
+.%A Sun Microelectronics
+.%U http://mediacast.sun.com/users/Barton808/media/STP2002QFP-FEPs_UG.pdf
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Nx 1.5 .
+The first
+.Fx
+version to include it was
+.Fx 5.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Paul Kranenburg
+.Aq pk@NetBSD.org .
diff --git a/share/man/man4/hpet.4 b/share/man/man4/hpet.4
new file mode 100644
index 0000000..cd1b766
--- /dev/null
+++ b/share/man/man4/hpet.4
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 14, 2010
+.Dt HPET 4
+.Os
+.Sh NAME
+.Nm hpet
+.Nd High Precision Event Timer driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi"
+.Ed
+.Pp
+The following tunables are settable from the
+.Xr loader 8 :
+.Bl -ohang
+.It Va hint.hpet. Ns Ar X Ns Va .allowed_irqs
+is a 32bit mask. Each set bit allows driver to use respective IRQ,
+if BIOS also set respective capability bit in comparator's configuration
+register.
+Default value is 0xffff0000, except some known broken hardware.
+.It Va hint.hpet. Ns Ar X Ns Va .clock
+controls event timers functionality support. Setting to 0, disables it.
+Default value is 1.
+.It Va hint.hpet. Ns Ar X Ns Va .legacy_route
+controls "LegacyReplacement Route" mode. If enabled, HPET will steal IRQ0 of
+i8254 timer and IRQ8 of RTC. Before using it, make sure that respective
+drivers are not using interrupts, by setting also:
+.Bd -literal
+hint.attimer.0.clock=0
+hint.atrtc.0.clock=0
+.Ed
+Default value is 0.
+.It Va hint.hpet. Ns Ar X Ns Va .per_cpu
+controls how much per-CPU event timers should driver attempt to register.
+This functionality requires every comparator in a group to have own unshared
+IRQ, so it depends on hardware capabilities and interrupts configuration.
+Default value is 1.
+.El
+.Sh DESCRIPTION
+This driver uses High Precision Event Timer hardware (part of the chipset,
+usually enumerated via ACPI) to supply kernel with one time counter and
+several (usually from 3 to 8) event timers.
+This hardware includes single main counter with known increment frequency
+(10MHz or more), and several programmable comparators (optionally with
+automatic reload feature).
+When value of the main counter matches current value of any comparator,
+interrupt can be generated.
+Depending on hardware capabilities and configuration, interrupt can be
+delivered as regular I/O APIC interrupt (ISA or PCI) in range from 0 to 31,
+or as Front Side Bus interrupt, alike to PCI MSI interrupts, or in so called
+"LegacyReplacement Route" HPET can steal IRQ0 of i8254 and IRQ8 of the RTC.
+Interrupt can be either edge- or level-triggered. In last case they could be
+safely shared with PCI IRQs.
+Driver prefers to use FSB interrupts, if supported, to avoid sharing.
+If it is not possible, it uses single sharable IRQ from PCI range.
+Other modes (LegacyReplacement and ISA IRQs) require special care to setup,
+but could be configured manually via device hints.
+.Pp
+Event timers provided by the driver support both one-shot an periodic modes
+and irrelevant to CPU power states.
+.Pp
+Depending on hardware capabilities and configuration, driver can expose each
+comparator as separate event timer or group them into one or several per-CPU
+event timers. In last case interrupt of every of those comparators within
+group is bound to specific CPU core. This is possible only when each
+of these comparators has own unsharable IRQ.
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr apic 4 ,
+.Xr atrtc 4 ,
+.Xr attimer 4 ,
+.Xr eventtimers 4 ,
+.Xr timecounters 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.3 .
+Support for event timers was added in
+.Fx 9.0 .
diff --git a/share/man/man4/hpt27xx.4 b/share/man/man4/hpt27xx.4
new file mode 100644
index 0000000..01f9ba5
--- /dev/null
+++ b/share/man/man4/hpt27xx.4
@@ -0,0 +1,101 @@
+.\"
+.\" Copyright (c) 2011 iXsystems, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 28, 2011
+.Dt HPT27XX 4
+.Os
+.Sh NAME
+.Nm hpt27xx
+.Nd "HighPoint RocketRAID 27xx SAS 6Gb/s HBA card driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device hpt27xx"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hpt27xx_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for HighPoint's RocketRAID 27xx based RAID controller.
+.Pp
+These devices support SAS disk drives
+and provide RAID0 (striping), RAID1 (mirroring), and RAID5 functionality.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following SAS
+controllers:
+.Pp
+.Bl -bullet -compact
+.It
+HighPoint's RocketRAID 271x series
+.It
+HighPoint's RocketRAID 272x series
+.It
+HighPoint's RocketRAID 274x series
+.It
+HighPoint's RocketRAID 276x series
+.It
+HighPoint's RocketRAID 278x series
+.El
+.Sh NOTES
+The
+.Nm
+driver only works on the i386 and amd64 platforms as it requires a binary
+blob object from the manufacturer which they only supply for these platforms.
+The
+.Nm
+driver does
+.Em not
+work on i386 with
+.Xr pae 4
+enabled.
+.Sh SEE ALSO
+.Xr kld 4 ,
+.Xr kldload 8 ,
+.Xr loader 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An HighPoint Technologies, Inc. .
+This manual page was written by
+.An Xin LI Aq delphij@FreeBSD.org
+for iXsystems, Inc.
diff --git a/share/man/man4/hptiop.4 b/share/man/man4/hptiop.4
new file mode 100644
index 0000000..c1017f1
--- /dev/null
+++ b/share/man/man4/hptiop.4
@@ -0,0 +1,138 @@
+.\" Copyright (c) 2007 Christian Brueffer
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 5, 2013
+.Dt HPTIOP 4
+.Os
+.Sh NAME
+.Nm hptiop
+.Nd "HighPoint RocketRAID 3xxx/4xxx device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device hptiop"
+.Cd "device scbus"
+.Cd "device da"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hptiop_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the HighPoint RocketRAID 3xxx/4xxx series
+of SAS and SATA RAID controllers.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following SAS and SATA RAID controllers:
+.Pp
+.Bl -bullet -compact
+.It
+HighPoint RocketRAID 4522
+.It
+HighPoint RocketRAID 4521
+.It
+HighPoint RocketRAID 4520
+.It
+HighPoint RocketRAID 4322
+.It
+HighPoint RocketRAID 4321
+.It
+HighPoint RocketRAID 4320
+.It
+HighPoint RocketRAID 4311
+.It
+HighPoint RocketRAID 4310
+.It
+HighPoint RocketRAID 3640
+.It
+HighPoint RocketRAID 3622
+.It
+HighPoint RocketRAID 3620
+.El
+.Pp
+The
+.Nm
+driver also supports the following SAS and SATA RAID controllers that
+are already End-of-Life:
+.Pp
+.Bl -bullet -compact
+.It
+HighPoint RocketRAID 4211
+.It
+HighPoint RocketRAID 4210
+.It
+HighPoint RocketRAID 3560
+.It
+HighPoint RocketRAID 3540
+.It
+HighPoint RocketRAID 3530
+.It
+HighPoint RocketRAID 3522
+.It
+HighPoint RocketRAID 3521
+.It
+HighPoint RocketRAID 3520
+.It
+HighPoint RocketRAID 3511
+.It
+HighPoint RocketRAID 3510
+.It
+HighPoint RocketRAID 3410
+.It
+HighPoint RocketRAID 3320
+.It
+HighPoint RocketRAID 3220
+.It
+HighPoint RocketRAID 3122
+.It
+HighPoint RocketRAID 3120
+.It
+HighPoint RocketRAID 3020
+.El
+.Sh NOTES
+The
+.Nm
+driver has only been tested on the i386 and amd64 platforms.
+.Sh SEE ALSO
+.Xr cam 4 ,
+.Xr hptmv 4 ,
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 7.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by HighPoint Technologies, Inc.
diff --git a/share/man/man4/hptmv.4 b/share/man/man4/hptmv.4
new file mode 100644
index 0000000..240a32f
--- /dev/null
+++ b/share/man/man4/hptmv.4
@@ -0,0 +1,101 @@
+.\"
+.\" Copyright (c) 2004 David E. O'Brien
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 17, 2005
+.Dt HPTMV 4
+.Os
+.Sh NAME
+.Nm hptmv
+.Nd "HighPoint RocketRAID 182x device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device hptmv"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hptmv_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for HighPoint's RocketRAID 182x based RAID controller.
+.Pp
+These devices support ATA disk drives
+and provide RAID0 (striping), RAID1 (mirroring), and RAID5 functionality.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following ATA RAID
+controllers:
+.Pp
+.Bl -bullet -compact
+.It
+HighPoint's RocketRAID 182x series
+.El
+.Sh NOTES
+The
+.Nm
+driver only works on the i386 and amd64 platforms as it requires a binary
+blob object from the manufacturer which they only supply for these platforms.
+The
+.Nm
+driver does
+.Em not
+work on i386 with
+.Xr pae 4
+enabled.
+.Sh SEE ALSO
+.Xr kld 4 ,
+.Xr kldload 8 ,
+.Xr loader 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An HighPoint Technologies, Inc. ,
+and ported to
+.Fx
+by
+.An Scott Long .
+This manual page was written by
+.An David E. O'Brien .
+.Sh BUGS
+The
+.Nm
+driver does not support manipulating the RAID from the OS, RAIDs need
+to be set up from the on-board BIOS.
diff --git a/share/man/man4/hptnr.4 b/share/man/man4/hptnr.4
new file mode 100644
index 0000000..e441b3a
--- /dev/null
+++ b/share/man/man4/hptnr.4
@@ -0,0 +1,92 @@
+.\"-
+.\" Copyright (c) 2013 iXsystems, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 5, 2013
+.Dt HPTNR 4
+.Os
+.Sh NAME
+.Nm hptnr
+.Nd "HighPoint DC Series Data Center HBA card driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device hptnr"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hptnr_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for HighPoint's DC Series Data Center HBA card.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following SATA
+controllers:
+.Pp
+.Bl -bullet -compact
+.It
+HighPoint's DC7280 series
+.It
+HighPoint's Rocket R750 series
+.El
+.Sh NOTES
+The
+.Nm
+driver only works on the i386 and amd64 platforms as it requires a binary
+blob object from the manufacturer which they only supply for these platforms.
+The
+.Nm
+driver does
+.Em not
+work on i386 with
+.Xr pae 4
+enabled.
+.Sh SEE ALSO
+.Xr kld 4 ,
+.Xr kldload 8 ,
+.Xr loader 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 9.2 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An HighPoint Technologies, Inc. .
+This manual page was written by
+.An Xin LI Aq delphij@FreeBSD.org
+for iXsystems, Inc.
diff --git a/share/man/man4/hptrr.4 b/share/man/man4/hptrr.4
new file mode 100644
index 0000000..0cbd2fd
--- /dev/null
+++ b/share/man/man4/hptrr.4
@@ -0,0 +1,141 @@
+.\"
+.\" Copyright (c) 2007 Me
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 6, 2012
+.Dt HPTRR 4
+.Os
+.Sh NAME
+.Nm hptrr
+.Nd "HighPoint RocketRAID device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device hptrr"
+.Cd "device scbus"
+.Cd "device da"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hptrr_load="YES"
+.Ed
+.Pp
+The following tunables are settable from the loader:
+.Bl -ohang
+.It Va hw.hptrr.attach_generic
+set to 1 to permit driver attach to chips with generic Marvell (non-HighPoint)
+PCI identification. These chips are also supported by
+.Xr ata 4
+and
+.Xr mvs 4 .
+Some vendors are using same chips, but without providing RAID BIOS.
+.El
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for HighPoint's RocketRAID based RAID controllers.
+.Pp
+These devices support SATA/ATA disk drives
+and provide RAID0 (striping), RAID1 (mirroring), and RAID5 functionality.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following RAID
+controllers:
+.Pp
+.Bl -bullet -compact
+.It
+RocketRAID 172x series
+.It
+RocketRAID 174x series
+.It
+RocketRAID 2210
+.It
+RocketRAID 222x series
+.It
+RocketRAID 2240
+.It
+RocketRAID 230x series
+.It
+RocketRAID 231x series
+.It
+RocketRAID 232x series
+.It
+RocketRAID 2340
+.It
+RocketRAID 2522
+.El
+.Sh NOTES
+The
+.Nm
+driver only works on the i386 and amd64 platforms as it requires a binary
+blob object from the manufacturer which they only supply for these platforms.
+The
+.Nm
+driver does
+.Em not
+work on i386 with
+.Xr pae 4
+enabled.
+.Pp
+This driver does not support the RR182x series controller.
+See the
+.Xr hptmv 4
+manual page for details on support.
+.Pp
+This driver supersedes the older rr232x driver.
+.Sh SEE ALSO
+.Xr ata 4 ,
+.Xr cam 4 ,
+.Xr hptmv 4 ,
+.Xr mvs 4 ,
+.Xr loader 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 6.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An HighPoint Technologies, Inc. ,
+and ported to
+.Fx
+by
+.An Scott Long .
+This manual page was written by
+.An David E. O'Brien .
+.Sh BUGS
+The
+.Nm
+driver does not support manipulating the RAID from the OS, RAIDs need
+to be set up from the on-board BIOS.
diff --git a/share/man/man4/hv_ata_pci_disengage.4 b/share/man/man4/hv_ata_pci_disengage.4
new file mode 100644
index 0000000..b8699f7
--- /dev/null
+++ b/share/man/man4/hv_ata_pci_disengage.4
@@ -0,0 +1,90 @@
+.\" $FreeBSD$
+.\"
+.\" Copyright (c) 2012 Microsoft Corp.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd September 10, 2013
+.Dt HYPER-V 4
+.Os
+.Sh NAME
+.Nm hv_ata_pci_disengage
+.Nd Hyper-V ATA PCI Disengage driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in
+the system kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device hyperv"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver prevents the native
+.Fx
+ATA driver from
+loading in the presence of Hyper-V.
+.Fx
+guests running on Hyper-V can take advantage of the Hyper-V Storage
+Virtual Consumer
+.Pq Xr hv_storvsc 4
+for using their IDE devices.
+Since the ATA
+driver serves IDE devices as well, there is a chance that the ATA driver may
+interfere with the operations of
+.Xr hv_storvsc 4 .
+The
+.Nm
+driver avoids
+conflicts between the ATA driver and
+.Xr hv_storvsc 4
+by disabling the ATA driver
+when the
+.Fx
+guest is booting.
+.Pp
+A side effect of disabling the ATA driver is that CDROM may become
+inoperational on
+.Fx
+guest partitions.
+If CDROM access is a must then users may use
+"set hw.ata.disk_enable=1" at boot time to prevent the ATA driver from being
+disabled.
+.Sh SEE ALSO
+.Xr hv_vmbus 4 ,
+.Xr hv_utils 4 ,
+.Xr hv_netvsc 4 ,
+.Xr hv_storvsc 4
+.Sh HISTORY
+Support for
+.Nm
+first appeared in
+.Fx 10.0 .
+The driver was developed through a joint effort between Citrix Incorporated,
+Microsoft Corporation, and Network Appliance Incorporated.
+.Sh AUTHORS
+.An -nosplit
+.Fx
+support for
+.Nm
+was first added by
+.An Microsoft BSD Integration Services Team Aq bsdic@microsoft.com .
diff --git a/share/man/man4/hv_kvp.4 b/share/man/man4/hv_kvp.4
new file mode 100644
index 0000000..afd3e32
--- /dev/null
+++ b/share/man/man4/hv_kvp.4
@@ -0,0 +1,96 @@
+.\" $FreeBSD$
+.\"
+.\" Copyright (c) 2012 Microsoft Corp.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd September 10, 2013
+.Dt HYPER-V 4
+.Os
+.Sh NAME
+.Nm hv_kvp
+.Nd Hyper-V Key Value Pair Driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in
+the system kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device hyperv"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides the ability to store, retrieve, modify and delete
+key value pairs for
+.Fx
+guest partitions running on Hyper-V.
+Hyper-V allows administrators to store custom metadata in the form
+of key value pairs inside the
+.Fx
+guest partition.
+Administrators can use Windows Powershell scripts to add, read,
+modify and delete such key value pairs.
+.Pp
+The driver is bare bones and merely forwards requests to its counterpart
+user mode daemon,
+.Xr hv_kvp_daemon 8 .
+The daemon maintains pools of key value
+pairs and does the actual metadata management.
+.Pp
+The same driver and daemon combination are also used to set and get
+IP addresses from a
+.Fx
+guest.
+.Pp
+The set functionality is particularly
+useful when the
+.Fx
+guest is assigned a static IP address and is failed over from one
+Hyper-V host to another.
+After failover, Hyper-V uses the set IP functionality to automatically
+update the
+.Fx
+guest's IP address to its original static value.
+.Pp
+On the other hand, the get IP functionality is used to update the guest IP
+address in the Hyper-V management console window.
+.Sh SEE ALSO
+.Xr hv_vmbus 4 ,
+.Xr hv_utils 4 ,
+.Xr hv_netvsc 4 ,
+.Xr hv_storvsc 4 ,
+.Xr hv_ata_pci_disengage 4 ,
+.Xr hv_kvp_daemon 8
+.Sh HISTORY
+Support for
+.Nm
+first appeared in
+.Fx 10.0 .
+The driver was developed through a joint effort between Citrix
+Incorporated, Microsoft Corporation and Network Appliance Incorporated.
+.Sh AUTHORS
+.An -nosplit
+.Fx
+support for
+.Nm
+was first added by
+.An Microsoft BSD Integration Services Team Aq bsdic@microsoft.com .
diff --git a/share/man/man4/hv_netvsc.4 b/share/man/man4/hv_netvsc.4
new file mode 100644
index 0000000..ed04e9d
--- /dev/null
+++ b/share/man/man4/hv_netvsc.4
@@ -0,0 +1,83 @@
+.\" $FreeBSD$
+.\"
+.\" Copyright (c) 2012 Microsoft Corp.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd September 10, 2013
+.Dt HYPER-V 4
+.Os
+.Sh NAME
+.Nm hv_netvsc
+.Nd Hyper-V Network Virtual Service Consumer
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in
+the system kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device hyperv"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver implements the virtual network device for
+.Fx
+guest
+partitions running on Hyper-V.
+.Fx
+guest partitions running on Hyper-V do not have direct access to
+network devices attached to the Hyper-V server.
+Although a
+.Fx
+guest can access network devices using Hyper-V's
+full emulation mode, the performance in this mode tends to be unsatisfactory.
+.Pp
+To counter the above issues, the
+.Nm
+driver implements a network
+Virtual
+Service Consumer (VSC) that relays network requests from the guest partition
+to the network Virtual Service Provider (VSP) hosted in the root partition
+using the high performance data exchange infrastructure provided by
+.Xr hv_vmbus 4
+driver.
+The VSP in the root partition then forwards the network related requests to
+the physical network card.
+.Sh SEE ALSO
+.Xr hv_vmbus 4 ,
+.Xr hv_utils 4 ,
+.Xr hv_storvsc 4 ,
+.Xr hv_ata_pci_disengage 4
+.Sh HISTORY
+Support for
+.Nm
+first appeared in
+.Fx 10.0 .
+The driver was developed through a joint effort between Citrix Incorporated,
+Microsoft Corporation, and Network Appliance Incorporated.
+.Sh AUTHORS
+.An -nosplit
+.Fx
+support for
+.Nm
+was first added by
+.An Microsoft BSD Integration Services Team Aq bsdic@microsoft.com .
diff --git a/share/man/man4/hv_storvsc.4 b/share/man/man4/hv_storvsc.4
new file mode 100644
index 0000000..57b6127
--- /dev/null
+++ b/share/man/man4/hv_storvsc.4
@@ -0,0 +1,89 @@
+.\" $FreeBSD$
+.\"
+.\" Copyright (c) 2012 Microsoft Corp.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd September 10, 2013
+.Dt HYPER-V 4
+.Os
+.Sh NAME
+.Nm hv_storvsc
+.Nd Hyper-V Storage Virtual Service Consumer
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in
+the system kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device hyperv"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver implements the virtual store device for
+.Fx
+guest
+partitions running on Hyper-V.
+.Fx
+guest partitions running on Hyper-V do not have direct access to
+storage devices attached to the Hyper-V server.
+Although a
+.Fx
+guest can access storage devices using Hyper-V's
+full emulation mode, the performance in this mode tends to be unsatisfactory.
+.Pp
+To counter the above issues, the
+.Nm
+driver implements a storage
+Virtual
+Service Consumer (VSC) that relays storage requests from the guest partition
+to the storage Virtual Service Provider (VSP) hosted in the root partition
+using the high performance data exchange infrastructure provided by
+.Xr hv_vmbus 4
+driver.
+The VSP in the root partition then forwards the storage related requests to
+the physical storage device.
+.Pp
+This driver functions by presenting a SCSI HBA interface to the Comman Access
+Method (CAM) layer.
+CAM control blocks (CCBs) are
+converted into VSCSI protocol messages which are delivered to the root
+partition VSP over the Hyper-V VMBus.
+.Sh SEE ALSO
+.Xr hv_vmbus 4 ,
+.Xr hv_utils 4 ,
+.Xr hv_netvsc 4 ,
+.Xr hv_ata_pci_disengage 4
+.Sh HISTORY
+Support for
+.Nm
+first appeared in
+.Fx 10.0 .
+The driver was developed through a joint effort between Citrix Incorporated,
+Microsoft Corporation, and Network Appliance Incorporated.
+.Sh AUTHORS
+.An -nosplit
+.Fx
+support for
+.Nm
+was first added by
+.An Microsoft BSD Integration Services Team Aq bsdic@microsoft.com .
diff --git a/share/man/man4/hv_utils.4 b/share/man/man4/hv_utils.4
new file mode 100644
index 0000000..844e599
--- /dev/null
+++ b/share/man/man4/hv_utils.4
@@ -0,0 +1,85 @@
+.\" $FreeBSD$
+.\"
+.\" Copyright (c) 2012 Microsoft Corp.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd September 10, 2013
+.Dt HYPER-V 4
+.Os
+.Sh NAME
+.Nm hv_utils
+.Nd Hyper-V Utilities Driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in
+the system kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device hyperv"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides time keeping, shutdown and heartbeat
+functionality for
+.Fx
+guest partitions running on Hyper-V.
+Hyper-V is a hypervisor-based virtualization technology from Microsoft.
+The
+.Nm
+driver is one of the core drivers required to be present in guest
+partitions running on Hyper-V.
+This driver provides the following
+functionalities to guest partitions:
+.Pp
+(a) Time Keeping: The clock inside the guest partition will remain accurate by
+synchronizing to the clock on the virtualization server via Timesync service,
+and with the help of the pluggable time source device.
+.Pp
+(b) Integrated shutdown: Guest partitions running
+.Fx
+can be shut down from
+Hyper-V Manager console by using the
+.Qq Shut down
+command.
+.Pp
+(c) Heartbeat: This feature allows the virtualization server to detect whether
+the guest partition is running and responsive.
+.Sh SEE ALSO
+.Xr hv_vmbus 4 ,
+.Xr hv_netvsc 4 ,
+.Xr hv_storvsc 4 ,
+.Xr hv_ata_pci_disengage 4
+.Sh HISTORY
+Support for
+.Nm
+first appeared in
+.Fx 10.0 .
+The driver was developed through a joint effort between Citrix Incorporated,
+Microsoft Corporation, and Network Appliance Incorporated.
+.Sh AUTHORS
+.An -nosplit
+.Fx
+support for
+.Nm
+was first added by
+.An Microsoft BSD Integration Services Team Aq bsdic@microsoft.com .
diff --git a/share/man/man4/hv_vmbus.4 b/share/man/man4/hv_vmbus.4
new file mode 100644
index 0000000..873cb28e
--- /dev/null
+++ b/share/man/man4/hv_vmbus.4
@@ -0,0 +1,93 @@
+.\" $FreeBSD$
+.\"
+.\" Copyright (c) 2012 Microsoft Corp.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd September 10, 2013
+.Dt HYPER-V 4
+.Os
+.Sh NAME
+.Nm hv_vmbus
+.Nd Hyper-V Virtual Machine Bus (VMBus) Driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in
+the system kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device hyperv"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+provides a high performance communication interface between
+guest and root partitions in Hyper-V.
+Hyper-V is a hypervisor-based virtualization technology from Microsoft.
+Hyper-V supports isolation in terms of a partition.
+A partition is a
+logical unit of isolation, supported by the hypervisor, in which
+operating systems execute.
+.Pp
+The Microsoft hypervisor must have at least one parent, or root,
+partition, running Windows Server operating system.
+The virtualization stack runs in the parent partition and has
+direct access to the hardware devices.
+The root partition then creates the child partitions which host
+the guest operating systems.
+.Pp
+Child partitions do not have direct access to other hardware resources
+and are presented
+a virtual view of the resources, as virtual devices (VDevs).
+Requests to the virtual devices are
+redirected either via the VMBus or the hypervisor to the devices in
+the parent partition, which handles the requests.
+.Pp
+The VMBus is a logical inter-partition communication channel.
+The parent partition hosts Virtualization Service Providers (VSPs)
+which communicate over the VMBus to handle device access requests from
+child partitions.
+Child partitions host Virtualization Service
+Consumers (VSCs) which redirect device requests to VSPs in the parent
+partition via the VMBus.
+The Hyper-V VMBus driver defines and implements
+the interface that facilitate high performance bi-directional communication
+between the VSCs and VSPs.
+All VSCs utilize the VMBus driver.
+.Sh SEE ALSO
+.Xr hv_utils 4 ,
+.Xr hv_netvsc 4 ,
+.Xr hv_storvsc 4 ,
+.Xr hv_ata_pci_disengage 4
+.Sh HISTORY
+Support for
+.Nm
+first appeared in
+.Fx 10.0 .
+The driver was developed through a joint effort between Citrix Incorporated,
+Microsoft Corporation, and Network Appliance Incorporated.
+.Sh AUTHORS
+.An -nosplit
+.Fx
+support for
+.Nm
+was first added by
+.An Microsoft BSD Integration Services Team Aq bsdic@microsoft.com .
diff --git a/share/man/man4/hwpmc.4 b/share/man/man4/hwpmc.4
new file mode 100644
index 0000000..b0c3930
--- /dev/null
+++ b/share/man/man4/hwpmc.4
@@ -0,0 +1,833 @@
+.\" Copyright (c) 2003-2008 Joseph Koshy
+.\" Copyright (c) 2007 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" Portions of this software were developed by A. Joseph Koshy under
+.\" sponsorship from the FreeBSD Foundation and Google, Inc.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 2, 2012
+.Dt HWPMC 4
+.Os
+.Sh NAME
+.Nm hwpmc
+.Nd "Hardware Performance Monitoring Counter support"
+.Sh SYNOPSIS
+.Cd "options HWPMC_HOOKS"
+.Cd "device hwpmc"
+.Pp
+Additionally, for i386 systems:
+.Cd "device apic"
+.Sh DESCRIPTION
+The
+.Nm
+driver virtualizes the hardware performance monitoring facilities in
+modern CPUs and provides support for using these facilities from
+user level processes.
+.Pp
+The driver supports multi-processor systems.
+.Pp
+PMCs are allocated using the
+.Dv PMC_OP_PMCALLOCATE
+request.
+A successful
+.Dv PMC_OP_PMCALLOCATE
+request will return a handle to the requesting process.
+Subsequent operations on the allocated PMC use this handle to denote
+the specific PMC.
+A process that has successfully allocated a PMC is termed an
+.Dq "owner process" .
+.Pp
+PMCs may be allocated with process or system scope.
+.Bl -tag -width ".Em Process-scope"
+.It Em "Process-scope"
+The PMC is active only when a thread belonging
+to a process it is attached to is scheduled on a CPU.
+.It Em "System-scope"
+The PMC operates independently of processes and
+measures hardware events for the system as a whole.
+.El
+.Pp
+PMCs may be allocated for counting or for sampling:
+.Bl -tag -width ".Em Counting"
+.It Em Counting
+In counting modes, the PMCs count hardware events.
+These counts are retrievable using the
+.Dv PMC_OP_PMCREAD
+system call on all architectures.
+Some architectures offer faster methods of reading these counts.
+.It Em Sampling
+In sampling modes, the PMCs are configured to sample the CPU
+instruction pointer (and optionally to capture the call chain leading
+up to the sampled instruction pointer) after a configurable number of
+hardware events have been observed.
+Instruction pointer samples and call chain records are usually
+directed to a log file for subsequent analysis.
+.El
+.Pp
+Scope and operational mode are orthogonal; a PMC may thus be
+configured to operate in one of the following four modes:
+.Bl -tag -width indent
+.It Process-scope, counting
+These PMCs count hardware events whenever a thread in their attached process is
+scheduled on a CPU.
+These PMCs normally count from zero, but the initial count may be
+set using the
+.Dv PMC_OP_SETCOUNT
+operation.
+Applications can read the value of the PMC anytime using the
+.Dv PMC_OP_PMCRW
+operation.
+.It Process-scope, sampling
+These PMCs sample the target processes instruction pointer after they
+have seen the configured number of hardware events.
+The PMCs only count events when a thread belonging to their attached
+process is active.
+The desired frequency of sampling is set using the
+.Dv PMC_OP_SETCOUNT
+operation prior to starting the PMC.
+Log files are configured using the
+.Dv PMC_OP_CONFIGURELOG
+operation.
+.It System-scope, counting
+These PMCs count hardware events seen by them independent of the
+processes that are executing.
+The current count on these PMCs can be read using the
+.Dv PMC_OP_PMCRW
+request.
+These PMCs normally count from zero, but the initial count may be
+set using the
+.Dv PMC_OP_SETCOUNT
+operation.
+.It System-scope, sampling
+These PMCs will periodically sample the instruction pointer of the CPU
+they are allocated on, and will write the sample to a log for further
+processing.
+The desired frequency of sampling is set using the
+.Dv PMC_OP_SETCOUNT
+operation prior to starting the PMC.
+Log files are configured using the
+.Dv PMC_OP_CONFIGURELOG
+operation.
+.Pp
+System-wide statistical sampling can only be enabled by a process with
+super-user privileges.
+.El
+.Pp
+Processes are allowed to allocate as many PMCs as the hardware and
+current operating conditions permit.
+Processes may mix allocations of system-wide and process-private
+PMCs.
+Multiple processes may be using PMCs simultaneously.
+.Pp
+Allocated PMCs are started using the
+.Dv PMC_OP_PMCSTART
+operation, and stopped using the
+.Dv PMC_OP_PMCSTOP
+operation.
+Stopping and starting a PMC is permitted at any time the owner process
+has a valid handle to the PMC.
+.Pp
+Process-private PMCs need to be attached to a target process before
+they can be used.
+Attaching a process to a PMC is done using the
+.Dv PMC_OP_PMCATTACH
+operation.
+An already attached PMC may be detached from its target process
+using the converse
+.Dv PMC_OP_PMCDETACH
+operation.
+Issuing a
+.Dv PMC_OP_PMCSTART
+operation on an as yet unattached PMC will cause it to be attached
+to its owner process.
+The following rules determine whether a given process may attach
+a PMC to another target process:
+.Bl -bullet -compact
+.It
+A non-jailed process with super-user privileges is allowed to attach
+to any other process in the system.
+.It
+Other processes are only allowed to attach to targets that they would
+be able to attach to for debugging (as determined by
+.Xr p_candebug 9 ) .
+.El
+.Pp
+PMCs are released using
+.Dv PMC_OP_PMCRELEASE .
+After a successful
+.Dv PMC_OP_PMCRELEASE
+operation the handle to the PMC will become invalid.
+.Ss Modifier Flags
+The
+.Dv PMC_OP_PMCALLOCATE
+operation supports the following flags that modify the behavior
+of an allocated PMC:
+.Bl -tag -width indent
+.It Dv PMC_F_CALLCHAIN
+This modifier informs sampling PMCs to record a callchain when
+capturing a sample.
+The maximum depth to which call chains are recorded is specified
+by the
+.Va "kern.hwpmc.callchaindepth"
+kernel tunable.
+.It Dv PMC_F_DESCENDANTS
+This modifier is valid only for a PMC being allocated in process-private
+mode.
+It signifies that the PMC will track hardware events for its
+target process and the target's current and future descendants.
+.It Dv PMC_F_KGMON
+This modifier is valid only for a PMC being allocated in system-wide
+sampling mode.
+It signifies that the PMC's sampling interrupt is to be used to drive
+kernel profiling via
+.Xr kgmon 8 .
+This functionality is currently unimplemented.
+.It Dv PMC_F_LOG_PROCCSW
+This modifier is valid only for a PMC being allocated in process-private
+mode.
+When this modifier is present, at every context switch,
+.Nm
+will log a record containing the number of hardware events
+seen by the target process when it was scheduled on the CPU.
+.It Dv PMC_F_LOG_PROCEXIT
+This modifier is valid only for a PMC being allocated in process-private
+mode.
+With this modifier present,
+.Nm
+will maintain per-process counts for each target process attached to
+a PMC.
+At process exit time, a record containing the target process' PID and
+the accumulated per-process count for that process will be written to the
+configured log file.
+.El
+.Pp
+Modifiers
+.Dv PMC_F_LOG_PROCEXIT
+and
+.Dv PMC_F_LOG_PROCCSW
+may be used in combination with modifier
+.Dv PMC_F_DESCENDANTS
+to track the behavior of complex pipelines of processes.
+PMCs with modifiers
+.Dv PMC_F_LOG_PROCEXIT
+and
+.Dv PMC_F_LOG_PROCCSW
+cannot be started until their owner process has configured a log file.
+.Ss Signals
+The
+.Nm
+driver may deliver signals to processes that have allocated PMCs:
+.Bl -tag -width ".Dv SIGBUS"
+.It Dv SIGIO
+A
+.Dv PMC_OP_PMCRW
+operation was attempted on a process-private PMC that does not have
+attached target processes.
+.It Dv SIGBUS
+The
+.Nm
+driver is being unloaded from the kernel.
+.El
+.Ss PMC ROW DISPOSITIONS
+A PMC row is defined as the set of PMC resources at the same hardware
+address in the CPUs in a system.
+Since process scope PMCs need to move between CPUs following their
+target threads, allocation of a process scope PMC reserves all PMCs in
+a PMC row for use only with process scope PMCs.
+Accordingly a PMC row will be in one of the following dispositions:
+.Bl -tag -width ".Dv PMC_DISP_STANDALONE" -compact
+.It Dv PMC_DISP_FREE
+Hardware counters in this row are free and may be use to satisfy
+either of system scope or process scope allocation requests.
+.It Dv PMC_DISP_THREAD
+Hardware counters in this row are in use by process scope PMCs
+and are only available for process scope allocation requests.
+.It Dv PMC_DISP_STANDALONE
+Some hardware counters in this row have been administratively
+disabled or are in use by system scope PMCs.
+Non-disabled hardware counters in such a row may be used
+for satisfying system scope allocation requests.
+No process scope PMCs will use hardware counters in this row.
+.El
+.Sh PROGRAMMING API
+The recommended way for application programs to use the facilities of
+the
+.Nm
+driver is using the API provided by the
+.Xr pmc 3
+library.
+.Pp
+The
+.Nm
+driver operates using a system call number that is dynamically
+allotted to it when it is loaded into the kernel.
+.Pp
+The
+.Nm
+driver supports the following operations:
+.Bl -tag -width indent
+.It Dv PMC_OP_CONFIGURELOG
+Configure a log file for PMCs that require a log file.
+The
+.Nm
+driver will write log data to this file asynchronously.
+If it encounters an error, logging will be stopped and the error code
+encountered will be saved for subsequent retrieval by a
+.Dv PMC_OP_FLUSHLOG
+request.
+.It Dv PMC_OP_FLUSHLOG
+Transfer buffered log data inside
+.Nm
+to a configured output file.
+This operation returns to the caller after the write operation
+has returned.
+The returned error code reflects any pending error state inside
+.Nm .
+.It Dv PMC_OP_GETCPUINFO
+Retrieve information about the highest possible CPU number for the system,
+and the number of hardware performance monitoring counters available per CPU.
+.It Dv PMC_OP_GETDRIVERSTATS
+Retrieve module statistics (for analyzing the behavior of
+.Nm
+itself).
+.It Dv PMC_OP_GETMODULEVERSION
+Retrieve the version number of API.
+.It Dv PMC_OP_GETPMCINFO
+Retrieve information about the current state of the PMCs on a
+given CPU.
+.It Dv PMC_OP_PMCADMIN
+Set the administrative state (i.e., whether enabled or disabled) for
+the hardware PMCs managed by the
+.Nm
+driver.
+The invoking process needs to possess the
+.Dv PRIV_PMC_MANAGE
+privilege.
+.It Dv PMC_OP_PMCALLOCATE
+Allocate and configure a PMC.
+On successful allocation, a handle to the PMC (a 32 bit value)
+is returned.
+.It Dv PMC_OP_PMCATTACH
+Attach a process mode PMC to a target process.
+The PMC will be active whenever a thread in the target process is
+scheduled on a CPU.
+.Pp
+If the
+.Dv PMC_F_DESCENDANTS
+flag had been specified at PMC allocation time, then the PMC is
+attached to all current and future descendants of the target process.
+.It Dv PMC_OP_PMCDETACH
+Detach a PMC from its target process.
+.It Dv PMC_OP_PMCRELEASE
+Release a PMC.
+.It Dv PMC_OP_PMCRW
+Read and write a PMC.
+This operation is valid only for PMCs configured in counting modes.
+.It Dv PMC_OP_SETCOUNT
+Set the initial count (for counting mode PMCs) or the desired sampling
+rate (for sampling mode PMCs).
+.It Dv PMC_OP_PMCSTART
+Start a PMC.
+.It Dv PMC_OP_PMCSTOP
+Stop a PMC.
+.It Dv PMC_OP_WRITELOG
+Insert a timestamped user record into the log file.
+.El
+.Ss i386 Specific API
+Some i386 family CPUs support the RDPMC instruction which allows a
+user process to read a PMC value without needing to invoke a
+.Dv PMC_OP_PMCRW
+operation.
+On such CPUs, the machine address associated with an allocated PMC is
+retrievable using the
+.Dv PMC_OP_PMCX86GETMSR
+system call.
+.Bl -tag -width indent
+.It Dv PMC_OP_PMCX86GETMSR
+Retrieve the MSR (machine specific register) number associated with
+the given PMC handle.
+.Pp
+The PMC needs to be in process-private mode and allocated without the
+.Dv PMC_F_DESCENDANTS
+modifier flag, and should be attached only to its owner process at the
+time of the call.
+.El
+.Ss amd64 Specific API
+AMD64 CPUs support the RDPMC instruction which allows a
+user process to read a PMC value without needing to invoke a
+.Dv PMC_OP_PMCRW
+operation.
+The machine address associated with an allocated PMC is
+retrievable using the
+.Dv PMC_OP_PMCX86GETMSR
+system call.
+.Bl -tag -width indent
+.It Dv PMC_OP_PMCX86GETMSR
+Retrieve the MSR (machine specific register) number associated with
+the given PMC handle.
+.Pp
+The PMC needs to be in process-private mode and allocated without the
+.Dv PMC_F_DESCENDANTS
+modifier flag, and should be attached only to its owner process at the
+time of the call.
+.El
+.Sh SYSCTL VARIABLES AND LOADER TUNABLES
+The behavior of
+.Nm
+is influenced by the following
+.Xr sysctl 8
+and
+.Xr loader 8
+tunables:
+.Bl -tag -width indent
+.It Va kern.hwpmc.callchaindepth Pq integer, read-only
+The maximum number of call chain records to capture per sample.
+The default is 8.
+.It Va kern.hwpmc.debugflags Pq string, read-write
+(Only available if the
+.Nm
+driver was compiled with
+.Fl DDEBUG . )
+Control the verbosity of debug messages from the
+.Nm
+driver.
+.It Va kern.hwpmc.hashsize Pq integer, read-only
+The number of rows in the hash tables used to keep track of owner and
+target processes.
+The default is 16.
+.It Va kern.hwpmc.logbuffersize Pq integer, read-only
+The size in kilobytes of each log buffer used by
+.Nm Ns 's
+logging function.
+The default buffer size is 4KB.
+.It Va kern.hwpmc.mtxpoolsize Pq integer, read-only
+The size of the spin mutex pool used by the PMC driver.
+The default is 32.
+.It Va kern.hwpmc.nbuffers Pq integer, read-only
+The number of log buffers used by
+.Nm
+for logging.
+The default is 64.
+.It Va kern.hwpmc.nsamples Pq integer, read-only
+The number of entries in the per-CPU ring buffer used during sampling.
+The default is 512.
+.It Va security.bsd.unprivileged_syspmcs Pq boolean, read-write
+If set to non-zero, allow unprivileged processes to allocate system-wide
+PMCs.
+The default value is 0.
+.It Va security.bsd.unprivileged_proc_debug Pq boolean, read-write
+If set to 0, the
+.Nm
+driver will only allow privileged processes to attach PMCs to other
+processes.
+.El
+.Pp
+These variables may be set in the kernel environment using
+.Xr kenv 1
+before
+.Nm
+is loaded.
+.Sh IMPLEMENTATION NOTES
+.Ss SMP Symmetry
+The kernel driver requires all physical CPUs in an SMP system to have
+identical performance monitoring counter hardware.
+.Ss Sparse CPU Numbering
+On platforms that sparsely number CPUs and which support hot-plugging
+of CPUs, requests that specify non-existent or disabled CPUs will fail
+with an error.
+Applications allocating system-scope PMCs need to be aware of
+the possibility of such transient failures.
+.Ss x86 TSC Handling
+Historically, on the x86 architecture,
+.Fx
+has permitted user processes running at a processor CPL of 3 to
+read the TSC using the RDTSC instruction.
+The
+.Nm
+driver preserves this behavior.
+.Ss Intel P4/HTT Handling
+On CPUs with HTT support, Intel P4 PMCs are capable of qualifying
+only a subset of hardware events on a per-logical CPU basis.
+Consequently, if HTT is enabled on a system with Intel Pentium P4
+PMCs, then the
+.Nm
+driver will reject allocation requests for process-private PMCs that
+request counting of hardware events that cannot be counted separately
+for each logical CPU.
+.Ss Intel Pentium-Pro Handling
+Writing a value to the PMC MSRs found in Intel Pentium-Pro style PMCs
+(found in
+.Tn "Intel Pentium Pro" ,
+.Tn "Pentium II" ,
+.Tn "Pentium III" ,
+.Tn "Pentium M"
+and
+.Tn "Celeron"
+processors) will replicate bit 31 of the
+value being written into the upper 8 bits of the MSR,
+bringing down the usable width of these PMCs to 31 bits.
+For process-virtual PMCs, the
+.Nm
+driver implements a workaround in software and makes the corrected 64
+bit count available via the
+.Dv PMC_OP_RW
+operation.
+Processes that intend to use RDPMC instructions directly or
+that intend to write values larger than 2^31 into these PMCs with
+.Dv PMC_OP_RW
+need to be aware of this hardware limitation.
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "hwpmc: [class/npmc/capabilities]..."
+Announce the presence of
+.Va npmc
+PMCs of class
+.Va class ,
+with capabilities described by bit string
+.Va capabilities .
+.It "hwpmc: kernel version (0x%x) does not match module version (0x%x)."
+The module loading process failed because a version mismatch was detected
+between the currently executing kernel and the module being loaded.
+.It "hwpmc: this kernel has not been compiled with 'options HWPMC_HOOKS'."
+The module loading process failed because the currently executing kernel
+was not configured with the required configuration option
+.Dv HWPMC_HOOKS .
+.It "hwpmc: tunable hashsize=%d must be greater than zero."
+A negative value was supplied for tunable
+.Va kern.hwpmc.hashsize .
+.It "hwpmc: tunable logbuffersize=%d must be greater than zero."
+A negative value was supplied for tunable
+.Va kern.hwpmc.logbuffersize .
+.It "hwpmc: tunable nlogbuffers=%d must be greater than zero."
+A negative value was supplied for tunable
+.Va kern.hwpmc.nlogbuffers .
+.It "hwpmc: tunable nsamples=%d out of range."
+The value for tunable
+.Va kern.hwpmc.nsamples
+was negative or greater than 65535.
+.El
+.Sh COMPATIBILITY
+The
+.Nm
+driver is
+.Ud
+The API and ABI documented in this manual page may change in
+the future.
+The recommended method of accessing this driver is using the
+.Xr pmc 3
+API.
+.Sh ERRORS
+A command issued to the
+.Nm
+driver may fail with the following errors:
+.Bl -tag -width Er
+.It Bq Er EAGAIN
+Helper process creation failed for a
+.Dv PMC_OP_CONFIGURELOG
+request due to a temporary resource shortage in the kernel.
+.It Bq Er EBUSY
+A
+.Dv PMC_OP_CONFIGURELOG
+operation was requested while an existing log was active.
+.It Bq Er EBUSY
+A DISABLE operation was requested using the
+.Dv PMC_OP_PMCADMIN
+request for a set of hardware resources currently in use for
+process-private PMCs.
+.It Bq Er EBUSY
+A
+.Dv PMC_OP_PMCADMIN
+operation was requested on an active system mode PMC.
+.It Bq Er EBUSY
+A
+.Dv PMC_OP_PMCATTACH
+operation was requested for a target process that already had another
+PMC using the same hardware resources attached to it.
+.It Bq Er EBUSY
+A
+.Dv PMC_OP_PMCRW
+request writing a new value was issued on a PMC that was active.
+.It Bq Er EBUSY
+A
+.Dv PMC_OP_PMCSETCOUNT
+request was issued on a PMC that was active.
+.It Bq Er EDOOFUS
+A
+.Dv PMC_OP_PMCSTART
+operation was requested without a log file being configured for a
+PMC allocated with
+.Dv PMC_F_LOG_PROCCSW
+and
+.Dv PMC_F_LOG_PROCEXIT
+modifiers.
+.It Bq Er EDOOFUS
+A
+.Dv PMC_OP_PMCSTART
+operation was requested on a system-wide sampling PMC without a log
+file being configured.
+.It Bq Er EEXIST
+A
+.Dv PMC_OP_PMCATTACH
+request was reissued for a target process that already is the target
+of this PMC.
+.It Bq Er EFAULT
+A bad address was passed in to the driver.
+.It Bq Er EINVAL
+An invalid PMC handle was specified.
+.It Bq Er EINVAL
+An invalid CPU number was passed in for a
+.Dv PMC_OP_GETPMCINFO
+operation.
+.It Bq Er EINVAL
+A
+.Dv PMC_OP_CONFIGURELOG
+request to de-configure a log file was issued without a log file
+being configured.
+.It Bq Er EINVAL
+A
+.Dv PMC_OP_FLUSHLOG
+request was issued without a log file being configured.
+.It Bq Er EINVAL
+An invalid CPU number was passed in for a
+.Dv PMC_OP_PMCADMIN
+operation.
+.It Bq Er EINVAL
+An invalid operation request was passed in for a
+.Dv PMC_OP_PMCADMIN
+operation.
+.It Bq Er EINVAL
+An invalid PMC ID was passed in for a
+.Dv PMC_OP_PMCADMIN
+operation.
+.It Bq Er EINVAL
+A suitable PMC matching the parameters passed in to a
+.Dv PMC_OP_PMCALLOCATE
+request could not be allocated.
+.It Bq Er EINVAL
+An invalid PMC mode was requested during a
+.Dv PMC_OP_PMCALLOCATE
+request.
+.It Bq Er EINVAL
+An invalid CPU number was specified during a
+.Dv PMC_OP_PMCALLOCATE
+request.
+.It Bq Er EINVAL
+A CPU other than
+.Dv PMC_CPU_ANY
+was specified in a
+.Dv PMC_OP_PMCALLOCATE
+request for a process-private PMC.
+.It Bq Er EINVAL
+A CPU number of
+.Dv PMC_CPU_ANY
+was specified in a
+.Dv PMC_OP_PMCALLOCATE
+request for a system-wide PMC.
+.It Bq Er EINVAL
+The
+.Ar pm_flags
+argument to an
+.Dv PMC_OP_PMCALLOCATE
+request contained unknown flags.
+.It Bq Er EINVAL
+(On Intel Pentium 4 CPUs with HTT support)
+A
+.Dv PMC_OP_PMCALLOCATE
+request for a process-private PMC was issued for an event that does
+not support counting on a per-logical CPU basis.
+.It Bq Er EINVAL
+A PMC allocated for system-wide operation was specified with a
+.Dv PMC_OP_PMCATTACH
+or
+.Dv PMC_OP_PMCDETACH
+request.
+.It Bq Er EINVAL
+The
+.Ar pm_pid
+argument to a
+.Dv PMC_OP_PMCATTACH
+or
+.Dv PMC_OP_PMCDETACH
+request specified an illegal process ID.
+.It Bq Er EINVAL
+A
+.Dv PMC_OP_PMCDETACH
+request was issued for a PMC not attached to the target process.
+.It Bq Er EINVAL
+Argument
+.Ar pm_flags
+to a
+.Dv PMC_OP_PMCRW
+request contained illegal flags.
+.It Bq Er EINVAL
+A
+.Dv PMC_OP_PMCX86GETMSR
+operation was requested for a PMC not in process-virtual mode, or
+for a PMC that is not solely attached to its owner process, or for
+a PMC that was allocated with flag
+.Dv PMC_F_DESCENDANTS .
+.It Bq Er EINVAL
+A
+.Dv PMC_OP_WRITELOG
+request was issued for an owner process without a log file
+configured.
+.It Bq Er ENOMEM
+The system was not able to allocate kernel memory.
+.It Bq Er ENOSYS
+(On i386 and amd64 architectures)
+A
+.Dv PMC_OP_PMCX86GETMSR
+operation was requested for hardware that does not support reading
+PMCs directly with the RDPMC instruction.
+.It Bq Er ENXIO
+A
+.Dv PMC_OP_GETPMCINFO
+operation was requested for an absent or disabled CPU.
+.It Bq Er ENXIO
+A
+.Dv PMC_OP_PMCALLOCATE
+operation specified allocation of a system-wide PMC on an absent or
+disabled CPU.
+.It Bq Er ENXIO
+A
+.Dv PMC_OP_PMCSTART
+or
+.Dv PMC_OP_PMCSTOP
+request was issued for a system-wide PMC that was allocated on a CPU
+that is currently absent or disabled.
+.It Bq Er EOPNOTSUPP
+A
+.Dv PMC_OP_PMCALLOCATE
+request was issued for PMC capabilities not supported
+by the specified PMC class.
+.It Bq Er EOPNOTSUPP
+(i386 architectures)
+A sampling mode PMC was requested on a CPU lacking an APIC.
+.It Bq Er EPERM
+A
+.Dv PMC_OP_PMCADMIN
+request was issued by a process without super-user
+privilege or by a jailed super-user process.
+.It Bq Er EPERM
+A
+.Dv PMC_OP_PMCATTACH
+operation was issued for a target process that the current process
+does not have permission to attach to.
+.It Bq Er EPERM
+(i386 and amd64 architectures)
+A
+.Dv PMC_OP_PMCATTACH
+operation was issued on a PMC whose MSR has been retrieved using
+.Dv PMC_OP_PMCX86GETMSR .
+.It Bq Er ESRCH
+A process issued a PMC operation request without having allocated any
+PMCs.
+.It Bq Er ESRCH
+A process issued a PMC operation request after the PMC was detached
+from all of its target processes.
+.It Bq Er ESRCH
+A
+.Dv PMC_OP_PMCATTACH
+or
+.Dv PMC_OP_PMCDETACH
+request specified a non-existent process ID.
+.It Bq Er ESRCH
+The target process for a
+.Dv PMC_OP_PMCDETACH
+operation is not being monitored by
+.Nm .
+.El
+.Sh SEE ALSO
+.Xr kenv 1 ,
+.Xr pmc 3 ,
+.Xr pmclog 3 ,
+.Xr kgmon 8 ,
+.Xr kldload 8 ,
+.Xr pmccontrol 8 ,
+.Xr pmcstat 8 ,
+.Xr sysctl 8 ,
+.Xr kproc_create 9 ,
+.Xr p_candebug 9
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An "Joseph Koshy"
+.Aq jkoshy@FreeBSD.org .
+.Sh BUGS
+The driver samples the state of the kernel's logical processor support
+at the time of initialization (i.e., at module load time).
+On CPUs supporting logical processors, the driver could misbehave if
+logical processors are subsequently enabled or disabled while the
+driver is active.
+.Pp
+On the i386 architecture, the driver requires that the local APIC on the
+CPU be enabled for sampling mode to be supported.
+Many single-processor motherboards keep the APIC disabled in BIOS; on
+such systems
+.Nm
+will not support sampling PMCs.
+.Sh SECURITY CONSIDERATIONS
+PMCs may be used to monitor the actual behavior of the system on hardware.
+In situations where this constitutes an undesirable information leak,
+the following options are available:
+.Bl -enum
+.It
+Set the
+.Xr sysctl 8
+tunable
+.Va security.bsd.unprivileged_syspmcs
+to 0.
+This ensures that unprivileged processes cannot allocate system-wide
+PMCs and thus cannot observe the hardware behavior of the system
+as a whole.
+This tunable may also be set at boot time using
+.Xr loader 8 ,
+or with
+.Xr kenv 1
+prior to loading the
+.Nm
+driver into the kernel.
+.It
+Set the
+.Xr sysctl 8
+tunable
+.Va security.bsd.unprivileged_proc_debug
+to 0.
+This will ensure that an unprivileged process cannot attach a PMC
+to any process other than itself and thus cannot observe the hardware
+behavior of other processes with the same credentials.
+.El
+.Pp
+System administrators should note that on IA-32 platforms
+.Fx
+makes the content of the IA-32 TSC counter available to all processes
+via the RDTSC instruction.
diff --git a/share/man/man4/ichsmb.4 b/share/man/man4/ichsmb.4
new file mode 100644
index 0000000..a415941
--- /dev/null
+++ b/share/man/man4/ichsmb.4
@@ -0,0 +1,57 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 28, 2007
+.Dt ICHSMB 4
+.Os
+.Sh NAME
+.Nm ichsmb
+.Nd Intel ICH SMBus controller driver
+.Sh SYNOPSIS
+.Cd device pci
+.Cd device smbus
+.Cd device smb
+.Cd device ichsmb
+.Sh DESCRIPTION
+This driver provides access to the SMBus controller logical
+device contained in the Intel 82801AA (ICH), 82801AB (ICH0),
+82801BA (ICH2), 82801CA (ICH3), 82801DC (ICH4), 82801EB (ICH5),
+82801FB (ICH6) and 82801GB (ICH7) PCI chips.
+.Sh SEE ALSO
+.Xr smb 4 ,
+.Xr smbus 4
+.Sh AUTHORS
+.An Archie L. Cobbs Aq archie@FreeBSD.org
diff --git a/share/man/man4/ichwd.4 b/share/man/man4/ichwd.4
new file mode 100644
index 0000000..25b6dbb
--- /dev/null
+++ b/share/man/man4/ichwd.4
@@ -0,0 +1,90 @@
+.\"-
+.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 20, 2008
+.Dt ICHWD 4
+.Os
+.Sh NAME
+.Nm ichwd
+.Nd device driver for the Intel ICH watchdog interrupt timer
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ichwd"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ichwd_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides
+.Xr watchdog 4
+support for the watchdog interrupt timer present on
+all Intel ICH motherboard chipsets.
+.Pp
+The ICH WDT counts down in ticks of approximately 0.6 seconds; the
+exact value depends on hardware quality and environmental factors.
+Supported watchdog intervals range from 2 to 63 ticks.
+.Pp
+Note that on some ICH-based systems, the WDT may be present but
+disabled, either in hardware or by the BIOS.
+The
+.Nm
+driver attempts to detect this condition and will refuse to attach if
+it believes the WDT is disabled.
+.Sh SEE ALSO
+.Xr watchdog 4 ,
+.Xr watchdog 8 ,
+.Xr watchdogd 8 ,
+.Xr watchdog 9
+.Rs
+.%T Using the Intel ICH Family Watchdog Timer (WDT)
+.%R Intel Application Note AP-725
+.%O Document Number 292273-001
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Wm. Daryl Hawkins Aq dhawkins@tamu.edu
+of Texas A&M University and
+.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
+This manual page was written by
+.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
diff --git a/share/man/man4/icmp.4 b/share/man/man4/icmp.4
new file mode 100644
index 0000000..6b7f78e
--- /dev/null
+++ b/share/man/man4/icmp.4
@@ -0,0 +1,250 @@
+.\" Copyright (c) 1986, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)icmp.4 8.1 (Berkeley) 6/5/93
+.\" $FreeBSD$
+.\"
+.Dd February 9, 2007
+.Dt ICMP 4
+.Os
+.Sh NAME
+.Nm icmp
+.Nd Internet Control Message Protocol
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In netinet/in.h
+.Ft int
+.Fn socket AF_INET SOCK_RAW proto
+.Sh DESCRIPTION
+.Tn ICMP
+is the error and control message protocol used
+by
+.Tn IP
+and the Internet protocol family.
+It may be accessed
+through a
+.Dq raw socket
+for network monitoring
+and diagnostic functions.
+The
+.Fa proto
+parameter to the socket call to create an
+.Tn ICMP
+socket
+is obtained from
+.Xr getprotobyname 3 .
+.Tn ICMP
+sockets are connectionless,
+and are normally used with the
+.Xr sendto 2
+and
+.Xr recvfrom 2
+calls, though the
+.Xr connect 2
+call may also be used to fix the destination for future
+packets (in which case the
+.Xr read 2
+or
+.Xr recv 2
+and
+.Xr write 2
+or
+.Xr send 2
+system calls may be used).
+.Pp
+Outgoing packets automatically have an
+.Tn IP
+header prepended to
+them (based on the destination address).
+Incoming packets are received with the
+.Tn IP
+header and options intact.
+.Ss Types
+ICMP messages are classified according to the type and code fields
+present in the ICMP header.
+The abbreviations for the types and codes may be used in rules in
+.Xr pf.conf 5 .
+The following types are defined:
+.Bl -column x xxxxxxxxxxxx -offset indent
+.It Sy Num Ta Sy Abbrev. Ta Sy Description
+.It 0 Ta echorep Ta "Echo reply"
+.It 3 Ta unreach Ta "Destination unreachable"
+.It 4 Ta squench Ta "Packet loss, slow down"
+.It 5 Ta redir Ta "Shorter route exists"
+.It 6 Ta althost Ta "Alternate host address"
+.It 8 Ta echoreq Ta "Echo request"
+.It 9 Ta routeradv Ta "Router advertisement"
+.It 10 Ta routersol Ta "Router solicitation"
+.It 11 Ta timex Ta "Time exceeded"
+.It 12 Ta paramprob Ta "Invalid IP header"
+.It 13 Ta timereq Ta "Timestamp request"
+.It 14 Ta timerep Ta "Timestamp reply"
+.It 15 Ta inforeq Ta "Information request"
+.It 16 Ta inforep Ta "Information reply"
+.It 17 Ta maskreq Ta "Address mask request"
+.It 18 Ta maskrep Ta "Address mask reply"
+.It 30 Ta trace Ta Traceroute
+.It 31 Ta dataconv Ta "Data conversion problem"
+.It 32 Ta mobredir Ta "Mobile host redirection"
+.It 33 Ta ipv6-where Ta "IPv6 where-are-you"
+.It 34 Ta ipv6-here Ta "IPv6 i-am-here"
+.It 35 Ta mobregreq Ta "Mobile registration request"
+.It 36 Ta mobregrep Ta "Mobile registration reply"
+.It 39 Ta skip Ta SKIP
+.It 40 Ta photuris Ta Photuris
+.El
+.Pp
+The following codes are defined:
+.Bl -column x xxxxxxxxxxxx xxxxxxxx -offset indent
+.It Sy Num Ta Sy Abbrev. Ta Sy Type Ta Sy Description
+.It 0 Ta net-unr Ta unreach Ta "Network unreachable"
+.It 1 Ta host-unr Ta unreach Ta "Host unreachable"
+.It 2 Ta proto-unr Ta unreach Ta "Protocol unreachable"
+.It 3 Ta port-unr Ta unreach Ta "Port unreachable"
+.It 4 Ta needfrag Ta unreach Ta "Fragmentation needed but DF bit set"
+.It 5 Ta srcfail Ta unreach Ta "Source routing failed"
+.It 6 Ta net-unk Ta unreach Ta "Network unknown"
+.It 7 Ta host-unk Ta unreach Ta "Host unknown"
+.It 8 Ta isolate Ta unreach Ta "Host isolated"
+.It 9 Ta net-prohib Ta unreach Ta "Network administratively prohibited"
+.It 10 Ta host-prohib Ta unreach Ta "Host administratively prohibited"
+.It 11 Ta net-tos Ta unreach Ta "Invalid TOS for network"
+.It 12 Ta host-tos Ta unreach Ta "Invalid TOS for host"
+.It 13 Ta filter-prohib Ta unreach Ta "Prohibited access"
+.It 14 Ta host-preced Ta unreach Ta "Precedence violation"
+.It 15 Ta cutoff-preced Ta unreach Ta "Precedence cutoff"
+.It 0 Ta redir-net Ta redir Ta "Shorter route for network"
+.It 1 Ta redir-host Ta redir Ta "Shorter route for host"
+.It 2 Ta redir-tos-net Ta redir Ta "Shorter route for TOS and network"
+.It 3 Ta redir-tos-host Ta redir Ta "Shorter route for TOS and host"
+.It 0 Ta normal-adv Ta routeradv Ta "Normal advertisement"
+.It 16 Ta common-adv Ta routeradv Ta "Selective advertisement"
+.It 0 Ta transit Ta timex Ta "Time exceeded in transit"
+.It 1 Ta reassemb Ta timex Ta "Time exceeded in reassembly"
+.It 0 Ta badhead Ta paramprob Ta "Invalid option pointer"
+.It 1 Ta optmiss Ta paramprob Ta "Missing option"
+.It 2 Ta badlen Ta paramprob Ta "Invalid length"
+.It 1 Ta unknown-ind Ta photuris Ta "Unknown security index"
+.It 2 Ta auth-fail Ta photuris Ta "Authentication failed"
+.It 3 Ta decrypt-fail Ta photuris Ta "Decryption failed"
+.El
+.Ss MIB Variables
+The
+.Tn ICMP
+protocol implements a number of variables in the
+.Va net.inet.icmp
+branch of the
+.Xr sysctl 3
+MIB.
+.Bl -tag -width ".Va icmplim_output"
+.It Va maskrepl
+.Pq Vt boolean
+Enable/disable replies to ICMP Address Mask Request packets.
+Defaults to false.
+.It Va maskfake
+.Pq Vt "unsigned integer"
+When
+.Va maskrepl
+is set and this value is non-zero,
+it will be used instead of the real address mask when
+the system replies to an ICMP Address Mask Request packet.
+Defaults to 0.
+.It Va icmplim
+.Pq Vt integer
+Bandwidth limit for ICMP replies in packets/second.
+Used when
+.Va icmplim_output
+is non-zero.
+Defaults to 200.
+.It Va icmplim_output
+.Pq Vt boolean
+Enable/disable bandwidth limiting of ICMP replies.
+Defaults to true.
+.It Va drop_redirect
+.Pq Vt boolean
+Enable/disable dropping of ICMP Redirect packets.
+Defaults to false.
+.It Va log_redirect
+.Pq Vt boolean
+Enable/disable logging of ICMP Redirect packets.
+Defaults to false.
+.It Va bmcastecho
+.Pq Vt boolean
+Enable/disable ICMP replies received via broadcast or multicast.
+Defaults to false.
+.It Va reply_src
+.Pq Vt str
+An interface name used for the ICMP reply source in response to packets
+which are not directly addressed to us.
+By default continue with normal source selection.
+.It Va reply_from_interface
+.Pq Vt boolean
+Use the IP address of the interface the packet came through in for
+responses to packets which are not directly addressed to us.
+If enabled, this rule is processed before all others.
+By default, continue with normal source selection.
+Enabling this option is particularly useful on routers because it
+makes external traceroutes show the actual path a packet has taken
+instead of the possibly different return path.
+.It Va quotelen
+.Pq Vt integer
+Number of bytes from original packet to quote in ICMP reply.
+This number is internally enforced to be at least 8 bytes (per RFC792)
+and at most the maximal space left in the ICMP reply mbuf.
+.El
+.Sh ERRORS
+A socket operation may fail with one of the following errors returned:
+.Bl -tag -width Er
+.It Bq Er EISCONN
+when trying to establish a connection on a socket which
+already has one, or when trying to send a datagram with the destination
+address specified and the socket is already connected;
+.It Bq Er ENOTCONN
+when trying to send a datagram, but
+no destination address is specified, and the socket has not been
+connected;
+.It Bq Er ENOBUFS
+when the system runs out of memory for
+an internal data structure;
+.It Bq Er EADDRNOTAVAIL
+when an attempt is made to create a
+socket with a network address for which no network interface
+exists.
+.El
+.Sh SEE ALSO
+.Xr recv 2 ,
+.Xr send 2 ,
+.Xr inet 4 ,
+.Xr intro 4 ,
+.Xr ip 4 ,
+.Xr pf.conf 5
+.Sh HISTORY
+The
+.Nm
+protocol appeared in
+.Bx 4.3 .
diff --git a/share/man/man4/icmp6.4 b/share/man/man4/icmp6.4
new file mode 100644
index 0000000..b052fc9
--- /dev/null
+++ b/share/man/man4/icmp6.4
@@ -0,0 +1,265 @@
+.\" $KAME: icmp6.4,v 1.6 2004/12/27 05:30:56 itojun Exp $
+.\" $OpenBSD: icmp6.4,v 1.19 2004/12/23 20:33:03 jaredy Exp $
+.\"
+.\" Copyright (c) 1986, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 7, 2012
+.Dt ICMP6 4
+.Os
+.Sh NAME
+.Nm icmp6
+.Nd Internet Control Message Protocol for IPv6
+.Sh SYNOPSIS
+.In sys/socket.h
+.In netinet/in.h
+.In netinet/icmp6.h
+.Ft int
+.Fn socket AF_INET6 SOCK_RAW IPPROTO_ICMPV6
+.Sh DESCRIPTION
+ICMPv6 is the error and control message protocol used by IPv6 and the
+IPv6 protocol family (see
+.Xr ip6 4
+and
+.Xr inet6 4 ) .
+It may be accessed through a
+.Dq raw socket
+for network monitoring and diagnostic functions.
+.Pp
+The
+.Fa proto
+parameter to the
+.Xr socket 2
+call to create an ICMPv6 socket may be obtained from
+.Xr getprotobyname 3 .
+ICMPv6 sockets are connectionless, and are normally used with the
+.Xr sendto 2
+and
+.Xr recvfrom 2
+calls, though the
+.Xr connect 2
+call may also be used to fix the destination for future packets
+(in which case
+.Xr read 2
+or
+.Xr recv 2
+and
+.Xr write 2
+or
+.Xr send 2
+system calls may be used).
+.Pp
+Outgoing packets automatically have an IPv6 header prepended to them
+(based on the destination address).
+Incoming packets on the socket are received with the IPv6 header and any
+extension headers removed.
+.Ss Types
+ICMPv6 messages are classified according to the type and code fields
+present in the ICMPv6 header.
+The abbreviations for the types and codes may be used in rules in
+.Xr pf.conf 5 .
+The following types are defined:
+.Bl -column x xxxxxxxxxxxx -offset indent
+.It Sy Num Ta Sy Abbrev. Ta Sy Description
+.It 1 Ta unreach Ta "Destination unreachable"
+.It 2 Ta toobig Ta "Packet too big"
+.It 3 Ta timex Ta "Time exceeded"
+.It 4 Ta paramprob Ta "Invalid IPv6 header"
+.It 128 Ta echoreq Ta "Echo service request"
+.It 129 Ta echorep Ta "Echo service reply"
+.It 130 Ta groupqry Ta "Group membership query"
+.It 130 Ta listqry Ta "Multicast listener query"
+.It 131 Ta grouprep Ta "Group membership report"
+.It 131 Ta listenrep Ta "Multicast listener report"
+.It 132 Ta groupterm Ta "Group membership termination"
+.It 132 Ta listendone Ta "Multicast listener done"
+.It 133 Ta routersol Ta "Router solicitation"
+.It 134 Ta routeradv Ta "Router advertisement"
+.It 135 Ta neighbrsol Ta "Neighbor solicitation"
+.It 136 Ta neighbradv Ta "Neighbor advertisement"
+.It 137 Ta redir Ta "Shorter route exists"
+.It 138 Ta routrrenum Ta "Route renumbering"
+.It 139 Ta fqdnreq Ta "FQDN query"
+.It 139 Ta niqry Ta "Node information query"
+.It 139 Ta wrureq Ta "Who-are-you request"
+.It 140 Ta fqdnrep Ta "FQDN reply"
+.It 140 Ta nirep Ta "Node information reply"
+.It 140 Ta wrurep Ta "Who-are-you reply"
+.It 200 Ta mtraceresp Ta "mtrace response"
+.It 201 Ta mtrace Ta "mtrace messages"
+.El
+.Pp
+The following codes are defined:
+.Bl -column x xxxxxxxxxxxx xxxxxxxx -offset indent
+.It Sy Num Ta Sy Abbrev. Ta Sy Type Ta
+.Sy Description
+.It 0 Ta noroute-unr Ta unreach Ta "No route to destination"
+.It 1 Ta admin-unr Ta unreach Ta "Administratively prohibited"
+.It 2 Ta beyond-unr Ta unreach Ta "Beyond scope of source address"
+.It 2 Ta notnbr-unr Ta unreach Ta "Not a neighbor (obsolete)"
+.It 3 Ta addr-unr Ta unreach Ta "Address unreachable"
+.It 4 Ta port-unr Ta unreach Ta "Port unreachable"
+.It 0 Ta transit Ta timex Ta "Time exceeded in transit"
+.It 1 Ta reassemb Ta timex Ta "Time exceeded in reassembly"
+.It 0 Ta badhead Ta paramprob Ta "Erroneous header field"
+.It 1 Ta nxthdr Ta paramprob Ta "Unrecognized next header"
+.It 2 Ta "" Ta redir Ta "Unrecognized option"
+.It 0 Ta redironlink Ta redir Ta "Redirection to on-link node"
+.It 1 Ta redirrouter Ta redir Ta "Redirection to better router"
+.El
+.Ss Headers
+All ICMPv6 messages are prefixed with an ICMPv6 header.
+This header corresponds to the
+.Vt icmp6_hdr
+structure and has the following definition:
+.Bd -literal -offset indent
+struct icmp6_hdr {
+ uint8_t icmp6_type; /* type field */
+ uint8_t icmp6_code; /* code field */
+ uint16_t icmp6_cksum; /* checksum field */
+ union {
+ uint32_t icmp6_un_data32[1]; /* type-specific */
+ uint16_t icmp6_un_data16[2]; /* type-specific */
+ uint8_t icmp6_un_data8[4]; /* type-specific */
+ } icmp6_dataun;
+} __packed;
+
+#define icmp6_data32 icmp6_dataun.icmp6_un_data32
+#define icmp6_data16 icmp6_dataun.icmp6_un_data16
+#define icmp6_data8 icmp6_dataun.icmp6_un_data8
+#define icmp6_pptr icmp6_data32[0] /* parameter prob */
+#define icmp6_mtu icmp6_data32[0] /* packet too big */
+#define icmp6_id icmp6_data16[0] /* echo request/reply */
+#define icmp6_seq icmp6_data16[1] /* echo request/reply */
+#define icmp6_maxdelay icmp6_data16[0] /* mcast group membership*/
+.Ed
+.Pp
+.Va icmp6_type
+describes the type of the message.
+Suitable values are defined in
+.Aq Pa netinet/icmp6.h .
+.Va icmp6_code
+describes the sub-type of the message and depends on
+.Va icmp6_type .
+.Va icmp6_cksum
+contains the checksum for the message and is filled in by the
+kernel on outgoing messages.
+The other fields are used for type-specific purposes.
+.Ss Filters
+Because of the extra functionality of ICMPv6 in comparison to ICMPv4,
+a larger number of messages may be potentially received on an ICMPv6
+socket.
+Input filters may therefore be used to restrict input to a subset of the
+incoming ICMPv6 messages so only interesting messages are returned by the
+.Xr recv 2
+family of calls to an application.
+.Pp
+The
+.Vt icmp6_filter
+structure may be used to refine the input message set according to the
+ICMPv6 type.
+By default, all messages types are allowed on newly created raw ICMPv6
+sockets.
+The following macros may be used to refine the input set:
+.Bl -tag -width Ds
+.It Fn "void ICMP6_FILTER_SETPASSALL" "struct icmp6_filter *filterp"
+Allow all incoming messages.
+.Va filterp
+is modified to allow all message types.
+.It Fn "void ICMP6_FILTER_SETBLOCKALL" "struct icmp6_filter *filterp"
+Ignore all incoming messages.
+.Va filterp
+is modified to ignore all message types.
+.It Xo
+.Ft void
+.Fn ICMP6_FILTER_SETPASS "int type" "struct icmp6_filter *filterp"
+.Xc
+Allow ICMPv6 messages with the given
+.Fa type .
+.Va filterp
+is modified to allow such messages.
+.It Xo
+.Ft void
+.Fn ICMP6_FILTER_SETBLOCK" "int type" "struct icmp6_filter *filterp"
+.Xc
+Ignore ICMPv6 messages with the given
+.Fa type .
+.Va filterp
+is modified to ignore such messages.
+.It Xo
+.Ft int
+.Fn ICMP6_FILTER_WILLPASS" "int type" "const struct icmp6_filter *filterp"
+.Xc
+Determine if the given filter will allow an ICMPv6 message of the given
+type.
+.It Xo
+.Ft int
+.Fn ICMP6_FILTER_WILLBLOCK" "int type" "const struct icmp6_filter *filterp"
+.Xc
+Determine if the given filter will ignore an ICMPv6 message of the given
+type.
+.El
+.Pp
+The
+.Xr getsockopt 2
+and
+.Xr setsockopt 2
+calls may be used to obtain and install the filter on ICMPv6 sockets at
+option level
+.Dv IPPROTO_ICMPV6
+and name
+.Dv ICMP6_FILTER
+with a pointer to the
+.Vt icmp6_filter
+structure as the option value.
+.Sh SEE ALSO
+.Xr getsockopt 2 ,
+.Xr recv 2 ,
+.Xr send 2 ,
+.Xr setsockopt 2 ,
+.Xr socket 2 ,
+.Xr getprotobyname 3 ,
+.Xr inet6 4 ,
+.Xr ip6 4 ,
+.Xr netintro 4
+.Rs
+.%A W. Stevens
+.%A M. Thomas
+.%T Advanced Sockets API for IPv6
+.%N RFC 2292
+.%D February 1998
+.Re
+.Rs
+.%A A. Conta
+.%A S. Deering
+.%T "Internet Control Message Protocol (ICMPv6) for the Internet" \
+ "Protocol Version 6 (IPv6) Specification"
+.%N RFC 2463
+.%D December 1998
+.Re
diff --git a/share/man/man4/ida.4 b/share/man/man4/ida.4
new file mode 100644
index 0000000..01e0267
--- /dev/null
+++ b/share/man/man4/ida.4
@@ -0,0 +1,84 @@
+.\" $FreeBSD$
+.\" Written by Tom Rhodes
+.\" This file is public domain
+.\"
+.Dd August 8, 2004
+.Dt IDA 4
+.Os
+.Sh NAME
+.Nm ida
+.Nd Compaq Intelligent Drive Array Controllers
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device ida"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ida_load="YES"
+.Ed
+.Sh DESCRIPTION
+The Compaq Intelligent Drive Array (IDA) technology is used to
+distribute data across an array of hard drives.
+It unites these hard drives into one or more high-performance logical drives.
+The drive array is managed by an array controller.
+.Pp
+These controllers have the ability to provide fault tolerance for the connected
+drives and optionally provide write cache for the logical drives.
+It is also possible for an application to access the SCSI bus subsystem
+directly by using the pass-through interface.
+.Sh HARDWARE
+The following controllers are supported by the
+.Nm
+driver:
+.Pp
+.Bl -bullet -compact
+.It
+Compaq SMART Array 221
+.It
+Compaq Integrated SMART Array Controller
+.It
+Compaq SMART Array 4200
+.It
+Compaq SMART Array 4250ES
+.It
+Compaq SMART 3200 Controller
+.It
+Compaq SMART 3100ES Controller
+.It
+Compaq SMART-2/DH Controller
+.It
+Compaq SMART-2/SL Controller
+.It
+Compaq SMART-2/P Controller
+.It
+Compaq SMART-2/E Controller
+.It
+Compaq SMART Controller
+.El
+.Sh IMPLEMENTATION NOTES
+Extreme caution should be exercised when using the pass-through interface.
+It is possible to interfere with normal system I/O and cause hangs if
+pass-through is used to an active device.
+Pass-through should only be used to a device that is otherwise quiescent.
+.Sh SEE ALSO
+.Xr cam 4 ,
+.Xr pass 4 ,
+.Xr xpt 4 ,
+.Xr camcontrol 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Jonathan Lemon Aq jlemon@FreeBSD.org
+and
+.An Matthew N. Dodd Aq mdodd@FreeBSD.org .
+This manual page was written by
+.An Tom Rhodes Aq trhodes@FreeBSD.org .
diff --git a/share/man/man4/ifmib.4 b/share/man/man4/ifmib.4
new file mode 100644
index 0000000..3d12a96
--- /dev/null
+++ b/share/man/man4/ifmib.4
@@ -0,0 +1,190 @@
+.\" Copyright 1996 Massachusetts Institute of Technology
+.\"
+.\" Permission to use, copy, modify, and distribute this software and
+.\" its documentation for any purpose and without fee is hereby
+.\" granted, provided that both the above copyright notice and this
+.\" permission notice appear in all copies, that both the above
+.\" copyright notice and this permission notice appear in all
+.\" supporting documentation, and that the name of M.I.T. not be used
+.\" in advertising or publicity pertaining to distribution of the
+.\" software without specific, written prior permission. M.I.T. makes
+.\" no representations about the suitability of this software for any
+.\" purpose. It is provided "as is" without express or implied
+.\" warranty.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
+.\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
+.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+.\" SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 28, 2009
+.Dt IFMIB 4
+.Os
+.Sh NAME
+.Nm ifmib
+.Nd Management Information Base for network interfaces
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In sys/sysctl.h
+.In sys/time.h
+.In net/if.h
+.In net/if_mib.h
+.Sh DESCRIPTION
+The
+.Nm
+facility is an application of the
+.Xr sysctl 3
+interface to provide management information about network interfaces
+to client applications such as
+.Xr netstat 1 ,
+.Xr slstat 8 ,
+and
+.Tn SNMP
+management agents.
+This information is structured as a table, where
+each row in the table represents a logical network interface (either a
+hardware device or a software pseudo-device like
+.Xr lo 4 ) .
+There are two columns in the table, each containing a single
+structure: one column contains generic information relevant to all
+interfaces, and the other contains information specific to the
+particular class of interface.
+(Generally the latter will implement
+the
+.Tn SNMP
+.Tn MIB
+defined for that particular interface class, if one exists and can be
+implemented in the kernel.)
+.Pp
+The
+.Nm
+facility is accessed via the
+.Dq Li net.link.generic
+branch of the
+.Xr sysctl 3
+MIB.
+The manifest constants for each level in the
+.Xr sysctl 3
+.Ar name
+are defined in
+.In net/if_mib.h .
+The index of the last row in the table is given by
+.Dq Li net.link.generic.system.ifcount
+(or, using the manifest constants,
+.Dv CTL_NET ,
+.Dv PF_LINK ,
+.Dv NETLINK_GENERIC ,
+.Dv IFMIB_SYSTEM ,
+.Dv IFMIB_IFCOUNT ) .
+A management application searching for a particular interface should
+start with row 1 and continue through the table row-by-row until the
+desired interface is found, or the interface count is reached.
+Note that the table may be sparse, i.e., a given row may not exist,
+indicated by an
+.Va errno
+of
+.Er ENOENT .
+Such an error should be ignored, and the next row should be checked.
+.Pp
+The generic interface information, common to all interfaces,
+can be accessed via the following procedure:
+.Bd -literal -offset indent
+int
+get_ifmib_general(int row, struct ifmibdata *ifmd)
+{
+ int name[6];
+ size_t len;
+
+ name[0] = CTL_NET;
+ name[1] = PF_LINK;
+ name[2] = NETLINK_GENERIC;
+ name[3] = IFMIB_IFDATA;
+ name[4] = row;
+ name[5] = IFDATA_GENERAL;
+
+ len = sizeof(*ifmd);
+
+ return sysctl(name, 6, ifmd, &len, (void *)0, 0);
+}
+.Ed
+.Pp
+The fields in
+.Li struct ifmibdata
+are as follows:
+.Bl -tag -width "ifmd_snd_drops"
+.It Li ifmd_name
+.Pq Li "char []"
+the name of the interface, including the unit number
+.It Li ifmd_pcount
+.Pq Li int
+the number of promiscuous listeners
+.It Li ifmd_flags
+.Pq Li int
+the interface's flags (defined in
+.In net/if.h )
+.It Li ifmd_snd_len
+.Pq Li int
+the current instantaneous length of the send queue
+.It Li ifmd_snd_drops
+.Pq Li int
+the number of packets dropped at this interface because the send queue
+was full
+.It Li ifmd_data
+.Pq Li struct if_data
+more information from a structure defined in
+.In net/if.h
+(see
+.Xr if_data 9 )
+.El
+.Pp
+Class-specific information can be retrieved by examining the
+.Dv IFDATA_LINKSPECIFIC
+column instead.
+Note that the form and length of the structure will
+depend on the class of interface.
+For
+.Dv IFT_ETHER ,
+.Dv IFT_ISO88023 ,
+and
+.Dv IFT_STARLAN
+interfaces, the structure is called
+.Dq Li struct ifmib_iso_8802_3
+(defined in
+.In net/if_mib.h ) ,
+and implements a superset of the
+.Tn "RFC 1650"
+MIB for Ethernet-like networks.
+.Sh SEE ALSO
+.Xr sysctl 3 ,
+.Xr intro 4 ,
+.Xr ifnet 9
+.\" .Xr ethermib 4 ,
+.Rs
+.%T "Definitions of Managed Objects for the Ethernet-like Interface Types Using SMIv2"
+.%A F. Kastenholz
+.%D August 1994
+.%O RFC 1650
+.Re
+.Sh HISTORY
+The
+.Nm
+interface first appeared in
+.Fx 2.2 .
+.Sh BUGS
+Many Ethernet-like interfaces do not yet support the Ethernet MIB;
+the interfaces known to support it include
+.Xr ed 4
+and
+.Xr de 4 .
+Regardless, all interfaces automatically support the generic MIB.
diff --git a/share/man/man4/igb.4 b/share/man/man4/igb.4
new file mode 100644
index 0000000..5c857c8
--- /dev/null
+++ b/share/man/man4/igb.4
@@ -0,0 +1,228 @@
+.\" Copyright (c) 2001-2003, Intel Corporation
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright notice,
+.\" this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" 3. Neither the name of the Intel Corporation nor the names of its
+.\" contributors may be used to endorse or promote products derived from
+.\" this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" * Other names and brands may be claimed as the property of others.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 25, 2013
+.Dt IGB 4
+.Os
+.Sh NAME
+.Nm igb
+.Nd "Intel(R) PRO/1000 PCI Express Gigabit Ethernet adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device igb"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_igb_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Express Gigabit Ethernet adapters
+based on the Intel 82575 and 82576 Ethernet controller chips.
+The driver supports Transmit/Receive checksum offload and Jumbo
+Frames.
+Furthermore it supports TCP segmentation offload (TSO) on all
+adapters.
+The identification LEDs of the adapters supported by the
+.Nm
+driver can be controlled via the
+.Xr led 4
+API for localization purposes.
+.Pp
+For questions related to hardware requirements, refer to the
+documentation supplied with your Intel PRO/1000 adapter.
+All hardware requirements listed apply to use with
+.Fx .
+.Pp
+Support for Jumbo Frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+The maximum MTU size for Jumbo Frames is 9216.
+.Pp
+This driver supports hardware assisted VLANs.
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enables auto-negotiation for speed and duplex.
+.It Cm 10baseT/UTP
+Sets 10Mbps operation.
+Use the
+.Cm mediaopt
+option to select
+.Cm full-duplex
+mode.
+.It Cm 100baseTX
+Sets 100Mbps operation.
+Use the
+.Cm mediaopt
+option to select
+.Cm full-duplex
+mode.
+.It Cm 1000baseSX
+Sets 1000Mbps operation.
+Only
+.Cm full-duplex
+mode is supported at this speed.
+.It Cm 1000baseTX
+Sets 1000Mbps operation.
+Only
+.Cm full-duplex
+mode is supported at this speed.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Forces full-duplex operation
+.It Cm half-duplex
+Forces half-duplex operation.
+.El
+.Pp
+Only use
+.Cm mediaopt
+to set the driver to
+.Cm full-duplex .
+If
+.Cm mediaopt
+is not specified, the driver defaults to
+.Cm half-duplex .
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Gigabit Ethernet adapters based on the Intel 82575 and
+82576 controller chips:
+.Pp
+.Bl -bullet -compact
+.It
+Intel Gigabit ET Dual Port Server Adapter (82576)
+.It
+Intel Gigabit VT Quad Port Server Adapter (82575)
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va hw.igb.rxd
+Number of receive descriptors allocated by the driver.
+The default value is 1024.
+The minimum is 80, and the maximum is 4096.
+.It Va hw.igb.txd
+Number of transmit descriptors allocated by the driver.
+The default value is 1024.
+The minimum is 80, and the maximum is 4096.
+.It Va hw.igb.enable_aim
+If set to 1, enable Adaptive Interrupt Moderation.
+The default is to enable Adaptive Interrupt Moderation.
+.It Va hw.igb.num_queues
+Number of queues used for data transfer.
+If set to 0, number of queues will be configured
+automatically based on number of CPUs and max
+supported MSI-X messages on the device.
+.It Va kern.ipc.nmbclusters
+The maximum number of mbuf clusters allowed.
+If the system has more than one igb card or jumbo frames are
+enabled, this value will need to be increased.
+.It Va kern.ipc.nmbjumbo9k
+The maximum number of mbuf 9k jumbo clusters allowed.
+Increasing this to allow for at least 8192 extra clusters
+per interface can allow for an mtu of 8192.
+.El
+.Sh FILES
+.Bl -tag -width /dev/led/igb*
+.It Pa /dev/led/igb*
+identification LED device nodes
+.El
+.Sh EXAMPLES
+Make the identification LED of igb0 blink:
+.Pp
+.Dl "echo f2 > /dev/led/igb0"
+.Pp
+Turn the identification LED of igb0 off again:
+.Pp
+.Dl "echo 0 > /dev/led/igb0"
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "igb%d: Unable to allocate bus resource: memory"
+A fatal initialization error has occurred.
+.It "igb%d: Unable to allocate bus resource: interrupt"
+A fatal initialization error has occurred.
+.It "igb%d: watchdog timeout -- resetting"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Sh SUPPORT
+For general information and support,
+go to the Intel support website at:
+.Pa http://support.intel.com .
+.Pp
+If an issue is identified with the released source code on the supported kernel
+with a supported adapter, email the specific information related to the
+issue to
+.Aq freebsd@intel.com .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr em 4 ,
+.Xr led 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 7.1 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Intel Corporation Aq freebsd@intel.com .
diff --git a/share/man/man4/igmp.4 b/share/man/man4/igmp.4
new file mode 100644
index 0000000..696fa7d
--- /dev/null
+++ b/share/man/man4/igmp.4
@@ -0,0 +1,138 @@
+.\"
+.\" Copyright (c) 2009 Bruce Simpson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the project nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 9, 2009
+.Dt IGMP 4
+.Os
+.Sh NAME
+.Nm igmp
+.Nd Internet Group Management Protocol
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In netinet/in.h
+.In netinet/in_systm.h
+.In netinet/ip.h
+.In netinet/igmp.h
+.Ft int
+.Fn socket AF_INET SOCK_RAW IPPROTO_IGMP
+.Sh DESCRIPTION
+.Tn IGMP
+is a control plane protocol used by IPv4 hosts and routers to
+propagate multicast group membership information.
+Normally this protocol is not used directly, except by the kernel
+itself, in response to multicast membership requests by user
+applications.
+Routing protocols may open a raw socket to directly interact with
+.Nm .
+.Pp
+As of
+.Fx 8.0 ,
+IGMP version 3 is implemented.
+This adds support for Source-Specific Multicast (SSM), whereby
+applications may communicate to upstream multicast routers that
+they are only interested in receiving multicast streams from
+particular sources.
+.\"
+.Sh SYSCTL VARIABLES
+.Bl -tag -width indent
+.\"
+.It net.inet.igmp.stats
+This opaque read-only variable exposes the stack-wide IGMPv3
+protocol statistics to
+.Xr netstat 1 .
+.\"
+.It net.inet.igmp.ifinfo
+This opaque read-only variable exposes the per-link IGMPv3 status to
+.Xr ifmcstat 8 .
+.\"
+.It net.inet.igmp.gsrdelay
+This variable specifies the time threshold, in seconds, for processing
+Group-and-Source Specific Queries (GSR).
+As GSR query processing requires maintaining state on the host,
+it may cause memory to be allocated, and is therefore a potential
+attack point for Denial-of-Service (DoS).
+If more than one GSR query is received within this threshold,
+it will be dropped, to mitigate the potential for DoS.
+.\"
+.It net.inet.igmp.default_version
+This variable controls the default version of IGMP to be used on all links.
+This sysctl is normally set to 3 by default.
+.\"
+.It net.inet.igmp.legacysupp
+If this variable is non-zero, then IGMP v1 and v2 membership reports
+received on a link will be allowed to suppress the IGMP v3 state-change
+reports which would otherwise be issued by this host.
+This sysctl is normally enabled by default.
+.\"
+.It net.inet.igmp.v2enable
+If this variable is non-zero, then IGMP v2 membership queries will be
+processed by this host, and backwards compatibility will be enabled
+until the v2 'Old Querier Present' timer expires.
+This sysctl is normally enabled by default.
+.\"
+.It net.inet.igmp.v1enable
+If this variable is non-zero, then IGMP v1 membership queries will be
+processed by this host, and backwards compatibility will be enabled
+until the v1 'Old Querier Present' timer expires.
+This sysctl is normally enabled by default.
+.\"
+.It net.inet.igmp.sendlocal
+If this variable is non-zero, then IGMP state-changes for groups in
+the 224.0.0.0/24 link-scope prefix will be issued.
+This behaviour is recommended if deploying
+.Fx
+in a network environment with layer 2 devices which snoop IGMP traffic
+to mitigate multicast propagation throughout the network.
+This sysctl is normally enabled by default.
+.\"
+.It net.inet.igmp.sendra
+If this variable is non-zero, then IGMP v2 and v3 reports will contain
+the IP Router Alert option.
+This sysctl is normally enabled by default.
+.\"
+.It net.inet.igmp.recvifkludge
+If this variable is non-zero, then received IGMP reports which contain
+0.0.0.0 as their source will be rewritten to contain the subnet address.
+This is useful when there are hosts on-link which have not yet been
+configured with a primary IPv4 address.
+This sysctl is normally enabled by default.
+.\"
+.El
+.Sh SEE ALSO
+.Xr ifmcstat 8 ,
+.Xr inet 4 ,
+.Xr multicast 4 ,
+.Xr netstat 1 ,
+.Xr sourcefilter 3
+.Sh HISTORY
+The
+.Nm
+manual page re-appeared in
+.Fx 8.0 .
diff --git a/share/man/man4/iic.4 b/share/man/man4/iic.4
new file mode 100644
index 0000000..d82f574
--- /dev/null
+++ b/share/man/man4/iic.4
@@ -0,0 +1,201 @@
+.\" Copyright (c) 2006, M. Warner Losh
+.\" Copyright (c) 1998, Nicolas Souchu
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 24, 2014
+.Dt IIC 4
+.Os
+.Sh NAME
+.Nm iic
+.Nd I2C generic I/O device driver
+.Sh SYNOPSIS
+.Cd "device iic"
+.Pp
+.In dev/iicbus/iic.h
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides generic I/O to any
+.Xr iicbus 4
+instance.
+In order to control I2C devices, use
+.Pa /dev/iic?
+with the
+following ioctls:
+.Bl -tag -width ".Dv I2CRPTSTART"
+.It Dv I2CSTART
+.Pq Vt "struct iiccmd"
+Sends the start condition to the slave specified by the
+.Va slave
+element to the bus.
+The
+.Va slave
+element consists of a 7-bit address and a read/write bit
+(i.e., 7-bit address << 1 | r/w).
+If the read/write bit is set a read operation is initiated, if the read/write
+bit is cleared a write operation is initiated.
+All other elements are ignored.
+.It Dv I2CRPTSTART
+.Pq Vt "struct iiccmd"
+Sends the repeated start condition to the slave specified by the
+.Va slave
+element to the bus.
+The slave address should be specified as in
+.Dv I2CSTART .
+All other elements are ignored.
+.It Dv I2CSTOP
+No argument is passed.
+Sends the stop condition to the bus.
+This terminates the current transaction.
+.It Dv I2CRSTCARD
+.Pq Vt "struct iiccmd"
+Resets the bus.
+The argument is completely ignored.
+.It Dv I2CWRITE
+.Pq Vt "struct iiccmd"
+Writes data to the
+.Xr iicbus 4 .
+The bus should already be started.
+The
+.Va slave
+element is ignored.
+The
+.Va count
+element is the number of bytes to write.
+The
+.Va last
+element is a boolean flag.
+It is non-zero when additional write commands will follow.
+The
+.Va buf
+element is a pointer to the data to write to the bus.
+.It Dv I2CREAD
+.Pq Vt "struct iiccmd"
+Reads data from the
+.Xr iicbus 4 .
+The bus should already be started.
+The
+.Va slave
+element is ignored.
+The
+.Va count
+element is the number of bytes to write.
+The
+.Va last
+element is a boolean flag.
+It is non-zero when additional write commands will follow.
+The
+.Va buf
+element is a pointer to where to store the data read from the bus.
+Short reads on the bus produce undefined results.
+.It Dv I2CRDWR
+.Pq Vt "struct iic_rdwr_data"
+Generic read/write interface.
+Allows for an arbitrary number of commands to be sent to
+an arbitrary number of devices on the bus.
+A read transfer is specified if
+.Dv IIC_M_RD
+is set in
+.Va flags .
+Otherwise the transfer is a write transfer.
+The
+.Va slave
+element specifies the 7-bit address with the read/write bit for the transfer.
+The read/write bit will be handled by the iicbus stack based on the specified
+transfer operation.
+The
+.Va len
+element is the number of
+.Pq Vt "struct iic_msg"
+messages encoded on
+.Pq Vt "struct iic_rdwr_data" .
+The
+.Va buf
+element is a buffer for that data.
+This ioctl is intended to be
+.Tn Linux
+compatible.
+.El
+.Pp
+The following data structures are defined in
+.In dev/iicbus/iic.h
+and referenced above:
+.Bd -literal -offset indent
+struct iiccmd {
+ u_char slave;
+ int count;
+ int last;
+ char *buf;
+};
+
+/* Designed to be compatible with linux's struct i2c_msg */
+struct iic_msg
+{
+ uint16_t slave;
+ uint16_t flags;
+#define IIC_M_RD 0x0001 /* read vs write */
+ uint16_t len; /* msg length */
+ uint8_t * buf;
+};
+
+struct iic_rdwr_data {
+ struct iic_msg *msgs;
+ uint32_t nmsgs;
+};
+.Ed
+.Pp
+It is also possible to use read/write routines, then I2C start/stop handshake is
+managed by the
+.Xr iicbus 4
+system.
+However, the address used for the read/write routines is the one
+passed to last
+.Dv I2CSTART
+.Xr ioctl 2
+to this device.
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr read 2 ,
+.Xr write 2 ,
+.Xr iicbus 4
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+.An -nosplit
+This
+manual page was written by
+.An Nicolas Souchu
+and
+.An M. Warner Losh .
+.Sh BUGS
+Only the
+.Dv I2CRDWR
+.Xr ioctl 2
+is thread safe.
+All other interfaces suffer from some kind of race.
diff --git a/share/man/man4/iicbb.4 b/share/man/man4/iicbb.4
new file mode 100644
index 0000000..e048c5d
--- /dev/null
+++ b/share/man/man4/iicbb.4
@@ -0,0 +1,58 @@
+.\" Copyright (c) 1998, Nicolas Souchu
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 25, 1998
+.Dt IICBB 4
+.Os
+.Sh NAME
+.Nm iicbb
+.Nd I2C generic bit-banging driver
+.Sh SYNOPSIS
+.Cd "device iicbb"
+.Pp
+.Cd "device lpbb"
+.Pp
+For one or more iicbus busses:
+.Cd "device iicbus"
+.Sh DESCRIPTION
+The
+.Em iicbb
+driver provides support to any bit-banging interface for the
+.Xr iicbus 4
+system.
+.Sh SEE ALSO
+.Xr iicbus 4 ,
+.Xr lpbb 4 ,
+.Xr ppbus 4
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Nicolas Souchu .
diff --git a/share/man/man4/iicbus.4 b/share/man/man4/iicbus.4
new file mode 100644
index 0000000..4bbc846
--- /dev/null
+++ b/share/man/man4/iicbus.4
@@ -0,0 +1,120 @@
+.\" Copyright (c) 1998, Nicolas Souchu
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 24, 2014
+.Dt IICBUS 4
+.Os
+.Sh NAME
+.Nm iicbus
+.Nd I2C bus system
+.Sh SYNOPSIS
+.Cd "device iicbus"
+.Cd "device iicbb"
+.Pp
+.Cd "device iic"
+.Cd "device ic"
+.Cd "device iicsmb"
+.Sh DESCRIPTION
+The
+.Em iicbus
+system provides a uniform, modular and architecture-independent
+system for the implementation of drivers to control various I2C devices
+and to utilize different I2C controllers.
+.Sh I2C
+I2C is an acronym for Inter Integrated Circuit bus.
+The I2C bus was developed
+in the early 1980's by Philips semiconductors.
+Its purpose was to provide an
+easy way to connect a CPU to peripheral chips in a TV-set.
+.Pp
+The BUS physically consists of 2 active wires and a ground connection.
+The active wires, SDA and SCL, are both bidirectional.
+Where SDA is the
+Serial DAta line and SCL is the Serial CLock line.
+.Pp
+Every component hooked up to the bus has its own unique address whether it
+is a CPU, LCD driver, memory, or complex function chip.
+Each of these chips
+can act as a receiver and/or transmitter depending on its functionality.
+Obviously an LCD driver is only a receiver, while a memory or I/O chip can
+both be transmitter and receiver.
+Furthermore there may be one or
+more BUS MASTERs.
+.Pp
+The BUS MASTER is the chip issuing the commands on the BUS.
+In the I2C protocol
+specification it is stated that the IC that initiates a data transfer on the
+bus is considered the BUS MASTER.
+At that time all the others are regarded to
+as the BUS SLAVEs.
+As mentioned before, the IC bus is a Multi-MASTER BUS.
+This means that more than one IC capable of initiating data transfer can be
+connected to it.
+.Sh DEVICES
+Some I2C device drivers are available:
+.Pp
+.Bl -column "Device drivers" -compact
+.It Em Devices Ta Em Description
+.It Sy iic Ta "general i/o operation"
+.It Sy ic Ta "network IP interface"
+.It Sy iicsmb Ta "I2C to SMB software bridge"
+.El
+.Sh INTERFACES
+The I2C protocol may be implemented by hardware or software.
+Software
+interfaces rely on very simple hardware, usually two lines
+twiddled by 2 registers.
+Hardware interfaces are more intelligent and receive
+8-bit characters they write to the bus according to the I2C protocol.
+.Pp
+I2C interfaces may act on the bus as slave devices, allowing spontaneous
+bidirectional communications, thanks to the multi-master capabilities of the
+I2C protocol.
+.Pp
+Some I2C interfaces are available:
+.Pp
+.Bl -column "Interface drivers" -compact
+.It Em Interface Ta Em Description
+.It Sy pcf Ta "Philips PCF8584 master/slave interface"
+.It Sy iicbb Ta "generic bit-banging master-only driver"
+.It Sy lpbb Ta "parallel port specific bit-banging interface"
+.It Sy bktr Ta "Brooktree848 video chipset, hardware and software master-only interface"
+.El
+.Sh SEE ALSO
+.Xr bktr 4 ,
+.Xr iic 4 ,
+.Xr iicbb 4 ,
+.Xr lpbb 4 ,
+.Xr pcf 4
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Nicolas Souchu .
diff --git a/share/man/man4/iicsmb.4 b/share/man/man4/iicsmb.4
new file mode 100644
index 0000000..4fdf6d4
--- /dev/null
+++ b/share/man/man4/iicsmb.4
@@ -0,0 +1,56 @@
+.\" Copyright (c) 1998, Nicolas Souchu
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 10, 1998
+.Dt IICSMB 4
+.Os
+.Sh NAME
+.Nm iicsmb
+.Nd I2C to SMB bridge
+.Sh SYNOPSIS
+.Cd "device iicsmb"
+.Pp
+For one or more smbus busses:
+.Cd "device smbus"
+.Sh DESCRIPTION
+The
+.Em iicsmb
+driver supports SMB commands over
+.Xr iicbus 4
+for the
+.Xr smbus 4
+system.
+.Sh SEE ALSO
+.Xr smbus 4
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Nicolas Souchu .
diff --git a/share/man/man4/iir.4 b/share/man/man4/iir.4
new file mode 100644
index 0000000..a7608b2
--- /dev/null
+++ b/share/man/man4/iir.4
@@ -0,0 +1,77 @@
+.\" $FreeBSD$
+.\" Written by Tom Rhodes
+.\" This file is in the public domain.
+.\"
+.Dd August 8, 2004
+.Dt IIR 4
+.Os
+.Sh NAME
+.Nm iir
+.Nd Intel Integrated RAID controller and ICP Vortex driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device scbus"
+.Cd "device iir"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+iir_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver claims to interface with the Intel integrated
+RAID controller cards, and all versions of the
+ICP Vortex controllers (including FC).
+.Sh HARDWARE
+Controllers supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Intel RAID Controller SRCMR
+.It
+Intel Server RAID Controller U3-l (SRCU31a)
+.It
+Intel Server RAID Controller U3-1L (SRCU31La)
+.It
+Intel Server RAID Controller U3-2 (SRCU32)
+.It
+All past and future releases of Intel and ICP RAID Controllers.
+.El
+.Pp
+.Bl -bullet -compact
+.It
+Intel RAID Controller SRCU21 (discontinued)
+.It
+Intel RAID Controller SRCU31 (older revision, not compatible)
+.It
+Intel RAID Controller SRCU31L (older revision, not compatible)
+.El
+.Pp
+The SRCU31 and SRCU31L can be updated via a firmware update available
+from Intel.
+.Sh SEE ALSO
+.Xr cam 4 ,
+.Xr pass 4 ,
+.Xr xpt 4 ,
+.Xr camcontrol 8
+.Sh AUTHORS
+The
+.Nm
+driver is supported and maintained by
+.An -nosplit
+.An Achim Leubner Aq Achim_Leubner@adaptec.com .
+.Pp
+This manual page was written by
+.An Tom Rhodes Aq trhodes@FreeBSD.org
+and is based on information supplied by the driver authors and the website of
+.An Mike Smith Aq msmith@FreeBSD.org .
diff --git a/share/man/man4/inet.4 b/share/man/man4/inet.4
new file mode 100644
index 0000000..238cdbd
--- /dev/null
+++ b/share/man/man4/inet.4
@@ -0,0 +1,305 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" From: @(#)inet.4 8.1 (Berkeley) 6/5/93
+.\" $FreeBSD$
+.\"
+.Dd January 26, 2012
+.Dt INET 4
+.Os
+.Sh NAME
+.Nm inet
+.Nd Internet protocol family
+.Sh SYNOPSIS
+.In sys/types.h
+.In netinet/in.h
+.Sh DESCRIPTION
+The Internet protocol family is a collection of protocols
+layered atop the
+.Em Internet Protocol
+.Pq Tn IP
+transport layer, and utilizing the Internet address format.
+The Internet family provides protocol support for the
+.Dv SOCK_STREAM , SOCK_DGRAM ,
+and
+.Dv SOCK_RAW
+socket types; the
+.Dv SOCK_RAW
+interface provides access to the
+.Tn IP
+protocol.
+.Sh ADDRESSING
+Internet addresses are four byte quantities, stored in
+network standard format (on little endian machines, such as the
+.Tn alpha ,
+.Tn amd64 ,
+.Tn i386
+and
+.Tn ia64
+these are word and byte reversed).
+The include file
+.In netinet/in.h
+defines this address
+as a discriminated union.
+.Pp
+Sockets bound to the Internet protocol family utilize
+the following addressing structure,
+.Bd -literal -offset indent
+struct sockaddr_in {
+ uint8_t sin_len;
+ sa_family_t sin_family;
+ in_port_t sin_port;
+ struct in_addr sin_addr;
+ char sin_zero[8];
+};
+.Ed
+.Pp
+Sockets may be created with the local address
+.Dv INADDR_ANY
+to affect
+.Dq wildcard
+matching on incoming messages.
+The address in a
+.Xr connect 2
+or
+.Xr sendto 2
+call may be given as
+.Dv INADDR_ANY
+to mean
+.Dq this host .
+The distinguished address
+.Dv INADDR_BROADCAST
+is allowed as a shorthand for the broadcast address on the primary
+network if the first network configured supports broadcast.
+.Sh PROTOCOLS
+The Internet protocol family is comprised of
+the
+.Tn IP
+network protocol, Internet Control
+Message Protocol
+.Pq Tn ICMP ,
+Internet Group Management Protocol
+.Pq Tn IGMP ,
+Transmission Control
+Protocol
+.Pq Tn TCP ,
+and User Datagram Protocol
+.Pq Tn UDP .
+.Tn TCP
+is used to support the
+.Dv SOCK_STREAM
+abstraction while
+.Tn UDP
+is used to support the
+.Dv SOCK_DGRAM
+abstraction.
+A raw interface to
+.Tn IP
+is available
+by creating an Internet socket of type
+.Dv SOCK_RAW .
+The
+.Tn ICMP
+message protocol is accessible from a raw socket.
+.Pp
+The
+.Nm
+address on an interface consist of the address itself, the
+netmask, either broadcast address in case of a broadcast
+interface or peers address in case of point-to-point interface.
+The following
+.Xr ioctl 2
+commands are provided for a datagram socket in the Internet domain:
+.Pp
+.Bl -tag -width ".Dv SIOCGIFBRDADDR" -offset indent -compact
+.It Dv SIOCAIFADDR
+Add address to an interface.
+The command requires
+.Ft struct in_aliasreq
+as argument.
+.It Dv SIOCDIFADDR
+Delete address from an interface.
+The command requires
+.Ft struct ifreq
+as argument.
+.It Dv SIOCGIFADDR
+.It Dv SIOCGIFBRDADDR
+.It Dv SIOCGIFDSTADDR
+.It Dv SIOCGIFNETMASK
+Return address information from interface. The returned value
+is in
+.Ft struct ifreq .
+This way of address information retrieval is obsoleted, a
+preferred way is to use
+.Xr getifaddrs 3
+API.
+.El
+.Ss MIB Variables
+A number of variables are implemented in the net.inet branch of the
+.Xr sysctl 3
+MIB.
+In addition to the variables supported by the transport protocols
+(for which the respective manual pages may be consulted),
+the following general variables are defined:
+.Bl -tag -width IPCTL_FASTFORWARDING
+.It Dv IPCTL_FORWARDING
+.Pq ip.forwarding
+Boolean: enable/disable forwarding of IP packets.
+Defaults to off.
+.It Dv IPCTL_FASTFORWARDING
+.Pq ip.fastforwarding
+Boolean: enable/disable the use of
+.Tn fast IP forwarding
+code.
+Defaults to off.
+When
+.Tn fast IP forwarding
+is enabled, IP packets are forwarded directly to the appropriate network
+interface with direct processing to completion, which greatly improves
+the throughput.
+All packets for local IP addresses, non-unicast, or with IP options are
+handled by the normal IP input processing path.
+All features of the normal (slow) IP forwarding path are supported
+including firewall (through
+.Xr pfil 9
+hooks) checking, except
+.Xr ipsec 4
+tunnel brokering.
+The
+.Tn IP fastforwarding
+path does not generate ICMP redirect or source quench messages.
+.It Dv IPCTL_SENDREDIRECTS
+.Pq ip.redirect
+Boolean: enable/disable sending of ICMP redirects in response to
+.Tn IP
+packets for which a better, and for the sender directly reachable, route
+and next hop is known.
+Defaults to on.
+.It Dv IPCTL_DEFTTL
+.Pq ip.ttl
+Integer: default time-to-live
+.Pq Dq TTL
+to use for outgoing
+.Tn IP
+packets.
+.It Dv IPCTL_ACCEPTSOURCEROUTE
+.Pq ip.accept_sourceroute
+Boolean: enable/disable accepting of source-routed IP packets (default false).
+.It Dv IPCTL_SOURCEROUTE
+.Pq ip.sourceroute
+Boolean: enable/disable forwarding of source-routed IP packets (default false).
+.It Dv IPCTL_RTEXPIRE
+.Pq ip.rtexpire
+Integer: lifetime in seconds of protocol-cloned
+.Tn IP
+routes after the last reference drops (default one hour).
+This value varies dynamically as described above.
+.It Dv IPCTL_RTMINEXPIRE
+.Pq ip.rtminexpire
+Integer: minimum value of ip.rtexpire (default ten seconds).
+This value has no effect on user modifications, but restricts the dynamic
+adaptation described above.
+.It Dv IPCTL_RTMAXCACHE
+.Pq ip.rtmaxcache
+Integer: trigger level of cached, unreferenced, protocol-cloned routes
+which initiates dynamic adaptation (default 128).
+.It Va ip.process_options
+Integer: control IP options processing.
+By setting this variable to 0, all IP options in the incoming packets
+will be ignored, and the packets will be passed unmodified.
+By setting to 1, IP options in the incoming packets will be processed
+accordingly.
+By setting to 2, an
+.Tn ICMP
+.Dq "prohibited by filter"
+message will be sent back in response to incoming packets with IP options.
+Default is 1.
+This
+.Xr sysctl 8
+variable affects packets destined for a local host as well as packets
+forwarded to some other host.
+.It Va ip.random_id
+Boolean: control IP IDs generation behaviour.
+Setting this
+.Xr sysctl 8
+to non-zero causes the ID field in IP packets to be randomized instead of
+incremented by 1 with each packet generated.
+This closes a minor information leak which allows remote observers to
+determine the rate of packet generation on the machine by watching the
+counter.
+In the same time, on high-speed links, it can decrease the ID reuse
+cycle greatly.
+Default is 0 (sequential IP IDs).
+IPv6 flow IDs and fragment IDs are always random.
+.It Va ip.maxfragpackets
+Integer: maximum number of fragmented packets the host will accept and hold
+in the reassembling queue simultaneously.
+0 means that the host will not accept any fragmented packets.
+\-1 means that the host will accept as many fragmented packets as it receives.
+.It Va ip.maxfragsperpacket
+Integer: maximum number of fragments the host will accept and hold
+in the reassembling queue for a packet.
+0 means that the host will not accept any fragmented packets.
+.El
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr socket 2 ,
+.Xr getifaddrs 3 ,
+.Xr sysctl 3 ,
+.Xr icmp 4 ,
+.Xr intro 4 ,
+.Xr ip 4 ,
+.Xr ipfirewall 4 ,
+.Xr route 4 ,
+.Xr tcp 4 ,
+.Xr udp 4 ,
+.Xr pfil 9
+.Rs
+.%T "An Introductory 4.3 BSD Interprocess Communication Tutorial"
+.%B PS1
+.%N 7
+.Re
+.Rs
+.%T "An Advanced 4.3 BSD Interprocess Communication Tutorial"
+.%B PS1
+.%N 8
+.Re
+.Sh HISTORY
+The
+.Nm
+protocol interface appeared in
+.Bx 4.2 .
+The
+.Dq protocol cloning
+code appeared in
+.Fx 2.1 .
+.Sh CAVEATS
+The Internet protocol support is subject to change as
+the Internet protocols develop.
+Users should not depend
+on details of the current implementation, but rather
+the services exported.
diff --git a/share/man/man4/inet6.4 b/share/man/man4/inet6.4
new file mode 100644
index 0000000..93015e0
--- /dev/null
+++ b/share/man/man4/inet6.4
@@ -0,0 +1,457 @@
+.\" $KAME: inet6.4,v 1.21 2001/04/05 01:00:18 itojun Exp $
+.\"
+.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the project nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 2, 2009
+.Dt INET6 4
+.Os
+.Sh NAME
+.Nm inet6
+.Nd Internet protocol version 6 family
+.Sh SYNOPSIS
+.In sys/types.h
+.In netinet/in.h
+.Sh DESCRIPTION
+The
+.Nm
+family is an updated version of
+.Xr inet 4
+family.
+While
+.Xr inet 4
+implements Internet Protocol version 4,
+.Nm
+implements Internet Protocol version 6.
+.Pp
+.Nm
+is a collection of protocols layered atop the
+.Em Internet Protocol version 6
+.Pq Tn IPv6
+transport layer, and utilizing the IPv6 address format.
+The
+.Nm
+family provides protocol support for the
+.Dv SOCK_STREAM , SOCK_DGRAM ,
+and
+.Dv SOCK_RAW
+socket types; the
+.Dv SOCK_RAW
+interface provides access to the
+.Tn IPv6
+protocol.
+.Sh ADDRESSING
+IPv6 addresses are 16 byte quantities, stored in network standard byteorder.
+The include file
+.In netinet/in.h
+defines this address
+as a discriminated union.
+.Pp
+Sockets bound to the
+.Nm
+family utilize the following addressing structure:
+.Bd -literal -offset indent
+struct sockaddr_in6 {
+ uint8_t sin6_len;
+ sa_family_t sin6_family;
+ in_port_t sin6_port;
+ uint32_t sin6_flowinfo;
+ struct in6_addr sin6_addr;
+ uint32_t sin6_scope_id;
+};
+.Ed
+.Pp
+Sockets may be created with the local address
+.Dq Dv ::
+(which is equal to IPv6 address
+.Dv 0:0:0:0:0:0:0:0 )
+to affect
+.Dq wildcard
+matching on incoming messages.
+.Pp
+The IPv6 specification defines scoped addresses,
+like link-local or site-local addresses.
+A scoped address is ambiguous to the kernel,
+if it is specified without a scope identifier.
+To manipulate scoped addresses properly from the userland,
+programs must use the advanced API defined in RFC2292.
+A compact description of the advanced API is available in
+.Xr ip6 4 .
+If a scoped address is specified without an explicit scope,
+the kernel may raise an error.
+Note that scoped addresses are not for daily use at this moment,
+both from a specification and an implementation point of view.
+.Pp
+The KAME implementation supports an extended numeric IPv6 address notation
+for link-local addresses,
+like
+.Dq Li fe80::1%de0
+to specify
+.Do
+.Li fe80::1
+on
+.Li de0
+interface
+.Dc .
+This notation is supported by
+.Xr getaddrinfo 3
+and
+.Xr getnameinfo 3 .
+Some of normal userland programs, such as
+.Xr telnet 1
+or
+.Xr ftp 1 ,
+are able to use this notation.
+With special programs
+like
+.Xr ping6 8 ,
+you can specify the outgoing interface by an extra command line option
+to disambiguate scoped addresses.
+.Pp
+Scoped addresses are handled specially in the kernel.
+In kernel structures like routing tables or interface structures,
+a scoped address will have its interface index embedded into the address.
+Therefore,
+the address in some kernel structures is not the same as that on the wire.
+The embedded index will become visible through a
+.Dv PF_ROUTE
+socket, kernel memory accesses via
+.Xr kvm 3
+and on some other occasions.
+HOWEVER, users should never use the embedded form.
+For details please consult
+.Pa IMPLEMENTATION
+supplied with KAME kit.
+.Sh PROTOCOLS
+The
+.Nm
+family is comprised of the
+.Tn IPv6
+network protocol, Internet Control
+Message Protocol version 6
+.Pq Tn ICMPv6 ,
+Transmission Control Protocol
+.Pq Tn TCP ,
+and User Datagram Protocol
+.Pq Tn UDP .
+.Tn TCP
+is used to support the
+.Dv SOCK_STREAM
+abstraction while
+.Tn UDP
+is used to support the
+.Dv SOCK_DGRAM
+abstraction.
+Note that
+.Tn TCP
+and
+.Tn UDP
+are common to
+.Xr inet 4
+and
+.Nm .
+A raw interface to
+.Tn IPv6
+is available
+by creating an Internet socket of type
+.Dv SOCK_RAW .
+The
+.Tn ICMPv6
+message protocol is accessible from a raw socket.
+.Ss MIB Variables
+A number of variables are implemented in the net.inet6 branch of the
+.Xr sysctl 3
+MIB.
+In addition to the variables supported by the transport protocols
+(for which the respective manual pages may be consulted),
+the following general variables are defined:
+.Bl -tag -width IPV6CTL_MAXFRAGPACKETS
+.It Dv IPV6CTL_FORWARDING
+.Pq ip6.forwarding
+Boolean: enable/disable forwarding of
+.Tn IPv6
+packets.
+Also, identify if the node is acting as a router.
+Defaults to off.
+.It Dv IPV6CTL_SENDREDIRECTS
+.Pq ip6.redirect
+Boolean: enable/disable sending of
+.Tn ICMPv6
+redirects in response to unforwardable
+.Tn IPv6
+packets.
+This option is ignored unless the node is routing
+.Tn IPv6
+packets,
+and should normally be enabled on all systems.
+Defaults to on.
+.It Dv IPV6CTL_DEFHLIM
+.Pq ip6.hlim
+Integer: default hop limit value to use for outgoing
+.Tn IPv6
+packets.
+This value applies to all the transport protocols on top of
+.Tn IPv6 .
+There are APIs to override the value.
+.It Dv IPV6CTL_MAXFRAGPACKETS
+.Pq ip6.maxfragpackets
+Integer: default maximum number of fragmented packets the node will accept.
+0 means that the node will not accept any fragmented packets.
+-1 means that the node will accept as many fragmented packets as it receives.
+The flag is provided basically for avoiding possible DoS attacks.
+.It Dv IPV6CTL_ACCEPT_RTADV
+.Pq ip6.accept_rtadv
+Boolean: the default value of a per-interface flag to
+enable/disable receiving of
+.Tn ICMPv6
+router advertisement packets,
+and autoconfiguration of address prefixes and default routers.
+The node must be a host
+(not a router)
+for the option to be meaningful.
+Defaults to off.
+.It Dv IPV6CTL_AUTO_LINKLOCAL
+.Pq ip6.auto_linklocal
+Boolean: the default value of a per-interface flag to
+enable/disable performing automatic link-local address configuration.
+Defaults to on.
+.It Dv IPV6CTL_KEEPFAITH
+.Pq ip6.keepfaith
+Boolean: enable/disable
+.Dq FAITH
+TCP relay IPv6-to-IPv4 translator code in the kernel.
+Refer
+.Xr faith 4
+and
+.Xr faithd 8
+for detail.
+Defaults to off.
+.It Dv IPV6CTL_LOG_INTERVAL
+.Pq ip6.log_interval
+Integer: default interval between
+.Tn IPv6
+packet forwarding engine log output
+(in seconds).
+.It Dv IPV6CTL_HDRNESTLIMIT
+.Pq ip6.hdrnestlimit
+Integer: default number of the maximum
+.Tn IPv6
+extension headers
+permitted on incoming
+.Tn IPv6
+packets.
+If set to 0, the node will accept as many extension headers as possible.
+.It Dv IPV6CTL_DAD_COUNT
+.Pq ip6.dad_count
+Integer: default number of
+.Tn IPv6
+DAD
+.Pq duplicated address detection
+probe packets.
+The packets will be generated when
+.Tn IPv6
+interface addresses are configured.
+.It Dv IPV6CTL_AUTO_FLOWLABEL
+.Pq ip6.auto_flowlabel
+Boolean: enable/disable automatic filling of
+.Tn IPv6
+flowlabel field, for outstanding connected transport protocol packets.
+The field might be used by intermediate routers to identify packet flows.
+Defaults to on.
+.It Dv IPV6CTL_DEFMCASTHLIM
+.Pq ip6.defmcasthlim
+Integer: default hop limit value for an
+.Tn IPv6
+multicast packet sourced by the node.
+This value applies to all the transport protocols on top of
+.Tn IPv6 .
+There are APIs to override the value as documented in
+.Xr ip6 4 .
+.It Dv IPV6CTL_GIF_HLIM
+.Pq ip6.gifhlim
+Integer: default maximum hop limit value for an
+.Tn IPv6
+packet generated by
+.Xr gif 4
+tunnel interface.
+.It Dv IPV6CTL_KAME_VERSION
+.Pq ip6.kame_version
+String: identifies the version of KAME
+.Tn IPv6
+stack implemented in the kernel.
+.It Dv IPV6CTL_USE_DEPRECATED
+.Pq ip6.use_deprecated
+Boolean: enable/disable use of deprecated address,
+specified in RFC2462 5.5.4.
+Defaults to on.
+.It Dv IPV6CTL_RR_PRUNE
+.Pq ip6.rr_prune
+Integer: default interval between
+.Tn IPv6
+router renumbering prefix babysitting, in seconds.
+.It Dv IPV6CTL_V6ONLY
+.Pq ip6.v6only
+Boolean: enable/disable the prohibited use of
+.Tn IPv4
+mapped address on
+.Dv AF_INET6
+sockets.
+Defaults to on.
+.It Dv IPV6CTL_RTEXPIRE
+.Pq ip6.rtexpire
+Integer: lifetime in seconds of protocol-cloned
+.Tn IP
+routes after the last reference drops (default one hour).
+.\"This value varies dynamically as described above.
+.It Dv IPV6CTL_RTMINEXPIRE
+.Pq ip6.rtminexpire
+Integer: minimum value of ip.rtexpire (default ten seconds).
+.\"This value has no effect on user modifications, but restricts the dynamic
+.\"adaptation described above.
+.It Dv IPV6CTL_RTMAXCACHE
+.Pq ip6.rtmaxcache
+Integer: trigger level of cached, unreferenced, protocol-cloned routes
+which initiates dynamic adaptation (default 128).
+.El
+.Ss Interaction between IPv4/v6 sockets
+By default,
+.Fx
+does not route IPv4 traffic to
+.Dv AF_INET6
+sockets.
+The default behavior intentionally violates RFC2553 for security reasons.
+Listen to two sockets if you want to accept both IPv4 and IPv6 traffic.
+IPv4 traffic may be routed with certain
+per-socket/per-node configuration, however, it is not recommended to do so.
+Consult
+.Xr ip6 4
+for details.
+.Pp
+The behavior of
+.Dv AF_INET6
+TCP/UDP socket is documented in RFC2553.
+Basically, it says this:
+.Bl -bullet -compact
+.It
+A specific bind on an
+.Dv AF_INET6
+socket
+.Xr ( bind 2
+with an address specified)
+should accept IPv6 traffic to that address only.
+.It
+If you perform a wildcard bind
+on an
+.Dv AF_INET6
+socket
+.Xr ( bind 2
+to IPv6 address
+.Li :: ) ,
+and there is no wildcard bind
+.Dv AF_INET
+socket on that TCP/UDP port, IPv6 traffic as well as IPv4 traffic
+should be routed to that
+.Dv AF_INET6
+socket.
+IPv4 traffic should be seen as if it came from an IPv6 address like
+.Li ::ffff:10.1.1.1 .
+This is called an IPv4 mapped address.
+.It
+If there are both a wildcard bind
+.Dv AF_INET
+socket and a wildcard bind
+.Dv AF_INET6
+socket on one TCP/UDP port, they should behave separately.
+IPv4 traffic should be routed to the
+.Dv AF_INET
+socket and IPv6 should be routed to the
+.Dv AF_INET6
+socket.
+.El
+.Pp
+However, RFC2553 does not define the ordering constraint between calls to
+.Xr bind 2 ,
+nor how IPv4 TCP/UDP port numbers and IPv6 TCP/UDP port numbers
+relate to each other
+(should they be integrated or separated).
+Implemented behavior is very different from kernel to kernel.
+Therefore, it is unwise to rely too much upon the behavior of
+.Dv AF_INET6
+wildcard bind sockets.
+It is recommended to listen to two sockets, one for
+.Dv AF_INET
+and another for
+.Dv AF_INET6 ,
+when you would like to accept both IPv4 and IPv6 traffic.
+.Pp
+It should also be noted that
+malicious parties can take advantage of the complexity presented above,
+and are able to bypass access control,
+if the target node routes IPv4 traffic to
+.Dv AF_INET6
+socket.
+Users are advised to take care handling connections
+from IPv4 mapped address to
+.Dv AF_INET6
+sockets.
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr socket 2 ,
+.Xr sysctl 3 ,
+.Xr icmp6 4 ,
+.Xr intro 4 ,
+.Xr ip6 4 ,
+.Xr tcp 4 ,
+.Xr udp 4
+.Sh STANDARDS
+.Rs
+.%A Tatsuya Jinmei
+.%A Atsushi Onoe
+.%T "An Extension of Format for IPv6 Scoped Addresses"
+.%R internet draft
+.%D June 2000
+.%N draft-ietf-ipngwg-scopedaddr-format-02.txt
+.%O work in progress material
+.Re
+.Sh HISTORY
+The
+.Nm
+protocol interfaces are defined in RFC2553 and RFC2292.
+The implementation described herein appeared in the WIDE/KAME project.
+.Sh BUGS
+The IPv6 support is subject to change as the Internet protocols develop.
+Users should not depend on details of the current implementation,
+but rather the services exported.
+.Pp
+Users are suggested to implement
+.Dq version independent
+code as much as possible, as you will need to support both
+.Xr inet 4
+and
+.Nm .
diff --git a/share/man/man4/intpm.4 b/share/man/man4/intpm.4
new file mode 100644
index 0000000..5e015a8
--- /dev/null
+++ b/share/man/man4/intpm.4
@@ -0,0 +1,63 @@
+.\" Copyright (c) 1999 Takanori Watanabe
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 8, 1999
+.Dt INTPM 4
+.Os
+.Sh NAME
+.Nm intpm
+.Nd Intel PIIX4 Power Management controller driver
+.Sh SYNOPSIS
+.Cd device smbus
+.Cd device smb
+.Cd device intpm
+.Sh DESCRIPTION
+This driver provides access to
+.Tn Intel PIIX4 PCI Controller function 3 ,
+Power management controller.
+Currently, only smbus controller
+function is implemented.
+But it also have bus idle monitoring function.
+It
+will display mapped I/O address for bus monitoring function when attaching.
+.Sh SEE ALSO
+.Xr smb 4 ,
+.Xr smbus 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 3.4 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Takanori Watanabe Aq takawata@shidahara1.planet.sci.kobe-u.ac.jp .
+.Sh BUGS
+This device requires IRQ 9 exclusively.
+To use this, you should enable
+ACPI function in BIOS configuration, or PnP mechanism assigns conflicted
+IRQ for PnP ISA card.
+And do not use IRQ 9 for Non-PnP ISA cards.
diff --git a/share/man/man4/intro.4 b/share/man/man4/intro.4
new file mode 100644
index 0000000..93a9ab5
--- /dev/null
+++ b/share/man/man4/intro.4
@@ -0,0 +1,178 @@
+.\"
+.\" Copyright (c) 1996 David E. O'Brien, Joerg Wunsch
+.\"
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 20, 1996
+.Dt INTRO 4
+.Os
+.Sh NAME
+.Nm intro
+.Nd introduction to devices and device drivers
+.Sh DESCRIPTION
+This section contains information related to devices, device drivers
+and miscellaneous hardware.
+.Ss The device abstraction
+Device is a term used mostly for hardware-related stuff that belongs
+to the system, like disks, printers, or a graphics display with its
+keyboard.
+There are also so-called
+.Em pseudo-devices
+where a device driver emulates the behaviour of a device in software
+without any particular underlying hardware.
+A typical example for
+the latter class is
+.Pa /dev/mem ,
+a loophole where the physical memory can be accessed using the regular
+file access semantics.
+.Pp
+The device abstraction generally provides a common set of system calls
+layered on top of them, which are dispatched to the corresponding
+device driver by the upper layers of the kernel.
+The set of system
+calls available for devices is chosen from
+.Xr open 2 ,
+.Xr close 2 ,
+.Xr read 2 ,
+.Xr write 2 ,
+.Xr ioctl 2 ,
+.Xr select 2 ,
+and
+.Xr mmap 2 .
+Not all drivers implement all system calls, for example, calling
+.Xr mmap 2
+on terminal devices is likely to be not useful at all.
+.Ss Accessing Devices
+Most of the devices in a
+.Ux Ns
+-like operating system are accessed
+through so-called
+.Em device nodes ,
+sometimes also called
+.Em special files .
+They are usually located under the directory
+.Pa /dev
+in the file system hierarchy
+(see also
+.Xr hier 7 ) .
+.Pp
+Note that this could lead to an inconsistent state, where either there
+are device nodes that do not have a configured driver associated with
+them, or there may be drivers that have successfully probed for their
+devices, but cannot be accessed since the corresponding device node is
+still missing.
+In the first case, any attempt to reference the device
+through the device node will result in an error, returned by the upper
+layers of the kernel, usually
+.Er ENXIO .
+In the second case, the device node needs to be created before the
+driver and its device will be usable.
+.Pp
+Some devices come in two flavors:
+.Em block
+and
+.Em character
+devices, or to use better terms, buffered and unbuffered
+(raw)
+devices.
+The traditional names are reflected by the letters
+.Ql b
+and
+.Ql c
+as the file type identification in the output of
+.Ql ls -l .
+Buffered devices are being accessed through the buffer cache of the
+operating system, and they are solely intended to layer a file system
+on top of them.
+They are normally implemented for disks and disk-like
+devices only and, for historical reasons, for tape devices.
+.Pp
+Raw devices are available for all drivers, including those that also
+implement a buffered device.
+For the latter group of devices, the
+differentiation is conventionally done by prepending the letter
+.Ql r
+to the path name of the device node, for example
+.Pa /dev/rda0
+denotes the raw device for the first SCSI disk, while
+.Pa /dev/da0
+is the corresponding device node for the buffered device.
+.Pp
+Unbuffered devices should be used for all actions that are not related
+to file system operations, even if the device in question is a disk
+device.
+This includes making backups of entire disk partitions, or
+to
+.Em raw
+floppy disks
+(i.e., those used like tapes).
+.Pp
+Access restrictions to device nodes are usually subject to the regular
+file permissions of the device node entry, instead of being enforced
+directly by the drivers in the kernel.
+.Ss Drivers without device nodes
+Drivers for network devices do not use device nodes in order to be
+accessed.
+Their selection is based on other decisions inside the
+kernel, and instead of calling
+.Xr open 2 ,
+use of a network device is generally introduced by using the system
+call
+.Xr socket 2 .
+.Ss Configuring a driver into the kernel
+For each kernel, there is a configuration file that is used as a base
+to select the facilities and drivers for that kernel, and to tune
+several options.
+See
+.Xr config 8
+for a detailed description of the files involved.
+The individual manual pages in this section provide a sample line for the
+configuration file in their synopsis portion.
+See also the sample config file
+.Pa /sys/i386/conf/LINT
+(for the
+.Em i386
+architecture).
+.Sh SEE ALSO
+.Xr close 2 ,
+.Xr ioctl 2 ,
+.Xr mmap 2 ,
+.Xr open 2 ,
+.Xr read 2 ,
+.Xr select 2 ,
+.Xr socket 2 ,
+.Xr write 2 ,
+.Xr devfs 5 ,
+.Xr hier 7 ,
+.Xr config 8
+.Sh HISTORY
+This manual page first appeared in
+.Fx 2.1 .
+.Sh AUTHORS
+.An -nosplit
+This man page has been written by
+.An J\(:org Wunsch
+with initial input by
+.An David E. O'Brien .
diff --git a/share/man/man4/io.4 b/share/man/man4/io.4
new file mode 100644
index 0000000..fa1c3f1
--- /dev/null
+++ b/share/man/man4/io.4
@@ -0,0 +1,130 @@
+.\"
+.\" Copyright (c) 1996 Joerg Wunsch
+.\"
+.\" All rights reserved.
+.\"
+.\" This program is free software.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 1, 2010
+.Dt IO 4
+.Os
+.Sh NAME
+.Nm io
+.Nd I/O privilege file
+.Sh SYNOPSIS
+.Cd "device io"
+.Pp
+.In sys/types.h
+.In sys/ioctl.h
+.In dev/io/iodev.h
+.In machine/iodev.h
+.Bd -literal
+struct iodev_pio_req {
+ u_int access;
+ u_int port;
+ u_int width;
+ u_int val;
+};
+.Ed
+.Sh DESCRIPTION
+The special file
+.Pa /dev/io
+is a controlled security hole that allows a process to gain I/O
+privileges
+(which are normally reserved for kernel-internal code).
+This can be useful in order to write userland
+programs that handle some hardware directly.
+.Pp
+The usual operations on the device are to open it via the
+.Xr open 2
+interface and to send I/O requests to the file descriptor using the
+.Xr ioctl 2
+syscall.
+.Pp
+The
+.Xr ioctl 2
+requests available for
+.Pa /dev/io
+are mostly platform dependent, but there are also some in common between
+all of them.
+The
+.Dv IODEV_PIO
+is used by all the architectures in order to request that an I/O operation
+be performed.
+It takes a 'struct iodev_pio_req' argument that must be previously setup.
+.Pp
+The
+.Fa access
+member specifies the type of operation requested.
+It may be:
+.Bl -tag -width IODEV_PIO_WRITE
+.It Dv IODEV_PIO_READ
+The operation is an "in" type.
+A value will be read from the specified port
+(retrieved from the
+.Fa port
+member) and the result will be stored in the
+.Fa val
+member.
+.It Dv IODEV_PIO_WRITE
+The operation is a "out" type.
+The value will be fetched from the
+.Fa val
+member and will be written out to the specified port (defined as the
+.Fa port
+member).
+.El
+.Pp
+Finally, the
+.Fa width
+member specifies the size of the operand to be read/written, expressed
+in bytes.
+.Pp
+In addition to any file access permissions on
+.Pa /dev/io ,
+the kernel enforces that only the super-user may open this device.
+.Sh LEGACY
+The
+.Pa /dev/io
+interface used to be very i386 specific and worked differently.
+The initial implementation simply raised the
+.Em IOPL
+of the current thread when
+.Xr open 2
+was called on the device.
+This behaviour is retained in the current implementation as legacy
+support for both i386 and amd64 architectures.
+.Sh SEE ALSO
+.Xr close 2 ,
+.Xr i386_get_ioperm 2 ,
+.Xr i386_set_ioperm 2 ,
+.Xr ioctl 2 ,
+.Xr open 2 ,
+.Xr mem 4
+.Sh HISTORY
+The
+.Nm
+file appeared in
+.Fx 1.0 .
diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4
new file mode 100644
index 0000000..b95a350
--- /dev/null
+++ b/share/man/man4/ip.4
@@ -0,0 +1,893 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)ip.4 8.2 (Berkeley) 11/30/93
+.\" $FreeBSD$
+.\"
+.Dd October 12, 2012
+.Dt IP 4
+.Os
+.Sh NAME
+.Nm ip
+.Nd Internet Protocol
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In netinet/in.h
+.Ft int
+.Fn socket AF_INET SOCK_RAW proto
+.Sh DESCRIPTION
+.Tn IP
+is the transport layer protocol used
+by the Internet protocol family.
+Options may be set at the
+.Tn IP
+level
+when using higher-level protocols that are based on
+.Tn IP
+(such as
+.Tn TCP
+and
+.Tn UDP ) .
+It may also be accessed
+through a
+.Dq raw socket
+when developing new protocols, or
+special-purpose applications.
+.Pp
+There are several
+.Tn IP-level
+.Xr setsockopt 2
+and
+.Xr getsockopt 2
+options.
+.Dv IP_OPTIONS
+may be used to provide
+.Tn IP
+options to be transmitted in the
+.Tn IP
+header of each outgoing packet
+or to examine the header options on incoming packets.
+.Tn IP
+options may be used with any socket type in the Internet family.
+The format of
+.Tn IP
+options to be sent is that specified by the
+.Tn IP
+protocol specification (RFC-791), with one exception:
+the list of addresses for Source Route options must include the first-hop
+gateway at the beginning of the list of gateways.
+The first-hop gateway address will be extracted from the option list
+and the size adjusted accordingly before use.
+To disable previously specified options,
+use a zero-length buffer:
+.Bd -literal
+setsockopt(s, IPPROTO_IP, IP_OPTIONS, NULL, 0);
+.Ed
+.Pp
+.Dv IP_TOS
+and
+.Dv IP_TTL
+may be used to set the type-of-service and time-to-live
+fields in the
+.Tn IP
+header for
+.Dv SOCK_STREAM , SOCK_DGRAM ,
+and certain types of
+.Dv SOCK_RAW
+sockets.
+For example,
+.Bd -literal
+int tos = IPTOS_LOWDELAY; /* see <netinet/ip.h> */
+setsockopt(s, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));
+
+int ttl = 60; /* max = 255 */
+setsockopt(s, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl));
+.Ed
+.Pp
+.Dv IP_MINTTL
+may be used to set the minimum acceptable TTL a packet must have when
+received on a socket.
+All packets with a lower TTL are silently dropped.
+This option is only really useful when set to 255, preventing packets
+from outside the directly connected networks reaching local listeners
+on sockets.
+.Pp
+.Dv IP_DONTFRAG
+may be used to set the Don't Fragment flag on IP packets.
+Currently this option is respected only on
+.Xr udp 4
+and raw
+.Xr ip 4
+sockets, unless the
+.Dv IP_HDRINCL
+option has been set.
+On
+.Xr tcp 4
+sockets, the Don't Fragment flag is controlled by the Path
+MTU Discovery option.
+Sending a packet larger than the MTU size of the egress interface,
+determined by the destination address, returns an
+.Er EMSGSIZE
+error.
+.Pp
+If the
+.Dv IP_RECVDSTADDR
+option is enabled on a
+.Dv SOCK_DGRAM
+socket,
+the
+.Xr recvmsg 2
+call will return the destination
+.Tn IP
+address for a
+.Tn UDP
+datagram.
+The
+.Vt msg_control
+field in the
+.Vt msghdr
+structure points to a buffer
+that contains a
+.Vt cmsghdr
+structure followed by the
+.Tn IP
+address.
+The
+.Vt cmsghdr
+fields have the following values:
+.Bd -literal
+cmsg_len = CMSG_LEN(sizeof(struct in_addr))
+cmsg_level = IPPROTO_IP
+cmsg_type = IP_RECVDSTADDR
+.Ed
+.Pp
+The source address to be used for outgoing
+.Tn UDP
+datagrams on a socket can be specified as ancillary data with a type code of
+.Dv IP_SENDSRCADDR .
+The msg_control field in the msghdr structure should point to a buffer
+that contains a
+.Vt cmsghdr
+structure followed by the
+.Tn IP
+address.
+The cmsghdr fields should have the following values:
+.Bd -literal
+cmsg_len = CMSG_LEN(sizeof(struct in_addr))
+cmsg_level = IPPROTO_IP
+cmsg_type = IP_SENDSRCADDR
+.Ed
+.Pp
+The socket should be either bound to
+.Dv INADDR_ANY
+and a local port, and the address supplied with
+.Dv IP_SENDSRCADDR
+should't be
+.Dv INADDR_ANY ,
+or the socket should be bound to a local address and the address supplied with
+.Dv IP_SENDSRCADDR
+should be
+.Dv INADDR_ANY .
+In the latter case bound address is overriden via generic source address
+selection logic, which would choose IP address of interface closest to
+destination.
+.Pp
+For convenience,
+.Dv IP_SENDSRCADDR
+is defined to have the same value as
+.Dv IP_RECVDSTADDR ,
+so the
+.Dv IP_RECVDSTADDR
+control message from
+.Xr recvmsg 2
+can be used directly as a control message for
+.Xr sendmsg 2 .
+.\"
+.Pp
+If the
+.Dv IP_ONESBCAST
+option is enabled on a
+.Dv SOCK_DGRAM
+or a
+.Dv SOCK_RAW
+socket, the destination address of outgoing
+broadcast datagrams on that socket will be forced
+to the undirected broadcast address,
+.Dv INADDR_BROADCAST ,
+before transmission.
+This is in contrast to the default behavior of the
+system, which is to transmit undirected broadcasts
+via the first network interface with the
+.Dv IFF_BROADCAST
+flag set.
+.Pp
+This option allows applications to choose which
+interface is used to transmit an undirected broadcast
+datagram.
+For example, the following code would force an
+undirected broadcast to be transmitted via the interface
+configured with the broadcast address 192.168.2.255:
+.Bd -literal
+char msg[512];
+struct sockaddr_in sin;
+int onesbcast = 1; /* 0 = disable (default), 1 = enable */
+
+setsockopt(s, IPPROTO_IP, IP_ONESBCAST, &onesbcast, sizeof(onesbcast));
+sin.sin_addr.s_addr = inet_addr("192.168.2.255");
+sin.sin_port = htons(1234);
+sendto(s, msg, sizeof(msg), 0, &sin, sizeof(sin));
+.Ed
+.Pp
+It is the application's responsibility to set the
+.Dv IP_TTL
+option
+to an appropriate value in order to prevent broadcast storms.
+The application must have sufficient credentials to set the
+.Dv SO_BROADCAST
+socket level option, otherwise the
+.Dv IP_ONESBCAST
+option has no effect.
+.Pp
+If the
+.Dv IP_BINDANY
+option is enabled on a
+.Dv SOCK_STREAM ,
+.Dv SOCK_DGRAM
+or a
+.Dv SOCK_RAW
+socket, one can
+.Xr bind 2
+to any address, even one not bound to any available network interface in the
+system.
+This functionality (in conjunction with special firewall rules) can be used for
+implementing a transparent proxy.
+The
+.Dv PRIV_NETINET_BINDANY
+privilege is needed to set this option.
+.Pp
+If the
+.Dv IP_RECVTTL
+option is enabled on a
+.Dv SOCK_DGRAM
+socket, the
+.Xr recvmsg 2
+call will return the
+.Tn IP
+.Tn TTL
+(time to live) field for a
+.Tn UDP
+datagram.
+The msg_control field in the msghdr structure points to a buffer
+that contains a cmsghdr structure followed by the
+.Tn TTL .
+The cmsghdr fields have the following values:
+.Bd -literal
+cmsg_len = CMSG_LEN(sizeof(u_char))
+cmsg_level = IPPROTO_IP
+cmsg_type = IP_RECVTTL
+.Ed
+.\"
+.Pp
+If the
+.Dv IP_RECVTOS
+option is enabled on a
+.Dv SOCK_DGRAM
+socket, the
+.Xr recvmsg 2
+call will return the
+.Tn IP
+.Tn TOS
+(type of service) field for a
+.Tn UDP
+datagram.
+The msg_control field in the msghdr structure points to a buffer
+that contains a cmsghdr structure followed by the
+.Tn TOS .
+The cmsghdr fields have the following values:
+.Bd -literal
+cmsg_len = CMSG_LEN(sizeof(u_char))
+cmsg_level = IPPROTO_IP
+cmsg_type = IP_RECVTOS
+.Ed
+.\"
+.Pp
+If the
+.Dv IP_RECVIF
+option is enabled on a
+.Dv SOCK_DGRAM
+socket, the
+.Xr recvmsg 2
+call returns a
+.Vt "struct sockaddr_dl"
+corresponding to the interface on which the
+packet was received.
+The
+.Va msg_control
+field in the
+.Vt msghdr
+structure points to a buffer that contains a
+.Vt cmsghdr
+structure followed by the
+.Vt "struct sockaddr_dl" .
+The
+.Vt cmsghdr
+fields have the following values:
+.Bd -literal
+cmsg_len = CMSG_LEN(sizeof(struct sockaddr_dl))
+cmsg_level = IPPROTO_IP
+cmsg_type = IP_RECVIF
+.Ed
+.Pp
+.Dv IP_PORTRANGE
+may be used to set the port range used for selecting a local port number
+on a socket with an unspecified (zero) port number.
+It has the following
+possible values:
+.Bl -tag -width IP_PORTRANGE_DEFAULT
+.It Dv IP_PORTRANGE_DEFAULT
+use the default range of values, normally
+.Dv IPPORT_HIFIRSTAUTO
+through
+.Dv IPPORT_HILASTAUTO .
+This is adjustable through the sysctl setting:
+.Va net.inet.ip.portrange.first
+and
+.Va net.inet.ip.portrange.last .
+.It Dv IP_PORTRANGE_HIGH
+use a high range of values, normally
+.Dv IPPORT_HIFIRSTAUTO
+and
+.Dv IPPORT_HILASTAUTO .
+This is adjustable through the sysctl setting:
+.Va net.inet.ip.portrange.hifirst
+and
+.Va net.inet.ip.portrange.hilast .
+.It Dv IP_PORTRANGE_LOW
+use a low range of ports, which are normally restricted to
+privileged processes on
+.Ux
+systems.
+The range is normally from
+.Dv IPPORT_RESERVED
+\- 1 down to
+.Li IPPORT_RESERVEDSTART
+in descending order.
+This is adjustable through the sysctl setting:
+.Va net.inet.ip.portrange.lowfirst
+and
+.Va net.inet.ip.portrange.lowlast .
+.El
+.Pp
+The range of privileged ports which only may be opened by
+root-owned processes may be modified by the
+.Va net.inet.ip.portrange.reservedlow
+and
+.Va net.inet.ip.portrange.reservedhigh
+sysctl settings.
+The values default to the traditional range,
+0 through
+.Dv IPPORT_RESERVED
+\- 1
+(0 through 1023), respectively.
+Note that these settings do not affect and are not accounted for in the
+use or calculation of the other
+.Va net.inet.ip.portrange
+values above.
+Changing these values departs from
+.Ux
+tradition and has security
+consequences that the administrator should carefully evaluate before
+modifying these settings.
+.Pp
+Ports are allocated at random within the specified port range in order
+to increase the difficulty of random spoofing attacks.
+In scenarios such as benchmarking, this behavior may be undesirable.
+In these cases,
+.Va net.inet.ip.portrange.randomized
+can be used to toggle randomization off.
+If more than
+.Va net.inet.ip.portrange.randomcps
+ports have been allocated in the last second, then return to sequential
+port allocation.
+Return to random allocation only once the current port allocation rate
+drops below
+.Va net.inet.ip.portrange.randomcps
+for at least
+.Va net.inet.ip.portrange.randomtime
+seconds.
+The default values for
+.Va net.inet.ip.portrange.randomcps
+and
+.Va net.inet.ip.portrange.randomtime
+are 10 port allocations per second and 45 seconds correspondingly.
+.Ss "Multicast Options"
+.Tn IP
+multicasting is supported only on
+.Dv AF_INET
+sockets of type
+.Dv SOCK_DGRAM
+and
+.Dv SOCK_RAW ,
+and only on networks where the interface
+driver supports multicasting.
+.Pp
+The
+.Dv IP_MULTICAST_TTL
+option changes the time-to-live (TTL)
+for outgoing multicast datagrams
+in order to control the scope of the multicasts:
+.Bd -literal
+u_char ttl; /* range: 0 to 255, default = 1 */
+setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl));
+.Ed
+.Pp
+Datagrams with a TTL of 1 are not forwarded beyond the local network.
+Multicast datagrams with a TTL of 0 will not be transmitted on any network,
+but may be delivered locally if the sending host belongs to the destination
+group and if multicast loopback has not been disabled on the sending socket
+(see below).
+Multicast datagrams with TTL greater than 1 may be forwarded
+to other networks if a multicast router is attached to the local network.
+.Pp
+For hosts with multiple interfaces, where an interface has not
+been specified for a multicast group membership,
+each multicast transmission is sent from the primary network interface.
+The
+.Dv IP_MULTICAST_IF
+option overrides the default for
+subsequent transmissions from a given socket:
+.Bd -literal
+struct in_addr addr;
+setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &addr, sizeof(addr));
+.Ed
+.Pp
+where "addr" is the local
+.Tn IP
+address of the desired interface or
+.Dv INADDR_ANY
+to specify the default interface.
+.Pp
+To specify an interface by index, an instance of
+.Vt ip_mreqn
+may be passed instead.
+The
+.Vt imr_ifindex
+member should be set to the index of the desired interface,
+or 0 to specify the default interface.
+The kernel differentiates between these two structures by their size.
+.Pp
+The use of
+.Vt IP_MULTICAST_IF
+is
+.Em not recommended ,
+as multicast memberships are scoped to each
+individual interface.
+It is supported for legacy use only by applications,
+such as routing daemons, which expect to
+be able to transmit link-local IPv4 multicast datagrams (224.0.0.0/24)
+on multiple interfaces,
+without requesting an individual membership for each interface.
+.Pp
+.\"
+An interface's local IP address and multicast capability can
+be obtained via the
+.Dv SIOCGIFCONF
+and
+.Dv SIOCGIFFLAGS
+ioctls.
+Normal applications should not need to use this option.
+.Pp
+If a multicast datagram is sent to a group to which the sending host itself
+belongs (on the outgoing interface), a copy of the datagram is, by default,
+looped back by the IP layer for local delivery.
+The
+.Dv IP_MULTICAST_LOOP
+option gives the sender explicit control
+over whether or not subsequent datagrams are looped back:
+.Bd -literal
+u_char loop; /* 0 = disable, 1 = enable (default) */
+setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop));
+.Ed
+.Pp
+This option
+improves performance for applications that may have no more than one
+instance on a single host (such as a routing daemon), by eliminating
+the overhead of receiving their own transmissions.
+It should generally not
+be used by applications for which there may be more than one instance on a
+single host (such as a conferencing program) or for which the sender does
+not belong to the destination group (such as a time querying program).
+.Pp
+The sysctl setting
+.Va net.inet.ip.mcast.loop
+controls the default setting of the
+.Dv IP_MULTICAST_LOOP
+socket option for new sockets.
+.Pp
+A multicast datagram sent with an initial TTL greater than 1 may be delivered
+to the sending host on a different interface from that on which it was sent,
+if the host belongs to the destination group on that other interface.
+The loopback control option has no effect on such delivery.
+.Pp
+A host must become a member of a multicast group before it can receive
+datagrams sent to the group.
+To join a multicast group, use the
+.Dv IP_ADD_MEMBERSHIP
+option:
+.Bd -literal
+struct ip_mreq mreq;
+setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));
+.Ed
+.Pp
+where
+.Fa mreq
+is the following structure:
+.Bd -literal
+struct ip_mreq {
+ struct in_addr imr_multiaddr; /* IP multicast address of group */
+ struct in_addr imr_interface; /* local IP address of interface */
+}
+.Ed
+.Pp
+.Va imr_interface
+should be set to the
+.Tn IP
+address of a particular multicast-capable interface if
+the host is multihomed.
+It may be set to
+.Dv INADDR_ANY
+to choose the default interface, although this is not recommended;
+this is considered to be the first interface corresponding
+to the default route.
+Otherwise, the first multicast-capable interface
+configured in the system will be used.
+.Pp
+Prior to
+.Fx 7.0 ,
+if the
+.Va imr_interface
+member is within the network range
+.Li 0.0.0.0/8 ,
+it is treated as an interface index in the system interface MIB,
+as per the RIP Version 2 MIB Extension (RFC-1724).
+In versions of
+.Fx
+since 7.0, this behavior is no longer supported.
+Developers should
+instead use the RFC 3678 multicast source filter APIs; in particular,
+.Dv MCAST_JOIN_GROUP .
+.Pp
+Up to
+.Dv IP_MAX_MEMBERSHIPS
+memberships may be added on a single socket.
+Membership is associated with a single interface;
+programs running on multihomed hosts may need to
+join the same group on more than one interface.
+.Pp
+To drop a membership, use:
+.Bd -literal
+struct ip_mreq mreq;
+setsockopt(s, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq));
+.Ed
+.Pp
+where
+.Fa mreq
+contains the same values as used to add the membership.
+Memberships are dropped when the socket is closed or the process exits.
+.\" TODO: Update this piece when IPv4 source-address selection is implemented.
+.Pp
+The IGMP protocol uses the primary IP address of the interface
+as its identifier for group membership.
+This is the first IP address configured on the interface.
+If this address is removed or changed, the results are
+undefined, as the IGMP membership state will then be inconsistent.
+If multiple IP aliases are configured on the same interface,
+they will be ignored.
+.Pp
+This shortcoming was addressed in IPv6; MLDv2 requires
+that the unique link-local address for an interface is
+used to identify an MLDv2 listener.
+.Ss "Source-Specific Multicast Options"
+Since
+.Fx 8.0 ,
+the use of Source-Specific Multicast (SSM) is supported.
+These extensions require an IGMPv3 multicast router in order to
+make best use of them.
+If a legacy multicast router is present on the link,
+.Fx
+will simply downgrade to the version of IGMP spoken by the router,
+and the benefits of source filtering on the upstream link
+will not be present, although the kernel will continue to
+squelch transmissions from blocked sources.
+.Pp
+Each group membership on a socket now has a filter mode:
+.Bl -tag -width MCAST_EXCLUDE
+.It Dv MCAST_EXCLUDE
+Datagrams sent to this group are accepted,
+unless the source is in a list of blocked source addresses.
+.It Dv MCAST_INCLUDE
+Datagrams sent to this group are accepted
+only if the source is in a list of accepted source addresses.
+.El
+.Pp
+Groups joined using the legacy
+.Dv IP_ADD_MEMBERSHIP
+option are placed in exclusive-mode,
+and are able to request that certain sources are blocked or allowed.
+This is known as the
+.Em delta-based API .
+.Pp
+To block a multicast source on an existing group membership:
+.Bd -literal
+struct ip_mreq_source mreqs;
+setsockopt(s, IPPROTO_IP, IP_BLOCK_SOURCE, &mreqs, sizeof(mreqs));
+.Ed
+.Pp
+where
+.Fa mreqs
+is the following structure:
+.Bd -literal
+struct ip_mreq_source {
+ struct in_addr imr_multiaddr; /* IP multicast address of group */
+ struct in_addr imr_sourceaddr; /* IP address of source */
+ struct in_addr imr_interface; /* local IP address of interface */
+}
+.Ed
+.Va imr_sourceaddr
+should be set to the address of the source to be blocked.
+.Pp
+To unblock a multicast source on an existing group:
+.Bd -literal
+struct ip_mreq_source mreqs;
+setsockopt(s, IPPROTO_IP, IP_UNBLOCK_SOURCE, &mreqs, sizeof(mreqs));
+.Ed
+.Pp
+The
+.Dv IP_BLOCK_SOURCE
+and
+.Dv IP_UNBLOCK_SOURCE
+options are
+.Em not permitted
+for inclusive-mode group memberships.
+.Pp
+To join a multicast group in
+.Dv MCAST_INCLUDE
+mode with a single source,
+or add another source to an existing inclusive-mode membership:
+.Bd -literal
+struct ip_mreq_source mreqs;
+setsockopt(s, IPPROTO_IP, IP_ADD_SOURCE_MEMBERSHIP, &mreqs, sizeof(mreqs));
+.Ed
+.Pp
+To leave a single source from an existing group in inclusive mode:
+.Bd -literal
+struct ip_mreq_source mreqs;
+setsockopt(s, IPPROTO_IP, IP_DROP_SOURCE_MEMBERSHIP, &mreqs, sizeof(mreqs));
+.Ed
+If this is the last accepted source for the group, the membership
+will be dropped.
+.Pp
+The
+.Dv IP_ADD_SOURCE_MEMBERSHIP
+and
+.Dv IP_DROP_SOURCE_MEMBERSHIP
+options are
+.Em not accepted
+for exclusive-mode group memberships.
+However, both exclusive and inclusive mode memberships
+support the use of the
+.Em full-state API
+documented in RFC 3678.
+For management of source filter lists using this API,
+please refer to
+.Xr sourcefilter 3 .
+.Pp
+The sysctl settings
+.Va net.inet.ip.mcast.maxsocksrc
+and
+.Va net.inet.ip.mcast.maxgrpsrc
+are used to specify an upper limit on the number of per-socket and per-group
+source filter entries which the kernel may allocate.
+.\"-----------------------
+.Ss "Raw IP Sockets"
+Raw
+.Tn IP
+sockets are connectionless,
+and are normally used with the
+.Xr sendto 2
+and
+.Xr recvfrom 2
+calls, though the
+.Xr connect 2
+call may also be used to fix the destination for future
+packets (in which case the
+.Xr read 2
+or
+.Xr recv 2
+and
+.Xr write 2
+or
+.Xr send 2
+system calls may be used).
+.Pp
+If
+.Fa proto
+is 0, the default protocol
+.Dv IPPROTO_RAW
+is used for outgoing
+packets, and only incoming packets destined for that protocol
+are received.
+If
+.Fa proto
+is non-zero, that protocol number will be used on outgoing packets
+and to filter incoming packets.
+.Pp
+Outgoing packets automatically have an
+.Tn IP
+header prepended to
+them (based on the destination address and the protocol
+number the socket is created with),
+unless the
+.Dv IP_HDRINCL
+option has been set.
+Incoming packets are received with
+.Tn IP
+header and options intact, except for
+.Va ip_len
+and
+.Va ip_off
+fields converted to host byte order.
+.Pp
+.Dv IP_HDRINCL
+indicates the complete IP header is included with the data
+and may be used only with the
+.Dv SOCK_RAW
+type.
+.Bd -literal
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
+
+int hincl = 1; /* 1 = on, 0 = off */
+setsockopt(s, IPPROTO_IP, IP_HDRINCL, &hincl, sizeof(hincl));
+.Ed
+.Pp
+Unlike previous
+.Bx
+releases, the program must set all
+the fields of the IP header, including the following:
+.Bd -literal
+ip->ip_v = IPVERSION;
+ip->ip_hl = hlen >> 2;
+ip->ip_id = 0; /* 0 means kernel set appropriate value */
+ip->ip_off = offset;
+.Ed
+.Pp
+The
+.Va ip_len
+and
+.Va ip_off
+fields
+.Em must
+be provided in host byte order.
+All other fields must be provided in network byte order.
+See
+.Xr byteorder 3
+for more information on network byte order.
+If the
+.Va ip_id
+field is set to 0 then the kernel will choose an
+appropriate value.
+If the header source address is set to
+.Dv INADDR_ANY ,
+the kernel will choose an appropriate address.
+.Sh ERRORS
+A socket operation may fail with one of the following errors returned:
+.Bl -tag -width Er
+.It Bq Er EISCONN
+when trying to establish a connection on a socket which
+already has one, or when trying to send a datagram with the destination
+address specified and the socket is already connected;
+.It Bq Er ENOTCONN
+when trying to send a datagram, but
+no destination address is specified, and the socket has not been
+connected;
+.It Bq Er ENOBUFS
+when the system runs out of memory for
+an internal data structure;
+.It Bq Er EADDRNOTAVAIL
+when an attempt is made to create a
+socket with a network address for which no network interface
+exists.
+.It Bq Er EACCES
+when an attempt is made to create
+a raw IP socket by a non-privileged process.
+.El
+.Pp
+The following errors specific to
+.Tn IP
+may occur when setting or getting
+.Tn IP
+options:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+An unknown socket option name was given.
+.It Bq Er EINVAL
+The IP option field was improperly formed;
+an option field was shorter than the minimum value
+or longer than the option buffer provided.
+.El
+.Pp
+The following errors may occur when attempting to send
+.Tn IP
+datagrams via a
+.Dq raw socket
+with the
+.Dv IP_HDRINCL
+option set:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+The user-supplied
+.Va ip_len
+field was not equal to the length of the datagram written to the socket.
+.El
+.Sh SEE ALSO
+.Xr getsockopt 2 ,
+.Xr recv 2 ,
+.Xr send 2 ,
+.Xr byteorder 3 ,
+.Xr icmp 4 ,
+.Xr igmp 4 ,
+.Xr inet 4 ,
+.Xr intro 4 ,
+.Xr multicast 4 ,
+.Xr sourcefilter 3
+.Rs
+.%A D. Thaler
+.%A B. Fenner
+.%A B. Quinn
+.%T "Socket Interface Extensions for Multicast Source Filters"
+.%N RFC 3678
+.%D Jan 2004
+.Re
+.Sh HISTORY
+The
+.Nm
+protocol appeared in
+.Bx 4.2 .
+The
+.Vt ip_mreqn
+structure appeared in
+.Tn Linux 2.4 .
+.Sh BUGS
+Before
+.Fx 10.0
+packets received on raw IP sockets had the
+.Va ip_hl
+subtracted from the
+.Va ip_len
+field.
diff --git a/share/man/man4/ip6.4 b/share/man/man4/ip6.4
new file mode 100644
index 0000000..fcd396c
--- /dev/null
+++ b/share/man/man4/ip6.4
@@ -0,0 +1,702 @@
+.\" $KAME: ip6.4,v 1.23 2005/01/11 05:56:25 itojun Exp $
+.\" $OpenBSD: ip6.4,v 1.21 2005/01/06 03:50:46 itojun Exp $
+.\"
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 13, 2011
+.Dt IP6 4
+.Os
+.Sh NAME
+.Nm ip6
+.Nd Internet Protocol version 6 (IPv6) network layer
+.Sh SYNOPSIS
+.In sys/socket.h
+.In netinet/in.h
+.Ft int
+.Fn socket AF_INET6 SOCK_RAW proto
+.Sh DESCRIPTION
+The IPv6 network layer is used by the IPv6 protocol family for
+transporting data.
+IPv6 packets contain an IPv6 header that is not provided as part of the
+payload contents when passed to an application.
+IPv6 header options affect the behavior of this protocol and may be used
+by high-level protocols (such as the
+.Xr tcp 4
+and
+.Xr udp 4
+protocols) as well as directly by
+.Dq raw sockets ,
+which process IPv6 messages at a lower-level and may be useful for
+developing new protocols and special-purpose applications.
+.Ss Header
+All IPv6 packets begin with an IPv6 header.
+When data received by the kernel are passed to the application, this
+header is not included in buffer, even when raw sockets are being used.
+Likewise, when data are sent to the kernel for transmit from the
+application, the buffer is not examined for an IPv6 header:
+the kernel always constructs the header.
+To directly access IPv6 headers from received packets and specify them
+as part of the buffer passed to the kernel, link-level access
+.Po
+.Xr bpf 4 ,
+for example
+.Pc
+must instead be utilized.
+.Pp
+The header has the following definition:
+.Bd -literal -offset indent
+struct ip6_hdr {
+ union {
+ struct ip6_hdrctl {
+ uint32_t ip6_un1_flow; /* 20 bits of flow ID */
+ uint16_t ip6_un1_plen; /* payload length */
+ uint8_t ip6_un1_nxt; /* next header */
+ uint8_t ip6_un1_hlim; /* hop limit */
+ } ip6_un1;
+ uint8_t ip6_un2_vfc; /* version and class */
+ } ip6_ctlun;
+ struct in6_addr ip6_src; /* source address */
+ struct in6_addr ip6_dst; /* destination address */
+} __packed;
+
+#define ip6_vfc ip6_ctlun.ip6_un2_vfc
+#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
+#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
+#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
+#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
+#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
+.Ed
+.Pp
+All fields are in network-byte order.
+Any options specified (see
+.Sx Options
+below) must also be specified in network-byte order.
+.Pp
+.Va ip6_flow
+specifies the flow ID.
+.Va ip6_plen
+specifies the payload length.
+.Va ip6_nxt
+specifies the type of the next header.
+.Va ip6_hlim
+specifies the hop limit.
+.Pp
+The top 4 bits of
+.Va ip6_vfc
+specify the class and the bottom 4 bits specify the version.
+.Pp
+.Va ip6_src
+and
+.Va ip6_dst
+specify the source and destination addresses.
+.Pp
+The IPv6 header may be followed by any number of extension headers that start
+with the following generic definition:
+.Bd -literal -offset indent
+struct ip6_ext {
+ uint8_t ip6e_nxt;
+ uint8_t ip6e_len;
+} __packed;
+.Ed
+.Ss Options
+IPv6 allows header options on packets to manipulate the behavior of the
+protocol.
+These options and other control requests are accessed with the
+.Xr getsockopt 2
+and
+.Xr setsockopt 2
+system calls at level
+.Dv IPPROTO_IPV6
+and by using ancillary data in
+.Xr recvmsg 2
+and
+.Xr sendmsg 2 .
+They can be used to access most of the fields in the IPv6 header and
+extension headers.
+.Pp
+The following socket options are supported:
+.Bl -tag -width Ds
+.\" .It Dv IPV6_OPTIONS
+.It Dv IPV6_UNICAST_HOPS Fa "int *"
+Get or set the default hop limit header field for outgoing unicast
+datagrams sent on this socket.
+.\" .It Dv IPV6_RECVOPTS Fa "int *"
+.\" Get or set the status of whether all header options will be
+.\" delivered along with the datagram when it is received.
+.\" .It Dv IPV6_RECVRETOPTS Fa "int *"
+.\" Get or set the status of whether header options will be delivered
+.\" for reply.
+.\" .It Dv IPV6_RECVDSTADDR Fa "int *"
+.\" Get or set the status of whether datagrams are received with
+.\" destination addresses.
+.\" .It Dv IPV6_RETOPTS
+.\" Get or set IPv6 options.
+.It Dv IPV6_MULTICAST_IF Fa "u_int *"
+Get or set the interface from which multicast packets will be sent.
+For hosts with multiple interfaces, each multicast transmission is sent
+from the primary network interface.
+The interface is specified as its index as provided by
+.Xr if_nametoindex 3 .
+A value of zero specifies the default interface.
+.It Dv IPV6_MULTICAST_HOPS Fa "int *"
+Get or set the default hop limit header field for outgoing multicast
+datagrams sent on this socket.
+This option controls the scope of multicast datagram transmissions.
+.Pp
+Datagrams with a hop limit of 1 are not forwarded beyond the local
+network.
+Multicast datagrams with a hop limit of zero will not be transmitted on
+any network but may be delivered locally if the sending host belongs to
+the destination group and if multicast loopback (see below) has not been
+disabled on the sending socket.
+Multicast datagrams with a hop limit greater than 1 may be forwarded to
+the other networks if a multicast router (such as
+.Xr mrouted 8 Pq Pa ports/net/mrouted )
+is attached to the local network.
+.It Dv IPV6_MULTICAST_LOOP Fa "u_int *"
+Get or set the status of whether multicast datagrams will be looped back
+for local delivery when a multicast datagram is sent to a group to which
+the sending host belongs.
+.Pp
+This option improves performance for applications that may have no more
+than one instance on a single host (such as a router daemon) by
+eliminating the overhead of receiving their own transmissions.
+It should generally not be used by applications for which there may be
+more than one instance on a single host (such as a conferencing program)
+or for which the sender does not belong to the destination group
+(such as a time-querying program).
+.Pp
+A multicast datagram sent with an initial hop limit greater than 1 may
+be delivered to the sending host on a different interface from that on
+which it was sent if the host belongs to the destination group on that
+other interface.
+The multicast loopback control option has no effect on such delivery.
+.It Dv IPV6_JOIN_GROUP Fa "struct ipv6_mreq *"
+Join a multicast group.
+A host must become a member of a multicast group before it can receive
+datagrams sent to the group.
+.Bd -literal
+struct ipv6_mreq {
+ struct in6_addr ipv6mr_multiaddr;
+ unsigned int ipv6mr_interface;
+};
+.Ed
+.Pp
+.Va ipv6mr_interface
+may be set to zeroes to choose the default multicast interface or to the
+index of a particular multicast-capable interface if the host is
+multihomed.
+Membership is associated with a single interface; programs running on
+multihomed hosts may need to join the same group on more than one
+interface.
+.Pp
+If the multicast address is unspecified (i.e., all zeroes), messages
+from all multicast addresses will be accepted by this group.
+Note that setting to this value requires superuser privileges.
+.It Dv IPV6_LEAVE_GROUP Fa "struct ipv6_mreq *"
+Drop membership from the associated multicast group.
+Memberships are automatically dropped when the socket is closed or when
+the process exits.
+.It Dv IPV6_PORTRANGE Fa "int *"
+Get or set the allocation policy of ephemeral ports for when the kernel
+automatically binds a local address to this socket.
+The following values are available:
+.Pp
+.Bl -tag -width IPV6_PORTRANGE_DEFAULT -compact
+.It Dv IPV6_PORTRANGE_DEFAULT
+Use the regular range of non-reserved ports (varies, see
+.Xr ip 4 ) .
+.It Dv IPV6_PORTRANGE_HIGH
+Use a high range (varies, see
+.Xr ip 4 ) .
+.It Dv IPV6_PORTRANGE_LOW
+Use a low, reserved range (600\-1023, see
+.Xr ip 4 ) .
+.El
+.It Dv IPV6_PKTINFO Fa "int *"
+Get or set whether additional information about subsequent packets will
+be provided as ancillary data along with the payload in subsequent
+.Xr recvmsg 2
+calls.
+The information is stored in the following structure in the ancillary
+data returned:
+.Bd -literal
+struct in6_pktinfo {
+ struct in6_addr ipi6_addr; /* src/dst IPv6 address */
+ unsigned int ipi6_ifindex; /* send/recv if index */
+};
+.Ed
+.It Dv IPV6_HOPLIMIT Fa "int *"
+Get or set whether the hop limit header field from subsequent packets
+will be provided as ancillary data along with the payload in subsequent
+.Xr recvmsg 2
+calls.
+The value is stored as an
+.Vt int
+in the ancillary data returned.
+.\" .It Dv IPV6_NEXTHOP Fa "int *"
+.\" Get or set whether the address of the next hop for subsequent
+.\" packets will be provided as ancillary data along with the payload in
+.\" subsequent
+.\" .Xr recvmsg 2
+.\" calls.
+.\" The option is stored as a
+.\" .Vt sockaddr
+.\" structure in the ancillary data returned.
+.\" .Pp
+.\" This option requires superuser privileges.
+.It Dv IPV6_HOPOPTS Fa "int *"
+Get or set whether the hop-by-hop options from subsequent packets will be
+provided as ancillary data along with the payload in subsequent
+.Xr recvmsg 2
+calls.
+The option is stored in the following structure in the ancillary data
+returned:
+.Bd -literal
+struct ip6_hbh {
+ uint8_t ip6h_nxt; /* next header */
+ uint8_t ip6h_len; /* length in units of 8 octets */
+/* followed by options */
+} __packed;
+.Ed
+.Pp
+The
+.Fn inet6_option_space
+routine and family of routines may be used to manipulate this data.
+.Pp
+This option requires superuser privileges.
+.It Dv IPV6_DSTOPTS Fa "int *"
+Get or set whether the destination options from subsequent packets will
+be provided as ancillary data along with the payload in subsequent
+.Xr recvmsg 2
+calls.
+The option is stored in the following structure in the ancillary data
+returned:
+.Bd -literal
+struct ip6_dest {
+ uint8_t ip6d_nxt; /* next header */
+ uint8_t ip6d_len; /* length in units of 8 octets */
+/* followed by options */
+} __packed;
+.Ed
+.Pp
+The
+.Fn inet6_option_space
+routine and family of routines may be used to manipulate this data.
+.Pp
+This option requires superuser privileges.
+.It Dv IPV6_TCLASS Fa "int *"
+Get or set the value of the traffic class field used for outgoing datagrams
+on this socket.
+The value must be between \-1 and 255.
+A value of \-1 resets to the default value.
+.It Dv IPV6_RECVTCLASS Fa "int *"
+Get or set the status of whether the traffic class header field will be
+provided as ancillary data along with the payload in subsequent
+.Xr recvmsg 2
+calls.
+The header field is stored as a single value of type
+.Vt int .
+.It Dv IPV6_RTHDR Fa "int *"
+Get or set whether the routing header from subsequent packets will be
+provided as ancillary data along with the payload in subsequent
+.Xr recvmsg 2
+calls.
+The header is stored in the following structure in the ancillary data
+returned:
+.Bd -literal
+struct ip6_rthdr {
+ uint8_t ip6r_nxt; /* next header */
+ uint8_t ip6r_len; /* length in units of 8 octets */
+ uint8_t ip6r_type; /* routing type */
+ uint8_t ip6r_segleft; /* segments left */
+/* followed by routing-type-specific data */
+} __packed;
+.Ed
+.Pp
+The
+.Fn inet6_option_space
+routine and family of routines may be used to manipulate this data.
+.Pp
+This option requires superuser privileges.
+.It Dv IPV6_PKTOPTIONS Fa "struct cmsghdr *"
+Get or set all header options and extension headers at one time on the
+last packet sent or received on the socket.
+All options must fit within the size of an mbuf (see
+.Xr mbuf 9 ) .
+Options are specified as a series of
+.Vt cmsghdr
+structures followed by corresponding values.
+.Va cmsg_level
+is set to
+.Dv IPPROTO_IPV6 ,
+.Va cmsg_type
+to one of the other values in this list, and trailing data to the option
+value.
+When setting options, if the length
+.Va optlen
+to
+.Xr setsockopt 2
+is zero, all header options will be reset to their default values.
+Otherwise, the length should specify the size the series of control
+messages consumes.
+.Pp
+Instead of using
+.Xr sendmsg 2
+to specify option values, the ancillary data used in these calls that
+correspond to the desired header options may be directly specified as
+the control message in the series of control messages provided as the
+argument to
+.Xr setsockopt 2 .
+.It Dv IPV6_CHECKSUM Fa "int *"
+Get or set the byte offset into a packet where the 16-bit checksum is
+located.
+When set, this byte offset is where incoming packets will be expected
+to have checksums of their data stored and where outgoing packets will
+have checksums of their data computed and stored by the kernel.
+A value of \-1 specifies that no checksums will be checked on incoming
+packets and that no checksums will be computed or stored on outgoing
+packets.
+The offset of the checksum for ICMPv6 sockets cannot be relocated or
+turned off.
+.It Dv IPV6_V6ONLY Fa "int *"
+Get or set whether only IPv6 connections can be made to this socket.
+For wildcard sockets, this can restrict connections to IPv6 only.
+.\"With
+.\".Ox
+.\"IPv6 sockets are always IPv6-only, so the socket option is read-only
+.\"(not modifiable).
+.It Dv IPV6_FAITH Fa "int *"
+Get or set the status of whether
+.Xr faith 4
+connections can be made to this socket.
+.It Dv IPV6_USE_MIN_MTU Fa "int *"
+Get or set whether the minimal IPv6 maximum transmission unit (MTU) size
+will be used to avoid fragmentation from occurring for subsequent
+outgoing datagrams.
+.It Dv IPV6_AUTH_LEVEL Fa "int *"
+Get or set the
+.Xr ipsec 4
+authentication level.
+.It Dv IPV6_ESP_TRANS_LEVEL Fa "int *"
+Get or set the ESP transport level.
+.It Dv IPV6_ESP_NETWORK_LEVEL Fa "int *"
+Get or set the ESP encapsulation level.
+.It Dv IPV6_IPCOMP_LEVEL Fa "int *"
+Get or set the
+.Xr ipcomp 4
+level.
+.El
+.Pp
+The
+.Dv IPV6_PKTINFO ,
+.\" .Dv IPV6_NEXTHOP ,
+.Dv IPV6_HOPLIMIT ,
+.Dv IPV6_HOPOPTS ,
+.Dv IPV6_DSTOPTS ,
+and
+.Dv IPV6_RTHDR
+options will return ancillary data along with payload contents in subsequent
+.Xr recvmsg 2
+calls with
+.Va cmsg_level
+set to
+.Dv IPPROTO_IPV6
+and
+.Va cmsg_type
+set to respective option name value (e.g.,
+.Dv IPV6_HOPTLIMIT ) .
+These options may also be used directly as ancillary
+.Va cmsg_type
+values in
+.Xr sendmsg 2
+to set options on the packet being transmitted by the call.
+The
+.Va cmsg_level
+value must be
+.Dv IPPROTO_IPV6 .
+For these options, the ancillary data object value format is the same
+as the value returned as explained for each when received with
+.Xr recvmsg 2 .
+.Pp
+Note that using
+.Xr sendmsg 2
+to specify options on particular packets works only on UDP and raw sockets.
+To manipulate header options for packets on TCP sockets, only the socket
+options may be used.
+.Pp
+In some cases, there are multiple APIs defined for manipulating an IPv6
+header field.
+A good example is the outgoing interface for multicast datagrams, which
+can be set by the
+.Dv IPV6_MULTICAST_IF
+socket option, through the
+.Dv IPV6_PKTINFO
+option, and through the
+.Va sin6_scope_id
+field of the socket address passed to the
+.Xr sendto 2
+system call.
+.Pp
+Resolving these conflicts is implementation dependent.
+This implementation determines the value in the following way:
+options specified by using ancillary data (i.e.,
+.Xr sendmsg 2 )
+are considered first,
+options specified by using
+.Dv IPV6_PKTOPTIONS
+to set
+.Dq sticky
+options are considered second,
+options specified by using the individual, basic, and direct socket
+options (e.g.,
+.Dv IPV6_UNICAST_HOPS )
+are considered third,
+and options specified in the socket address supplied to
+.Xr sendto 2
+are the last choice.
+.Ss Multicasting
+IPv6 multicasting is supported only on
+.Dv AF_INET6
+sockets of type
+.Dv SOCK_DGRAM
+and
+.Dv SOCK_RAW ,
+and only on networks where the interface driver supports
+multicasting.
+Socket options (see above) that manipulate membership of
+multicast groups and other multicast options include
+.Dv IPV6_MULTICAST_IF ,
+.Dv IPV6_MULTICAST_HOPS ,
+.Dv IPV6_MULTICAST_LOOP ,
+.Dv IPV6_LEAVE_GROUP ,
+and
+.Dv IPV6_JOIN_GROUP .
+.Ss Raw Sockets
+Raw IPv6 sockets are connectionless and are normally used with the
+.Xr sendto 2
+and
+.Xr recvfrom 2
+calls, although the
+.Xr connect 2
+call may be used to fix the destination address for future outgoing
+packets so that
+.Xr send 2
+may instead be used and the
+.Xr bind 2
+call may be used to fix the source address for future outgoing
+packets instead of having the kernel choose a source address.
+.Pp
+By using
+.Xr connect 2
+or
+.Xr bind 2 ,
+raw socket input is constrained to only packets with their
+source address matching the socket destination address if
+.Xr connect 2
+was used and to packets with their destination address
+matching the socket source address if
+.Xr bind 2
+was used.
+.Pp
+If the
+.Ar proto
+argument to
+.Xr socket 2
+is zero, the default protocol
+.Pq Dv IPPROTO_RAW
+is used for outgoing packets.
+For incoming packets, protocols recognized by kernel are
+.Sy not
+passed to the application socket (e.g.,
+.Xr tcp 4
+and
+.Xr udp 4 )
+except for some ICMPv6 messages.
+The ICMPv6 messages not passed to raw sockets include echo, timestamp,
+and address mask requests.
+If
+.Ar proto
+is non-zero, only packets with this protocol will be passed to the
+socket.
+.Pp
+IPv6 fragments are also not passed to application sockets until
+they have been reassembled.
+If reception of all packets is desired, link-level access (such as
+.Xr bpf 4 )
+must be used instead.
+.Pp
+Outgoing packets automatically have an IPv6 header prepended to them
+(based on the destination address and the protocol number the socket
+was created with).
+Incoming packets are received by an application without the IPv6 header
+or any extension headers.
+.Pp
+Outgoing packets will be fragmented automatically by the kernel if they
+are too large.
+Incoming packets will be reassembled before being sent to the raw socket,
+so packet fragments or fragment headers will never be seen on a raw socket.
+.Sh EXAMPLES
+The following determines the hop limit on the next packet received:
+.Bd -literal
+struct iovec iov[2];
+u_char buf[BUFSIZ];
+struct cmsghdr *cm;
+struct msghdr m;
+int optval;
+bool found;
+u_char data[2048];
+
+/* Create socket. */
+
+(void)memset(&m, 0, sizeof(m));
+(void)memset(&iov, 0, sizeof(iov));
+
+iov[0].iov_base = data; /* buffer for packet payload */
+iov[0].iov_len = sizeof(data); /* expected packet length */
+
+m.msg_name = &from; /* sockaddr_in6 of peer */
+m.msg_namelen = sizeof(from);
+m.msg_iov = iov;
+m.msg_iovlen = 1;
+m.msg_control = (caddr_t)buf; /* buffer for control messages */
+m.msg_controllen = sizeof(buf);
+
+/*
+ * Enable the hop limit value from received packets to be
+ * returned along with the payload.
+ */
+optval = 1;
+if (setsockopt(s, IPPROTO_IPV6, IPV6_HOPLIMIT, &optval,
+ sizeof(optval)) == -1)
+ err(1, "setsockopt");
+
+found = false;
+do {
+ if (recvmsg(s, &m, 0) == -1)
+ err(1, "recvmsg");
+ for (cm = CMSG_FIRSTHDR(&m); cm != NULL;
+ cm = CMSG_NXTHDR(&m, cm)) {
+ if (cm->cmsg_level == IPPROTO_IPV6 &&
+ cm->cmsg_type == IPV6_HOPLIMIT &&
+ cm->cmsg_len == CMSG_LEN(sizeof(int))) {
+ found = true;
+ (void)printf("hop limit: %d\en",
+ *(int *)CMSG_DATA(cm));
+ break;
+ }
+ }
+} while (!found);
+.Ed
+.Sh DIAGNOSTICS
+A socket operation may fail with one of the following errors returned:
+.Bl -tag -width EADDRNOTAVAILxx
+.It Bq Er EISCONN
+when trying to establish a connection on a socket which
+already has one or when trying to send a datagram with the destination
+address specified and the socket is already connected.
+.It Bq Er ENOTCONN
+when trying to send a datagram, but
+no destination address is specified, and the socket has not been
+connected.
+.It Bq Er ENOBUFS
+when the system runs out of memory for
+an internal data structure.
+.It Bq Er EADDRNOTAVAIL
+when an attempt is made to create a
+socket with a network address for which no network interface
+exists.
+.It Bq Er EACCES
+when an attempt is made to create
+a raw IPv6 socket by a non-privileged process.
+.El
+.Pp
+The following errors specific to IPv6 may occur when setting or getting
+header options:
+.Bl -tag -width EADDRNOTAVAILxx
+.It Bq Er EINVAL
+An unknown socket option name was given.
+.It Bq Er EINVAL
+An ancillary data object was improperly formed.
+.El
+.Sh SEE ALSO
+.Xr getsockopt 2 ,
+.Xr recv 2 ,
+.Xr send 2 ,
+.Xr setsockopt 2 ,
+.Xr socket 2 ,
+.\" .Xr inet6_option_space 3 ,
+.\" .Xr inet6_rthdr_space 3 ,
+.Xr if_nametoindex 3 ,
+.Xr bpf 4 ,
+.Xr icmp6 4 ,
+.Xr ip 4 ,
+.Xr inet6 4 ,
+.Xr netintro 4 ,
+.Xr tcp 4 ,
+.Xr udp 4
+.Rs
+.%A W. Stevens
+.%A M. Thomas
+.%T Advanced Sockets API for IPv6
+.%R RFC 2292
+.%D February 1998
+.Re
+.Rs
+.%A S. Deering
+.%A R. Hinden
+.%T Internet Protocol, Version 6 (IPv6) Specification
+.%R RFC 2460
+.%D December 1998
+.Re
+.Rs
+.%A R. Gilligan
+.%A S. Thomson
+.%A J. Bound
+.%A W. Stevens
+.%T Basic Socket Interface Extensions for IPv6
+.%R RFC 2553
+.%D March 1999
+.Re
+.Rs
+.%A W. Stevens
+.%A B. Fenner
+.%A A. Rudoff
+.%T UNIX Network Programming, third edition
+.Re
+.Sh STANDARDS
+Most of the socket options are defined in RFC 2292 or RFC 2553.
+The
+.Dv IPV6_V6ONLY
+socket option is defined in RFC 3493 Section 5.3.
+The
+.Dv IPV6_PORTRANGE
+socket option and the conflict resolution rule are not defined in the
+RFCs and should be considered implementation dependent.
diff --git a/share/man/man4/ipfirewall.4 b/share/man/man4/ipfirewall.4
new file mode 100644
index 0000000..40c77a1
--- /dev/null
+++ b/share/man/man4/ipfirewall.4
@@ -0,0 +1,89 @@
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 25, 2012
+.Dt IPFW 4
+.Os
+.Sh NAME
+.Nm ipfw
+.Nd IP packet filter and traffic accounting
+.Sh SYNOPSIS
+To compile
+the driver
+into the kernel, place the following option in the kernel configuration
+file:
+.Bd -ragged -offset indent
+.Cd "options IPFIREWALL"
+.Ed
+.Pp
+Other related kernel options
+which may also be useful are:
+.Bd -ragged -offset indent
+.Cd "options IPFIREWALL_DEFAULT_TO_ACCEPT"
+.Cd "options IPFIREWALL_VERBOSE"
+.Cd "options IPFIREWALL_VERBOSE_LIMIT=100"
+.Ed
+.Pp
+To load
+the driver
+as a module at boot time, add the following line into the
+.Xr loader.conf 5
+file:
+.Bd -literal -offset indent
+ipfw_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+system facility allows filtering,
+redirecting, and other operations on
+.Tn IP
+packets travelling through
+network interfaces.
+.Pp
+The default behavior of
+.Nm
+is to block all incoming and outgoing traffic.
+This behavior can be modified, to allow all traffic through the
+.Nm
+firewall by default, by enabling the
+.Dv IPFIREWALL_DEFAULT_TO_ACCEPT
+kernel option.
+This option may be useful when configuring
+.Nm
+for the first time.
+If the default
+.Nm
+behavior is to allow everything, it is easier to cope with
+firewall-tuning mistakes which may accidentally block all traffic.
+.Pp
+To enable logging of packets passing through
+.Nm ,
+enable the
+.Dv IPFIREWALL_VERBOSE
+kernel option.
+The
+.Dv IPFIREWALL_VERBOSE_LIMIT
+option will prevent
+.Xr syslogd 8
+from flooding system logs or causing local Denial of Service.
+This option may be set to the number of packets which will be logged on
+a per-entry basis before the entry is rate-limited.
+.Pp
+The user interface for
+.Nm
+is implemented by the
+.Xr ipfw 8
+utility, so please refer to the
+.Xr ipfw 8
+manpage for a complete description of the
+.Nm
+capabilities and how to use it.
+.Sh SEE ALSO
+.Xr setsockopt 2 ,
+.Xr divert 4 ,
+.Xr ip 4 ,
+.Xr ipfw 8 ,
+.Xr sysctl 8 ,
+.Xr syslogd 8 ,
+.Xr pfil 9
diff --git a/share/man/man4/ipmi.4 b/share/man/man4/ipmi.4
new file mode 100644
index 0000000..25dc341
--- /dev/null
+++ b/share/man/man4/ipmi.4
@@ -0,0 +1,201 @@
+.\"
+.\" Copyright (c) 2006 Tom Rhodes
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 10, 2007
+.Dt IPMI 4
+.Os
+.Sh NAME
+.Nm ipmi
+.Nd "OpenIPMI compatible IPMI interface driver"
+.Sh SYNOPSIS
+.Cd "device ipmi"
+.Pp
+To manually specify I/O attachment in
+.Pa /boot/device.hints :
+.Cd hint.ipmi.0.at="isa"
+.Cd hint.ipmi.0.port="0xCA2"
+.Cd hint.ipmi.0.spacing="8"
+.Cd hint.ipmi.0.mode="KCS"
+.Pp
+To manually specify memory attachment in
+.Pa /boot/device.hints :
+.Cd hint.ipmi.0.at="isa"
+.Cd hint.ipmi.0.maddr="0xf0000000"
+.Cd hint.ipmi.0.spacing="8"
+.Cd hint.ipmi.0.mode="SMIC"
+.Pp
+Meaning of
+.Ar spacing :
+.Bl -tag -offset indent -compact -width 0x0
+.It 8
+8 bit alignment
+.It 16
+16 bit alignment
+.It 32
+32 bit alignment
+.El
+.Pp
+If the
+.Ar port
+and
+.Ar spacing
+are not specified the interface type default will be used. Only specify
+either the
+.Ar port
+for I/O access or
+.Ar maddr
+for memory access.
+.Sh DESCRIPTION
+The
+.Tn IPMI
+(Intelligent Platform Management Interface) is a standard for
+monitoring system hardware by permitting generic code to detect
+and monitor the sensors in a system.
+The
+.Tn IPMI
+standard offers watchdog support, an FRU database, and other
+support extensions.
+It is currently being adopted by the makers of many
+single board and embedded system manufacturers.
+.Pp
+The
+.Nm
+driver in
+.Fx
+is heavily adopted from the standard and
+.Tn Linux
+driver; however, not all features described in the
+standard are supported.
+.Sh IOCTLS
+Sending and receiving messages through the
+.Nm
+driver requires the use of
+.Xr ioctl 2 .
+The ioctls are used due to the complexity of
+data sent to and from the device.
+The
+.Xr ioctl 2
+command codes below are defined in
+.In sys/ipmi.h .
+The third argument to
+.Xr ioctl 2
+should be a pointer to the type indicated.
+.Pp
+Currently the following ioctls are supported:
+.Bl -tag -width indent
+.It Dv IPMICTL_RECEIVE_MSG Pq Vt "struct ipmi_recv"
+Receive a message.
+Possible error values:
+.Bl -tag -width Er
+.It Bq Er EAGAIN
+No messages are in the process queue.
+.It Bq Er EFAULT
+An address supplied was invalid.
+.It Bq Er EMSGSIZE
+The address could not fit in the message buffer and
+will remain in the buffer.
+.El
+.It Dv IPMICTL_RECEIVE_MSG_TRUNC Pq Vt "struct ipmi_recv"
+Like
+.Dv IPMICTL_RECEIVE_MSG
+but if the message cannot fit into the buffer, it
+will truncate the contents instead of leaving the data
+in the buffer.
+.It Dv IPMICTL_SEND_COMMAND Pq Vt "struct ipmi_req"
+Send a message to the interface.
+Possible error values:
+.Bl -tag -width Er
+.It Bq Er EFAULT
+An address supplied was invalid.
+.It Bq Er ENOMEM
+Buffers could not be allowed for the command, out of memory.
+.El
+.It Dv IPMICTL_SET_MY_ADDRESS_CMD Pq Vt "unsigned int"
+Set the slave address for source messages.
+.It Dv IPMICTL_GET_MY_ADDRESS_CMD Pq Vt "unsigned int"
+Get the slave address for source messages.
+.It Dv IPMICTL_SET_MY_LUN_CMD Pq Vt "unsigned int"
+Set the slave LUN for source messages.
+.It Dv IPMICTL_GET_MY_LUN_CMD Pq Vt "unsigned int"
+Get the slave LUN for source messages.
+.El
+.Ss Unimplemented Ioctls
+.Bl -tag -width indent
+.It Dv IPMICTL_REGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec"
+Register to receive a specific command.
+Possible error values:
+.Bl -tag -width Er
+.It Bq Er EFAULT
+An supplied address was invalid.
+.It Bq Er EBUSY
+The network function/command is already in use.
+.It Bq Er ENOMEM
+Could not allocate memory.
+.El
+.It Dv IPMICTL_UNREGISTER_FOR_CMD Pq Vt "struct ipmi_cmdspec"
+Unregister to receive a specific command.
+Possible error values:
+.Bl -tag -width Er
+.It Bq Er EFAULT
+An address supplied was invalid.
+.It Bq Er ENOENT
+The network function/command was not found.
+.El
+.El
+.Ss Stub Only Ioctl
+.Bl -tag -width indent
+.It Dv IPMICTL_SET_GETS_EVENTS_CMD Pq Vt int
+Set whether this interface receives events.
+Possible error values:
+.Bl -tag -width Er
+.It Bq Er EFAULT
+An address supplied was invalid.
+.El
+.El
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr watchdog 4 ,
+.Xr watchdog 8 ,
+.Xr watchdogd 8 ,
+.Xr watchdog 9
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.2 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Doug Ambrisko Aq ambrisko@FreeBSD.org .
+This manual page was written by
+.An Tom Rhodes Aq trhodes@FreeBSD.org .
+.Sh BUGS
+Not all features of the MontaVista driver are supported.
+.Pp
+Currently, IPMB and BT modes are not implemented.
diff --git a/share/man/man4/ips.4 b/share/man/man4/ips.4
new file mode 100644
index 0000000..0a38d5b
--- /dev/null
+++ b/share/man/man4/ips.4
@@ -0,0 +1,204 @@
+.\"
+.\" Copyright (c) 2003 Tom Rhodes
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 7, 2009
+.Dt IPS 4
+.Os
+.Sh NAME
+.Nm ips
+.Nd IBM/Adaptec ServeRAID controller driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device scbus"
+.Cd "device ips"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ips_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver claims to support the
+.Tn IBM
+(now Adaptec) ServeRAID series
+.Tn SCSI
+controller cards.
+.Pp
+These cards come with a built in configuration utility stored in
+the firmware known as the
+.Tn ISPR .
+This utility is accessed with the
+.Aq Em Ctrl+I
+key combination during the initial card
+.Tn POST .
+.Pp
+It is highly recommended that this utility be used to configure the card
+before attempting to diagnose the below error messages.
+.Pp
+In some cases, the
+.Nm
+driver can have difficulties attaching during
+the system initialization period.
+To avoid these difficulties, set the
+.Va hw.ips.0.disable
+tunable to 1.
+It will prevent the driver from attaching.
+.Sh HARDWARE
+Controllers supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+IBM ServeRAID 3H
+.It
+ServeRAID 4L/4M/4H
+.It
+ServeRAID Series 5
+.It
+ServeRAID 6i/6M
+.It
+ServeRAID 7t/7k/7M
+.El
+.Pp
+Newer ServeRAID controllers are supported by the
+.Xr aac 4
+or
+.Xr mfi 4
+driver.
+.Sh DIAGNOSTICS
+Several error codes may be shown when the card initializes the
+.Tn IBM
+.Tn ISPR
+utility and are independent of
+.Fx .
+.Bl -diag
+.It ips%d: failed to get adapter configuration data from device
+.It ips%d: failed to get drive configuration data from device
+.Pp
+Unable to obtain adapter or drive configuration.
+.It ips%d iobuf error
+.Pp
+A buffer input/output error has occurred.
+.Bq Er ENXIO
+.El
+.Ss General adapter errors:
+.Bl -diag
+.It Attaching bus failed
+.Pp
+This message is undocumented.
+.It WARNING: command timeout. Adapter is in toaster mode, resetting
+.Pp
+A command timeout has caused the adapter to be reset.
+.It AIEE! adapter reset failed, giving up and going home! Have a nice day
+.Pp
+An error occurred while attempting to reset the adapter.
+.It unable to get adapter configuration
+.It unable to get drive configuration
+.Pp
+There was an error when attempting to get configuration information.
+.It Adapter error during initialization.
+.It adapter initialization failed
+.Pp
+There was an error while attempting to initialize the adapter.
+.It adapter failed config check
+.It adapter clear failed
+.Pp
+There was an error while checking the adapter.
+.It device is disabled
+.Pp
+The adapter is disabled.
+.It resource allocation failed
+.It irq allocation failed
+.It irq setup failed
+.Pp
+The driver was unable to allocate resources for the device.
+.El
+.Ss Error messages due to DMA:
+.Bl -diag
+.It can't alloc command dma tag
+.It can't alloc SG dma tag
+.It can't alloc dma tag for statue queue
+.It dmamap failed
+.Pp
+Failure to map or allocate DMA resources.
+.El
+.Ss Cache, buffer, and command errors:
+.Bl -diag
+.It failed to initialize command buffers
+.It no mem for command slots!
+.Pp
+The
+.Nm
+driver will return
+.Bq Er ENOMEM
+in such cases.
+.It ERROR: unable to get a command! can't flush cache!
+.It ERROR: cache flush command failed!
+.It ERROR: unable to get a command! can't update nvram
+.It ERROR: nvram update command failed!
+.It ERROR: unable to get a command! can't sync cache!
+.It ERROR: cache sync command failed!
+.It ERROR: unable to get a command! can't sync cache!
+.It ERROR: etable command failed!
+.El
+.Sh COMPATIBILITY
+Unlike many of the other
+.Tn SCSI
+devices in
+.Fx ,
+the
+.Nm
+driver does not use the
+.Xr cam 4
+.Tn SCSI
+subsystem.
+.Sh SEE ALSO
+.Xr aac 4 ,
+.Xr mfi 4 ,
+.Xr ch 4 ,
+.Xr da 4 ,
+.Xr sysctl 8
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An -nosplit
+.An David Jefferys
+and
+.An Scott Long Aq scottl@FreeBSD.org .
+.Pp
+This manual page was written by
+.An Tom Rhodes Aq trhodes@FreeBSD.org .
diff --git a/share/man/man4/ipsec.4 b/share/man/man4/ipsec.4
new file mode 100644
index 0000000..c6a3f24
--- /dev/null
+++ b/share/man/man4/ipsec.4
@@ -0,0 +1,415 @@
+.\" $KAME: ipsec.4,v 1.17 2001/06/27 15:25:10 itojun Exp $
+.\"
+.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the project nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 29, 2009
+.Dt IPSEC 4
+.Os
+.Sh NAME
+.Nm ipsec
+.Nd Internet Protocol Security protocol
+.Sh SYNOPSIS
+.Cd "options IPSEC"
+.Cd "device crypto"
+.Pp
+.In sys/types.h
+.In netinet/in.h
+.In netipsec/ipsec.h
+.In netipsec/ipsec6.h
+.Sh DESCRIPTION
+.Nm
+is a security protocol implemented within the Internet Protocol layer
+of the networking stack.
+.Nm
+is defined for both IPv4 and IPv6
+.Xr ( inet 4
+and
+.Xr inet6 4 ) .
+.Nm
+is a set of protocols,
+.Tn ESP
+(for Encapsulating Security Payload)
+.Tn AH
+(for Authentication Header),
+and
+.Tn IPComp
+(for IP Payload Compression Protocol)
+that provide security services for IP datagrams.
+AH both authenticates and guarantees the integrity of an IP packet
+by attaching a cryptographic checksum computed using one-way hash functions.
+ESP, in addition, prevents unauthorized parties from reading the payload of
+an IP packet by also encrypting it.
+IPComp tries to increase communication performance by compressing IP payload,
+thus reducing the amount of data sent.
+This will help nodes on slow links but with enough computing power.
+.Nm
+operates in one of two modes: transport mode or tunnel mode.
+Transport mode is used to protect peer-to-peer communication between end nodes.
+Tunnel mode encapsulates IP packets within other IP packets
+and is designed for security gateways such as VPN endpoints.
+.Pp
+System configuration requires the
+.Xr crypto 4
+subsystem.
+.Pp
+The packets can be passed to a virtual
+.Xr enc 4
+interface,
+to perform packet filtering before outbound encryption and after decapsulation
+inbound.
+.Pp
+To properly filter on the inner packets of an
+.Nm
+tunnel with firewalls, you can change the values of the following sysctls
+.Bl -column net.inet6.ipsec6.filtertunnel default enable
+.It Sy "Name Default Enable"
+.It "net.inet.ipsec.filtertunnel 0 1"
+.It "net.inet6.ipsec6.filtertunnel 0 1"
+.El
+.\"
+.Ss Kernel interface
+.Nm
+is controlled by a key management and policy engine,
+that reside in the operating system kernel.
+Key management
+is the process of associating keys with security associations, also
+know as SAs.
+Policy management dictates when new security
+associations created or destroyed.
+.Pp
+The key management engine can be accessed from userland by using
+.Dv PF_KEY
+sockets.
+The
+.Dv PF_KEY
+socket API is defined in RFC2367.
+.Pp
+The policy engine is controlled by an extension to the
+.Dv PF_KEY
+API,
+.Xr setsockopt 2
+operations, and
+.Xr sysctl 3
+interface.
+The kernel implements
+an extended version of the
+.Dv PF_KEY
+interface and allows the programmer to define IPsec policies
+which are similar to the per-packet filters.
+The
+.Xr setsockopt 2
+interface is used to define per-socket behavior, and
+.Xr sysctl 3
+interface is used to define host-wide default behavior.
+.Pp
+The kernel code does not implement a dynamic encryption key exchange protocol
+such as IKE
+(Internet Key Exchange).
+Key exchange protocols are beyond what is necessary in the kernel and
+should be implemented as daemon processes which call the
+.Nm APIs.
+.\"
+.Ss Policy management
+IPsec policies can be managed in one of two ways, either by
+configuring per-socket policies using the
+.Xr setsockopt 2
+system calls, or by configuring kernel level packet filter-based
+policies using the
+.Dv PF_KEY
+interface, via the
+.Xr setkey 8
+you can define IPsec policies against packets using rules similar to packet
+filtering rules.
+Refer to
+.Xr setkey 8
+on how to use it.
+.Pp
+When setting policies using the
+.Xr setkey 8
+command, the
+.Dq Li default
+option instructs the system to use its default policy, as
+explained below, for processing packets.
+The following sysctl variables are available for configuring the
+system's IPsec behavior.
+The variables can have one of two values.
+A
+.Li 1
+means
+.Dq Li use ,
+which means that if there is a security association then use it but if
+there is not then the packets are not processed by IPsec.
+The value
+.Li 2
+is synonymous with
+.Dq Li require ,
+which requires that a security association must exist for the packets
+to move, and not be dropped.
+These terms are defined in
+.Xr ipsec_set_policy 8 .
+.Bl -column net.inet6.ipsec6.esp_trans_deflev integerxxx
+.It Sy "Name Type Changeable"
+.It "net.inet.ipsec.esp_trans_deflev integer yes"
+.It "net.inet.ipsec.esp_net_deflev integer yes"
+.It "net.inet.ipsec.ah_trans_deflev integer yes"
+.It "net.inet.ipsec.ah_net_deflev integer yes"
+.It "net.inet6.ipsec6.esp_trans_deflev integer yes"
+.It "net.inet6.ipsec6.esp_net_deflev integer yes"
+.It "net.inet6.ipsec6.ah_trans_deflev integer yes"
+.It "net.inet6.ipsec6.ah_net_deflev integer yes"
+.El
+.Pp
+If the kernel does not find a matching, system wide, policy then the
+default value is applied.
+The system wide default policy is specified
+by the following
+.Xr sysctl 8
+variables.
+.Li 0
+means
+.Dq Li discard
+which asks the kernel to drop the packet.
+.Li 1
+means
+.Dq Li none .
+.Bl -column net.inet6.ipsec6.def_policy integerxxx
+.It Sy "Name Type Changeable"
+.It "net.inet.ipsec.def_policy integer yes"
+.It "net.inet6.ipsec6.def_policy integer yes"
+.El
+.\"
+.Ss Miscellaneous sysctl variables
+When the
+.Nm
+protocols are configured for use, all protocols are included in the system.
+To selectively enable/disable protocols, use
+.Xr sysctl 8 .
+.Bl -column net.inet.ipcomp.ipcomp_enable
+.It Sy "Name Default"
+.It "net.inet.esp.esp_enable On"
+.It "net.inet.ah.ah_enable On"
+.It "net.inet.ipcomp.ipcomp_enable On"
+.El
+.Pp
+In addition the following variables are accessible via
+.Xr sysctl 8 ,
+for tweaking the kernel's IPsec behavior:
+.Bl -column net.inet6.ipsec6.inbonud_call_ike integerxxx
+.It Sy "Name Type Changeable"
+.It "net.inet.ipsec.ah_cleartos integer yes"
+.It "net.inet.ipsec.ah_offsetmask integer yes"
+.It "net.inet.ipsec.dfbit integer yes"
+.It "net.inet.ipsec.ecn integer yes"
+.It "net.inet.ipsec.debug integer yes"
+.It "net.inet6.ipsec6.ecn integer yes"
+.It "net.inet6.ipsec6.debug integer yes"
+.El
+.Pp
+The variables are interpreted as follows:
+.Bl -tag -width 6n
+.It Li ipsec.ah_cleartos
+If set to non-zero, the kernel clears the type-of-service field in the IPv4 header
+during AH authentication data computation.
+This variable is used to get current systems to inter-operate with devices that
+implement RFC1826 AH.
+It should be set to non-zero
+(clear the type-of-service field)
+for RFC2402 conformance.
+.It Li ipsec.ah_offsetmask
+During AH authentication data computation, the kernel will include a
+16bit fragment offset field
+(including flag bits)
+in the IPv4 header, after computing logical AND with the variable.
+The variable is used for inter-operating with devices that
+implement RFC1826 AH.
+It should be set to zero
+(clear the fragment offset field during computation)
+for RFC2402 conformance.
+.It Li ipsec.dfbit
+This variable configures the kernel behavior on IPv4 IPsec tunnel encapsulation.
+If set to 0, the DF bit on the outer IPv4 header will be cleared while
+1 means that the outer DF bit is set regardless from the inner DF bit and
+2 indicates that the DF bit is copied from the inner header to the
+outer one.
+The variable is supplied to conform to RFC2401 chapter 6.1.
+.It Li ipsec.ecn
+If set to non-zero, IPv4 IPsec tunnel encapsulation/decapsulation behavior will
+be friendly to ECN
+(explicit congestion notification),
+as documented in
+.Li draft-ietf-ipsec-ecn-02.txt .
+.Xr gif 4
+talks more about the behavior.
+.It Li ipsec.debug
+If set to non-zero, debug messages will be generated via
+.Xr syslog 3 .
+.El
+.Pp
+Variables under the
+.Li net.inet6.ipsec6
+tree have similar meanings to those described above.
+.\"
+.Sh PROTOCOLS
+The
+.Nm
+protocol acts as a plug-in to the
+.Xr inet 4
+and
+.Xr inet6 4
+protocols and therefore supports most of the protocols defined upon
+those IP-layer protocols.
+The
+.Xr icmp 4
+and
+.Xr icmp6 4
+protocols may behave differently with
+.Nm
+because
+.Nm
+can prevent
+.Xr icmp 4
+or
+.Xr icmp6 4
+routines from looking into the IP payload.
+.\"
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr socket 2 ,
+.Xr ipsec_set_policy 3 ,
+.Xr crypto 4 ,
+.Xr enc 4 ,
+.Xr icmp6 4 ,
+.Xr intro 4 ,
+.Xr ip6 4 ,
+.Xr setkey 8 ,
+.Xr sysctl 8
+.\".Xr racoon 8
+.Rs
+.%A "S. Kent"
+.%A "R. Atkinson"
+.%T "IP Authentication Header"
+.%O "RFC 2404"
+.Re
+.Rs
+.%A "S. Kent"
+.%A "R. Atkinson"
+.%T "IP Encapsulating Security Payload (ESP)"
+.%O "RFC 2406"
+.Re
+.Sh STANDARDS
+.Rs
+.%A Daniel L. McDonald
+.%A Craig Metz
+.%A Bao G. Phan
+.%T "PF_KEY Key Management API, Version 2"
+.%R RFC
+.%N 2367
+.Re
+.Pp
+.Rs
+.%A "D. L. McDonald"
+.%T "A Simple IP Security API Extension to BSD Sockets"
+.%R internet draft
+.%N "draft-mcdonald-simple-ipsec-api-03.txt"
+.%O work in progress material
+.Re
+.Sh HISTORY
+The original
+.Nm
+implementation appeared in the WIDE/KAME IPv6/IPsec stack.
+.Pp
+For
+.Fx 5.0
+a fully locked IPsec implementation called fast_ipsec was brought in.
+The protocols drew heavily on the
+.Ox
+implementation of the
+.Tn IPsec
+protocols.
+The policy management code was derived from the
+.Tn KAME
+implementation found
+in their
+.Tn IPsec
+protocols.
+The fast_ipsec implementation lacked
+.Xr ip6 4
+support but made use of the
+.Xr crypto 4
+subsystem.
+.Pp
+For
+.Fx 7.0
+.Xr ip6 4
+support was added to fast_ipsec.
+After this the old KAME IPsec implementation was dropped and fast_ipsec
+became what now is the only
+.Nm
+implementation in
+.Fx .
+.Sh BUGS
+There is no single standard for the policy engine API,
+so the policy engine API described herein is just for this implementation.
+.Pp
+AH and tunnel mode encapsulation may not work as you might expect.
+If you configure inbound
+.Dq require
+policy with an AH tunnel or any IPsec encapsulating policy with AH
+(like
+.Dq Li esp/tunnel/A-B/use ah/transport/A-B/require ) ,
+tunnelled packets will be rejected.
+This is because the policy check is enforced on the inner packet on reception,
+and AH authenticates encapsulating
+(outer)
+packet, not the encapsulated
+(inner)
+packet
+(so for the receiving kernel there is no sign of authenticity).
+The issue will be solved when we revamp our policy engine to keep all the
+packet decapsulation history.
+.Pp
+When a large database of security associations or policies is present
+in the kernel the
+.Dv SADB_DUMP
+and
+.Dv SADB_SPDDUMP
+operations on
+.Dv PF_KEY
+sockets may fail due to lack of space.
+Increasing the socket buffer
+size may alleviate this problem.
+.Pp
+The
+.Tn IPcomp
+protocol may occasionally error because of
+.Xr zlib 3
+problems.
+.Pp
+This documentation needs more review.
diff --git a/share/man/man4/ipw.4 b/share/man/man4/ipw.4
new file mode 100644
index 0000000..9becdfa
--- /dev/null
+++ b/share/man/man4/ipw.4
@@ -0,0 +1,155 @@
+.\" Copyright (c) 2004-2006
+.\" Damien Bergamini <damien.bergamini@free.fr>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice unmodified, this list of conditions, and the following
+.\" disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 13, 2008
+.Dt IPW 4
+.Os
+.Sh NAME
+.Nm ipw
+.Nd "Intel PRO/Wireless 2100 IEEE 802.11 driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ipw"
+.Cd "device ipwfw"
+.Cd "device pci"
+.Cd "device wlan"
+.Cd "device firmware"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ipw_load="YES"
+.Ed
+.Pp
+In both cases, place the following line in
+.Xr loader.conf 5
+to acknowledge the firmware license (see below):
+.Bd -literal -offset indent
+legal.intel_ipw.license_ack=1
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the
+.Tn Intel
+PRO/Wireless 2100 MiniPCI network adapter.
+.Nm
+supports
+.Cm station ,
+.Cm adhoc ,
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+This driver requires the firmware built with the
+.Nm ipwfw
+module to work.
+For the loaded firmware to be enabled for use the license at
+.Pa /usr/share/doc/legal/intel_ipw/LICENSE
+must be agreed by adding the following line to
+.Xr loader.conf 5 :
+.Pp
+.Dl "legal.intel_ipw.license_ack=1"
+.Sh FILES
+.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw/LICENSE" -compact
+.It Pa /usr/share/doc/legal/intel_ipw/LICENSE
+.Nm
+firmware license
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev ipw0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev ipw0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev ipw0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Pp
+Join a specific BSS network with 128-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev ipw0 wlanmode adhoc ssid my_net \e
+ wepmode on wepkey 0x01020304050607080910111213 weptxkey 1
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ipw%d: device timeout"
+The driver will reset the hardware.
+This should not happen.
+.It "ipw%d: firmware error"
+The onboard microcontroller crashes for some reason.
+The driver will reset the hardware.
+This should not happen.
+.It "ipw%d: timeout waiting for firmware initialization to complete"
+The onboard microcontroller failed to initialize in time.
+This should not happen.
+.It "ipw%d: could not load firmware image '%s'"
+The driver failed to load the firmware image using the
+.Xr firmware 9
+subsystem.
+Verify the
+.Xr ipwfw 4
+firmware module is installed and the license agreement
+.Xr loader 8
+tunable has been set.
+.It "ipw%d: could not load microcode"
+An attempt to upload the microcode image to the onboard microcontroller failed.
+This should not happen.
+.It "ipw%d: could not load firmware"
+An attempt to upload the firmware image to the onboard microcontroller failed.
+This should not happen.
+.El
+.Sh SEE ALSO
+.Xr ipwfw 4 ,
+.Xr pci 4 ,
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Sh AUTHORS
+The original
+.Nm
+driver was written by
+.An Damien Bergamini Aq damien.bergamini@free.fr .
diff --git a/share/man/man4/ipwfw.4 b/share/man/man4/ipwfw.4
new file mode 100644
index 0000000..b901de8
--- /dev/null
+++ b/share/man/man4/ipwfw.4
@@ -0,0 +1,75 @@
+.\" Copyright (c) 2009 Sam Leffler, Errno Consulting
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 14, 2010
+.Dt IPWFW 4
+.Os
+.Sh NAME
+.Nm ipwfw
+.Nd "Firmware Module for Intel PRO/Wireless 2100 driver"
+.Sh SYNOPSIS
+To compile this module into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ipwfw"
+.Ed
+.Pp
+This will include three firmware images inside the kernel.
+If you want to pick only the firmware image for the mode you want to operate
+your network adapter in choose one of the following:
+.Bd -ragged -offset indent
+.Cd "device ipwbssfw"
+.Cd "device ipwibssfw"
+.Cd "device ipwmonitorfw"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ipw_bss_load="YES"
+ipw_ibss_load="YES"
+ipw_monitor_load="YES"
+.Ed
+.Sh DESCRIPTION
+This module provides access to firmware sets for the
+Intel PRO/Wireless 2100 series of IEEE 802.11 adapters.
+It may be statically linked into the kernel, or loaded as a module.
+.Pp
+For the loaded firmware to be enabled for use the license at
+.Pa /usr/share/doc/legal/intel_ipw/LICENSE
+must be agreed to by adding the following line to
+.Xr loader.conf 5 :
+.Pp
+.Dl "legal.intel_ipw.license_ack=1"
+.Sh FILES
+.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw/LICENSE" -compact
+.It Pa /usr/share/doc/legal/intel_ipw/LICENSE
+.Nm
+firmware license
+.El
+.Sh SEE ALSO
+.Xr ipw 4 ,
+.Xr firmware 9
diff --git a/share/man/man4/isci.4 b/share/man/man4/isci.4
new file mode 100644
index 0000000..1d9353d
--- /dev/null
+++ b/share/man/man4/isci.4
@@ -0,0 +1,113 @@
+.\"
+.\" Copyright (c) 2012 Intel Corporation
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions, and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" substantially similar to the "NO WARRANTY" disclaimer below
+.\" ("Disclaimer") and any redistribution must be conditioned upon
+.\" including a substantially similar Disclaimer requirement for further
+.\" binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" isci driver man page.
+.\"
+.\" Author: Jim Harris <jimharris@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 23, 2012
+.Dt ISCI 4
+.Os
+.Sh NAME
+.Nm isci
+.Nd Intel C600 Serial Attached SCSI driver
+.Sh SYNOPSIS
+To compile this driver into your kernel,
+place the following lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device isci"
+.Ed
+.Pp
+Or, to load the driver as a module at boot, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+isci_load="YES"
+.Ed
+.Sh HARDWARE
+The
+.Nm
+driver provides support for Intel C600
+.Tn SAS
+controllers.
+.Sh CONFIGURATION
+To force legacy interrupts for all
+.Nm
+driver instances, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hw.isci.force_legacy_interrupts=1
+.Ed
+.Sh DEBUGGING
+To enable debugging prints from the
+.Nm
+driver, set the
+.Bd -literal -offset indent
+hw.isci.debug_level
+.Ed
+.Pp
+variable to a value between 1 and 4 in
+.Xr loader.conf 5 .
+.Pp
+The hardware layer in the
+.Nm
+driver has extensive logging capabilities
+which are disabled by default for performance reasons.
+These can be enabled by adding
+.Bd -literal -offset indent
+options ISCI_LOGGING
+.Ed
+.Pp
+to the kernel configuration file.
+.Sh SEE ALSO
+.Xr cd 4 ,
+.Xr ch 4 ,
+.Xr da 4 ,
+.Xr pci 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 8.3
+and 9.1.
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was developed by Intel and originally written by
+.An Jim Harris Aq jimharris@FreeBSD.org
+with contributions from Sohaib Ahsan and input from
+.An Scott Long Aq scottl@FreeBSD.org .
+.Pp
+This man page was written by
+.An Jim Harris Aq jimharris@FreeBSD.org .
diff --git a/share/man/man4/iscsi_initiator.4 b/share/man/man4/iscsi_initiator.4
new file mode 100644
index 0000000..d48a757
--- /dev/null
+++ b/share/man/man4/iscsi_initiator.4
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2007-2010 Daniel Braniss <danny@cs.huji.ac.il>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 3, 2010
+.Dt ISCSI_INITIATOR 4
+.Os
+.Sh NAME
+.Nm iscsi_initiator
+.Nd kernel driver for the iSCSI protocol
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device iscsi_initiator"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+iscsi_initiator_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+implements the kernel side of the Internet SCSI (iSCSI) network
+protocol standard, the user land companion is
+.Xr iscontrol 8 ,
+and permits access to remote
+.Em virtual
+SCSI devices via
+.Xr cam 4 .
+.Sh SYSCTL VARIABLES
+.Bl -tag -width ".Va net.iscsi.n.targeaddress"
+.It Va debug.iscsi_initiator
+set the debug-level, 0 means no debugging, 9 for maximum.
+.It Va net.iscsi.isid
+the initiator part of the Session Identifier.
+.It Va "kern.cam.cam_srch_hi=1"
+allow search above LUN 7 for SCSI3 and greater devices.
+.It "the following are informative only:"
+.It Va net.iscsi.driver_version
+the current version of the driver.
+.It Va net.iscsi.sessions
+the number of current active sessions.
+.It Va net.iscsi.n.targetname
+is the targe name of session
+.Em n .
+.It Va net.iscsi.n.targeaddress
+is the IP address of the target of session
+.Em n .
+.It Va net.iscsi.n.stats
+are some statistics for session
+.Em n
+.It Va net.iscsi.n.pid
+is the
+.Em "process id"
+of the userland side of session
+.Em n ,
+see
+.Xr iscontrol 8 .
+.El
+.Sh FILES
+The
+.Nm
+driver creates the following:
+.Pp
+.Bl -tag -width ".Pa /dev/iscsi%dxx" -compact
+.It Pa /dev/iscsi
+used to create new sessions.
+.It Pa /dev/iscsi%d
+for each new session.
+.El
+.Sh SEE ALSO
+.Xr cam 4 ,
+.Xr camcontrol 8 ,
+.Xr iscontrol 8
+.Sh STANDARDS
+iSCSI RFC 3720
+.\" .Sh HISTORY
+.Sh AUTHORS
+This software was written by Daniel Braniss <danny@cs.huji.ac.il>
+.Sh BUGS
+The lun discovery method is old-fashioned.
diff --git a/share/man/man4/ismt.4 b/share/man/man4/ismt.4
new file mode 100644
index 0000000..15baf4b
--- /dev/null
+++ b/share/man/man4/ismt.4
@@ -0,0 +1,59 @@
+.\"
+.\" Copyright (c) 2014 Intel Corporation
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions, and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of Intel Corporation nor the names of its
+.\" contributors may be used to endorse or promote products derived from
+.\" this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" ismt driver man page.
+.\"
+.\" Author: Jim Harris <jimharris@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 9, 2014
+.Dt ISMT 4
+.Os
+.Sh NAME
+.Nm ismt
+.Nd Intel SMBus Message Transport (SMBus 2.0) driver
+.Sh SYNOPSIS
+.Cd device pci
+.Cd device smbus
+.Cd device smb
+.Cd device ismt
+.Sh DESCRIPTION
+This driver provides access to the SMBus 2.0 controller device contained
+in the Intel Atom S1200 and C2000 CPUs.
+.Sh SEE ALSO
+.Xr smb 4 ,
+.Xr smbus 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 11.0 .
+.Sh AUTHORS
+.An Jim Harris Aq jimharris@FreeBSD.org
diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4
new file mode 100644
index 0000000..23fd4b1
--- /dev/null
+++ b/share/man/man4/isp.4
@@ -0,0 +1,238 @@
+.\" $NetBSD: isp.4,v 1.5 1999/12/18 18:33:05 mjacob Exp $
+.\"
+.\" Copyright (c) 1998, 1999, 2001
+.\" Matthew Jacob, for NASA/Ames Research Center
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" Additional Copyright (c) 2006 by Marcus Alves Grando
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 28, 2007
+.Dt ISP 4
+.Os
+.Sh NAME
+.Nm isp
+.Nd Qlogic based SCSI and FibreChannel SCSI Host Adapters
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device isp"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+isp_load="YES"
+.Ed
+.Sh DESCRIPTION
+This driver provides access to
+.Tn SCSI
+or
+.Tn FibreChannel
+devices.
+.Pp
+SCSI features include support for Ultra SCSI and wide mode transactions
+for
+.Tn SCSI ,
+Ultra2 LVD (for the ISP1080 and ISP1280), and Ultra3 LVD (for the
+ISP12160).
+.Pp
+Fibre Channel support uses FCP SCSI profile for
+.Tn FibreChannel ,
+and utilizes Class 3 and Class 2 connections (Qlogic 2100 is Class
+3 only, minor patches to the Qlogic 2200 to force Class 2 mode).
+Support is available for Public and Private loops, and for
+point-to-point connections (Qlogic 2200 only).
+The newer 2-Gigabit cards (2300, 2312, 2322) and 4-Gigabit (2422, 2432)
+are also supported.
+Command tagging is
+supported for all (in fact,
+.Tn FibreChannel
+requires tagging).
+Fabric support is enabled by default for other than 2100 cards.
+Fabric
+support for 2100 cards has been so problematic and these cards are so
+old now that it is just not worth your time to try it.
+.Sh FIRMWARE
+Firmware is available if the
+.Xr ispfw 4
+module is loaded during bootstrap (q.v.).
+.Pp
+It is
+.Ar strongly
+recommended that you use the firmware available
+from
+.Xr ispfw 4
+as it is the most likely to have been tested with this driver.
+.Sh HARDWARE
+Cards supported by the
+.Nm
+driver include:
+.Bl -tag -width xxxxxx -offset indent
+.It ISP1000
+SBus Fast Wide, Ultra Fast Wide cards, Single Ended or Differential
+cards.
+.It ISP1020
+Qlogic 1020 Fast Wide and Differential Fast Wide PCI cards.
+.It ISP1040
+Qlogic 1040 Ultra Wide and Differential Ultra Wide PCI cards.
+Also known as the DEC KZPBA-CA (single ended) and KZPBA-CB (HVD differential).
+.It Qlogic 1240
+Qlogic 1240 Dual Bus Ultra Wide and Differential Ultra Wide PCI
+cards.
+.It Qlogic 1020
+Qlogic 1020 SCSI cards.
+.It Qlogic 1040
+Qlogic 1040 Ultra SCSI cards.
+.It Qlogic 1080
+Qlogic 1280 LVD Ultra2 Wide PCI cards.
+.It Qlogic 1280
+Qlogic 1280 Dual Bus LVD Ultra2 Wide PCI cards.
+.It Qlogic 12160
+Qlogic 12160 Dual Bus LVD Ultra3 Wide PCI cards.
+.It Qlogic 210X
+Qlogic 2100 and 2100A Copper and Optical Fibre Channel Arbitrated
+Loop (single, dual).
+.It Qlogic 220X
+Qlogic 2200 Copper and Optical Fibre Channel Arbitrated Loop PCI
+cards (single, dual, quad).
+.It Qlogic 2300
+Qlogic 2300 Optical Fibre Channel PCI cards.
+.It Qlogic 2312
+Qlogic 2312 Optical Fibre Channel PCI cards.
+.It Qlogic 234X
+Qlogic 234X Optical Fibre Channel PCI cards (2312 chipset, single and dual attach).
+.It Qlogic 2322
+Qlogic 2322 Optical Fibre Channel PCIe cards.
+.It Qlogic 200
+Dell Branded version of the QLogic 2312 Fibre Channel PCI cards.
+.It Qlogic 2422
+Qlogic 2422 Optical Fibre Channel PCI cards (4 Gigabit)
+.It Qlogic 2432
+Qlogic 2432 Optical Fibre Channel PCIe cards (4 Gigabit)
+.El
+.Sh CONFIGURATION OPTIONS
+Target mode support may be enabled with the
+.Pp
+.Cd options ISP_TARGET_MODE
+.Pp
+option.
+.Sh BOOT OPTIONS
+The following options are switchable by setting values in
+.Pa /boot/device.hints .
+.Pp
+They are:
+.Bl -tag -width indent
+.It Va hint.isp.0.disable
+A hint value to disable driver in kernel.
+.It Va hint.isp.0.fwload_disable
+A hint value to disable loading of firmware
+.Xr ispfw 4 .
+.It Va hint.isp.0.prefer_memmap
+A hint value to use PCI memory space instead of I/O space
+access for.
+.It Va hint.isp.0.prefer_iomap
+A hint value to use PCI I/O space instead of Memory space
+access for.
+.It Va hint.isp.0.ignore_nvram
+A hint value to ignore board NVRAM settings for.
+Otherwise use NVRAM settings.
+.It Va hint.isp.0.fullduplex
+A hint value to set full duplex mode.
+.It Va hint.isp.0.topology
+A hint value to select topology of connection.
+Supported values are:
+.Pp
+.Bl -tag -width ".Li lport-only" -compact
+.It Li lport
+Prefer loopback and fallback to point to point.
+.It Li nport
+Prefer point to point and fallback to loopback.
+.It Li lport-only
+Loopback only.
+.It Li nport-only
+Point to point only.
+.El
+.It Va hint.isp.0.portwwn
+This should be the full 64 bit World Wide Port Name you would like
+to use, overriding the value in NVRAM for the card.
+.It Va hint.isp.0.nodewwn
+This should be the full 64 bit World Wide Node Name you would like
+to use, overriding the value in NVRAM for the card.
+.It Va hint.isp.0.iid
+A hint to override or set the Initiator ID or Loop ID.
+For Fibre Channel
+cards in Local Loop topologies it is
+.Ar strongly
+recommended that you set this value to non-zero.
+.It Va hint.isp.0.role
+A hint to define default role for isp instance (target, initiator, both).
+.It Va hint.isp.0.debug
+A hint value for a driver debug level (see the file
+.Pa /usr/src/sys/dev/isp/ispvar.h
+for the values.
+.El
+.Sh SYSCTL OPTIONS
+.Bl -tag -width indent
+.It Va dev.isp.N.loop_down_limit
+This value says how long to wait in seconds after loop has gone down before
+giving up and expiring all of the devices that were visible.
+The default is 300 seconds (5 minutes).
+A separate (nonadjustable) timeout is used when
+booting to not stop booting on lack of FC connectivity.
+.It Va dev.isp.N.gone_device_time
+This value says how long to wait for devices to reappear if they (temporarily)
+disappear due to loop or fabric events.
+While this timeout is running, I/O
+to those devices will simply be held.
+.It Va dev.isp.N.wwnn
+This is the readonly World Wide Node Name value for this port.
+.It Va dev.isp.N.wwpn
+This is the readonly World Wide Port Name value for this port.
+.El
+.Sh SEE ALSO
+.Xr da 4 ,
+.Xr intro 4 ,
+.Xr ispfw 4 ,
+.Xr sa 4 ,
+.Xr scsi 4 ,
+.Xr gmultipath 8
+.Sh AUTHORS
+The
+.Nm
+driver was written by Matthew Jacob originally for NetBSD at
+NASA/Ames Research Center.
+.Sh BUGS
+The driver currently ignores some NVRAM settings.
+.Pp
+Target mode support is not completely reliable yet.
+It works reasonably
+well for Fibre Channel, somewhat well for Qlogic 1040 cards, but
+does not yet work for the other cards (due to last minute unannounced
+changes in firmware interfaces).
diff --git a/share/man/man4/ispfw.4 b/share/man/man4/ispfw.4
new file mode 100644
index 0000000..5755501
--- /dev/null
+++ b/share/man/man4/ispfw.4
@@ -0,0 +1,59 @@
+.\" Copyright (c) 2000
+.\" Matthew Jacob
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 20, 2000
+.Dt ISPFW 4
+.Os
+.Sh NAME
+.Nm ispfw
+.Nd "Firmware Module for Qlogic based SCSI and FibreChannel SCSI Host Adapters"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ispfw"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ispfw_load="YES"
+.Ed
+.Sh DESCRIPTION
+This trivial driver provides access to firmware sets for the Qlogic
+based SCSI and FibreChannel SCSI Host Adapters.
+It may either be
+statically linked into the kernel, or loaded as a module.
+In either
+case, the
+.Xr isp 4
+driver will notice that firmware is available to be downloaded onto
+Qlogic cards (to replace the usually out of date firmware on the cards).
+This will kick the f/w into getting unstuck.
+.Sh SEE ALSO
+.Xr isp 4
+.Sh AUTHORS
+This driver was written by Matthew Jacob.
diff --git a/share/man/man4/iwi.4 b/share/man/man4/iwi.4
new file mode 100644
index 0000000..97ff634
--- /dev/null
+++ b/share/man/man4/iwi.4
@@ -0,0 +1,160 @@
+.\" Copyright (c) 2004-2006
+.\" Damien Bergamini <damien.bergamini@free.fr>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice unmodified, this list of conditions, and the following
+.\" disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 13, 2008
+.Dt IWI 4
+.Os
+.Sh NAME
+.Nm iwi
+.Nd "Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+include the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device iwi"
+.Cd "device iwifw"
+.Cd "device pci"
+.Cd "device wlan"
+.Cd "device firmware"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_iwi_load="YES"
+.Ed
+.Pp
+In both cases, place the following line in
+.Xr loader.conf 5
+to acknowledge the firmware license (see below):
+.Bd -literal -offset indent
+legal.intel_iwi.license_ack=1
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for
+.Tn Intel
+PRO/Wireless 2200BG/2915ABG MiniPCI and 2225BG PCI network adapters.
+.Nm
+supports
+.Cm station ,
+.Cm adhoc ,
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+This driver requires the firmware built with the
+.Nm iwifw
+module to work.
+For the loaded firmware to be enabled for use the license at
+.Pa /usr/share/doc/legal/intel_iwi/LICENSE
+must be agreed by adding the following line to
+.Xr loader.conf 5 :
+.Pp
+.Dl "legal.intel_iwi.license_ack=1"
+.Sh FILES
+.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi/LICENSE" -compact
+.It Pa /usr/share/doc/legal/intel_iwi/LICENSE
+.Nm
+firmware license
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev iwi0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev iwi0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev iwi0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Pp
+Join a specific BSS network with 128-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev iwi0 wlanmode adhoc ssid my_net \e
+ wepmode on wepkey 0x01020304050607080910111213 weptxkey 1
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "iwi%d: device timeout"
+The driver will reset the hardware.
+This should not happen.
+.It "iwi%d: firmware error"
+The onboard microcontroller crashed for some reason.
+The driver will reset the hardware.
+This should not happen.
+.It "iwi%d: timeout waiting for firmware initialization to complete"
+The onboard microcontroller failed to initialize in time.
+This should not happen.
+.It "iwi%d: could not load firmware image '%s'"
+The driver failed to load the firmware image using the
+.Xr firmware 9
+subsystem.
+Verify the
+.Xr iwifw 4
+firmware module is installed and the license agreement
+.Xr loader 8
+tunable has been set.
+.It "iwi%d: could not load boot firmware"
+An attempt to upload the boot firmware image to the onboard microcontroller
+failed.
+This should not happen.
+.It "iwi%d: could not load microcode"
+An attempt to upload the microcode image to the onboard microcontroller failed.
+This should not happen.
+.It "iwi%d: could not load main firmware"
+An attempt to upload the main firmware image to the onboard microcontroller
+failed.
+This should not happen.
+.El
+.Sh SEE ALSO
+.Xr iwifw 4 ,
+.Xr pci 4 ,
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8 .
+.Sh AUTHORS
+The original
+.Nm
+driver was written by
+.An Damien Bergamini Aq damien.bergamini@free.fr
diff --git a/share/man/man4/iwifw.4 b/share/man/man4/iwifw.4
new file mode 100644
index 0000000..7effd3d
--- /dev/null
+++ b/share/man/man4/iwifw.4
@@ -0,0 +1,75 @@
+.\" Copyright (c) 2009 Sam Leffler, Errno Consulting
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 14, 2010
+.Dt IWIFW 4
+.Os
+.Sh NAME
+.Nm iwifw
+.Nd "Firmware Module for Intel PRO/Wireless 2200BG/2225BG/2915ABG driver"
+.Sh SYNOPSIS
+To compile this module into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device iwifw"
+.Ed
+.Pp
+This will include three firmware images inside the kernel.
+If you want to pick only the firmware image for the mode you want to operate
+your network adapter in choose one of the following:
+.Bd -ragged -offset indent
+.Cd "device iwibssfw"
+.Cd "device iwiibssfw"
+.Cd "device iwimonitorfw"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+iwi_bss_load="YES"
+iwi_ibss_load="YES"
+iwi_monitor_load="YES"
+.Ed
+.Sh DESCRIPTION
+This module provides access to firmware sets for the
+Intel PRO/Wireless 2200BG/2225BG/2915ABG series of IEEE 802.11 adapters.
+It may be statically linked into the kernel, or loaded as a module.
+.Pp
+For the loaded firmware to be enabled for use the license at
+.Pa /usr/share/doc/legal/intel_iwi/LICENSE
+must be agreed to by adding the following line to
+.Xr loader.conf 5 :
+.Pp
+.Dl "legal.intel_iwi.license_ack=1"
+.Sh FILES
+.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi/LICENSE" -compact
+.It Pa /usr/share/doc/legal/intel_iwi/LICENSE
+.Nm
+firmware license
+.El
+.Sh SEE ALSO
+.Xr iwi 4 ,
+.Xr firmware 9
diff --git a/share/man/man4/iwn.4 b/share/man/man4/iwn.4
new file mode 100644
index 0000000..f489321
--- /dev/null
+++ b/share/man/man4/iwn.4
@@ -0,0 +1,195 @@
+.\" Copyright (c) 2004-2006
+.\" Damien Bergamini <damien.bergamini@free.fr>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice unmodified, this list of conditions, and the following
+.\" disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 28, 2014
+.Dt IWN 4
+.Os
+.Sh NAME
+.Nm iwn
+.Nd Intel IEEE 802.11n wireless network driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+include the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device iwn"
+.Cd "device pci"
+.Cd "device wlan"
+.Cd "device firmware"
+.Ed
+.Pp
+You also need to select a firmware for your device.
+Choose one from:
+.Bd -ragged -offset indent
+.Cd "device iwn1000fw"
+.Cd "device iwn2000fw"
+.Cd "device iwn2030fw"
+.Cd "device iwn4965fw"
+.Cd "device iwn5000fw"
+.Cd "device iwn5150fw"
+.Cd "device iwn6000fw"
+.Cd "device iwn6000g2afw"
+.Cd "device iwn6000g2bfw"
+.Cd "device iwn6050fw"
+.Ed
+.Pp
+Or you can use
+.Bd -ragged -offset indent
+.Cd "device iwnfw"
+.Ed
+.Pp
+to include them all.
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_iwn_load="YES"
+iwn1000fw_load="YES"
+iwn2000fw_load="YES"
+iwn2030fw_load="YES"
+iwn4965fw_load="YES"
+iwn5000fw_load="YES"
+iwn5150fw_load="YES"
+iwn6000fw_load="YES"
+iwn6000g2afw_load="YES"
+iwn6000g2bfw_load="YES"
+iwn6050fw_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for:
+.Pp
+.Bl -tag -width Ds -offset indent -compact
+.It Intel Centrino Advanced-N 6200
+.It Intel Centrino Advanced-N 6205
+.It Intel Centrino Advanced-N 6230
+.It Intel Centrino Advanced-N + WiMAX 6250
+.It Intel Centrino Ultimate-N 6300
+.It Intel Centrino Wireless-N 100
+.It Intel Centrino Wireless-N 105
+.It Intel Centrino Wireless-N 130
+.It Intel Centrino Wireless-N 1000
+.It Intel Centrino Wireless-N 1030
+.It Intel Centrino Wireless-N 2200
+.It Intel Centrino Wireless-N 2230
+.It Intel Centrino Wireless-N 4965
+.It Intel Centrino Wireless-N 5100
+.It Intel Centrino Wireless-N 6150
+.It Intel Centrino Wireless-N 6200
+.It Intel Centrino Wireless-N 6250
+.It Intel Centrino Wireless-N 6250
+.It Intel Centrino Wireless-N + WiMAX 6150
+.It Intel Ultimate N WiFi Link 5300
+.It Intel Wireless WiFi Link 4965
+.It Intel WiFi Link 5100
+.It Intel WiMAX/WiFi Link 5150
+.It Intel WiMAX/WiFi Link 5350
+.El
+.Pp
+.Nm
+supports
+.Cm station
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+This driver requires the firmware built with the
+.Nm iwnfw
+module to work.
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev iwn0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev iwn0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev iwn0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Pp
+Join a specific BSS network with 128-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev iwn0 wlanmode adhoc ssid my_net \e
+ wepmode on wepkey 0x01020304050607080910111213 weptxkey 1
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "iwn%d: device timeout"
+The driver will reset the hardware.
+This should not happen.
+.It "iwn%d: firmware error"
+The onboard microcontroller crashed for some reason.
+The driver will reset the hardware.
+This should not happen.
+.It "iwn%d: timeout waiting for firmware initialization to complete"
+The onboard microcontroller failed to initialize in time.
+This should not happen.
+.It "iwn%d: could not load firmware image '%s'"
+The driver failed to load the firmware image using the
+.Xr firmware 9
+subsystem.
+Verify the
+.Xr iwnfw 4
+firmware module is present.
+.It "iwn%d: could not load boot firmware"
+An attempt to upload the boot firmware image to the onboard microcontroller
+failed.
+This should not happen.
+.It "iwn%d: could not load microcode"
+An attempt to upload the microcode image to the onboard microcontroller failed.
+This should not happen.
+.It "iwn%d: could not load main firmware"
+An attempt to upload the main firmware image to the onboard microcontroller
+failed.
+This should not happen.
+.El
+.Sh SEE ALSO
+.Xr iwnfw 4 ,
+.Xr pci 4 ,
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Sh AUTHORS
+The original
+.Nm
+driver was written by
+.An Damien Bergamini Aq damien.bergamini@free.fr .
diff --git a/share/man/man4/iwnfw.4 b/share/man/man4/iwnfw.4
new file mode 100644
index 0000000..7af2bb2
--- /dev/null
+++ b/share/man/man4/iwnfw.4
@@ -0,0 +1,78 @@
+.\" Copyright (c) 2009 Sam Leffler, Errno Consulting
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 9, 2014
+.Dt IWNFW 4
+.Os
+.Sh NAME
+.Nm iwnfw
+.Nd "Firmware Module for Intel Wireless driver"
+.Sh SYNOPSIS
+To compile this module into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device iwnfw"
+.Ed
+.Pp
+This will include three firmware images inside the kernel.
+If you want to pick only the firmware image for your network adapter choose one
+of the following:
+.Bd -ragged -offset indent
+.Cd "device iwn1000fw"
+.Cd "device iwn2000fw"
+.Cd "device iwn2030fw"
+.Cd "device iwn4965fw"
+.Cd "device iwn5000fw"
+.Cd "device iwn5150fw"
+.Cd "device iwn6000fw"
+.Cd "device iwn6000g2afw"
+.Cd "device iwn6000g2bfw"
+.Cd "device iwn6050fw"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+iwn1000fw_load="YES"
+iwn2000fw_load="YES"
+iwn2030fw_load="YES"
+iwn4965fw_load="YES"
+iwn5000fw_load="YES"
+iwn5150fw_load="YES"
+iwn6000fw_load="YES"
+iwn6000g2afw_load="YES"
+iwn6000g2bfw_load="YES"
+iwn6050fw_load="YES"
+.Ed
+.Sh DESCRIPTION
+This module provides access to firmware sets for the
+Intel Wireless WiFi Link 1000, 2000, 2030, 4965, 5000 and 6000 series of
+IEEE 802.11n adapters.
+It may be
+statically linked into the kernel, or loaded as a module.
+.Sh SEE ALSO
+.Xr iwn 4 ,
+.Xr firmware 9
diff --git a/share/man/man4/ixgb.4 b/share/man/man4/ixgb.4
new file mode 100644
index 0000000..59d1648
--- /dev/null
+++ b/share/man/man4/ixgb.4
@@ -0,0 +1,125 @@
+.\" Copyright (c) 2001-2004, Intel Corporation
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright notice,
+.\" this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" 3. Neither the name of the Intel Corporation nor the names of its
+.\" contributors may be used to endorse or promote products derived from
+.\" this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" * Other names and brands may be claimed as the property of others.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 18, 2006
+.Dt IXGB 4
+.Os
+.Sh NAME
+.Nm ixgb
+.Nd "Intel(R) PRO/10GbE Ethernet driver for the FreeBSD operating system"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ixgb"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ixgb_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Gigabit Ethernet adapters based on
+the Intel 82597EX Ethernet controller chips.
+The driver supports Transmit/Receive checksum offload
+and Jumbo Frames.
+.Pp
+For questions related to hardware requirements,
+refer to the documentation supplied with your Intel PRO/10GbE adapter.
+All hardware requirements listed apply to use with
+.Fx .
+.Pp
+Support for Jumbo Frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+The maximum MTU size for Jumbo Frames is 16114.
+.Pp
+This driver version supports VLANs.
+For information on enabling VLANs, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports the following cards:
+.Pp
+.Bl -bullet -compact
+.It
+Intel PRO/10GbE LR Server Adapter
+.It
+Intel PRO/10GbE SR Server Adapter
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ixgb%d: Unable to allocate bus resource: memory"
+A fatal initialization error has occurred.
+.It "ixgb%d: Unable to allocate bus resource: interrupt"
+A fatal initialization error has occurred.
+.It "ixgb%d: watchdog timeout -- resetting"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Sh SUPPORT
+For general information and support,
+go to the Intel support website at:
+.Pa http://support.intel.com .
+.Pp
+If an issue is identified with the released source code on the supported kernel
+with a supported adapter, email the specific information related to the
+issue to
+.Aq freebsd@intel.com .
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr em 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.11
+and
+.Fx 5.3 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Intel Corporation Aq freebsd@intel.com .
diff --git a/share/man/man4/ixgbe.4 b/share/man/man4/ixgbe.4
new file mode 100644
index 0000000..be056d3
--- /dev/null
+++ b/share/man/man4/ixgbe.4
@@ -0,0 +1,126 @@
+.\" Copyright (c) 2001-2008, Intel Corporation
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright notice,
+.\" this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" 3. Neither the name of the Intel Corporation nor the names of its
+.\" contributors may be used to endorse or promote products derived from
+.\" this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" * Other names and brands may be claimed as the property of others.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 19, 2010
+.Dt IXGBE 4
+.Os
+.Sh NAME
+.Nm ixgbe
+.Nd "Intel(R) 10Gb Ethernet driver for the FreeBSD operating system"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ixgbe"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ixgbe_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI 10Gb Ethernet adapters based on
+the Intel 82598EB Intel(R) Network Connections.
+The driver supports Jumbo Frames, MSIX, TSO, and RSS.
+.Pp
+For questions related to hardware requirements,
+refer to the documentation supplied with your Intel 10GbE adapter.
+All hardware requirements listed apply to use with
+.Fx .
+.Pp
+Support for Jumbo Frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+The maximum MTU size for Jumbo Frames is 16114.
+.Pp
+This driver version supports VLANs.
+For information on enabling VLANs, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports the following cards:
+.Pp
+.Bl -bullet -compact
+.It
+Intel(R) 10 Gigabit XF SR/AF Dual Port Server Adapter
+.It
+Intel(R) 10 Gigabit XF SR/LR Server Adapter
+.It
+Intel(R) 82598EB 10 Gigabit AF Network Connection
+.It
+Intel(R) 82598EB 10 Gigabit AT CX4 Network Connection
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ixgbe%d: Unable to allocate bus resource: memory"
+A fatal initialization error has occurred.
+.It "ixgbe%d: Unable to allocate bus resource: interrupt"
+A fatal initialization error has occurred.
+.It "ixgbe%d: watchdog timeout -- resetting"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Sh SUPPORT
+For general information and support,
+go to the Intel support website at:
+.Pa http://support.intel.com .
+.Pp
+If an issue is identified with the released source code on the supported kernel
+with a supported adapter, email the specific information related to the
+issue to
+.Aq freebsd@intel.com .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 7.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Intel Corporation Aq freebsd@intel.com .
diff --git a/share/man/man4/jme.4 b/share/man/man4/jme.4
new file mode 100644
index 0000000..e17a797
--- /dev/null
+++ b/share/man/man4/jme.4
@@ -0,0 +1,197 @@
+.\" Copyright (c) 2008 Pyun YongHyeon
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 4, 2012
+.Dt JME 4
+.Os
+.Sh NAME
+.Nm jme
+.Nd JMicron Gigabit/Fast Ethernet driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device jme"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_jme_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for JMicron JMC25x PCI Express
+Gigabit Ethernet controllers and JMicron JMC26x PCI Express Fast
+Ethernet controllers.
+.Pp
+All LOMs supported by the
+.Nm
+driver have TCP/UDP/IP checksum offload for both transmit and receive,
+TCP segmentation offload (TSO), hardware VLAN tag stripping/insertion
+features, Wake On Lan (WOL) and an interrupt coalescing/moderation
+mechanism as well as a 64-bit multicast hash filter.
+.Pp
+The JMC25x also supports Jumbo Frames (up to 9216 bytes), which can be
+configured via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+.It Cm 1000baseTX
+Set 1000baseTX operation over twisted pair.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+device driver provides support for the following Ethernet controllers:
+.Pp
+.Bl -bullet -compact
+.It
+JMicron JMC250 PCI Express Gigabit Ethernet controller
+.It
+JMicron JMC251 PCI Express Gigabit Ethernet with Card Read Host controller
+.It
+JMicron JMC260 PCI Express Fast Ethernet controller
+.It
+JMicron JMC261 PCI Express Gigabit Ethernet with Card Read Host controller
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "xxxxxx"
+.It Va hw.jme.msi_disable
+This tunable disables MSI support on the Ethernet hardware.
+The default value is 0.
+.It Va hw.jme.msix_disable
+This tunable disables MSI-X support on the Ethernet hardware.
+The default value is 0.
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width "xxxxxx"
+.It Va dev.jme.%d.tx_coal_to
+This variable sets the maximum amount of time to delay
+before sending a Tx completion interrupt, in microseconds.
+The accepted range is 1 to 65535; the default is 100 (100us).
+.It Va dev.jme.%d.tx_coal_pkt
+This variable sets the maximum number of outgoing packets which may be
+coalesced together into a single Tx completion interrupt.
+The accepted range is 1 to 255; the default is 8.
+.It Va dev.jme.%d.rx_coal_to
+This variable sets the maximum amount of time to wait for
+additional packets to arrive (for possible packet coalescing)
+before firing an Rx completion interrupt, in microseconds.
+The accepted range is 1 to 65535; the default is 100 (100us).
+.It Va dev.jme.%d.rx_coal_pkt
+This variable sets the maximum number of incoming packets which may be
+coalesced into a single Rx completion interrupt.
+The accepted range is 1 to 255; the default is 2.
+.It Va dev.jme.%d.process_limit
+This variable sets the maximum number of events that will be processed
+in a single batch before the handler is requeued into a taskqueue.
+The accepted range is 10 to 255; the default value is 128 events.
+The interface does not need to be brought down and up again before
+a change takes effect.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver was written by
+.An Pyun YongHyeon
+.Aq yongari@FreeBSD.org .
+It first appeared in
+.Fx 7.1 .
+.Sh CAVEATS
+The
+.Nm
+driver tries to avoid unnecessary station address reprogramming for
+controllers that use eFuse to store station address.
+The number of times that eFuse can be safely reprogrammed is 16 at
+most.
+In addition, there is no way to restore the factory default station
+address once the station address has been reprogrammed via eFuse.
+It is highly recommended not to reprogram the station address and
+it is the responsibility of the administrator to store the original station
+address in a safe place when station address is changed.
+.Pp
+There are two known 1000baseT link establishment issues with JMC25x.
+If the full mask revision number of JMC25x controller is less than
+or equal to 4 and the link partner enabled the IEEE 802.3az Energy Efficient
+Ethernet feature, the controller will not be able to establish a
+1000baseT link.
+Also, if the length of the cable is longer than 120 meters, the controller
+can not establish a 1000baseT link.
+The known workaround for these issues is to force manual link
+configuration with 100baseTX instead of relying on auto-negotiation.
+The full mask revision number of controller can be checked with the
+verbose kernel boot option.
+Use the lower nibble of the chip revision number to get the
+full mask revision of the controller.
diff --git a/share/man/man4/joy.4 b/share/man/man4/joy.4
new file mode 100644
index 0000000..4de2f5a
--- /dev/null
+++ b/share/man/man4/joy.4
@@ -0,0 +1,119 @@
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 23, 1995
+.Dt JOY 4
+.Os
+.Sh NAME
+.Nm joy
+.Nd joystick device driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device joy"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+joy_load="YES"
+.Ed
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.joy.0.at="isa"
+.Cd hint.joy.0.port="0x201"
+.Cd hint.joy.1.at="isa"
+.Cd hint.joy.1.port="0x201"
+.Pp
+.In sys/joystick.h
+.Sh DESCRIPTION
+The joystick device driver allows applications to read the status of
+the PC joystick.
+.Pp
+This device may be opened by only one process at a time.
+.Pp
+The joystick status is read from a structure via a read()
+call.
+The structure is defined in the header file as follows:
+.Bd -literal -offset indent
+ struct joystick {
+ int x; /* x position */
+ int y; /* y position */
+ int b1; /* button 1 status */
+ int b2; /* button 2 status */
+ };
+.Ed
+.Pp
+Positions are typically in the range 0-2000.
+.Ss One line perl example:
+.Bd -literal -compact
+perl -e 'open(JOY,"/dev/joy0")||die;while(1)
+{sysread(JOY,$x,16);@j=unpack("iiii",$x);print "@j\\n";sleep(1);}'
+.Ed
+.Ss ioctl calls
+Several ioctl() calls are also available.
+They take an argument of
+type int *
+.Bl -tag -width JOY_SET_X_OFFSET
+.It Dv JOY_SETTIMEOUT Fa int *limit
+Set the time limit (in microseconds) for reading the joystick
+status.
+Setting a value
+too small may prevent to get correct values for the positions (which
+are then set to -2147483648), however this can be useful if one is
+only interested by the buttons status.
+.It Dv JOY_GETTIMEOUT Fa int *limit
+Get the time limit (in microseconds) used for reading the joystick
+status.
+.It Dv JOY_SET_X_OFFSET Fa int *offset
+Set the value to be added to the X position when reading the joystick
+status.
+.It Dv JOY_SET_Y_OFFSET Fa int *offset
+Set the value to be added to the Y position when reading the joystick
+status.
+.It Dv JOY_GET_X_OFFSET Fa int *offset
+Get the value which is added to the X position when reading the joystick
+status.
+.It Dv JOY_GET_Y_OFFSET Fa int *offset
+Get the value which is added to the Y position when reading the joystick
+status.
+.El
+.Sh TECHNICAL SPECIFICATIONS
+The pinout of the DB-15 connector is as follow:
+.Bd -literal
+ 1 XY1 (+5v)
+ 2 Switch 1
+ 3 X1 (potentiometer #1)
+ 4 Switch 1 (GND)
+ 5 Switch 2 (GND)
+ 6 Y1 (potentiometer #2)
+ 7 Switch 2
+ 8 N.C.
+ 9 XY2 (+5v)
+ 10 Switch 4
+ 11 X2 (potentiometer #3)
+ 12 Switch 3&4 (GND)
+ 13 Y2 (potentiometer #4)
+ 14 Switch 3
+ 15 N.C.
+.Ed
+.Pp
+Pots are normally 0-150k variable resistors (0-100k sometimes), and
+according to the IBM technical reference, the time is given by
+Time = 24.2e-6s + 0.011e-6s * R/Ohms
+.Sh FILES
+.Bl -tag -width /dev/joy?
+.It Pa /dev/joy?
+joystick device files
+.El
+.Sh HISTORY
+The
+.Nm
+driver appeared in
+.Fx 2.0.5 .
+.Sh AUTHORS
+.An Jean-Marc Zucconi Aq jmz@cabri.obs-besancon.fr
diff --git a/share/man/man4/kbdmux.4 b/share/man/man4/kbdmux.4
new file mode 100644
index 0000000..72b5889
--- /dev/null
+++ b/share/man/man4/kbdmux.4
@@ -0,0 +1,56 @@
+.\" $Id: kbdmux.4,v 1.1 2005/07/14 20:32:10 max Exp $
+.\" $FreeBSD$
+.\"
+.Dd July 12, 2005
+.Dt KBDMUX 4
+.Os
+.Sh NAME
+.Nm kbdmux
+.Nd "keyboard multiplexer"
+.Sh SYNOPSIS
+.Cd "device kbdmux"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.kbdmux.0.disabled="1"
+.Sh DESCRIPTION
+The
+.Nm
+keyboard driver provides support for basic keyboard multiplexing.
+It is built around the idea of a
+.Dq "super keyboard" .
+The
+.Nm
+driver
+acts as a master keyboard consuming input from all slave keyboards attached to
+it.
+.Pp
+Slave keyboards can be attached to or detached from the
+.Nm
+keyboard driver with the
+.Xr kbdcontrol 1
+utility.
+.Sh SEE ALSO
+.Xr kbdcontrol 1 ,
+.Xr atkbd 4 ,
+.Xr syscons 4 ,
+.Xr ukbd 4
+.Sh HISTORY
+The
+.Nm
+module was implemented in
+.Fx 6.0 .
+.Sh AUTHORS
+.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
+.Sh CAVEATS
+The
+.Nm
+keyboard driver switches all slave keyboards into
+.Dv K_RAW
+mode.
+Thus all slave keyboards attached to the
+.Nm
+keyboard share the same state.
+The
+.Nm
+keyboard is logically equivalent to one keyboard with lots of duplicated keys.
diff --git a/share/man/man4/keyboard.4 b/share/man/man4/keyboard.4
new file mode 100644
index 0000000..8cff292
--- /dev/null
+++ b/share/man/man4/keyboard.4
@@ -0,0 +1,170 @@
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 8, 1995
+.Dt KEYBOARD 4
+.Os
+.Sh NAME
+.Nm keyboard
+.Nd pc keyboard interface
+.Sh DESCRIPTION
+The PC keyboard is used as the console character input device.
+The keyboard
+is owned by the current virtual console.
+To switch between the virtual consoles use the sequence
+.Ar ALT+Fn ,
+which means hold down ALT and press one of the function keys.
+The
+virtual console with the same number as the function key is then
+selected as the current virtual console and given exclusive use of
+the keyboard and display.
+.Pp
+The console allows entering values that are not physically
+present on the keyboard via a special keysequence.
+To use this facility press and hold down ALT,
+then enter a decimal number from 0-255 via the numerical keypad, then
+release ALT.
+The entered value is then used as the ASCII value for one
+character.
+This way it is possible to enter any ASCII value, not present
+on the keyboard.
+The console driver also includes a history function.
+It is activated by
+pressing the scroll-lock key.
+This holds the display, and enables the cursor
+arrows for scrolling up and down through the last scrolled out lines.
+.Pp
+The keyboard is configurable to suit the individual user and the different
+national layout.
+.Pp
+The keys on the keyboard can have any of the following functions:
+.Pp
+.Bl -tag -width "Modifier Key" -compact
+.It "Normal key"
+Enter the ASCII value associated with the key.
+.It "Function key"
+Enter a string of ASCII values.
+.It "Switch Key"
+Switch virtual console.
+.It "Modifier Key"
+Change the meaning of another key.
+.El
+.Pp
+The keyboard is seen as a number of keys numbered from 1 to n.
+This
+number is often referred to as the "scancode" for a given key.
+The number
+of the key is transmitted as an 8 bit char with bit 7 as 0 when a key is
+pressed, and the number with bit 7 as 1 when released.
+This makes it
+possible to make the mapping of the keys fully configurable.
+.Pp
+The meaning of every key is programmable via the PIO_KEYMAP ioctl call, that
+takes a structure keymap_t as argument.
+The layout of this structure is as
+follows:
+.Bd -literal -offset indent
+ struct keymap {
+ u_short n_keys;
+ struct key_t {
+ u_char map[NUM_STATES];
+ u_char spcl;
+ u_char flgs;
+ } key[NUM_KEYS];
+ };
+.Ed
+.Pp
+The field n_keys tells the system how many keydefinitions (scancodes)
+follows.
+Each scancode is then specified in the key_t substructure.
+.Pp
+Each scancode can be translated to any of 8 different values, depending
+on the shift, control, and alt state.
+These eight possibilities are
+represented by the map array, as shown below:
+.Bd -literal
+ alt
+ scan cntrl alt alt cntrl
+ code base shift cntrl shift alt shift cntrl shift
+ map[n] 0 1 2 3 4 5 6 7
+ ---- ------------------------------------------------------
+ 0x1E 'a' 'A' 0x01 0x01 'a' 'A' 0x01 0x01
+.Ed
+.Pp
+This is the default mapping for the key labelled 'A' which normally has
+scancode 0x1E.
+The eight states are as shown, giving the 'A' key its
+normal behavior.
+The spcl field is used to give the key "special" treatment, and is
+interpreted as follows.
+Each bit corresponds to one of the states above.
+If the bit is 0 the
+key emits the number defined in the corresponding map[] entry.
+If the bit is 1 the key is "special".
+This means it does not emit
+anything; instead it changes the "state".
+That means it is a shift,
+control, alt, lock, switch-screen, function-key or no-op key.
+The bitmap is backwards i.e.,
+7 for base, 6 for shift etc.
+.Pp
+The flgs field defines if the key should react on caps-lock (1),
+num-lock (2), both (3) or ignore both (0).
+.Pp
+The
+.Xr kbdcontrol 1
+utility is used to load such a description into/outof
+the kernel at runtime.
+This makes it possible to change the key
+assignments at runtime, or more important to get (GIO_KEYMAP ioctl)
+the exact key meanings from the kernel (e.g.\& used by the X server).
+.Pp
+The function keys can be programmed using the SETFKEY ioctl call.
+.Pp
+This ioctl takes an argument of the type fkeyarg_t:
+.Bd -literal -offset indent
+ struct fkeyarg {
+ u_short keynum;
+ char keydef[MAXFK];
+ char flen;
+ };
+.Ed
+.Pp
+The field keynum defines which function key that is programmed.
+The array keydef should contain the new string to be used (MAXFK long),
+and the length should be entered in flen.
+.Pp
+The GETFKEY ioctl call works in a similar manner, except it returns
+the current setting of keynum.
+.Pp
+The function keys are numbered like this:
+.Bd -literal -offset indent
+ F1-F12 key 1 - 12
+ Shift F1-F12 key 13 - 24
+ Ctrl F1-F12 key 25 - 36
+ Ctrl+shift F1-F12 key 37 - 48
+
+ Home key 49
+ Up arrow key 50
+ Page Up key 51
+ (keypad) - key 52
+ Left arrow key 53
+ (keypad) 5 key 54
+ Right arrow key 55
+ (keypad) + key 56
+ End key 57
+ Down arrow key 58
+ Page down key 59
+ Insert key 60
+ Delete key 61
+
+ Left window key 62
+ Right window key 63
+ Menu key 64
+.Ed
+.Pp
+The
+.Xr kbdcontrol 1
+utility also allows changing these values at runtime.
+.Sh AUTHORS
+.An S\(/oren Schmidt Aq sos@FreeBSD.org
diff --git a/share/man/man4/kld.4 b/share/man/man4/kld.4
new file mode 100644
index 0000000..de991c4
--- /dev/null
+++ b/share/man/man4/kld.4
@@ -0,0 +1,175 @@
+.\" Copyright (c) 1993 Christopher G. Demetriou
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 13, 2014
+.Dt KLD 4
+.Os
+.Sh NAME
+.Nm kld
+.Nd dynamic kernel linker facility
+.Sh DESCRIPTION
+The LKM (Loadable Kernel Modules) facility has been deprecated in
+.Fx 3.0
+and above in favor of the
+.Nm
+interface.
+This interface, like its
+predecessor, allows the system administrator to dynamically add and remove
+functionality from a running system.
+This ability also helps software
+developers to develop new parts of the kernel without constantly rebooting
+to test their changes.
+.Pp
+Various types of modules can be loaded into the system.
+There are several defined module types, listed below, which can
+be added to the system in a predefined way.
+In addition, there
+is a generic type, for which the module itself handles loading and
+unloading.
+.Pp
+The
+.Fx
+system makes extensive use of loadable kernel modules, and provides loadable
+versions of most file systems, the
+.Tn NFS
+client and server, all the screen-savers, and the
+.Tn iBCS2
+and
+.Tn Linux
+emulators.
+.Nm
+modules are placed by default in the
+.Pa /boot/kernel
+directory along with their matching kernel.
+.Pp
+The
+.Nm
+interface is used through the
+.Xr kldload 8 ,
+.Xr kldunload 8
+and
+.Xr kldstat 8
+programs.
+.Pp
+The
+.Xr kldload 8
+program can load either
+.Xr a.out 5
+or ELF formatted loadable modules.
+The
+.Xr kldunload 8
+program unloads any given loaded module, if no other module is dependent
+upon the given module.
+The
+.Xr kldstat 8
+program is used to check the status of the modules currently loaded into the
+system.
+.Pp
+Kernel modules may only be loaded or unloaded if the system security level
+.Va kern.securelevel
+is less than one.
+.Sh "MODULE TYPES"
+.Bl -ohang
+.It Em "Device Driver modules"
+New block and character device
+drivers may be loaded into the system with
+.Nm .
+Device nodes for the loaded drivers are automatically created when a
+module is loaded and destroyed when it is unloaded by
+.Xr devfs 5 .
+You can specify userland programs that will run when new devices
+become available as a result of loading modules, or existing devices
+go away when modules are unloaded, by configuring
+.Xr devd 8 .
+.El
+.Sh FILES
+.Bl -tag -width /usr/include/sys/module.h -compact
+.It Pa /boot/kernel
+directory containing module binaries built for the kernel also
+residing in the directory.
+.It Pa /usr/include/sys/module.h
+file containing definitions required to compile a
+.Nm
+module
+.It Pa /usr/share/examples/kld
+example source code implementing a sample kld module
+.El
+.Sh SEE ALSO
+.Xr kldfind 2 ,
+.Xr kldfirstmod 2 ,
+.Xr kldload 2 ,
+.Xr kldnext 2 ,
+.Xr kldstat 2 ,
+.Xr kldunload 2 ,
+.Xr devfs 5 ,
+.Xr devd 8 ,
+.Xr kldload 8 ,
+.Xr kldstat 8 ,
+.Xr kldunload 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+facility appeared in
+.Fx 3.0
+and was designed as a replacement for the
+.Nm lkm
+facility, which was similar in functionality to the loadable kernel modules
+facility provided by
+.Tn SunOS
+4.1.3.
+.Sh AUTHORS
+The
+.Nm
+facility was originally implemented by
+.An Doug Rabson Aq dfr@FreeBSD.org .
+.Sh BUGS
+If a module B, is dependent on another module A, but is not compiled with
+module A as a dependency, then
+.Xr kldload 8
+fails to load module B, even if module A is already present in the system.
+.Pp
+If multiple modules are dependent on module A, and are compiled with module
+A as a dependency, then
+.Xr kldload 8
+loads an instance of module A when any of the modules are loaded.
+.Pp
+If a custom entry point is used for a module, and the module is compiled as
+an
+.Sq ELF
+binary, then
+.Xr kldload 8
+fails to execute the entry point.
+.Pp
+.Xr kldload 8
+points the user to read
+.Xr dmesg 8
+for any error encountered while loading a module.
+.Pp
+When system internal interfaces change, old modules often cannot
+detect this, and such modules when loaded will often cause crashes or
+mysterious failures.
diff --git a/share/man/man4/ksyms.4 b/share/man/man4/ksyms.4
new file mode 100644
index 0000000..5c1dae0
--- /dev/null
+++ b/share/man/man4/ksyms.4
@@ -0,0 +1,154 @@
+.\" Copyright (c) 2008-2009 Stacey Son <sson@FreeBSD.org>
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 5, 2009
+.Dt KSYMS 4
+.Os
+.Sh NAME
+.Nm ksyms
+.Nd kernel symbol table interface
+.Sh SYNOPSIS
+.Cd "device ksyms"
+.Sh DESCRIPTION
+The
+.Pa /dev/ksyms
+character device provides a read-only interface to a snapshot of the kernel
+symbol table. The in-kernel symbol manager is designed to be able to handle
+many types of symbols tables, however, only
+.Xr elf 5
+symbol tables are supported by this device. The ELF format image contains two
+sections: a symbol table and a corresponding string table.
+.Bl -tag -width indent -offset indent
+.It Dv Symbol Table
+The SYMTAB section contains the symbol table entries present in the current
+running kernel, including the symbol table entries of any loaded modules. The
+symbols are ordered by the kernel module load time starting with kernel file
+symbols first, followed by the first loaded module's symbols and so on.
+.It Dv String Table
+The STRTAB section contains the symbol name strings from the kernel and any
+loaded modules that the symbol table entries reference.
+.El
+.Pp
+Elf formatted symbol table data read from the
+.Pa /dev/ksyms
+file represents the state of the kernel at the time when the device is opened.
+Since
+.Pa /dev/ksyms
+has no text or data, most of the fields are initialized to NULL.
+The
+.Nm
+driver does not block the loading or unloading of modules into the kernel
+while the
+.Pa /dev/ksyms
+file is open but may contain stale data.
+.Sh IOCTLS
+The
+.Xr ioctl 2
+command codes below are defined in
+.Aq Pa sys/ksyms.h .
+.Pp
+The (third) argument to the
+.Xr ioctl 2
+should be a pointer to the type indicated.
+.Bl -tag -width indent -offset indent
+.It Dv KIOCGSIZE (size_t)
+Returns the total size of the current symbol table.
+This can be used when allocating a buffer to make a copy of
+the kernel symbol table.
+.It Dv KIOCGADDR (void *)
+Returns the address of the kernel symbol table mapped in
+the process memory.
+.El
+.Sh FILES
+.Bl -tag -width /dev/ksymsX
+.It Pa /dev/ksyms
+.El
+.Sh ERRORS
+An
+.Xr open 2
+of
+.Pa /dev/ksyms
+will fail if:
+.Bl -tag -width Er
+.It Bq Er EBUSY
+The device is already open. A process must close
+.Pa /dev/ksyms
+before it can be opened again.
+.It Bq Er ENOMEM
+There is a resource shortage in the kernel.
+.It Bq Er ENXIO
+The driver was unsuccessful in creating a snapshot of the kernel symbol
+table. This may occur if the kernel was in the process of loading or
+unloading a module.
+.El
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr nlist 3 ,
+.Xr elf 5 ,
+.Xr kldload 8
+.Sh HISTORY
+A
+.Nm
+device exists in many different operating systems.
+This implementation is similar in function to the Solaris and NetBSD
+.Nm
+driver.
+.Pp
+The
+.Nm
+driver first appeared in
+.Fx 8.0
+to support
+.Xr lockstat 1 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Stacey Son
+.Aq sson@FreeBSD.org .
+.Sh BUGS
+Because files can be dynamically linked into the kernel at any time the symbol
+information can vary. When you open the
+.Pa /dev/ksyms
+file, you have access to an ELF image which represents a snapshot of the state of the kernel symbol information at that instant in time. Keeping the device open does not block the loading or unloading of kernel modules. To get a new snapshot you must close and re-open the device.
+.Pp
+A process is only allowed to open the
+.Pa /dev/ksyms
+file once at a time. The process must close the
+.Pa /dev/ksyms
+before it is allowed to open it again.
+.Pp
+The
+.Nm
+driver uses the calling process' memory address space to store the snapshot.
+.Xr ioctl 2
+can be used to get the memory address where the symbol table is stored to
+save kernel memory.
+.Xr mmap 2
+may also be used but it will map it to another address.
diff --git a/share/man/man4/ktr.4 b/share/man/man4/ktr.4
new file mode 100644
index 0000000..ee552b8
--- /dev/null
+++ b/share/man/man4/ktr.4
@@ -0,0 +1,211 @@
+.\" Copyright (c) 2001 John H. Baldwin <jhb@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 20, 2012
+.Dt KTR 4
+.Os
+.Sh NAME
+.Nm ktr
+.Nd kernel tracing facility
+.Sh SYNOPSIS
+.Cd options KTR
+.Cd options ALQ
+.Cd options KTR_ALQ
+.Cd options KTR_COMPILE=(KTR_LOCK|KTR_INTR|KTR_PROC)
+.Cd options KTR_CPUMASK=0x3
+.Cd options KTR_ENTRIES=8192
+.Cd options KTR_MASK=(KTR_INTR|KTR_PROC)
+.Cd options KTR_VERBOSE
+.Sh DESCRIPTION
+The
+.Nm
+facility allows kernel events to be logged while the kernel executes so that
+they can be examined later when debugging.
+The only mandatory option to enable
+.Nm
+is
+.Dq Li options KTR .
+.Pp
+The
+.Dv KTR_ENTRIES
+option sets the size of the buffer of events.
+The size of the buffer in the currently running kernel can be found via the
+sysctl
+.Va debug.ktr.entries .
+By default the buffer contains 1024 entries.
+.Ss Event Masking
+Event levels can be enabled or disabled to trim excessive and overly verbose
+logging.
+First, a mask of events is specified at compile time via the
+.Dv KTR_COMPILE
+option to limit which events are actually compiled into the kernel.
+The default value for this option is for all events to be enabled.
+.Pp
+Secondly, the actual events logged while the kernel runs can be further
+masked via the run time event mask.
+The
+.Dv KTR_MASK
+option sets the default value of the run time event mask.
+The runtime event mask can also be set by the
+.Xr loader 8
+via the
+.Va debug.ktr.mask
+environment variable.
+It can also be examined and set after booting via the
+.Va debug.ktr.mask
+sysctl.
+By default the run time mask is set to block any tracing.
+The definitions of the event mask bits can be found in
+.In sys/ktr.h .
+.Pp
+Furthermore, there is a CPU event mask whose default value can be changed via
+the
+.Dv KTR_CPUMASK
+option.
+When two or more parameters to
+.Dv KTR_CPUMASK ,
+are used, it is important they are not separated by whitespace.
+A CPU must have the bit corresponding to its logical id set in this bitmask
+for events that occur on it to be logged.
+This mask can be set by the
+.Xr loader 8
+via the
+.Va debug.ktr.cpumask
+environment variable.
+It can also be examined and set after booting via the
+.Va debug.ktr.cpumask
+sysctl.
+By default, only CPUs specified in
+.Dv KTR_CPUMASK
+will log events.
+See
+.Pa sys/conf/NOTES
+for more information.
+.Ss Verbose Mode
+By default, events are only logged to the internal buffer for examination
+later, but if the verbose flag is set then they are dumped to the kernel
+console as well.
+This flag can also be set from the loader via the
+.Va debug.ktr.verbose
+environment variable, or it can be examined and set after booting via the
+.Va debug.ktr.verbose
+sysctl.
+If the flag is set to zero, which is the default, then verbose output is
+disabled.
+If the flag is set to one, then the contents of the log message and the CPU
+number are printed to the kernel console.
+If the flag is greater than one, then the filename and line number of the
+event are output to the console in addition to the log message and the CPU
+number.
+The
+.Dv KTR_VERBOSE
+option sets the flag to one.
+.Ss Examining the Events
+The KTR buffer can be examined from within
+.Xr ddb 4
+via the
+.Ic show ktr Op Cm /vV
+command.
+This command displays the contents of the trace buffer one page at a time.
+At the
+.Dq Li --more--
+prompt, the Enter key displays one more entry and prompts again.
+The spacebar displays another page of entries.
+Any other key quits.
+By default the timestamp, filename, and line number are not displayed with
+each log entry.
+If the
+.Cm /v
+modifier is specified, then they are displayed in addition to the normal
+output.
+If the
+.Cm /V
+modifier is specified, then just the timestamp is displayed in
+addition to the normal output.
+Note that the events are displayed in reverse chronological order.
+That is, the most recent events are displayed first.
+.Ss Logging ktr to Disk
+The
+.Dv KTR_ALQ
+option can be used to log
+.Nm
+entries to disk for post analysis using the
+.Xr ktrdump 8
+utility.
+This option depends on the
+.Dv ALQ
+option.
+Due to the potentially high volume of trace messages the trace mask should be
+selected carefully.
+This feature is configured through a group of sysctls.
+.Bl -tag -width ".Va debug.ktr.alq_enable"
+.It Va debug.ktr.alq_file
+displays or sets the file that
+.Nm
+will log to.
+By default its value is
+.Pa /tmp/ktr.out .
+If the file name is changed while
+.Nm
+is enabled it will not take effect until
+the next invocation.
+.It Va debug.ktr.alq_enable
+enables logging of
+.Nm
+entries to disk if it is set to one.
+Setting this to 0 will terminate logging to disk and revert to
+logging to the normal ktr ring buffer.
+Data is not sent to the ring buffer while logging to disk.
+.It Va debug.ktr.alq_max
+is the maximum number of entries that will be recorded to disk, or 0 for
+infinite.
+This is helpful for limiting the number of particularly high frequency entries
+that are recorded.
+.It Va debug.ktr.alq_depth
+determines the number of entries in the write buffer.
+This is the buffer that holds entries before they are written to disk and
+defaults to the value of the
+.Dv KTR_ENTRIES
+option.
+.It Va debug.ktr.alq_failed
+records the number of times we failed to write an entry due to overflowing the
+write buffer.
+This may happen if the frequency of the logged
+.Nm
+messages outpaces the depth
+of the queue.
+.It Va debug.ktr.alq_cnt
+records the number of entries that have currently been written to disk.
+.El
+.Sh SEE ALSO
+.Xr ktrdump 8 ,
+.Xr alq 9 ,
+.Xr ktr 9
+.Sh HISTORY
+The KTR kernel tracing facility first appeared in
+.Bsx 3.0
+and was imported into
+.Fx 5.0 .
diff --git a/share/man/man4/kue.4 b/share/man/man4/kue.4
new file mode 100644
index 0000000..c9a8ad7
--- /dev/null
+++ b/share/man/man4/kue.4
@@ -0,0 +1,142 @@
+.\" Copyright (c) 1997, 1998, 1999, 2000
+.\" Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 7, 2006
+.Dt KUE 4
+.Os
+.Sh NAME
+.Nm kue
+.Nd "Kawasaki LSI KL5KUSB101B USB Ethernet driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device kue"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_kue_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB Ethernet adapters based on the Kawasaki
+LSI KL5KLUSB101B chipset.
+.Pp
+The KL5KLUSB101B supports a 128-entry multicast filter, single perfect
+filter entry for the station address and promiscuous mode.
+Packets are
+received and transmitted over separate USB bulk transfer endpoints.
+.Pp
+The Kawasaki chipset supports only 10Mbps half-duplex mode, hence there
+are no
+.Xr ifmedia 4
+modes to select.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Kawasaki LSI KL5KLUSB101B based USB Ethernet
+adapters including:
+.Pp
+.Bl -bullet -compact
+.It
+3Com 3c19250
+.It
+3Com 3c460 HomeConnect Ethernet USB Adapter
+.It
+ADS Technologies USB-10BT
+.It
+AOX USB101
+.It
+ATen UC10T
+.It
+Abocom URE 450
+.It
+Corega USB-T
+.It
+D-Link DSB-650C
+.It
+Entrega NET-USB-E45, NET-HUB-3U1E
+.It
+I/O Data USB ETT
+.It
+Kawasaki DU-H3E
+.It
+LinkSys USB10T
+.It
+Netgear EA101
+.It
+Peracom USB Ethernet Adapter
+.It
+Psion Gold Port USB Ethernet adapter
+.It
+SMC 2102USB, 2104USB
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "kue%d: watchdog timeout"
+A packet was queued for transmission and a transmit command was
+issued, however the device failed to acknowledge the transmission
+before a timeout expired.
+.It "kue%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ee.columbia.edu .
+.Sh BUGS
+The
+.Nm
+driver does not accumulate Ethernet collisions statistics because the
+Kawasaki firmware does not appear to maintain any internal statistics.
diff --git a/share/man/man4/lagg.4 b/share/man/man4/lagg.4
new file mode 100644
index 0000000..bb2cfc6
--- /dev/null
+++ b/share/man/man4/lagg.4
@@ -0,0 +1,202 @@
+.\" $OpenBSD: trunk.4,v 1.18 2006/06/09 13:53:34 jmc Exp $
+.\"
+.\" Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 23, 2012
+.Dt LAGG 4
+.Os
+.Sh NAME
+.Nm lagg
+.Nd link aggregation and link failover interface
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device lagg"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_lagg_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+interface allows aggregation of multiple network interfaces as one virtual
+.Nm
+interface for the purpose of providing fault-tolerance and high-speed links.
+.Pp
+A
+.Nm
+interface can be created using the
+.Ic ifconfig lagg Ns Ar N Ic create
+command.
+It can use different link aggregation protocols specified
+using the
+.Ic laggproto Ar proto
+option.
+Child interfaces can be added using the
+.Ic laggport Ar child-iface
+option and removed using the
+.Ic -laggport Ar child-iface
+option.
+.Pp
+The driver currently supports the aggregation protocols
+.Ic failover
+(the default),
+.Ic fec ,
+.Ic lacp ,
+.Ic loadbalance ,
+.Ic roundrobin ,
+and
+.Ic none .
+The protocols determine which ports are used for outgoing traffic
+and whether a specific port accepts incoming traffic.
+The interface link state is used to validate if the port is active or
+not.
+.Bl -tag -width loadbalance
+.It Ic failover
+Sends traffic only through the active port.
+If the master port becomes unavailable,
+the next active port is used.
+The first interface added is the master port;
+any interfaces added after that are used as failover devices.
+.Pp
+By default, received traffic is only accepted when they are received
+through the active port.
+This constraint can be relaxed by setting the
+.Va net.link.lagg.failover_rx_all
+.Xr sysctl 8
+variable to a nonzero value,
+which is useful for certain bridged network setups.
+.It Ic fec
+Supports Cisco EtherChannel.
+This is an alias for
+.Ic loadbalance
+mode.
+.It Ic lacp
+Supports the IEEE 802.1AX (formerly 802.3ad) Link Aggregation Control Protocol
+(LACP) and the Marker Protocol.
+LACP will negotiate a set of aggregable links with the peer in to one or more
+Link Aggregated Groups.
+Each LAG is composed of ports of the same speed, set to full-duplex operation.
+The traffic will be balanced across the ports in the LAG with the greatest
+total speed, in most cases there will only be one LAG which contains all ports.
+In the event of changes in physical connectivity, Link Aggregation will quickly
+converge to a new configuration.
+.It Ic loadbalance
+Balances outgoing traffic across the active ports based on hashed
+protocol header information and accepts incoming traffic from
+any active port.
+This is a static setup and does not negotiate aggregation with the peer or
+exchange frames to monitor the link.
+The hash includes the Ethernet source and destination address, and, if
+available, the VLAN tag, and the IP source and destination address.
+.It Ic roundrobin
+Distributes outgoing traffic using a round-robin scheduler
+through all active ports and accepts incoming traffic from
+any active port.
+.It Ic none
+This protocol is intended to do nothing: it disables any traffic without
+disabling the
+.Nm
+interface itself.
+.El
+.Pp
+Each
+.Nm
+interface is created at runtime using interface cloning.
+This is
+most easily done with the
+.Xr ifconfig 8
+.Cm create
+command or using the
+.Va cloned_interfaces
+variable in
+.Xr rc.conf 5 .
+.Pp
+The MTU of the first interface to be added is used as the lagg MTU.
+All additional interfaces are required to have exactly the same value.
+.Pp
+The
+.Ic loadbalance
+and
+.Ic lacp
+modes will use the RSS hash from the network card if available to avoid
+computing one, this may give poor traffic distribution if the hash is invalid
+or uses less of the protocol header information.
+Local hash computation can be forced per interface by setting the
+.Va net.link.lagg.X.use_flowid
+.Xr sysctl 8
+variable to zero where X is the interface number.
+The default for new interfaces is set via the
+.Va net.link.lagg.default_use_flowid
+.Xr sysctl 8 .
+.Sh EXAMPLES
+Create a link aggregation using LACP with two
+.Xr bge 4
+Gigabit Ethernet interfaces:
+.Bd -literal -offset indent
+# ifconfig bge0 up
+# ifconfig bge1 up
+# ifconfig lagg0 laggproto lacp laggport bge0 laggport bge1 \e
+ 192.168.1.1 netmask 255.255.255.0
+.Ed
+.Pp
+The following example uses an active failover interface to set up roaming
+between wired and wireless networks using two network devices.
+Whenever the wired master interface is unplugged, the wireless failover
+device will be used:
+.Bd -literal -offset indent
+# ifconfig em0 up
+# ifconfig ath0 ether 00:11:22:33:44:55
+# ifconfig create wlan0 wlandev ath0 ssid my_net up
+# ifconfig lagg0 laggproto failover laggport em0 laggport wlan0 \e
+ 192.168.1.1 netmask 255.255.255.0
+.Ed
+.Pp
+(Note the mac address of the wireless device is forced to match the wired
+device as a workaround.)
+.Sh SEE ALSO
+.Xr ng_one2many 4 ,
+.Xr sysctl 8 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device first appeared in
+.Fx 6.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written under the name
+.Nm trunk
+by
+.An Reyk Floeter Aq reyk@openbsd.org .
+The LACP implementation was written by
+.An YAMAMOTO Takashi
+for
+.Nx .
+.Sh BUGS
+There is no way to configure LACP administrative variables, including system
+and port priorities.
+The current implementation always performs active-mode LACP and uses 0x8000 as
+system and port priorities.
diff --git a/share/man/man4/le.4 b/share/man/man4/le.4
new file mode 100644
index 0000000..0a1823d
--- /dev/null
+++ b/share/man/man4/le.4
@@ -0,0 +1,476 @@
+.\" $NetBSD: le.4,v 1.22 2004/10/04 19:12:52 rumble Exp $
+.\"
+.\"-
+.\" Copyright (c) 1992, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" This software was developed by the Computer Systems Engineering group
+.\" at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+.\" contributed to Berkeley.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" from: Header: le.4,v 1.2 92/10/13 05:31:33 leres Exp
+.\" from: @(#)le.4 8.1 (Berkeley) 6/9/93
+.\" $FreeBSD$
+.\"
+.Dd January 20, 2007
+.Dt LE 4
+.Os
+.Sh NAME
+.Nm le
+.Nd "AMD Am7900 LANCE and Am79C9xx ILACC/PCnet Ethernet interface driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device le"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_le_load="YES"
+.Ed
+.Pp
+For C-Bus non-PnP adapters, the port address and the IRQ number have to be
+specified in
+.Pa /boot/device.hints :
+.Cd hint.le.0.at="isa"
+.Cd hint.le.0.port="0x03d0"
+.Cd hint.le.0.irq="6"
+.Pp
+For ISA non-PnP adapters, the port address as well as the IRQ and the DRQ
+numbers have to be specified in
+.Pa /boot/device.hints :
+.Cd hint.le.0.at="isa"
+.Cd hint.le.0.port="0x280"
+.Cd hint.le.0.irq="10"
+.Cd hint.le.0.drq="0"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Ethernet adapters based on the
+.Tn AMD Am7990
+and
+.Tn Am79C90
+.Pq CMOS, pin-compatible
+Local Area Network Controller for Ethernet
+.Pq Tn LANCE
+chips.
+.Pp
+The
+.Nm
+driver also supports Ethernet adapters based on the
+.Tn AMD Am79C900
+Integrated Local Area Communications Controller
+.Pq Tn ILACC
+as well as the
+.Tn Am79C9xx PCnet
+family of chips, which are single-chip implementations of a
+.Tn LANCE
+chip and a DMA engine.
+This includes a superset of the
+.Tn PCI
+bus Ethernet chips supported by the
+.Xr pcn 4
+driver.
+The
+.Nm
+driver treats all of these
+.Tn PCI
+bus Ethernet chips as an
+.Tn AMD Am79C970 PCnet-PCI
+and does not support the additional features like the MII bus and burst mode of
+.Tn AMD Am79C971 PCnet-FAST
+and greater chips.
+Thus the
+.Xr pcn 4
+driver should be preferred for the latter.
+.Pp
+Generally, the
+.Nm
+driver aims at supporting as many different chips on as many different
+platforms as possible,
+partially at the cost of the best performance with some of these.
+.Pp
+The
+.Nm
+driver supports reception and transmission of extended frames for
+.Xr vlan 4 .
+Selective reception of multicast Ethernet frames is provided by a 64-bit mask;
+multicast destination addresses are hashed to a bit entry using the Ethernet
+CRC function.
+.Sh HARDWARE
+.Ss C-Bus and ISA
+The
+.Nm
+driver supports
+.Tn C-Bus
+and
+.Tn ISA
+bus Ethernet adapters which are based on the following chips:
+.Pp
+.Bl -bullet -compact
+.It
+.Tn AMD Am7990 and Am79C90 LANCE
+.It
+.Tn AMD Am79C960 PCnet-ISA
+.It
+.Tn AMD Am79C961 PCnet-ISA+
+.It
+.Tn AMD Am79C961A PCnet-ISA II
+.El
+.Pp
+This includes support for the following Ethernet adapters:
+.Pp
+C-Bus non-PnP:
+.Pp
+.Bl -bullet -compact
+.It
+.Tn Contec C-NET(98)S
+.El
+.Pp
+ISA non-PnP:
+.Pp
+.Bl -bullet -compact
+.It
+.Tn BICC Isolan
+.\" .It
+.\" .Tn Digital DEPCA
+.It
+.Tn Novell NE2100
+.El
+.Pp
+ISA PnP:
+.Pp
+.Bl -bullet -compact
+.It
+.Tn AMD AM1500T/AM2100
+.It
+.Tn AMD PCnet-32
+.It
+.Tn AMD PCnet-ISA
+.It
+.Tn Allied Telesyn AT-1500
+.It
+.Tn Boca LANCard Combo
+.It
+.Tn Cabletron E2100 Series DNI
+.It
+.Tn Cabletron E2200 Single Chip
+.It
+.Tn Melco Inc. LGY-IV
+.It
+.Tn Novell NE2100
+.It
+.Tn Racal InterLan EtherBlaster
+.El
+.Pp
+The
+.Nm
+driver does not support the selection of media types and options via
+.Xr ifconfig 8
+with
+.Tn C-Bus
+and
+.Tn ISA
+bus Ethernet adapters.
+.\" .Ss EISA
+.\" The
+.\" .Tn EISA
+.\" bus Ethernet cards supported by the
+.\" .Nm
+.\" driver are:
+.\" .Pp
+.\" .Bl -bullet -compact
+.\" .It
+.\" .Tn DEC DE422
+.\" .El
+.\" .Ss MCA
+.\" The
+.\" .Tn MCA
+.\" bus Ethernet cards supported by the
+.\" .Nm
+.\" driver are:
+.\" .Pp
+.\" .Bl -bullet -compact
+.\" .It
+.\" .Tn SKNET Personal MC2
+.\" .It
+.\" .Tn SKNET MC2+
+.\" .El
+.Ss PCI
+The
+.Tn PCI
+bus Ethernet chips supported by the
+.Nm
+driver are:
+.Pp
+.Bl -bullet -compact
+.It
+.Tn AMD Am53C974/Am79C970/Am79C974 PCnet-PCI
+.It
+.Tn AMD Am79C970A PCnet-PCI II
+.It
+.Tn AMD Am79C971 PCnet-FAST
+.It
+.Tn AMD Am79C972 PCnet-FAST+
+.It
+.Tn AMD Am79C973/Am79C975 PCnet-FAST III
+.It
+.Tn AMD Am79C976 PCnet-PRO
+.It
+.Tn AMD Am79C978 PCnet-Home
+.El
+.Pp
+This includes support for the following Ethernet adapters:
+.Pp
+.Bl -bullet -compact
+.It
+.Tn AcerLAN NIC P20
+.It
+.Tn Allied Telesyn AT-2450 and AT-2700 series
+.It
+.Tn VMware emulated AMD Am79C970A PCnet-PCI II interface
+.El
+.Pp
+The
+.Nm
+driver supports the selection of the following media types via
+.Xr ifconfig 8
+with
+.Tn PCI
+bus Ethernet adapters:
+.Bl -tag -width ".Cm 10base5/AUI"
+.It Cm autoselect
+Enable autoselection of the media type.
+.It Cm 10baseT/UTP
+Select UTP media.
+.It Cm 10base5/AUI
+Select AUI/BNC media.
+.El
+.Pp
+The following media option is supported with these media types:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Select full duplex operation.
+.El
+.Pp
+Note that unlike the
+.Xr pcn 4
+driver, the
+.Nm
+driver does not support selecting 100Mbps (Fast Ethernet) media types.
+.Ss sparc64
+The
+.Nm
+driver supports the on-board
+.Tn LANCE
+interfaces found in
+.Tn Sun Ultra 1
+machines.
+The
+.Nm
+driver allows the selection of the following media types via
+.Xr ifconfig 8
+with these on-board interfaces:
+.Bl -tag -width ".Cm 10base5/AUI"
+.It Cm autoselect
+Enable autoselection of the media type.
+.It Cm 10baseT/UTP
+Select UTP media.
+.It Cm 10base5/AUI
+Select AUI media.
+.El
+.Pp
+When using autoselection, a default media type is selected for use by
+examining all ports for carrier.
+The first media type with which a carrier is detected will be selected.
+Additionally, if carrier is dropped on a port, the driver will switch
+between the possible ports until one with carrier is found.
+.Pp
+The
+.Nm
+driver also supports the following
+.Tn Sun SBus
+Ethernet add-on adapters:
+.Pp
+.Bl -bullet -compact
+.It
+.Tn SCSI HBA and Buffered Ethernet
+.Pq SBE/S, P/N 501-1869
+.It
+.Tn Fast SCSI and Buffered Ethernet
+.Pq FSBE/S, P/N 501-2015 and 501-2981
+.El
+.Pp
+The
+.Nm
+driver does not support the selection of media types and options via
+.Xr ifconfig 8
+with
+.Tn SBus
+Ethernet add-on adapters.
+.Pp
+For further information on configuring media types and options, see
+.Xr ifconfig 8 .
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "le%d: overflow"
+More packets came in from the Ethernet than there was space in the
+.Tn LANCE
+receive buffers.
+Packets were missed.
+.It "le%d: receive buffer error"
+The
+.Tn LANCE
+ran out of buffer space, packet dropped.
+.It "le%d: lost carrier"
+The Ethernet carrier disappeared during an attempt to transmit.
+The
+.Tn LANCE
+will finish transmitting the current packet,
+but will not automatically retry transmission if there is a collision.
+.It "le%d: excessive collisions, tdr %d"
+The Ethernet was extremely busy or jammed,
+outbound packets were dropped after 16 attempts to retransmit.
+.Pp
+TDR
+is the abbreviation of
+.Qq Time Domain Reflectometry .
+The optionally reported TDR value is an internal counter of the interval
+between the start of a transmission and the occurrence of a collision.
+This value can be used to determine the distance from the Ethernet tap to
+the point on the Ethernet cable that is shorted or open (unterminated).
+.It "le%d: dropping chained buffer"
+A packet did not fit into a single receive buffer and was dropped.
+Since the
+.Nm
+driver allocates buffers large enough to receive maximum sized Ethernet
+packets, this means some other station on the LAN transmitted a packet
+larger than allowed by the Ethernet standard.
+.It "le%d: transmit buffer error"
+The
+.Tn LANCE
+ran out of buffer space before finishing the transmission of a packet.
+If this error occurs, the driver software has a bug.
+.It "le%d: underflow"
+The
+.Tn LANCE
+ran out of buffer space before finishing the transmission of a packet.
+If this error occurs, the driver software has a bug.
+.It "le%d: controller failed to initialize"
+Driver failed to start the
+.Tn LANCE .
+This is potentially a hardware failure.
+.It "le%d: memory error"
+RAM failed to respond within the timeout when the
+.Tn LANCE
+wanted to read or write it.
+This is potentially a hardware failure.
+.It "le%d: receiver disabled"
+The receiver of the
+.Tn LANCE
+was turned off due to an error.
+.It "le%d: transmitter disabled"
+The transmitter of the
+.Tn LANCE
+was turned off due to an error.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr intro 4 ,
+.Xr netintro 4 ,
+.Xr pcn 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver was ported from
+.Nx
+and first appeared in
+.Fx 6.1 .
+The
+.Nx
+version in turn was derived from the
+.Nm
+driver which first appeared in
+.Bx 4.4 .
+.Sh AUTHORS
+The
+.Nm
+driver was ported by
+.An "Marius Strobl" Aq marius@FreeBSD.org .
+.\" .Sh BUGS
+.\" The Am7990 Revision C chips have a bug which causes garbage to be inserted
+.\" in front of the received packet occasionally.
+.\" The work-around is to ignore packets with an invalid destination address
+.\" (garbage will usually not match), by double-checking the destination
+.\" address of every packet in the driver.
+.\" This work-around can be enabled with the
+.\" .Dv LANCE_REVC_BUG
+.\" kernel option.
+.\" .Pp
+.\" When
+.\" .Dv LANCE_REVC_BUG
+.\" is enabled, the
+.\" .Nm
+.\" driver executes one or two calls to an inline Ethernet address comparison
+.\" function for every received packet.
+.\" On the
+.\" .Tn MC68000
+.\" it is exactly eight instructions of 16 bits each.
+.\" There is one comparison for each unicast packet, and two comparisons for
+.\" each broadcast packet.
+.\" .Pp
+.\" In summary, the cost of the LANCE_REVC_BUG option is:
+.\" .Bl -enum -compact
+.\" .It
+.\" loss of multicast support, and
+.\" .It
+.\" eight extra
+.\" .Tn CPU
+.\" instructions per received packet, sometimes sixteen, depending on both the
+.\" processor, and the type of packet.
+.\" .El
+.\" .Pp
+.\" All sun3 systems are presumed to have this bad revision of the Am7990,
+.\" until proven otherwise.
+.\" Alas, the only way to prove what revision of the chip is in a particular
+.\" system is inspection of the date code on the chip package,
+.\" to compare against a list of what chip revisions were fabricated between
+.\" which dates.
+.\" .Pp
+.\" Alas, the Am7990 chip is so old that
+.\" .Tn AMD
+.\" has
+.\" .Qq de-archived
+.\" the production information about it; pending a search elsewhere, we do not
+.\" know how to identify the revision C chip from the date codes.
diff --git a/share/man/man4/led.4 b/share/man/man4/led.4
new file mode 100644
index 0000000..b31a083
--- /dev/null
+++ b/share/man/man4/led.4
@@ -0,0 +1,193 @@
+.\" Copyright (c) 2003 Sergey A. Osokin <osa@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 24, 2007
+.Dt LED 4
+.Os
+.Sh NAME
+.Nm led
+.Nd API for manipulating LED's, lamps and other annunciators
+.Sh SYNOPSIS
+.In dev/led/led.h
+.Pp
+.Fd "typedef void led_t(void *priv, int onoff);"
+.Ft struct cdev *
+.Fn led_create_state "led_t *func" "void *priv" "char const *name" "int state"
+.Ft struct cdev *
+.Fn led_create "led_t *func" "void *priv" "char const *name"
+.Ft void
+.Fn led_destroy "struct cdev *"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides generic support for handling LEDs, lamps and other
+annunciators.
+.Pp
+The hardware driver must supply a function to turn the annunciator on and off
+and the device
+.Fa name
+of the annunciator relative to
+.Pa /dev/led/ .
+The
+.Fa priv
+argument is passed back to this on/off function and can be used however
+the hardware driver sees fit.
+.Pp
+The lamp can be controlled by opening and writing
+.Tn ASCII
+strings to the
+.Pa /dev/led/bla
+device.
+.Pp
+In the following, we will use this special notation to indicate the resulting
+output of the annunciator:
+.Pp
+.Bl -tag -width indent -offset indent -compact
+.It Ic *
+The annunciator is on for 1/10th second.
+.It Ic _
+The annunciator is off for 1/10th second.
+.El
+.Pp
+State can be set directly, and since the change happens immediately,
+it is possible to flash the annunciator with very short periods and
+synchronize it with program events.
+It should be noted that there is a non-trivial overhead, so this may
+not be usable for benchmarking or measuring short intervals.
+.Pp
+.Bl -tag -width indent -offset indent -compact
+.It Ic 0
+Turn the annunciator off immediately.
+.It Ic 1
+Turn the annunciator on immediately.
+.El
+.Pp
+Flashing can be set with a given period.
+The pattern continues endlessly.
+.Pp
+.Bl -tag -width indent -offset indent -compact
+.It Ic f
+_*
+.It Ic f1
+_*
+.It Ic f2
+__**
+.It Ic f3
+___***
+.It ...
+.It Ic f9
+_________*********
+.El
+.Pp
+Three high-level commands are available:
+.Bl -tag -width indent -offset indent
+.It Ic d%d
+Numbers.
+Each digit is blinked out at 1/10th second, zero as ten pulses.
+Between digits a one second pause and after the last
+digit a two second pause after which the sequence is repeated.
+.It Ic s%s
+String.
+This gives full control over the annunciator.
+Letters
+.Ql A
+.No ...
+.Ql J
+turn the annunciator on for from 1/10th to one full
+second.
+Letters
+.Ql a
+.No ...
+.Ql j
+turn the annunciator off for 1/10th
+to one full second.
+Letters
+.Ql u
+and
+.Ql U
+turn the annunciator off and on respectively when the next
+UTC second starts.
+Unless terminated with a
+.Ql \&. ,
+the sequence is immediately repeated.
+.It Ic m%s
+Morse.
+.Pp
+.Bl -tag -width indent -offset indent -compact
+.It Ql \&.
+becomes
+.Ql _*
+.It Ql -
+becomes
+.Sq Li _***
+.It Ql "\ "
+becomes
+.Sq Li __
+.It Ql \en
+becomes
+.Sq Li ____
+.El
+.El
+.Pp
+The sequence is repeated after a one second pause.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/led/*"
+.It Pa /dev/led/*
+.El
+.Sh EXAMPLES
+A
+.Sq Li d12
+flashes the lamp
+.Pp
+.Dl *__________*_*______________________________
+.Pp
+A
+.Sq Li sAaAbBa
+flashes
+.Pp
+.Dl *_*__**_
+.Bd -literal
+/usr/games/morse -l "Soekris rocks" > /dev/led/error
+.Ed
+.Sh SEE ALSO
+.Xr morse 6
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.2 .
+.Sh AUTHORS
+.An -nosplit
+This software was written by
+.An Poul-Henning Kamp
+.Aq phk@FreeBSD.org .
+.Pp
+This manual page was written by
+.An Sergey A. Osokin
+.Aq osa@FreeBSD.org
+and
+.An Poul-Henning Kamp
+.Aq phk@FreeBSD.org .
diff --git a/share/man/man4/lge.4 b/share/man/man4/lge.4
new file mode 100644
index 0000000..89510f2
--- /dev/null
+++ b/share/man/man4/lge.4
@@ -0,0 +1,157 @@
+.\" Copyright (c) 2001 Wind River Systems
+.\" Copyright (c) 1997, 1998, 1999, 2000, 2001
+.\" Bill Paul <william.paul@windriver.com>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt LGE 4
+.Os
+.Sh NAME
+.Nm lge
+.Nd "Level 1 LXT1001 NetCellerator PCI Gigabit Ethernet adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device lge"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_lge_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for various NICs based on the Level 1 LXT1001
+NetCellerator Gigabit Ethernet controller chip.
+.Pp
+The LXT1001 supports fiber PHYs and also a GMII port for use with
+10/100/1000 copper PHYs, however there are currently no NICs on the
+market that use this feature.
+.Pp
+The LXT1001 supports TCP/IP checksum offload for receive and
+VLAN-based filtering as well as a 64-bit multicast hash filter.
+It also supports jumbo frames, which can be configured
+via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit jumbo frames.
+Using jumbo frames can greatly improve performance for certain tasks,
+such as file transfers and data streaming.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 1000baseSX"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 1000baseSX
+Set 1000baseSX operation over fiber optic cable.
+Both
+.Cm full-duplex
+and
+.Cm half-duplex
+modes are supported.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+Adapters supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+SMC TigerCard 1000 (SMC9462SX)
+.It
+D-Link DGE-500SX
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "lge%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "lge%d: couldn't map ports"
+A fatal initialization error has occurred.
+.It "lge%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "lge%d: no memory for softc struct!"
+The driver failed to allocate memory for per-device instance information
+during initialization.
+.It "lge%d: failed to enable memory mapping!"
+The driver failed to initialize PCI shared memory mapping.
+This might
+happen if the card is not in a bus-master slot.
+.It "lge%d: no memory for jumbo buffers!"
+The driver failed to allocate memory for jumbo frames during
+initialization.
+.It "lge%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Rs
+.%T Level 1 LXT1001 Programming Manual
+.%U http://www.FreeBSD.org/~wpaul/Level1/LXT1001SRM.pdf
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.4 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq william.paul@windriver.com .
diff --git a/share/man/man4/linux.4 b/share/man/man4/linux.4
new file mode 100644
index 0000000..4fd95d1
--- /dev/null
+++ b/share/man/man4/linux.4
@@ -0,0 +1,145 @@
+.\" Copyright (c) 2000 Sheldon Hearn
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 8, 2010
+.Dt LINUX 4
+.Os
+.Sh NAME
+.Nm linux
+.Nd Linux ABI support
+.Sh SYNOPSIS
+To compile support for this ABI into an i386 kernel
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options COMPAT_LINUX"
+.Ed
+.Pp
+for an amd64 kernel use:
+.Bd -ragged -offset indent
+.Cd "options COMPAT_LINUX32"
+.Ed
+.Pp
+Alternatively, to load the ABI as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+linux_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+module provides limited
+Linux ABI (application binary interface) compatibility
+for userland applications.
+The module provides the following significant facilities:
+.Bl -bullet
+.It
+An image activator
+for correctly branded
+.Xr elf 5
+executable images
+.It
+Special signal handling for activated images
+.It
+Linux to native system call translation
+.El
+.Pp
+It is important to note that the Linux ABI support
+it not provided through an emulator.
+Rather, a true (albeit limited) ABI implementation is provided.
+.Pp
+The following
+.Xr sysctl 8
+tunable variables are available:
+.Bl -tag -width compat.linux.oss_version
+.It compat.linux.osname
+Linux kernel operating system name.
+.It compat.linux.osrelease
+Linux kernel operating system release.
+Changing this to something else is discouraged on non-development systems,
+because it may change the way Linux programs work.
+Recent versions of GNU libc are known to use different syscalls depending
+on the value of this sysctl.
+.It compat.linux.oss_version
+Linux Open Sound System version.
+.El
+.Pp
+The
+.Nm
+module can be linked into the kernel statically with the
+.Dv COMPAT_LINUX
+kernel configuration option
+or loaded as required.
+The following command will load the module
+if it is neither linked into the kernel
+nor already loaded as a module:
+.Bd -literal -offset indent
+if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then
+ kldload linux > /dev/null 2>&1
+fi
+.Ed
+.Pp
+Note that dynamically linked Linux executables
+will require a suitable environment in
+.Pa /compat/linux .
+Specifically, the Linux run-time linker's hints files
+should be correctly initialized.
+For this reason, it is common to execute the following commands
+to prepare the system to correctly run Linux executables:
+.Bd -literal -offset indent
+if [ -x /compat/linux/sbin/ldconfig ]; then
+ /compat/linux/sbin/ldconfig -r /compat/linux
+fi
+.Ed
+.Pp
+For information on loading the
+.Nm
+kernel loadable module automatically on system startup,
+see
+.Xr rc.conf 5 .
+This information applies
+regardless of whether the
+.Nm
+module is statically linked into the kernel
+or loaded as a module.
+.Sh FILES
+.Bl -tag -width /compat/linux/proc -compact
+.It Pa /compat/linux
+minimal Linux run-time environment
+.It Pa /compat/linux/proc
+limited Linux process file system
+.It Pa /compat/linux/sys
+limited Linux system file system
+.El
+.Sh SEE ALSO
+.Xr brandelf 1 ,
+.Xr elf 5 ,
+.Xr linprocfs 5 ,
+.Xr linsysfs 5
+.Sh HISTORY
+Linux ABI support first appeared in
+.Fx 2.1 .
diff --git a/share/man/man4/lm75.4 b/share/man/man4/lm75.4
new file mode 100644
index 0000000..8e794dc
--- /dev/null
+++ b/share/man/man4/lm75.4
@@ -0,0 +1,191 @@
+.\"
+.\" Copyright (c) 2014 Luiz Otavio O Souza <loos@freebsd.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 11, 2014
+.Dt LM75 4
+.Os
+.Sh NAME
+.Nm lm75
+.Nd lm75 i2c digital temperature sensor driver
+.Sh SYNOPSIS
+.Cd "device iic"
+.Cd "device iicbus"
+.Cd "device lm75"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides access to sensor data and configuration over the
+.Xr iicbus 4 .
+.Pp
+It provides an easy and simple way to check the functionality of an i2c bus
+as it provides read and write access to the
+.Nm
+configuration register.
+.Pp
+The access to
+.Nm
+data is made via the
+.Xr sysctl 8
+interface:
+.Bd -literal
+dev.lm75.0.%desc: LM75 temperature sensor
+dev.lm75.0.%driver: lm75
+dev.lm75.0.%location: addr=0x49
+dev.lm75.0.%pnpinfo: name=lm750 compat=national,lm75
+dev.lm75.0.%parent: iicbus3
+dev.lm75.0.temperature: 27.1C
+dev.lm75.0.thyst: 75.0C
+dev.lm75.0.tos: 80.0C
+dev.lm75.0.faults: 1
+dev.lm75.0.mode: comparator
+dev.lm75.0.polarity: active-low
+dev.lm75.0.shutdown: 0
+.Ed
+.Bl -tag -width ".Va dev.lm75.%d.temperature"
+.It Va dev.lm75.%d.temperature
+Is the read-only value of the current temperature read by the sensor.
+.It Va dev.lm75.%d.thyst
+Sets the hysteresis temperature.
+Once the temperature gets over the overtemperature shutdown value (tos)
+it needs to drop below the hysteresis temperature to disable the output
+(interrupt) pin again.
+.It Va dev.lm75.%d.tos
+Sets the overtemperature shutdown value.
+Once the temperature gets over this value the output pin will be enabled.
+The way the output (interrupt) pin works, depends on the mode configuration.
+.It Va dev.lm75.%d.faults
+Is the number of faults that must occur consecutively to activate the
+interrupt (output) pin.
+It can be set to 1, 2, 4, and 6.
+.It Va dev.lm75.%d.mode
+Sets the operation mode for the sensor interrupt pin.
+It can be set to 'comparator' (default) or 'interrupt'.
+.It Va dev.lm75.%d.polarity
+Sets the polarity of the sensor interrupt pin.
+It can be set to 'active-low' (default) or 'active-high'.
+Please note that the output pin is an open-drain output and it needs a
+proper pull-up resistor to work.
+.It Va dev.lm75.%d.shutdown
+When set to '1' it shuts down the sensor.
+The temperature conversion stops but the sensor remains with its i2c bus
+active, i.e., it can be woken up by setting this option to '0' again.
+.El
+.Pp
+Please check the
+.Nm
+datasheet for more details.
+.Pp
+When used together with
+.Xr snmp_lm75 3
+it allows the monitoring of
+.Nm
+temperature data over SNMP.
+.Pp
+The
+.Nm
+driver supports both the low and the high resolution models.
+.Pp
+The low resolution model (lm75) provides a 9 bit output with the LSB
+representing 0.5C.
+.Pp
+The high resolution model (lm75a) provides an 11 bit output with the LSB
+representing 0.125C.
+.Pp
+The driver tries to auto-detect the
+.Nm
+model, but the detection of some
+.Nm
+clones may not work reliably.
+.Pp
+On a
+.Xr device.hints 5
+based system, like
+.Li MIPS ,
+these values are configurable for
+.Nm :
+.Bl -tag -width ".Va hint.lm75.%d.addr"
+.It Va hint.lm75.%d.at
+Is the
+.Xr iicbus 4
+you are attaching to.
+.It Va hint.lm75.%d.addr
+Is the
+.Nm
+i2c address on the
+.Xr iicbus 4 .
+.El
+.Pp
+On a
+.Xr FDT 4
+based system, like
+.Li ARM ,
+the DTS part for a
+.Nm
+device usually looks like:
+.Bd -literal
+i2c {
+
+ ...
+
+ lm750 {
+ compatible = "national,lm75";
+ i2c-address = <0x49>;
+ };
+};
+.Ed
+.Pp
+Where:
+.Bl -tag -width ".Va i2c-address"
+.It Va compatible
+Should always be set to "national,lm75".
+.It Va i2c-address
+The
+.Va i2c-address
+property indicates which i2c address the
+.Nm
+is wired at.
+.Nm
+temperature sensors can be wired to 8 different addresses, allowing up to 8
+sensors on the same
+.Xr iicbus 4 .
+.El
+.Sh SEE ALSO
+.Xr snmp_lm75 3 ,
+.Xr fdt 4 ,
+.Xr iic 4 ,
+.Xr iicbus 4 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 11.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver and this manual page were written by
+.An Luiz Otavio O Souza Aq loos@FreeBSD.org .
diff --git a/share/man/man4/lmc.4 b/share/man/man4/lmc.4
new file mode 100644
index 0000000..ee29aee
--- /dev/null
+++ b/share/man/man4/lmc.4
@@ -0,0 +1,764 @@
+.\"
+.\" $FreeBSD$
+.\"
+.\" Copyright (c) 2002-2005 David Boggs. (boggs@boggs.palo-alto.ca.us)
+.\" All rights reserved.
+.\"
+.\" BSD License:
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" GNU General Public License:
+.\"
+.\" This program is free software; you can redistribute it and/or modify it
+.\" under the terms of the GNU General Public License as published by the Free
+.\" Software Foundation; either version 2 of the License, or (at your option)
+.\" any later version.
+.\"
+.\" This program is distributed in the hope that it will be useful, but WITHOUT
+.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+.\" more details.
+.\"
+.\" You should have received a copy of the GNU General Public License along with
+.\" this program; if not, write to the Free Software Foundation, Inc., 59
+.\" Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\"
+.Dd February 8, 2012
+.Dt LMC 4
+.Os
+.\"
+.Sh NAME
+.\"
+.Nm lmc
+.Nd device driver for
+.Tn LMC
+(now
+.Tn SBE )
+wide-area network interface cards
+.\"
+.Sh SYNOPSIS
+.\"
+To wire this driver into your kernel,
+add the following line to your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device lmc"
+.Ed
+.Pp
+Alternatively, to load this module at boot time, add
+.Bd -literal -offset indent
+if_lmc_load="YES"
+.Ed
+.Pp
+to
+.Pa /boot/loader.conf ;
+see
+.Xr loader.conf 5 .
+.Pp
+To wire a line protocol into your kernel, add:
+.Bd -ragged -offset indent
+.Cd "options NETGRAPH"
+.Cd "device sppp"
+.Ed
+.Pp
+It is not necessary to wire line protocols into your kernel,
+they can be loaded later with
+.Xr kldload 8 .
+The driver can send and receive raw IP packets even if neither
+SPPP nor Netgraph are configured into the kernel.
+Netgraph and SPPP can both be enabled; Netgraph will be used if the
+.Va rawdata
+hook is connected.
+.\"
+.Sh DESCRIPTION
+.\"
+This is an open-source
+.Ux
+device driver for PCI-bus WAN interface cards.
+It sends and receives packets in HDLC frames over synchronous circuits.
+A generic PC plus
+.Ux
+plus some
+.Tn LMC / SBE
+cards makes an
+.Em open
+router.
+This driver works with
+.Fx ,
+.Nx ,
+.Ox ,
+.Bsx
+and
+.Tn Linux
+OSs.
+It has been tested on i386 (SMP 32-bit little-endian) and Sparc (64-bit big-endian)
+architectures.
+.Pp
+The
+.Nm
+driver works with the following cards:
+.Bl -bullet
+.It
+SBE wanADAPT-HSSI (LMC5200)
+.Pp
+High Speed Serial Interface,
+EIA612/613, 50-pin connector,
+0 to 52 Mb/s, DTE only.
+.It
+SBE wanADAPT-T3 (LMC5245)
+.Pp
+T3: two 75-ohm BNC connectors,
+C-Parity or M13 Framing,
+44.736 Mb/s, up to 950 ft.
+.It
+SBE wanADAPT-SSI (LMC1000)
+.Pp
+Synchronous Serial Interface,
+V.35, X.21, EIA449, EIA530(A), EIA232,
+0 to 10 Mb/s, DTE or DCE.
+.It
+SBE wanADAPT-T1E1 (LMC1200)
+.Pp
+T1 or E1: RJ45 conn, 100 or 120 ohms,
+T1-ESF-B8ZS, T1-SF-AMI, E1-(many)-HDB3,
+1.544 Mb/s or 2.048 Mb/s, up to 6 Kft.
+.El
+.Pp
+Cards contain a high-performance
+.Sy "PCI"
+interface, an
+.Sy "HDLC"
+function and
+either integrated
+.Sy "modems"
+(T1, T3) or
+.Sy "modem"
+interfaces (HSSI and SSI).
+.Bl -tag -width "Modem"
+.It Sy "PCI"
+The PCI interface is a DEC 21140A "Tulip" Fast Ethernet chip.
+This chip has an efficient PCI implementation with scatter/gather DMA,
+and can run at 100 Mb/s full duplex (twice as fast as needed here).
+.It Sy "HDLC"
+The HDLC functions (ISO-3309: flags, bit-stuffing, CRC) are implemented
+in a Field Programmable Gate Array (FPGA) which talks to the Ethernet
+chip through a Media Independent Interface (MII).
+The hardware in the FPGA translates between Ethernet packets and
+HDLC frames on-the-fly; think it as a WAN PHY chip for Ethernet.
+.It Sy "Modem"
+The modem chips are the main differences between cards.
+HSSI cards use ECL10K chips to implement the EIA-612/613 interface.
+T3 cards use a TranSwitch TXC-03401 framer chip.
+SSI cards use Linear Technology LTC1343 modem interface chips.
+T1 cards use a BrookTree/Conexant/Mindspeed Bt8370 framer
+and line interface chip.
+.El
+.Pp
+Line protocols exist above device drivers and below internet protocols.
+They typically encapsulate packets in HDLC frames and deal with
+higher-level issues like protocol multiplexing and security.
+This driver is compatible with several line protocol packages:
+.Bl -tag -width "Generic HDLC"
+.It Sy "Netgraph"
+.Xr netgraph 4
+implements many basic packet-handling functions as kernel loadable modules.
+They can be interconnected in a graph to implement many protocols.
+Configuration is done from userland without rebuilding the kernel.
+Packets are sent and received through this interface if the driver's
+.Em rawdata
+hook is connected, otherwise the ifnet interface (SPPP and RawIP) is used.
+ASCII configuration control messages are
+.Em not
+currently supported.
+.It Sy "SPPP"
+.Xr sppp 4
+implements Synchronous-PPP, Frame-Relay and Cisco-HDLC in the kernel.
+.It Sy "RawIP"
+This null line protocol, built into the driver, sends and receives
+raw IPv4 and IPv6 packets in HDLC frames (aka IP-in-HDLC) with
+no extra bytes of overhead and no state at the end points.
+.El
+.\"
+.Sh EXAMPLES
+.\"
+.Ss "ifconfig and lmcconfig"
+.\"
+The program
+.Xr lmcconfig 8
+manipulates interface parameters beyond the scope of
+.Xr ifconfig 8 .
+In normal operation only a few arguments are needed:
+.Pp
+.Bl -tag -width ".Fl X" -offset indent -compact
+.It Fl X
+selects the external
+SPPP
+line protocol package.
+.It Fl x
+selects the built-in RawIP line protocol package.
+.It Fl Z
+selects PPP line protocol.
+.It Fl z
+selects Cisco-HDLC line protocol.
+.It Fl F
+selects Frame-Relay line protocol.
+.El
+.Bl -tag -width indent
+.It Li "lmcconfig lmc0"
+displays interface configuration and status.
+.It Li "lmcconfig lmc0 -D"
+enables debugging output from the device driver only.
+.It Li "ifconfig lmc0 debug"
+enables debugging output from the device driver and from
+the line protocol module above it.
+Debugging messages that appear on the console are also
+written to file
+.Pa "/var/log/messages" .
+.Em Caution :
+when things go very wrong, a torrent of debugging messages
+can swamp the console and bring a machine to its knees.
+.El
+.\"
+.Ss Operation
+.\"
+Activate a PPP link using SPPP and Netgraph with:
+.Bd -literal -offset indent
+ngctl mkpeer lmc0: sppp rawdata downstream
+ifconfig sppp0 10.0.0.1 10.0.0.2
+.Ed
+.Pp
+Activate a PPP link using only SPPP with:
+.Bd -literal -offset indent
+lmcconfig lmc0 -XYZ
+ifconfig lmc0 10.0.0.1 10.0.0.2
+.Ed
+.Pp
+Activate a Cisco-HDLC link using SPPP and Netgraph with:
+.Bd -literal -offset indent
+ngctl mkpeer lmc0: sppp rawdata downstream
+ifconfig sppp0 10.0.0.1 10.0.0.2 link2
+.Ed
+.Pp
+Activate a Cisco-HDLC link using only SPPP with:
+.Bd -literal -offset indent
+lmcconfig lmc0 -XYz
+ifconfig lmc0 10.0.0.1 10.0.0.2
+.Ed
+.Pp
+Activate a Cisco-HDLC link using only Netgraph with:
+.Bd -literal -offset indent
+ngctl mkpeer lmc0: cisco rawdata downstream
+ngctl mkpeer lmc0:rawdata iface inet inet
+ifconfig ng0 10.0.0.1 10.0.0.2
+.Ed
+.Pp
+Activate a Frame-Relay DTE link using SPPP with:
+.Bd -literal -offset indent
+lmcconfig lmc0 -XYF
+ifconfig lmc0 10.0.0.1 10.0.0.2
+.Ed
+.Pp
+(SPPP implements the ANSI T1.617 annex D LMI.)
+.Pp
+Activate a Frame-Relay DTE link using Netgraph with:
+.Bd -literal -offset indent
+ngctl mkpeer lmc0: frame_relay rawdata downstream
+ngctl mkpeer lmc0:rawdata lmi dlci0 auto0
+ngctl connect lmc0:rawdata dlci0 dlci1023 auto1023
+ngctl mkpeer lmc0:rawdata rfc1490 dlci500 downstream
+ngctl mkpeer lmc0:rawdata.dlci500 iface inet inet
+ifconfig ng0 10.0.0.1 10.0.0.2
+.Ed
+This is
+.Em ONE
+possible Frame Relay configuration; there are many.
+.Pp
+Activate a RAWIP link using only the driver with:
+.Bd -literal -offset indent
+lmcconfig lmc0 -x
+ifconfig lmc0 10.0.0.1 10.0.0.2
+.Ed
+.Pp
+Activate a RAWIP link using Netgraph with:
+.Bd -literal -offset indent
+ngctl mkpeer lmc0: iface rawdata inet
+ifconfig ng0 10.0.0.1 10.0.0.2
+.Ed
+.Pp
+If the driver is unloaded and then loaded, reconnect hooks by:
+.Pp
+.Dl "ngctl connect lmc0: ng0: rawdata inet"
+.\"
+.Sh TESTING
+.\"
+.Ss Testing with Loopbacks
+.\"
+Testing with loopbacks requires only one card.
+Packets can be looped back at many points: in the PCI chip,
+in the modem chips, through a loopback plug, in the
+local external equipment, or at the far end of a circuit.
+.Pp
+Activate the card with
+.Xr ifconfig 8 :
+.Pp
+.Dl "ifconfig lmc0 10.0.0.1 10.0.0.1"
+.Pp
+All cards can be looped through the PCI chip.
+Cards with internal modems can be looped through
+the modem framer and the modem line interface.
+Cards for external modems can be looped through
+the driver/receiver chips.
+See
+.Xr lmcconfig 8
+for details.
+.Pp
+Loopback plugs test everything on the card.
+.Bl -tag -width ".Sy T1/E1"
+.It Sy HSSI
+Loopback plugs can be ordered from SBE (and others).
+Transmit clock is normally supplied by the external modem.
+When an HSSI card is operated with a loopback plug, the PCI bus
+clock must be used as the transmit clock, typically 33 MHz.
+When testing an HSSI card with a loopback plug,
+configure it with
+.Xr lmcconfig 8 :
+.Pp
+.Dl "lmcconfig lmc0 -a 2"
+.Pp
+.Dq Fl a Li 2
+selects the PCI bus clock as the transmit clock.
+.It Sy T3
+Connect the two BNC jacks with a short coax cable.
+.It Sy SSI
+Loopback plugs can be ordered from SBE (only).
+Transmit clock is normally supplied by the external modem.
+When an SSI card is operated with a loopback plug,
+the on-board clock synthesizer must be used.
+When testing an SSI card with a loopback plug,
+configure it with
+.Xr lmcconfig 8 :
+.Pp
+.Dl "lmcconfig lmc0 -E -f 10000000"
+.Pp
+.Fl E
+puts the card in DCE mode to source a transmit clock.
+.Dq Fl f Li 10000000
+sets the internal clock source to 10 Mb/s.
+.It Sy T1/E1
+A loopback plug is a modular plug with two wires
+connecting pin 1 to pin 4 and pin 2 to pin 5.
+.El
+.Pp
+One can also test by connecting to a local modem (HSSI and SSI)
+or NI (T1 and T3) configured to loop back.
+Cards can generate signals to loopback remote equipment
+so that complete circuits can be tested; see
+.Xr lmcconfig 8
+for details.
+.\"
+.Ss Testing with a Modem
+.\"
+Testing with a modem requires two cards of different types.
+.Bl -tag -width ".Sy T3/HSSI"
+.It Sy T3/HSSI
+If you have a T3 modem with an HSSI interface
+(made by Digital Link, Larscom, Kentrox etc.\&)
+then use an HSSI card in one machine and a T3 card in the other machine.
+The T3 coax cables must use the null modem configuration (see below).
+.It Sy T1/V.35
+If you have a T1 (or E1) modem with a V.35, X.21 or EIA530 interface,
+then use an SSI card in one machine and a T1 card in the other machine.
+Use a T1 null modem cable (see below).
+.El
+.\"
+.Ss Testing with a Null Modem Cable
+.\"
+Testing with a null modem cable requires two cards of the same type.
+.Bl -tag -width ".Sy T1/E1"
+.It Sy HSSI
+Three-meter HSSI null-modem cables can be ordered from SBE.
+In a pinch, a 50-pin SCSI-II cable up to a few meters will
+work as a straight HSSI cable (not a null modem cable).
+Longer cables should be purpose-built HSSI cables because
+the cable impedance is different.
+Transmit clock is normally supplied by the external modem.
+When an HSSI card is connected by a null modem cable, the PCI bus
+clock can be used as the transmit clock, typically 33 MHz.
+When testing an HSSI card with a null modem cable, configure it
+with
+.Xr lmcconfig 8 :
+.Pp
+.Dl "lmcconfig lmc0 -a 2"
+.Pp
+.Dq Fl a Li 2
+selects the PCI bus clock as the transmit clock.
+.It Sy T3
+T3 null modem cables are just 75-ohm coax cables with BNC connectors.
+TX OUT on one card should be connected to RX IN on the other card.
+In a pinch, 50-ohm thin Ethernet cables
+.Em usually
+work up to a few meters, but they will
+.Em not
+work for longer runs \[em] 75-ohm coax is
+.Em required .
+.It Sy SSI
+Three-meter SSI null modem cables can be ordered from SBE.
+An SSI null modem cable reports a cable type of V.36/EIA449.
+Transmit clock is normally supplied by the external modem.
+When an SSI card is connected by a null modem cable,
+an on-board clock synthesizer is used.
+When testing an SSI card with a null modem cable, configure it
+with
+.Xr lmcconfig 8 :
+.Pp
+.Dl "lmcconfig lmc0 -E -f 10000000"
+.Pp
+.Fl E
+puts the card in DCE mode to source a transmit clock.
+.Dq Fl f Li 10000000
+sets the internal clock source to 10 Mb/s.
+.It Sy T1/E1
+A T1 null modem cable has two twisted pairs that connect
+pins 1 and 2 on one plug to pins 4 and 5 on the other plug.
+Looking into the cable entry hole of a plug,
+with the locking tab oriented down,
+pin 1 is on the left.
+A twisted pair Ethernet cable makes an excellent straight T1 cable.
+Alas, Ethernet cross-over cables do not work as T1 null modem cables.
+.El
+.\"
+.Sh OPERATION NOTES
+.\"
+.Ss Packet Lengths
+Maximum transmit and receive packet length is unlimited.
+Minimum transmit and receive packet length is one byte.
+.Pp
+Cleaning up after one packet and setting up for the next
+packet involves making several DMA references.
+This can take longer than the duration of a short packet,
+causing the adapter to fall behind.
+For typical PCI bus traffic levels and memory system latencies,
+back-to-back packets longer than about 20 bytes will always
+work (53 byte cells work), but a burst of several hundred
+back-to-back packets shorter than 20 bytes will cause packets
+to be dropped.
+This usually is not a problem since an IPv4 packet header is
+at least 20 bytes long.
+.Pp
+This device driver imposes no constraints on packet size.
+Most operating systems set the default Maximum Transmission
+Unit (MTU) to 1500 bytes; the legal range is usually (72..65535).
+This can be changed with
+.Pp
+.Dl "ifconfig lmc0 mtu 2000"
+.Pp
+SPPP enforces an MTU of (128..far-end-MRU) for PPP
+and 1500 bytes for Cisco-HDLC.
+RAWIP sets the default MTU to 4032 bytes,
+but it can be changed to anything.
+.\"
+.Ss BPF - Berkeley Packet Filter
+.\"
+This driver has hooks for
+.Xr bpf 4 ,
+the Berkeley Packet Filter.
+The line protocol header length reported to BPF is four bytes
+for SPPP and P2P line protocols and zero bytes for RawIP.
+.Pp
+To include BPF support into your kernel,
+add the following line to
+.Pa conf/YOURKERNEL :
+.Pp
+.Dl "device bpf"
+.Pp
+To test the BPF kernel interface,
+bring up a link between two machines, then run
+.Xr ping 8
+and
+.Xr tcpdump 1 :
+.Pp
+.Dl "ping 10.0.0.1"
+.Pp
+and in a different window:
+.Pp
+.Dl "tcpdump -i lmc0"
+.Pp
+The output from
+.Xr tcpdump 1
+should look like this:
+.Bd -literal -offset indent
+03:54:35.979965 10.0.0.2 > 10.0.0.1: icmp: echo request
+03:54:35.981423 10.0.0.1 > 10.0.0.2: icmp: echo reply
+.Ed
+.Pp
+Line protocol control packets will appear among the
+.Xr ping 8
+packets occasionally.
+.\"
+.Ss Device Polling
+.\"
+A T3 receiver can generate over 100K interrupts per second,
+this can cause a system to
+.Dq live-lock :
+spend all of its
+time servicing interrupts.
+.Fx
+has a polling mechanism to prevent live-lock.
+.Pp
+.Fx Ns 's
+mechanism permanently disables interrupts from the card
+and instead the card's interrupt service routine is called each
+time the kernel is entered (syscall, timer interrupt, etc.\&) and
+from the kernel idle loop; this adds some latency.
+The driver is permitted to process a limited number of packets.
+The percentage of the CPU that can be consumed this way is settable.
+.Pp
+See the
+.Xr polling 4
+manpage for details on how to enable the polling mode.
+.\"
+.Ss SNMP: Simple Network Management Protocol
+.\"
+This driver is aware of what is required to be a Network Interface
+Object managed by an Agent of the Simple Network Management Protocol.
+The driver exports SNMP-formatted configuration and status
+information sufficient for an SNMP Agent to create MIBs for:
+.Pp
+.Bl -item -offset indent -compact
+.It
+.%T "RFC-2233: Interfaces group" ,
+.It
+.%T "RFC-2496: DS3 interfaces" ,
+.It
+.%T "RFC-2495: DS1/E1 interfaces" ,
+.It
+.%T "RFC-1659: RS232-like interfaces" .
+.El
+.Pp
+An SNMP Agent is a user program, not a kernel function.
+Agents can retrieve configuration and status information
+by using
+Netgraph control messages or
+.Xr ioctl 2
+system calls.
+User programs should poll
+.Va sc->cfg.ticks
+which increments once per second after the SNMP state has been updated.
+.\"
+.Ss HSSI and SSI LEDs
+.\"
+The card should be operational if all three green LEDs are on
+(the upper-left one should be blinking) and the red LED is off.
+All four LEDs turn on at power-on and module unload.
+.Pp
+.Bl -column -compact -offset indent "YELLOW" "upper-right" "Software"
+.It "RED" Ta "upper-right" Ta "No Transmit clock"
+.It "GREEN" Ta "upper-left" Ta "Device driver is alive if blinking"
+.It "GREEN" Ta "lower-right" Ta "Modem signals are good"
+.It "GREEN" Ta "lower-left" Ta "Cable is plugged in (SSI only)"
+.El
+.\"
+.Ss T1E1 and T3 LEDs
+.\"
+The card should be operational if the upper-left green LED is blinking
+and all other LEDs are off.
+For the T3 card, if other LEDs are on or
+blinking, try swapping the coax cables!
+All four LEDs turn on at power-on and module unload.
+.Pp
+.Bl -column -compact -offset indent "YELLOW" "upper-right" "Received"
+.It "RED" Ta "upper-right" Ta "Received signal is wrong"
+.It "GREEN" Ta "upper-left" Ta "Device driver is alive if blinking"
+.It "BLUE" Ta "lower-right" Ta "Alarm Information Signal (AIS)"
+.It "YELLOW" Ta "lower-left" Ta "Remote Alarm Indication (RAI)"
+.El \" YELLOW
+.Pp
+.Bl -column -compact "The yellow" "LED"
+.It "The green" Ta "LED blinks if the device driver is alive."
+.It "The red" Ta "LED blinks if an outward loopback is active."
+.It "The blue" Ta "LED blinks if sending AIS, on solid if receiving AIS."
+.It "The yellow" Ta "LED blinks if sending RAI, on solid if receiving RAI."
+.El \" LED
+.\"
+.Ss E1 Framing
+.\"
+Phone companies usually insist that customers put a
+.Em Frame Alignment Signal
+(FAS) in time slot 0.
+A Cyclic Redundancy Checksum (CRC) can also ride in time slot 0.
+.Em Channel Associated Signalling
+(CAS) uses Time Slot 16.
+In telco-speak
+.Em signalling
+is on/off hook, ringing, busy, etc.
+Signalling is not needed here and consumes 64 Kb/s.
+Only use E1-CAS formats if the other end insists on it!
+Use E1-FAS+CRC framing format on a public circuit.
+Depending on the equipment installed in a private circuit,
+it may be possible to use all 32 time slots for data (E1-NONE).
+.\"
+.Ss T3 Framing
+.\"
+M13 is a technique for multiplexing 28 T1s into a T3.
+Muxes use the C-bits for speed-matching the tributaries.
+Muxing is not needed here and usurps the FEBE and FEAC bits.
+Only use T3-M13 format if the other end insists on it!
+Use T3-CParity framing format if possible.
+Loop Timing, Fractional T3, and HDLC packets in
+the Facility Data Link are
+.Em not
+supported.
+.\"
+.Ss T1 & T3 Frame Overhead Functions
+.\"
+.Bl -item -compact
+.It
+Performance Report Messages (PRMs) are enabled in T1-ESF.
+.It
+Bit Oriented Protocol (BOP) messages are enabled in T1-ESF.
+.It
+In-band loopback control (framed or not) is enabled in T1-SF.
+.It
+Far End Alarm and Control (FEAC) msgs are enabled in T3-CPar.
+.It
+Far End Block Error (FEBE) reports are enabled in T3-CPar.
+.It
+Remote Alarm Indication (RAI) is enabled in T3-Any.
+.It
+Loopbacks initiated remotely time out after 300 seconds.
+.El
+.\"
+.Ss T1/E1 'Fractional' 64 kb/s Time Slots
+.\"
+T1 uses time slots 24..1; E1 uses time slots 31..0.
+E1 uses TS0 for FAS overhead and TS16 for CAS overhead.
+E1-NONE has
+.Em no
+overhead, so all 32 TSs are available for data.
+Enable/disable time slots by setting 32 1s/0s in a config param.
+Enabling an E1 overhead time slot,
+or enabling TS0 or TS25-TS31 for T1,
+is ignored by the driver, which knows better.
+The default TS param, 0xFFFFFFFF, enables the maximum number
+of time slots for whatever frame format is selected.
+56 Kb/s time slots are
+.Em not
+supported.
+.\"
+.Ss T1 Raw Mode
+.\"
+Special gate array microcode exists for the T1/E1 card.
+Each T1 frame of 24 bytes is treated as a packet.
+A raw T1 byte stream can be delivered to main memory
+and transmitted from main memory.
+The T1 card adds or deletes framing bits but does not
+touch the data.
+ATM cells can be transmitted and received this way, with
+the software doing all the work.
+But that is not hard; after all it is only 1.5 Mb/s second!
+.\"
+.Ss T3 Circuit Emulation Mode
+.\"
+Special gate array microcode exists for the T3 card.
+Each T3 frame of 595 bytes is treated as a packet.
+A raw T3 signal can be
+.Em packetized ,
+transported through a
+packet network (using some protocol) and then
+.Em reconstituted
+as a T3 signal at the far end.
+The output transmitter's
+bit rate can be controlled from software so that it can be
+.Em frequency locked
+to the distant input signal.
+.\"
+.Ss HSSI and SSI Transmit Clocks
+.\"
+Synchronous interfaces use two transmit clocks to eliminate
+.Em skew
+caused by speed-of-light delays in the modem cable.
+DCEs (modems) drive ST, Send Timing, the first transmit clock.
+DTEs (hosts) receive ST and use it to clock transmit data, TD,
+onto the modem cable.
+DTEs also drive a copy of ST back towards the DCE and call it TT,
+Transmit Timing, the second transmit clock.
+DCEs receive TT and TD and use TT to clock TD into a flip flop.
+TT experiences the same delay as (and has no
+.Em skew
+relative to) TD.
+Thus, cable length does not affect data/clock timing.
+.\"
+.Sh SEE ALSO
+.\"
+.Xr tcpdump 1 ,
+.Xr ioctl 2 ,
+.Xr bpf 4 ,
+.Xr kld 4 ,
+.Xr netgraph 4 ,
+.Xr polling 4 ,
+.Xr sppp 4 ,
+.Xr loader.conf 5 ,
+.Xr ifconfig 8 ,
+.Xr lmcconfig 8 ,
+.Xr mpd 8 Pq Pa ports/net/mpd ,
+.Xr ngctl 8 ,
+.Xr ping 8 ,
+.Xr ifnet 9
+.\"
+.Sh HISTORY
+.\"
+.An Ron Crane
+had the idea to use a Fast Ethernet chip as a PCI interface
+and add an Ethernet-to-HDLC gate array to make a WAN card.
+.An David Boggs
+designed the Ethernet-to-HDLC gate array and PC cards.
+We did this at our company, LAN Media Corporation
+.Tn (LMC) .
+.Tn SBE
+Corp.\& acquired
+.Tn LMC
+and continues to make the cards.
+.Pp
+Since the cards use Tulip Ethernet chips, we started with
+.An Matt Thomas Ns '
+ubiquitous
+.Xr de 4
+driver.
+.An Michael Graff
+stripped out the Ethernet stuff and added HSSI stuff.
+.An Basil Gunn
+ported it to
+.Tn Solaris
+(lost) and
+.Tn Rob Braun
+ported it to
+.Tn Linux .
+.An Andrew Stanley-Jones
+added support
+for three more cards and wrote the first version of
+.Xr lmcconfig 8 .
+.An David Boggs
+rewrote everything and now feels responsible for it.
+.\"
+.Sh AUTHORS
+.\"
+.An "David Boggs" Aq boggs@boggs.palo-alto.ca.us
diff --git a/share/man/man4/lo.4 b/share/man/man4/lo.4
new file mode 100644
index 0000000..1a55b0c
--- /dev/null
+++ b/share/man/man4/lo.4
@@ -0,0 +1,90 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California.
+.\" Copyright (c) 2009 Robert N. M. Watson
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)lo.4 8.1 (Berkeley) 6/5/93
+.\" $FreeBSD$
+.\"
+.Dd January 25, 2012
+.Dt LO 4
+.Os
+.Sh NAME
+.Nm lo
+.Nd software loopback network interface
+.Sh SYNOPSIS
+.Cd "device loop"
+.Sh DESCRIPTION
+The
+.Nm loop
+interface is a software loopback mechanism which may be
+used for performance analysis, software testing, and/or local
+communication.
+As with other network interfaces, the loopback interface must have
+network addresses assigned for each address family with which it is to be used.
+These addresses
+may be set with the appropriate
+.Xr ioctl 2
+commands for corresponding address families.
+The loopback interface should be the last interface configured,
+as protocols may use the order of configuration as an indication of priority.
+The loopback should
+.Em never
+be configured first unless no hardware
+interfaces exist.
+.Pp
+If the transmit checksum offload capability flag is enabled on a loopback
+interface, checksums will not be generated by IP, UDP, or TCP for packets
+sent on the interface.
+.Pp
+If the receive checksum offload capability flag is enabled on a loopback
+interface, checksums will not be validated by IP, UDP, or TCP for packets
+received on the interface.
+.Pp
+By default, both receive and transmit checksum flags will be enabled, in
+order to avoid the overhead of checksumming for local communication where
+data corruption is unlikely.
+If transmit checksum generation is disabled, then validation should also be
+disabled in order to avoid packets being dropped due to invalid checksums.
+.Sh DIAGNOSTICS
+.Bl -diag
+.It lo%d: can't handle af%d.
+The interface was handed
+a message with addresses formatted in an unsuitable address
+family; the packet was dropped.
+.El
+.Sh SEE ALSO
+.Xr inet 4 ,
+.Xr intro 4
+.\" .Xr ns 4
+.Sh HISTORY
+The
+.Nm
+device appeared in
+.Bx 4.2 .
+The current checksum generation and validation avoidance policy appeared in
+.Fx 8.0 .
diff --git a/share/man/man4/lp.4 b/share/man/man4/lp.4
new file mode 100644
index 0000000..221b9c9
--- /dev/null
+++ b/share/man/man4/lp.4
@@ -0,0 +1,241 @@
+.\" -*- nroff -*-
+.\"
+.\" Copyright (c) 1996 A.R.Gordon, andrew.gordon@net-tel.co.uk
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Id: man4.i386/lp.4,v 1.9 1999/02/14 12:06:16 nsouch Exp
+.\" $FreeBSD$
+.\"
+.Dd March 4, 1996
+.Dt LP 4
+.Os
+.Sh NAME
+.Nm lp
+.Nd printer port Internet Protocol driver
+.Sh SYNOPSIS
+.Nm ifconfig
+.Ar plip0
+.Ar myaddress hisaddress
+.Op Fl link0
+.Pp
+.Cd "device ppbus"
+.Cd "device plip"
+.Cd "device ppc"
+.Sh DESCRIPTION
+The
+.Nm
+driver allows a PC parallel printer port to be used as a
+point-to-point network interface between two similarly configured systems.
+Data is transferred 4 bits at a time, using the printer status lines for
+input: hence there is no requirement for special bidirectional hardware
+and any standard AT-compatible printer port with working interrupts may be used.
+.Pp
+During the boot process, for each
+.Nm plip
+device which is probed and has an interrupt assigned, a corresponding
+.Nm network
+device is created.
+.Pp
+Configuring an
+.Nm
+device with
+.Xr ifconfig 8
+causes the corresponding
+.Nm parallel port bus
+to be reserved for PLIP until the network interface is configured 'down'.
+.Pp
+The communication protocol is selected by the
+.Cm link0
+flag:
+.Bl -tag -width Fl
+.It Fl link0
+(default) Use
+.Fx
+mode (LPIP).
+This is the simpler of the two modes
+and therefore slightly more efficient.
+.It Cm link0
+Use Crynwr/Linux compatible mode (CLPIP).
+This mode has a simulated Ethernet
+packet header, and is easier to interface to other types of equipment.
+.El
+.Pp
+The interface MTU defaults to 1500, but may be set to any value.
+Both ends
+of the link must be configured with the same MTU.
+.Ss Cable Connections
+The cable connecting the two parallel ports should be wired as follows:
+.Bd -literal
+ Pin Pin Description
+ 2 15 Data0 -> ERROR*
+ 3 13 Data1 -> SLCT
+ 4 12 Data2 -> PE
+ 5 10 Data3 -> ACK*
+ 6 11 Data4 -> BUSY
+ 15 2 ERROR* -> Data0
+ 13 3 SLCT -> Data1
+ 12 4 PE -> Data2
+ 10 5 ACK* -> Data3
+ 11 6 BUSY -> Data4
+ 18-25 18-25 Ground
+.Ed
+.Pp
+Cables with this wiring are widely available as 'Laplink' cables, and
+are often coloured yellow.
+.Pp
+The connections are symmetric, and provide 5 lines in each direction (four
+data plus one handshake).
+The two modes use the same wiring, but make a
+different choice of which line to use as handshake.
+.Ss FreeBSD LPIP mode
+The signal lines are used as follows:
+.Bl -tag -width dataxxxx(Pinxx)
+.It Em Data0 (Pin 2)
+Data out, bit 0.
+.It Em Data1 (Pin 3)
+Data out, bit 1.
+.It Em Data2 (Pin 4)
+Data out, bit 2.
+.It Em Data3 (Pin 5)
+Handshake out.
+.It Em Data4 (Pin 6)
+Data out, bit 3.
+.It Em ERROR* (pin 15)
+Data in, bit 0.
+.It Em SLCT (pin 13)
+Data in, bit 1.
+.It Em PE (pin 12)
+Data in, bit 2.
+.It Em BUSY (pin 11)
+Data in, bit 3.
+.It Em ACK* (pin 10)
+Handshake in.
+.El
+.Pp
+When idle, all data lines are at zero.
+Each byte is signalled in four steps:
+sender writes the 4 most significant bits and raises the handshake line;
+receiver reads the 4 bits and raises its handshake to acknowledge;
+sender places the 4 least significant bits on the data lines and lowers
+the handshake; receiver reads the data and lowers its handshake.
+.Pp
+The packet format has a two-byte header, comprising the fixed values 0x08,
+0x00, immediately followed by the IP header and data.
+.Pp
+The start of a packet is indicated by simply signalling the first byte
+of the header.
+The end of the packet is indicated by inverting
+the data lines (i.e., writing the ones-complement of the previous nibble
+to be transmitted) without changing the state of the handshake.
+.Pp
+Note that the end-of-packet marker assumes that the handshake signal and
+the data-out bits can be written in a single instruction - otherwise
+certain byte values in the packet data would falsely be interpreted
+as end-of-packet.
+This is not a problem for the PC printer port,
+but requires care when implementing this protocol on other equipment.
+.Ss Crynwr/Linux CLPIP mode
+The signal lines are used as follows:
+.Bl -tag -width dataxxxx(Pinxx)
+.It Em Data0 (Pin 2)
+Data out, bit 0.
+.It Em Data1 (Pin 3)
+Data out, bit 1.
+.It Em Data2 (Pin 4)
+Data out, bit 2.
+.It Em Data3 (Pin 5)
+Data out, bit 3.
+.It Em Data4 (Pin 6)
+Handshake out.
+.It Em ERROR* (pin 15)
+Data in, bit 0.
+.It Em SLCT (pin 13)
+Data in, bit 1.
+.It Em PE (pin 12)
+Data in, bit 2.
+.It Em ACK* (pin 10)
+Data in, bit 3.
+.It Em BUSY (pin 11)
+Handshake in.
+.El
+.Pp
+When idle, all data lines are at zero.
+Each byte is signalled in four steps:
+sender writes the 4 least significant bits and raises the handshake line;
+receiver reads the 4 bits and raises its handshake to acknowledge;
+sender places the 4 most significant bits on the data lines and lowers
+the handshake; receiver reads the data and lowers its handshake.
+[Note that this is the opposite nibble order to LPIP mode].
+.Pp
+Packet format is:
+.Bd -literal
+Length (least significant byte)
+Length (most significant byte)
+12 bytes of supposed MAC addresses (ignored by FreeBSD).
+Fixed byte 0x08
+Fixed byte 0x00
+<IP datagram>
+Checksum byte.
+.Ed
+.Pp
+The length includes the 14 header bytes, but not the length bytes themselves
+nor the checksum byte.
+.Pp
+The checksum is a simple arithmetic sum of all the bytes (again, including
+the header but not checksum or length bytes).
+.Fx
+calculates
+outgoing checksums, but does not validate incoming ones.
+.Pp
+The start of packet has to be signalled specially, since the line chosen
+for handshake-in cannot be used to generate an interrupt.
+The sender writes the value 0x08 to the data lines, and waits for the receiver
+to respond by writing 0x01 to its data lines.
+The sender then starts
+signalling the first byte of the packet (the length byte).
+.Pp
+End of packet is deduced from the packet length and is not signalled
+specially (although the data lines are restored to the zero, idle
+state to avoid spuriously indicating the start of the next packet).
+.Sh SEE ALSO
+.Xr ppbus 4 ,
+.Xr ppc 4 ,
+.Xr ifconfig 8
+.Sh BUGS
+Busy-waiting loops are used while handshaking bytes, (and worse still when
+waiting for the receiving system to respond to an interrupt for the start
+of a packet).
+Hence a fast system talking to a slow one will consume
+excessive amounts of CPU.
+This is unavoidable in the case of CLPIP mode
+due to the choice of handshake lines; it could theoretically be improved
+in the case of LPIP mode.
+.Pp
+Polling timeouts are controlled by counting loop iterations rather than
+timers, and so are dependent on CPU speed.
+This is somewhat stabilised
+by the need to perform (slow) ISA bus cycles to actually read the port.
diff --git a/share/man/man4/lpbb.4 b/share/man/man4/lpbb.4
new file mode 100644
index 0000000..89b2a07
--- /dev/null
+++ b/share/man/man4/lpbb.4
@@ -0,0 +1,79 @@
+.\" Copyright (c) 1998, Nicolas Souchu
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 25, 1998
+.Dt LPBB 4
+.Os
+.Sh NAME
+.Nm lpbb
+.Nd parallel port I2C bit-banging interface
+.Sh SYNOPSIS
+.Cd "device iicbus"
+.Cd "device iicbb"
+.Pp
+.Cd "device lpbb"
+.Cd "device iic"
+.Sh DESCRIPTION
+The
+.Em lpbb
+driver supports the Philips official I2C parallel bit-banging interface.
+.Bd -literal
+
+ LS05 pin 14 (Vcc) o -------
+ | | |
+ +--+--+---------------------+--+--+------------+------+-o 1 |
+ | | | | | | ===.1uF | +5V |
+ -------- [R][R][R] 3x10K 3x10K [R][R][R] LS05 | | |
+ | | | | | | | | pin 7 o-+------+-o 2 |
+ | 12 o-+--+ | | 3|\\ 4 | | | (Gnd) | GND |
+ | 17 o-+-----|--|----| >o-------------+--|--|--------------+ | |
+ | | | | |/ 8 /|9 | | 10 /|11 +----+-o 3 |
+ | 15 o-+-----+--|--------------o< |------+--|------o< |----+ | SCL |
+ | | | 1|\\ 2 \\| | \\| | |
+ | 9 o-+--------|----| >o-------------------+--------------+----+-o 4 |
+ | | | |/ 6 /|5 | | SDA |
+ | 11 o-+--------+----------------------------------o< |----+ -------
+ | 10 o-+-+ \\| 4-pin
+ | 13 o-+-+--oGND Connector
+ | 25 o-+-+ ------------------ Part List --------------------------
+ -------- | 1 - .1 uF capacitor | 6 - 10K 5% resistors |
+ 25-pin male D | 1 - 4-pin connector | 1 - 25-pin male D connector |
+ connector to PC | 1 - 74LS05 open collector hex inverter |
+ printer port -------------------------------------------------------
+.Ed
+.Sh SEE ALSO
+.Xr iicbb 4 ,
+.Xr iicbus 4 ,
+.Xr ppbus 4
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Nicolas Souchu .
diff --git a/share/man/man4/lpt.4 b/share/man/man4/lpt.4
new file mode 100644
index 0000000..8b3dd57
--- /dev/null
+++ b/share/man/man4/lpt.4
@@ -0,0 +1,98 @@
+.\"
+.\" Copyright (c) 1993 Christopher G. Demetriou
+.\" Copyright (c) 1994 Geoffrey M. Rehmet
+.\" Copyright (c) 1999 Nicolas Souchu
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 14, 1999
+.Dt LPT 4
+.Os
+.Sh NAME
+.Nm lpt
+.Nd generic printer device driver
+.Sh SYNOPSIS
+.Cd "device ppc"
+.Cd "device ppbus"
+.Cd "device lpt"
+.Sh DESCRIPTION
+The current
+.Em lpt
+driver is the port of the original lpt driver to the
+.Xr ppbus 4
+system.
+.Pp
+One purpose of this port was to allow parallel port sharing with other
+parallel devices.
+Secondly, inb()/outb() calls have been replaced by ppbus
+function calls.
+lpt is now arch-independent thanks to the ppbus interface.
+See
+.Xr ppbus 4
+for more info about the ppbus system.
+.Pp
+The parallel port bus is allocated by lpt when the printer device is opened
+and released only when the transfer is completed: either when the device
+is closed or when the entire buffer is sent in interrupt driven mode.
+.Pp
+The driver can be configured to be either interrupt-driven, or
+to poll the printer.
+Ports that are configured to be
+interrupt-driven can be switched to polled mode by using the
+.Xr lptcontrol 8
+command.
+.Pp
+Depending on your hardware, extended capabilities may be configured with the
+.Xr lptcontrol 8
+command.
+With an ECP/ISA port, you can take advantage
+of FIFO and DMA.
+.Pp
+In order to retrieve printer info from /dev/lpt0, just apply the
+.Nm cat
+command to the device.
+If the printer supports IEEE1284 nibble mode and has
+data to send to the host, you will get it.
+.Sh FILES
+.Bl -tag -width Pa -compact
+.It Pa /dev/lpt0
+first parallel port driver
+.El
+.Sh SEE ALSO
+.Xr ppbus 4 ,
+.Xr ppc 4 ,
+.Xr lptcontrol 8
+.Sh HISTORY
+This driver replaces the functionality of the lpa
+driver, which is now defunct.
+.Sh BUGS
+There are lots of them, especially in cheap parallel port implementations.
+.Pp
+It is only possible to open a lpt port when a printer is connected and
+on-line, making it impossible to run
+.Xr lptcontrol 8
+when there is no printer connected.
+.Pp
+This driver could still stand a rewrite.
diff --git a/share/man/man4/mac.4 b/share/man/man4/mac.4
new file mode 100644
index 0000000..b1ff1d9
--- /dev/null
+++ b/share/man/man4/mac.4
@@ -0,0 +1,254 @@
+.\" Copyright (c) 2003 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Chris Costello
+.\" at Safeport Network Services and Network Associates Labs, the
+.\" Security Research Division of Network Associates, Inc. under
+.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 30, 2007
+.Dt MAC 4
+.Os
+.Sh NAME
+.Nm mac
+.Nd Mandatory Access Control
+.Sh SYNOPSIS
+.Cd "options MAC"
+.Sh DESCRIPTION
+.Ss Introduction
+The Mandatory Access Control, or MAC, framework allows administrators to
+finely control system security by providing for a loadable security policy
+architecture.
+It is important to note that due to its nature, MAC security policies may
+only restrict access relative to one another and the base system policy;
+they cannot override traditional
+.Ux
+security provisions such as file permissions and superuser checks.
+.Pp
+Currently, the following MAC policy modules are shipped with
+.Fx :
+.Bl -column ".Xr mac_seeotheruids 4" "low-watermark mac policy" ".Em Labeling" "boot only"
+.It Sy Name Ta Sy Description Ta Sy Labeling Ta Sy "Load time"
+.It Xr mac_biba 4 Ta "Biba integrity policy" Ta yes Ta boot only
+.It Xr mac_bsdextended 4 Ta "File system firewall" Ta no Ta any time
+.It Xr mac_ifoff 4 Ta "Interface silencing" Ta no Ta any time
+.It Xr mac_lomac 4 Ta "Low-Watermark MAC policy" Ta yes Ta boot only
+.It Xr mac_mls 4 Ta "Confidentiality policy" Ta yes Ta boot only
+.It Xr mac_none 4 Ta "Sample no-op policy" Ta no Ta any time
+.It Xr mac_partition 4 Ta "Process partition policy" Ta yes Ta any time
+.It Xr mac_portacl 4 Ta "Port bind(2) access control" Ta no Ta any time
+.It Xr mac_seeotheruids 4 Ta "See-other-UIDs policy" Ta no Ta any time
+.It Xr mac_test 4 Ta "MAC testing policy" Ta no Ta any time
+.El
+.Ss MAC Labels
+Each system subject (processes, sockets, etc.) and each system object
+(file system objects, sockets, etc.) can carry with it a MAC label.
+MAC labels contain data in an arbitrary format
+taken into consideration in making access control decisions
+for a given operation.
+Most MAC labels on system subjects and objects
+can be modified directly or indirectly by the system
+administrator.
+The format for a given policy's label may vary depending on the type
+of object or subject being labeled.
+More information on the format for MAC labels can be found in the
+.Xr maclabel 7
+man page.
+.Ss MAC Support for UFS2 File Systems
+By default, file system enforcement of labeled MAC policies relies on
+a single file system label
+(see
+.Sx "MAC Labels" )
+in order to make access control decisions for all the files in a particular
+file system.
+With some policies, this configuration may not allow administrators to take
+full advantage of features.
+In order to enable support for labeling files on an individual basis
+for a particular file system,
+the
+.Dq multilabel
+flag must be enabled on the file system.
+To set the
+.Dq multilabel
+flag, drop to single-user mode and unmount the file system,
+then execute the following command:
+.Pp
+.Dl "tunefs -l enable" Ar filesystem
+.Pp
+where
+.Ar filesystem
+is either the mount point
+(in
+.Xr fstab 5 )
+or the special file
+(in
+.Pa /dev )
+corresponding to the file system on which to enable multilabel support.
+.Ss Policy Enforcement
+Policy enforcement is divided into the following areas of the system:
+.Bl -ohang
+.It Sy "File System"
+File system mounts, modifying directories, modifying files, etc.
+.It Sy KLD
+Loading, unloading, and retrieving statistics on loaded kernel modules
+.It Sy Network
+Network interfaces,
+.Xr bpf 4 ,
+packet delivery and transmission,
+interface configuration
+.Xr ( ioctl 2 ,
+.Xr ifconfig 8 )
+.It Sy Pipes
+Creation of and operation on
+.Xr pipe 2
+objects
+.It Sy Processes
+Debugging
+(e.g.\&
+.Xr ktrace 2 ) ,
+process visibility
+.Pq Xr ps 1 ,
+process execution
+.Pq Xr execve 2 ,
+signalling
+.Pq Xr kill 2
+.It Sy Sockets
+Creation of and operation on
+.Xr socket 2
+objects
+.It Sy System
+Kernel environment
+.Pq Xr kenv 1 ,
+system accounting
+.Pq Xr acct 2 ,
+.Xr reboot 2 ,
+.Xr settimeofday 2 ,
+.Xr swapon 2 ,
+.Xr sysctl 3 ,
+.Xr nfsd 8 Ns
+-related operations
+.It Sy VM
+.Xr mmap 2 Ns
+-ed files
+.El
+.Ss Setting MAC Labels
+From the command line, each type of system object has its own means for setting
+and modifying its MAC policy label.
+.Bl -column "user (by login class)" "Xr setfmac 8 , Xr setfsmac 8" -offset indent
+.It Sy "Subject/Object" Ta Sy "Utility"
+.It "File system object" Ta Xr setfmac 8 , Xr setfsmac 8
+.It "Network interface" Ta Xr ifconfig 8
+.It "TTY (by login class)" Ta Xr login.conf 5
+.It "User (by login class)" Ta Xr login.conf 5
+.El
+.Pp
+Additionally, the
+.Xr su 1
+and
+.Xr setpmac 8
+utilities can be used to run a command with a different process label than
+the shell's current label.
+.Ss Programming With MAC
+MAC security enforcement itself is transparent to application
+programs, with the exception that some programs may need to be aware of
+additional
+.Xr errno 2
+returns from various system calls.
+.Pp
+The interface for retrieving, handling, and setting policy labels
+is documented in the
+.Xr mac 3
+man page.
+.\" *** XXX ***
+.\" Support for this feature is poor and should not be encouraged.
+.\"
+.\" .It Va security.mac.mmap_revocation
+.\" Revoke
+.\" .Xr mmap 2
+.\" access to files on subject relabel.
+.\" .It Va security.mac.mmap_revocation_via_cow
+.\" Revoke
+.\" .Xr mmap 2
+.\" access to files via copy-on-write semantics;
+.\" mapped regions will still appear writable, but will no longer
+.\" effect a change on the underlying vnode.
+.\" (Default: 0).
+.Sh SEE ALSO
+.Xr mac 3 ,
+.Xr mac_biba 4 ,
+.Xr mac_bsdextended 4 ,
+.Xr mac_ifoff 4 ,
+.Xr mac_lomac 4 ,
+.Xr mac_mls 4 ,
+.Xr mac_none 4 ,
+.Xr mac_partition 4 ,
+.Xr mac_portacl 4 ,
+.Xr mac_seeotheruids 4 ,
+.Xr mac_test 4 ,
+.Xr login.conf 5 ,
+.Xr maclabel 7 ,
+.Xr getfmac 8 ,
+.Xr getpmac 8 ,
+.Xr setfmac 8 ,
+.Xr setpmac 8 ,
+.Xr mac 9
+.Rs
+.%B "The FreeBSD Handbook"
+.%T "Mandatory Access Control"
+.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/mac.html
+.Re
+.Sh HISTORY
+The
+.Nm
+implementation first appeared in
+.Fx 5.0
+and was developed by the
+.Tn TrustedBSD
+Project.
+.Sh AUTHORS
+This software was contributed to the
+.Fx
+Project by Network Associates Labs,
+the Security Research Division of Network Associates
+Inc.
+under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.
+.Sh BUGS
+See
+.Xr mac 9
+concerning appropriateness for production use.
+The
+.Tn TrustedBSD
+MAC Framework is considered experimental in
+.Fx .
+.Pp
+While the MAC Framework design is intended to support the containment of
+the root user, not all attack channels are currently protected by entry
+point checks.
+As such, MAC Framework policies should not be relied on, in isolation,
+to protect against a malicious privileged user.
diff --git a/share/man/man4/mac_biba.4 b/share/man/man4/mac_biba.4
new file mode 100644
index 0000000..7b7cf6e
--- /dev/null
+++ b/share/man/man4/mac_biba.4
@@ -0,0 +1,236 @@
+.\" Copyright (c) 2002-2004 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Chris Costello
+.\" at Safeport Network Services and Network Associates Laboratories, the
+.\" Security Research Division of Network Associates, Inc. under
+.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 18, 2002
+.Dt MAC_BIBA 4
+.Os
+.Sh NAME
+.Nm mac_biba
+.Nd "Biba data integrity policy"
+.Sh SYNOPSIS
+To compile Biba into your kernel, place the following lines in your kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Cd "options MAC_BIBA"
+.Ed
+.Pp
+Alternately, to load the Biba module at boot time, place the following line
+in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Ed
+.Pp
+and in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mac_biba_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+policy module implements the Biba integrity model,
+which protects the integrity of system objects and subjects by means of
+a strict information flow policy.
+In Biba, all system subjects and objects are assigned integrity labels, made
+up of hierarchal grades, and non-hierarchal components.
+Together, these label elements permit all labels to be placed in a partial
+order, with information flow protections based on a dominance operator
+describing the order.
+The hierarchal grade field is expressed as a value between 0 and 65535,
+with higher values reflecting higher integrity.
+The non-hierarchal compartment field is expressed as a set of up to 256
+components, numbered from 0 to 255.
+A complete label consists of both hierarchal and non-hierarchal elements.
+.Pp
+Three special label values exist:
+.Bl -column -offset indent ".Li biba/equal" "lower than all other labels"
+.It Sy Label Ta Sy Comparison
+.It Li biba/low Ta "lower than all other labels"
+.It Li biba/equal Ta "equal to all other labels"
+.It Li biba/high Ta "higher than all other labels"
+.El
+.Pp
+The
+.Dq Li biba/high
+label is assigned to system objects which affect the integrity of the system
+as a whole.
+The
+.Dq Li biba/equal
+label
+may be used to indicate that a particular subject or object is exempt from
+the Biba protections.
+These special label values are not specified as containing any compartments,
+although in a label comparison,
+.Dq Li biba/high
+appears to contain all compartments,
+.Dq Li biba/equal
+the same compartments as the other label to which it is being compared,
+and
+.Dq Li biba/low
+none.
+.Pp
+In general, Biba access control takes the following model:
+.Bl -bullet
+.It
+A subject at the same integrity level as an object may both read from
+and write to the object as though Biba protections were not in place.
+.It
+A subject at a higher integrity level than an object may write to the object,
+but not read the object.
+.It
+A subject at a lower integrity level than an object may read the object,
+but not write to the object.
+.It
+If the subject and object labels may not be compared in the partial order,
+all access is restricted.
+.El
+.Pp
+These rules prevent subjects of lower integrity from influencing the
+behavior of higher integrity subjects by preventing the flow of information,
+and hence control, from allowing low integrity subjects to modify either
+a high integrity object or high integrity subjects acting on those objects.
+Biba integrity policies may be appropriate in a number of environments,
+both from the perspective of preventing corruption of the operating system,
+and corruption of user data if marked as higher integrity than the attacker.
+In traditional trusted operating systems, the Biba integrity model is used
+to protect the Trusted Code Base (TCB).
+.Pp
+The Biba integrity model is similar to
+.Xr mac_lomac 4 ,
+with the exception that LOMAC permits access by a higher integrity subject
+to a lower integrity object, but downgrades the integrity level of the subject
+to prevent integrity rules from being violated.
+Biba is a fixed label policy in that all subject and object label changes are
+explicit, whereas LOMAC is a floating label policy.
+.Pp
+The Biba integrity model is also similar to
+.Xr mac_mls 4 ,
+with the exception that the dominance operator and access rules are reversed,
+preventing the downward flow of information rather than the upward flow of
+information.
+Multi-Level Security (MLS) protects the confidentiality, rather than the
+integrity, of subjects and objects.
+.Ss Label Format
+Almost all system objects are tagged with an effective, active label element,
+reflecting the integrity of the object, or integrity of the data contained
+in the object.
+In general, objects labels are represented in the following form:
+.Pp
+.Sm off
+.D1 Li biba / Ar grade : compartments
+.Sm on
+.Pp
+For example:
+.Bd -literal -offset indent
+biba/10:2+3+6
+biba/low
+.Ed
+.Pp
+Subject labels consist of three label elements: an effective (active) label,
+as well as a range of available labels.
+This range is represented using two ordered Biba label elements, and when set
+on a process, permits the process to change its active label to any label of
+greater or equal integrity to the low end of the range, and lesser or equal
+integrity to the high end of the range.
+In general, subject labels are represented in the following form:
+.Pp
+.Sm off
+.D1 Li biba / Ar effectivegrade : effectivecompartments ( lograde : locompartments -
+.D1 Ar higrade : hicompartments )
+.Sm on
+.Pp
+For example:
+.Bd -literal -offset indent
+biba/10:2+3+6(5:2+3-20:2+3+4+5+6)
+biba/high(low-high)
+.Ed
+.Pp
+Valid ranged labels must meet the following requirement regarding their
+elements:
+.Pp
+.D1 Ar rangehigh No \[>=] Ar effective No \[>=] Ar rangelow
+.Pp
+One class of objects with ranges currently exists, the network interface.
+In the case of the network interface, the effective label element references the
+default label for packets received over the interface, and the range
+represents the range of acceptable labels of packets to be transmitted over
+the interface.
+.Ss Runtime Configuration
+The following
+.Xr sysctl 8
+MIBs are available for fine-tuning the enforcement of this MAC policy.
+.Bl -tag -width ".Va security.mac.biba.ptys_equal"
+.It Va security.mac.biba.enabled
+Enables enforcement of the Biba integrity policy.
+(Default: 1).
+.It Va security.mac.biba.ptys_equal
+Label
+.Xr pty 4 Ns s
+as
+.Dq Li biba/equal
+upon creation.
+(Default: 0).
+.It Va security.mac.biba.revocation_enabled
+Revoke access to objects if the label is changed to dominate the subject.
+(Default: 0).
+.El
+.Sh SEE ALSO
+.Xr mac 4 ,
+.Xr mac_bsdextended 4 ,
+.Xr mac_ifoff 4 ,
+.Xr mac_lomac 4 ,
+.Xr mac_mls 4 ,
+.Xr mac_none 4 ,
+.Xr mac_partition 4 ,
+.Xr mac_portacl 4 ,
+.Xr mac_seeotheruids 4 ,
+.Xr mac_test 4 ,
+.Xr maclabel 7 ,
+.Xr mac 9
+.Sh HISTORY
+The
+.Nm
+policy module first appeared in
+.Fx 5.0
+and was developed by the
+.Tn TrustedBSD
+Project.
+.Sh AUTHORS
+This software was contributed to the
+.Fx
+Project by Network Associates Labs,
+the Security Research Division of Network Associates
+Inc.
+under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.
diff --git a/share/man/man4/mac_bsdextended.4 b/share/man/man4/mac_bsdextended.4
new file mode 100644
index 0000000..23b89c0
--- /dev/null
+++ b/share/man/man4/mac_bsdextended.4
@@ -0,0 +1,149 @@
+.\" Copyright (c) 2002 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Chris Costello
+.\" at Safeport Network Services and Network Associates Laboratories, the
+.\" Security Research Division of Network Associates, Inc. under
+.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 21, 2005
+.Dt MAC_BSDEXTENDED 4
+.Os
+.Sh NAME
+.Nm mac_bsdextended
+.Nd "file system firewall policy"
+.Sh SYNOPSIS
+To compile the file system firewall policy into your kernel,
+place the following lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Cd "options MAC_BSDEXTENDED"
+.Ed
+.Pp
+Alternately, to load the file system firewall policy module at boot time,
+place the following line in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Ed
+.Pp
+and in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mac_bsdextended_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+security policy module provides an interface for the system administrator
+to impose mandatory rules regarding users and some system objects.
+Rules are uploaded to the module
+(typically using
+.Xr ugidfw 8 ,
+or some other tool utilizing
+.Xr libugidfw 3 )
+where they are stored internally
+and used to determine whether to allow or deny specific accesses
+(see
+.Xr ugidfw 8 ) .
+.Sh IMPLEMENTATION NOTES
+While the traditional
+.Xr mac 9
+entry points are implemented,
+policy labels are not used;
+instead, access control decisions are made by iterating through the internal
+list of rules until a rule
+which denies the particular access
+is found,
+or the end of the list is reached.
+The
+.Nm
+policy works similar to
+.Xr ipfw 8
+or by using a
+.Em first match semantic .
+This means that not all rules are applied,
+only the first matched rule; thus if
+Rule A allows access and Rule B blocks
+access, Rule B will never be applied.
+.Pp
+.Ss Sysctls
+The following sysctls may be used to tweak the behavior of
+.Nm :
+.Bl -tag -width indent
+.It Va security.mac.bsdextended.enabled
+Set to zero or one to toggle the policy off or on.
+.It Va security.mac.bsdextended.rule_count
+List the number of defined rules, the maximum rule count is
+current set at 256.
+.It Va security.mac.bsdextended.rule_slots
+List the number of rule slots currently being used.
+.It Va security.mac.bsdextended.firstmatch_enabled
+Toggle between the old all rules match functionality
+and the new first rule matches functionality.
+This is enabled by default.
+.It Va security.mac.bsdextended.logging
+Log all access violations via the
+.Dv AUTHPRIV
+.Xr syslog 3
+facility.
+.It Va security.mac.bsdextended.rules
+Currently does nothing interesting.
+.El
+.Sh SEE ALSO
+.Xr libugidfw 3 ,
+.Xr syslog 3 ,
+.Xr mac 4 ,
+.Xr mac_biba 4 ,
+.Xr mac_ifoff 4 ,
+.Xr mac_lomac 4 ,
+.Xr mac_mls 4 ,
+.Xr mac_none 4 ,
+.Xr mac_partition 4 ,
+.Xr mac_portacl 4 ,
+.Xr mac_seeotheruids 4 ,
+.Xr mac_test 4 ,
+.Xr ipfw 8 ,
+.Xr ugidfw 8 ,
+.Xr mac 9
+.Sh HISTORY
+The
+.Nm
+policy module first appeared in
+.Fx 5.0
+and was developed by the
+.Tn TrustedBSD
+Project.
+.Pp
+The "match first case" and logging capabilities were later added by
+.An Tom Rhodes Aq trhodes@FreeBSD.org .
+.Sh AUTHORS
+This software was contributed to the
+.Fx
+Project by NAI Labs, the Security Research Division of Network Associates
+Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.
diff --git a/share/man/man4/mac_ifoff.4 b/share/man/man4/mac_ifoff.4
new file mode 100644
index 0000000..87c73b2
--- /dev/null
+++ b/share/man/man4/mac_ifoff.4
@@ -0,0 +1,133 @@
+.\" Copyright (c) 2002 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Chris Costello
+.\" at Safeport Network Services and Network Associates Laboratories, the
+.\" Security Research Division of Network Associates, Inc. under
+.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 10, 2002
+.Dt MAC_IFOFF 4
+.Os
+.Sh NAME
+.Nm mac_ifoff
+.Nd "interface silencing policy"
+.Sh SYNOPSIS
+To compile the interface silencing policy into your kernel,
+place the following lines in your kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Cd "options MAC_IFOFF"
+.Ed
+.Pp
+Alternately, to load the interface silencing policy module at boot time,
+place the following line in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Ed
+.Pp
+and in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mac_ifoff_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+interface silencing module allows administrators to enable and disable
+incoming and outgoing data flow on system network interfaces
+via the
+.Xr sysctl 8
+interface.
+.Pp
+To disable network traffic over the loopback
+.Pq Xr lo 4
+interface, set the
+.Xr sysctl 8
+OID
+.Va security.mac.ifoff.lo_enabled
+to 0 (default 1).
+.Pp
+To enable network traffic over other interfaces,
+set the
+.Xr sysctl 8
+OID
+.Va security.mac.ifoff.other_enabled
+to 1 (default 0).
+.Pp
+To allow BPF traffic to be received,
+even while other traffic is disabled,
+set the
+.Xr sysctl 8
+OID
+.Va security.mac.ifoff.bpfrecv_enabled
+to 1 (default 0).
+.Ss Label Format
+No labels are defined.
+.Sh SEE ALSO
+.Xr mac 4 ,
+.Xr mac_bsdextended 4 ,
+.Xr mac_lomac 4 ,
+.Xr mac_mls 4 ,
+.Xr mac_none 4 ,
+.Xr mac_partition 4 ,
+.Xr mac_portacl 4 ,
+.Xr mac_seeotheruids 4 ,
+.Xr mac_test 4 ,
+.Xr mac 9
+.Sh HISTORY
+The
+.Nm
+policy module first appeared in
+.Fx 5.0
+and was developed by the
+.Tn TrustedBSD
+Project.
+.Sh AUTHORS
+This software was contributed to the
+.Fx
+Project by Network Associates Labs,
+the Security Research Division of Network Associates
+Inc.
+under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.
+.Sh BUGS
+See
+.Xr mac 9
+concerning appropriateness for production use.
+The
+.Tn TrustedBSD
+MAC Framework is considered experimental in
+.Fx .
+.Pp
+While the MAC Framework design is intended to support the containment of
+the root user, not all attack channels are currently protected by entry
+point checks.
+As such, MAC Framework policies should not be relied on, in isolation,
+to protect against a malicious privileged user.
diff --git a/share/man/man4/mac_lomac.4 b/share/man/man4/mac_lomac.4
new file mode 100644
index 0000000..273a585
--- /dev/null
+++ b/share/man/man4/mac_lomac.4
@@ -0,0 +1,221 @@
+.\" Copyright (c) 2002 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Chris Costello
+.\" at Safeport Network Services and Network Associates Laboratories, the
+.\" Security Research Division of Network Associates, Inc. under
+.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 25, 2012
+.Dt MAC_LOMAC 4
+.Os
+.Sh NAME
+.Nm mac_lomac
+.Nd "Low-watermark Mandatory Access Control data integrity policy"
+.Sh SYNOPSIS
+To compile LOMAC into your kernel, place the following lines in your kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Cd "options MAC_LOMAC"
+.Ed
+.Pp
+Alternately, to load the LOMAC module at boot time, place the following line
+in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Ed
+.Pp
+and in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mac_lomac_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+policy module implements the LOMAC integrity model,
+which protects the integrity of system objects and subjects by means of
+an information flow policy coupled with the subject demotion
+via floating labels.
+In LOMAC, all system subjects and objects are assigned integrity labels, made
+up of one or more hierarchical grades, depending on their types.
+Together, these label elements permit all labels to be placed in a partial
+order, with information flow protections and demotion decisions
+based on a dominance operator
+describing the order.
+The hierarchal grade field or fields are expressed
+as a value between 0 and 65535,
+with higher values reflecting higher integrity.
+.Pp
+Three special label component values exist:
+.Bl -column -offset indent ".Sy Label" "dominated by all other labels"
+.It Sy Label Ta Sy Comparison
+.It Li low Ta "dominated by all other labels"
+.It Li equal Ta "equal to all other labels"
+.It Li high Ta "dominates all other labels"
+.El
+.Pp
+The
+.Dq Li high
+label is assigned to system objects which affect the integrity of the system
+as a whole.
+The
+.Dq Li equal
+label
+may be used to indicate that a particular subject or object is exempt from
+the LOMAC protections.
+For example, a label of
+.Dq Li lomac/equal(equal-equal)
+might be used on a subject which is to be used to administratively relabel
+anything on the system.
+.Pp
+Almost all system objects are tagged with a single, active label element,
+reflecting the integrity of the object, or integrity of the data contained
+in the object.
+File system objects may contain an additional auxiliary label which
+determines the inherited integrity level for new files created in a
+directory or the alternate label assumed by the subject upon execution of
+an executable.
+In general, objects labels are represented in the following form:
+.Pp
+.Sm off
+.D1 Li lomac / Ar grade Bq Ar auxgrade
+.Sm on
+.Pp
+For example:
+.Bd -literal -offset indent
+lomac/10[2]
+lomac/low
+.Ed
+.Pp
+Subject labels consist of three label elements: a single (active) label,
+as well as a range of available labels.
+This range is represented using two ordered LOMAC label elements, and when set
+on a process, permits the process to change its active label to any label of
+greater or equal integrity to the low end of the range, and lesser or equal
+integrity to the high end of the range.
+In general, subject labels are represented in the following form:
+.Pp
+.Sm off
+.D1 Li lomac / Ar singlegrade ( lograde No - Ar higrade )
+.Sm on
+.Pp
+Modification of objects is restricted to access via the following comparison:
+.Pp
+.D1 Ar subject Ns :: Ns Ar higrade No \[>=] Ar target-object Ns :: Ns Ar grade
+.Pp
+Modification of subjects is the same, as the target subject's single grade
+is the only element taken into comparison.
+.Pp
+Demotion of a subject occurs when the following comparison is true:
+.Pp
+.D1 Ar subject Ns :: Ns Ar singlegrade No > Ar object Ns :: Ns Ar grade
+.Pp
+When demotion occurs, the subject's
+.Ar singlegrade
+and
+.Ar higrade
+are reduced to the
+object's grade, as well as the
+.Ar lograde
+if necessary.
+When the demotion occurs, in addition to the permission of the subject being
+reduced, shared
+.Xr mmap 2
+objects which it has opened in its memory space may be revoked according to
+the following
+.Xr sysctl 3
+variables:
+.Pp
+.Bl -bullet -compact
+.It
+.Va security.mac.lomac.revocation_enabled
+.It
+.Va security.mac.enforce_vm
+.It
+.Va security.mac.mmap_revocation
+.It
+.Va security.mac.mmap_revocation_via_cow
+.El
+.Pp
+Upon execution of a file, if the executable has an auxiliary label, and that
+label is within the current range of
+.Ar lograde Ns - Ns Ar higrade ,
+it will be assumed by the subject immediately.
+After this, demotion is performed just as with any other read operation, with
+the executable as the target.
+Through the use of auxiliary labels, programs may be initially executed
+at a lower effective integrity level,
+while retaining the ability to raise it again.
+.Pp
+These rules prevent subjects of lower integrity from influencing the
+behavior of higher integrity subjects by preventing the flow of information,
+and hence control, from allowing low integrity subjects to modify either
+a high integrity object or high integrity subjects acting on those objects.
+LOMAC integrity policies may be appropriate in a number of environments,
+both from the perspective of preventing corruption of the operating system,
+and corruption of user data if marked as higher integrity than the attacker.
+.Pp
+The LOMAC security model is quite similar to that of
+.Xr mac_biba 4
+and
+.Xr mac_mls 4
+in various ways.
+More background information on this can be found in their respective
+man pages.
+.Sh SEE ALSO
+.Xr mmap 2 ,
+.Xr sysctl 3 ,
+.Xr mac 4 ,
+.Xr mac_biba 4 ,
+.Xr mac_bsdextended 4 ,
+.Xr mac_ifoff 4 ,
+.Xr mac_mls 4 ,
+.Xr mac_none 4 ,
+.Xr mac_partition 4 ,
+.Xr mac_portacl 4 ,
+.Xr mac_seeotheruids 4 ,
+.Xr mac_test 4 ,
+.Xr mac 9
+.Sh HISTORY
+The
+.Nm
+policy module first appeared in
+.Fx 5.0
+and was developed by the
+.Tn TrustedBSD
+Project.
+.Sh AUTHORS
+This software was contributed to the
+.Fx
+Project by Network Associates Labs,
+the Security Research Division of Network Associates
+Inc.
+under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.
diff --git a/share/man/man4/mac_mls.4 b/share/man/man4/mac_mls.4
new file mode 100644
index 0000000..b314fb5
--- /dev/null
+++ b/share/man/man4/mac_mls.4
@@ -0,0 +1,251 @@
+.\" Copyright (c) 2002-2004 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Chris Costello
+.\" at Safeport Network Services and Network Associates Laboratories, the
+.\" Security Research Division of Network Associates, Inc. under
+.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 1, 2002
+.Dt MAC_MLS 4
+.Os
+.Sh NAME
+.Nm mac_mls
+.Nd "Multi-Level Security confidentiality policy"
+.Sh SYNOPSIS
+To compile MLS into your kernel, place the following lines in your kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Cd "options MAC_MLS"
+.Ed
+.Pp
+Alternately, to load the MLS module at boot time, place the following line
+in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Ed
+.Pp
+and in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mac_mls_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+policy module implements the Multi-Level Security, or MLS model,
+which controls access between subjects and objects based on their
+confidentiality by means of a strict information flow policy.
+Each subject and object in the system has an MLS label associated with it;
+each subject's MLS label contains information on its clearance level,
+and each object's MLS label contains information on its classification.
+.Pp
+In MLS, all system subjects and objects are assigned confidentiality labels,
+made up of a sensitivity level and zero or more compartments.
+Together, these label elements permit all labels to be placed in a partial
+order, with confidentiality protections based on a dominance operator
+describing the order.
+The sensitivity level is expressed as a value between 0 and
+65535, with higher values reflecting higher sensitivity levels.
+The compartment field is expressed as a set of up to 256 components,
+numbered from 1 to 256.
+A complete label consists of both sensitivity and compartment
+elements.
+.Pp
+With normal labels, dominance is defined as a label having a higher
+or equal active sensitivity level, and having at least
+all of the same compartments as the label to which it is being compared.
+With respect to label comparisons,
+.Dq Li lower
+is defined as being dominated by the label to which it is being compared,
+and
+.Dq Li higher
+is defined as dominating the label to which it is being compared,
+and
+.Dq Li equal
+is defined as both labels being able to satisfy the dominance requirements
+over one another.
+.Pp
+Three special label values exist:
+.Bl -column -offset indent ".Li mls/equal" "dominated by all other labels"
+.It Sy Label Ta Sy Comparison
+.It Li mls/low Ta "dominated by all other labels"
+.It Li mls/equal Ta "equal to all other labels"
+.It Li mls/high Ta "dominates all other labels"
+.El
+.Pp
+The
+.Dq Li mls/equal
+label may be applied to subjects and objects for which no enforcement of the
+MLS security policy is desired.
+.Pp
+The MLS model enforces the following basic restrictions:
+.Bl -bullet
+.It
+Subjects may not observe the processes of another subject if its
+clearance level is lower than the clearance level of the object it is
+attempting to observe.
+.It
+Subjects may not read, write, or otherwise observe objects without proper
+clearance (e.g.\& subjects may not observe objects whose classification label
+dominates its own clearance label)
+.It
+Subjects may not write to objects with a lower classification level than
+its own clearance level.
+.It
+A subject may read and write to an object if its clearance level is equal
+to the object's classification level as though MLS protections were not in
+place.
+.El
+.Pp
+These rules prevent subjects of lower clearance from gaining access
+information classified beyond its clearance level in order to protect the
+confidentiality of classified information, subjects of higher clearance
+from writing to objects of lower classification in order to prevent the
+accidental or malicious leaking of information, and subjects of lower
+clearance from observing subjects of higher clearance altogether.
+In traditional trusted operating systems, the MLS confidentiality model is
+used in concert with the Biba integrity model
+.Xr ( mac_biba 4 )
+in order to protect the Trusted Code Base (TCB).
+.Ss Label Format
+Almost all system objects are tagged with an effective, active label element,
+reflecting the classification of the object, or classification of the data
+contained in the object.
+In general, object labels are represented in the following form:
+.Pp
+.Sm off
+.D1 Li mls / Ar grade : compartments
+.Sm on
+.Pp
+For example:
+.Bd -literal -offset indent
+mls/10:2+3+6
+mls/low
+.Ed
+.Pp
+Subject labels consist of three label elements: an effective (active) label,
+as well as a range of available labels.
+This range is represented using two ordered MLS label elements, and when set
+on a process, permits the process to change its active label to any label of
+greater or equal integrity to the low end of the range, and lesser or equal
+integrity to the high end of the range.
+In general, subject labels are represented in the following form:
+.Pp
+.Sm off
+.D1 Li mls / Ar effectivegrade : effectivecompartments ( lograde : locompartments No -
+.D1 Ar higrade : hicompartments )
+.Sm on
+.Pp
+For example:
+.Bd -literal -offset indent
+mls/10:2+3+6(5:2+3-20:2+3+4+5+6)
+mls/high(low-high)
+.Ed
+.Pp
+Valid ranged labels must meet the following requirement regarding their
+elements:
+.Pp
+.D1 Ar rangehigh No \[>=] Ar effective No \[>=] Ar rangelow
+.Pp
+One class of objects with ranges currently exists, the network interface.
+In the case of the network interface, the effective label element references
+the default label for packets received over the interface, and the range
+represents the range of acceptable labels of packets to be transmitted over
+the interface.
+.Ss Runtime Configuration
+The following
+.Xr sysctl 8
+MIBs are available for fine-tuning the enforcement of this MAC policy.
+.Bl -tag -width ".Va security.mac.mls.ptys_equal"
+.It Va security.mac.mls.enabled
+Enables the enforcement of the MLS confidentiality policy.
+(Default: 1).
+.It Va security.mac.mls.ptys_equal
+Label
+.Xr pty 4 Ns s
+as
+.Dq Li mls/equal
+upon creation.
+(Default: 0).
+.It Va security.mac.mls.revocation_enabled
+Revoke access to objects if the label is changed to a more sensitive
+level than the subject.
+(Default: 0).
+.El
+.Sh IMPLEMENTATION NOTES
+Currently, the
+.Nm
+policy relies on superuser status
+.Pq Xr suser 9
+in order to change network interface MLS labels.
+This will eventually go away, but it is currently a liability and may
+allow the superuser to bypass MLS protections.
+.Sh SEE ALSO
+.Xr mac 4 ,
+.Xr mac_biba 4 ,
+.Xr mac_bsdextended 4 ,
+.Xr mac_ifoff 4 ,
+.Xr mac_lomac 4 ,
+.Xr mac_none 4 ,
+.Xr mac_partition 4 ,
+.Xr mac_portacl 4 ,
+.Xr mac_seeotheruids 4 ,
+.Xr mac_test 4 ,
+.Xr maclabel 7 ,
+.Xr mac 9
+.Sh HISTORY
+The
+.Nm
+policy module first appeared in
+.Fx 5.0
+and was developed by the
+.Tn TrustedBSD
+Project.
+.Sh AUTHORS
+This software was contributed to the
+.Fx
+Project by Network Associates Laboratories,
+the Security Research Division of Network Associates
+Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.
+.Sh BUGS
+See
+.Xr mac 9
+concerning appropriateness for production use.
+The
+.Tn TrustedBSD
+MAC Framework is considered experimental in
+.Fx .
+.Pp
+While the MAC Framework design is intended to support the containment of
+the root user, not all attack channels are currently protected by entry
+point checks.
+As such, MAC Framework policies should not be relied on, in isolation,
+to protect against a malicious privileged user.
diff --git a/share/man/man4/mac_none.4 b/share/man/man4/mac_none.4
new file mode 100644
index 0000000..ed13ca6
--- /dev/null
+++ b/share/man/man4/mac_none.4
@@ -0,0 +1,113 @@
+.\" Copyright (c) 2002, 2003 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Chris Costello
+.\" at Safeport Network Services and Network Associates Laboratories, the
+.\" Security Research Division of Network Associates, Inc. under
+.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 1, 2002
+.Dt MAC_NONE 4
+.Os
+.Sh NAME
+.Nm mac_none
+.Nd "null MAC policy module"
+.Sh SYNOPSIS
+To compile the null policy
+into your kernel, place the following lines in your kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Cd "options MAC_NONE"
+.Ed
+.Pp
+Alternately, to load the none module at boot time, place the following line
+in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Ed
+.Pp
+and in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mac_none_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+policy module implements a none MAC policy that has no effect on
+access control in the system.
+Unlike
+.Xr mac_stub 4 ,
+none of the MAC entry points are defined.
+.Ss Label Format
+No labels are defined for
+.Nm .
+.Sh SEE ALSO
+.Xr mac 4 ,
+.Xr mac_biba 4 ,
+.Xr mac_bsdextended 4 ,
+.Xr mac_ifoff 4 ,
+.Xr mac_lomac 4 ,
+.Xr mac_mls 4 ,
+.Xr mac_partition 4 ,
+.Xr mac_portacl 4 ,
+.Xr mac_seeotheruids 4 ,
+.Xr mac_stub 4 ,
+.Xr mac_test 4 ,
+.Xr mac 9
+.Sh HISTORY
+The
+.Nm
+policy module first appeared in
+.Fx 5.0
+and was developed by the
+.Tn TrustedBSD
+Project.
+.Sh AUTHORS
+This software was contributed to the
+.Fx
+Project by Network Associates Labs,
+the Security Research Division of Network Associates
+Inc.
+under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.
+.Sh BUGS
+See
+.Xr mac 9
+concerning appropriateness for production use.
+The
+.Tn TrustedBSD
+MAC Framework is considered experimental in
+.Fx .
+.Pp
+While the MAC Framework design is intended to support the containment of
+the root user, not all attack channels are currently protected by entry
+point checks.
+As such, MAC Framework policies should not be relied on, in isolation,
+to protect against a malicious privileged user.
diff --git a/share/man/man4/mac_partition.4 b/share/man/man4/mac_partition.4
new file mode 100644
index 0000000..296635e
--- /dev/null
+++ b/share/man/man4/mac_partition.4
@@ -0,0 +1,133 @@
+.\" Copyright (c) 2002 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Chris Costello
+.\" at Safeport Network Services and Network Associates Laboratories, the
+.\" Security Research Division of Network Associates, Inc. under
+.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 9, 2002
+.Dt MAC_PARTITION 4
+.Os
+.Sh NAME
+.Nm mac_partition
+.Nd "process partition policy"
+.Sh SYNOPSIS
+To compile the process partition policy into your kernel,
+place the following lines in your kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Cd "options MAC_PARTITION"
+.Ed
+.Pp
+Alternately, to load the process partition module at boot time,
+place the following line in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Ed
+.Pp
+and in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mac_partition_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+policy module implements a process partition policy,
+which allows administrators to place running processes into
+.Dq partitions ,
+based on their numeric process partition
+(specified in the process's MAC label).
+Processes with a specified partition can only see processes that are in the
+same partition.
+If no partition is specified for a process, it can see all other processes
+in the system
+(subject to other MAC policy restrictions not defined in this man page).
+No provisions for placing processes into multiple partitions are available.
+.Ss Label Format
+Partition labels take on the following format:
+.Pp
+.Sm off
+.Dl Li partition / Ar value
+.Sm on
+.Pp
+Where
+.Ar value
+can be any integer value or
+.Dq Li none .
+For example:
+.Bd -literal -offset indent
+partition/1
+partition/20
+partition/none
+.Ed
+.Sh SEE ALSO
+.Xr mac 4 ,
+.Xr mac_biba 4 ,
+.Xr mac_bsdextended 4 ,
+.Xr mac_ifoff 4 ,
+.Xr mac_lomac 4 ,
+.Xr mac_mls 4 ,
+.Xr mac_none 4 ,
+.Xr mac_portacl 4 ,
+.Xr mac_seeotheruids 4 ,
+.Xr mac_test 4 ,
+.Xr maclabel 7 ,
+.Xr mac 9
+.Sh HISTORY
+The
+.Nm
+policy module first appeared in
+.Fx 5.0
+and was developed by the
+.Tn TrustedBSD
+Project.
+.Sh AUTHORS
+This software was contributed to the
+.Fx
+Project by Network Associates Labs,
+the Security Research Division of Network Associates
+Inc.
+under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.
+.Sh BUGS
+See
+.Xr mac 9
+concerning appropriateness for production use.
+The
+.Tn TrustedBSD
+MAC Framework is considered experimental in
+.Fx .
+.Pp
+While the MAC Framework design is intended to support the containment of
+the root user, not all attack channels are currently protected by entry
+point checks.
+As such, MAC Framework policies should not be relied on, in isolation,
+to protect against a malicious privileged user.
diff --git a/share/man/man4/mac_portacl.4 b/share/man/man4/mac_portacl.4
new file mode 100644
index 0000000..2ecee26
--- /dev/null
+++ b/share/man/man4/mac_portacl.4
@@ -0,0 +1,217 @@
+.\" Copyright (c) 2003 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Chris Costello
+.\" at Safeport Network Services and Network Associates Labs, the
+.\" Security Research Division of Network Associates, Inc. under
+.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 9, 2004
+.Dt MAC_PORTACL 4
+.Os
+.Sh NAME
+.Nm mac_portacl
+.Nd "network port access control policy"
+.Sh SYNOPSIS
+To compile the port access control policy into your kernel,
+place the following lines in your kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Cd "options MAC_PORTACL"
+.Ed
+.Pp
+Alternately, to load the port access control policy module at boot time,
+place the following line in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Ed
+.Pp
+and in
+.Xr loader.conf 5 :
+.Pp
+.Dl "mac_portacl_load=""YES"""
+.Sh DESCRIPTION
+The
+.Nm
+policy allows administrators to administratively limit binding to
+local
+.Tn UDP
+and
+.Tn TCP
+ports via the
+.Xr sysctl 8
+interface.
+.Pp
+In order to enable the
+.Nm
+policy, MAC policy must be enforced on sockets
+(see
+.Xr mac 4 ) ,
+and the port(s) protected by
+.Nm
+must not be included in the range specified by
+the
+.Va net.inet.ip.portrange.reservedlow
+and
+.Va net.inet.ip.portrange.reservedhigh
+.Xr sysctl 8
+MIBs.
+.Pp
+The
+.Nm
+policy only affects ports explicitly bound by a user process (either
+for a listen/outgoing
+.Tn TCP
+socket, or a send/receive
+.Tn UDP
+socket).
+This policy will not limit ports bound implicitly for outgoing
+connections where the process has not explicitly selected a port:
+these are automatically selected by the IP stack.
+.Pp
+When
+.Nm
+is enabled, it will control binding access to ports up to the port
+number set in the
+.Va security.mac.portacl.port_high
+.Xr sysctl 8
+variable.
+By default, all attempts to bind to
+.Nm
+controlled ports will fail if not explicitly allowed by the port
+access control list, though binding by the superuser will be allowed,
+if the
+.Xr sysctl 8
+variable
+.Va security.mac.portacl.suser_exempt
+is set to a non-zero value.
+.Ss Runtime Configuration
+The following
+.Xr sysctl 8
+MIBs are available for fine-tuning the enforcement of this MAC policy.
+All
+.Xr sysctl 8
+variables, except
+.Va security.mac.portacl.rules ,
+can also be set as
+.Xr loader 8
+tunables in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va security.mac.portacl.enabled
+Enforce the
+.Nm
+policy.
+(Default: 1).
+.It Va security.mac.portacl.port_high
+The highest port number
+.Nm
+will enforce rules for.
+(Default: 1023).
+.It Va security.mac.portacl.rules
+The port access control list is specified in the following format:
+.Pp
+.Sm off
+.D1 Ar idtype : id : protocol : port Op , Ar idtype : id : protocol : port , ...
+.Sm on
+.Bl -tag -width ".Ar protocol"
+.It Ar idtype
+Describes the type of subject match to be performed.
+Either
+.Li uid
+for user ID matching, or
+.Li gid
+for group ID matching.
+.It Ar id
+The user or group ID (depending on
+.Ar idtype )
+allowed to bind to the specified port.
+.Bf -emphasis
+NOTE: User and group names are not valid; only the actual ID numbers
+may be used.
+.Ef
+.It Ar protocol
+Describes which protocol this entry applies to.
+Either
+.Li tcp
+or
+.Li udp
+are supported.
+.It Ar port
+Describes which port this entry applies to.
+.Bf -emphasis
+NOTE: MAC security policies may not override other security system policies
+by allowing accesses that they may deny, such as
+.Va net.inet.ip.portrange.reservedlow /
+.Va net.inet.ip.portrange.reservedhigh .
+.Ef
+If the specified port falls within the range specified, the
+.Nm
+entry will not function
+(i.e., even the specified user/group may not be able to bind to the specified
+port).
+.El
+.It Va security.mac.portacl.suser_exempt
+Allow superuser (i.e., root) to bind to all
+.Nm
+protected ports, even if the port access control list does not
+explicitly allow this.
+(Default: 1).
+.It Va security.mac.portacl.autoport_exempt
+Allow applications to use automatic binding to port 0.
+Applications use port 0 as a request for automatic port allocation when
+binding an IP address to a socket.
+This tunable will exempt port 0 allocation from rule checking.
+(Default: 1).
+.El
+.Sh SEE ALSO
+.Xr mac 3 ,
+.Xr ip 4 ,
+.Xr mac_biba 4 ,
+.Xr mac_bsdextended 4 ,
+.Xr mac_ifoff 4 ,
+.Xr mac_mls 4 ,
+.Xr mac_none 4 ,
+.Xr mac_partition 4 ,
+.Xr mac_seeotheruids 4 ,
+.Xr mac_test 4 ,
+.Xr mac 9
+.Sh HISTORY
+MAC first appeared in
+.Fx 5.0
+and
+.Nm
+first appeared in
+.Fx 5.1 .
+.Sh AUTHORS
+This software was contributed to the
+.Fx
+Project by NAI Labs, the Security Research Division of Network Associates
+Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.
diff --git a/share/man/man4/mac_seeotheruids.4 b/share/man/man4/mac_seeotheruids.4
new file mode 100644
index 0000000..c870ca0
--- /dev/null
+++ b/share/man/man4/mac_seeotheruids.4
@@ -0,0 +1,131 @@
+.\" Copyright (c) 2002 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Chris Costello
+.\" at Safeport Network Services and Network Associates Laboratories, the
+.\" Security Research Division of Network Associates, Inc. under
+.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 6, 2005
+.Dt MAC_SEEOTHERUIDS 4
+.Os
+.Sh NAME
+.Nm mac_seeotheruids
+.Nd "simple policy controlling whether users see other users"
+.Sh SYNOPSIS
+To compile the
+policy into your kernel, place the following lines in your kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Cd "options MAC_SEEOTHERUIDS"
+.Ed
+.Pp
+Alternately, to load the module at boot time, place the following line
+in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Ed
+.Pp
+and in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mac_seeotheruids_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+policy module, when enabled, denies users to see processes or sockets owned
+by other users.
+.Pp
+To enable
+.Nm ,
+set the sysctl OID
+.Va security.mac.seeotheruids.enabled
+to 1.
+To permit superuser awareness of other credentials by virtue of privilege,
+set the sysctl OID
+.Va security.mac.seeotheruids.suser_privileged
+to 1.
+.Pp
+To allow users to see processes and sockets owned by the same primary group,
+set the sysctl OID
+.Va security.mac.seeotheruids.primarygroup_enabled
+to 1.
+.Pp
+To allow processes with a specific group ID to be exempt from the policy,
+set the sysctl OID
+.Va security.mac.seeotheruids.specificgid_enabled
+to 1, and
+.Va security.mac.seeotheruids.specificgid
+to the group ID to be exempted.
+.Ss Label Format
+No labels are defined for
+.Nm .
+.Sh SEE ALSO
+.Xr mac 4 ,
+.Xr mac_biba 4 ,
+.Xr mac_bsdextended 4 ,
+.Xr mac_ifoff 4 ,
+.Xr mac_lomac 4 ,
+.Xr mac_mls 4 ,
+.Xr mac_none 4 ,
+.Xr mac_partition 4 ,
+.Xr mac_portacl 4 ,
+.Xr mac_test 4 ,
+.Xr mac 9
+.Sh HISTORY
+The
+.Nm
+policy module first appeared in
+.Fx 5.0
+and was developed by the
+.Tn TrustedBSD
+Project.
+.Sh AUTHORS
+This software was contributed to the
+.Fx
+Project by Network Associates Labs,
+the Security Research Division of Network Associates
+Inc.
+under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.
+.Sh BUGS
+See
+.Xr mac 9
+concerning appropriateness for production use.
+The
+.Tn TrustedBSD
+MAC Framework is considered experimental in
+.Fx .
+.Pp
+While the MAC Framework design is intended to support the containment of
+the root user, not all attack channels are currently protected by entry
+point checks.
+As such, MAC Framework policies should not be relied on, in isolation,
+to protect against a malicious privileged user.
diff --git a/share/man/man4/mac_stub.4 b/share/man/man4/mac_stub.4
new file mode 100644
index 0000000..89491f1
--- /dev/null
+++ b/share/man/man4/mac_stub.4
@@ -0,0 +1,116 @@
+.\" Copyright (c) 2002, 2003 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Chris Costello
+.\" at Safeport Network Services and Network Associates Laboratories, the
+.\" Security Research Division of Network Associates, Inc. under
+.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 1, 2002
+.Dt MAC_STUB 4
+.Os
+.Sh NAME
+.Nm mac_stub
+.Nd "MAC policy stub module"
+.Sh SYNOPSIS
+To compile the stub policy
+into your kernel, place the following lines in your kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Cd "options MAC_STUB"
+.Ed
+.Pp
+Alternately, to load the stub module at boot time, place the following line
+in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Ed
+.Pp
+and in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mac_stub_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+policy module implements a stub MAC policy that has no effect on
+access control in the system.
+Unlike
+.Xr mac_none 4 ,
+each MAC entry point is defined as a
+.Dq no-op ,
+so the policy module will be entered for each event, but no change
+in system behavior should result.
+.Ss Label Format
+No labels are defined for
+.Nm .
+.Sh SEE ALSO
+.Xr mac 4 ,
+.Xr mac_biba 4 ,
+.Xr mac_bsdextended 4 ,
+.Xr mac_ifoff 4 ,
+.Xr mac_lomac 4 ,
+.Xr mac_mls 4 ,
+.Xr mac_none 4 ,
+.Xr mac_partition 4 ,
+.Xr mac_portacl 4 ,
+.Xr mac_seeotheruids 4 ,
+.Xr mac_test 4 ,
+.Xr mac 9
+.Sh HISTORY
+The
+.Nm
+policy module first appeared in
+.Fx 5.1
+and was developed by the
+.Tn TrustedBSD
+Project.
+.Sh AUTHORS
+This software was contributed to the
+.Fx
+Project by Network Associates Labs,
+the Security Research Division of Network Associates
+Inc.
+under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.
+.Sh BUGS
+See
+.Xr mac 9
+concerning appropriateness for production use.
+The
+.Tn TrustedBSD
+MAC Framework is considered experimental in
+.Fx .
+.Pp
+While the MAC Framework design is intended to support the containment of
+the root user, not all attack channels are currently protected by entry
+point checks.
+As such, MAC Framework policies should not be relied on, in isolation,
+to protect against a malicious privileged user.
diff --git a/share/man/man4/mac_test.4 b/share/man/man4/mac_test.4
new file mode 100644
index 0000000..e86d4bd
--- /dev/null
+++ b/share/man/man4/mac_test.4
@@ -0,0 +1,117 @@
+.\" Copyright (c) 2002 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Chris Costello
+.\" at Safeport Network Services and Network Associates Laboratories, the
+.\" Security Research Division of Network Associates, Inc. under
+.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
+.\" DARPA CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 1, 2002
+.Dt MAC_TEST 4
+.Os
+.Sh NAME
+.Nm mac_test
+.Nd MAC framework testing policy
+.Sh SYNOPSIS
+To compile the testing policy
+into your kernel, place the following lines in your kernel
+configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Cd "options MAC_TEST"
+.Ed
+.Pp
+Alternately, to load the testing module at boot time, place the following line
+in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options MAC"
+.Ed
+.Pp
+and in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mac_test_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+policy module implements a testing facility for the MAC framework.
+Among other things,
+.Nm
+will try to catch corrupt labels the system is attempting to destroy and
+drop to the debugger.
+Additionally, a set of statistics regarding the number of times various
+MAC framework entry points have been called is stored in the
+.Va security.mac.test
+.Xr sysctl 8
+tree.
+.Ss Label Format
+No labels are defined for
+.Nm .
+.Sh SEE ALSO
+.Xr mac 4 ,
+.Xr mac_biba 4 ,
+.Xr mac_bsdextended 4 ,
+.Xr mac_ifoff 4 ,
+.Xr mac_lomac 4 ,
+.Xr mac_mls 4 ,
+.Xr mac_none 4 ,
+.Xr mac_partition 4 ,
+.Xr mac_portacl 4 ,
+.Xr mac_seeotheruids 4 ,
+.Xr mac 9
+.Sh HISTORY
+The
+.Nm
+policy module first appeared in
+.Fx 5.0
+and was developed by the
+.Tn TrustedBSD
+Project.
+.Sh AUTHORS
+This software was contributed to the
+.Fx
+Project by Network Associates Labs,
+the Security Research Division of Network Associates
+Inc.
+under DARPA/SPAWAR contract N66001-01-C-8035
+.Pq Dq CBOSS ,
+as part of the DARPA CHATS research program.
+.Sh BUGS
+See
+.Xr mac 9
+concerning appropriateness for production use.
+The
+.Tn TrustedBSD
+MAC Framework is considered experimental in
+.Fx .
+.Pp
+While the MAC Framework design is intended to support the containment of
+the root user, not all attack channels are currently protected by entry
+point checks.
+As such, MAC Framework policies should not be relied on, in isolation,
+to protect against a malicious privileged user.
diff --git a/share/man/man4/malo.4 b/share/man/man4/malo.4
new file mode 100644
index 0000000..22cc471
--- /dev/null
+++ b/share/man/man4/malo.4
@@ -0,0 +1,127 @@
+.\"-
+.\" Copyright (c) 2008 Weongyo Jeong <weongyo@FreeBSD.org>
+.\" All rights reserved.
+.\""
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+.\" redistribution must be conditioned upon including a substantially
+.\" similar Disclaimer requirement for further binary redistribution.
+.\" 3. Neither the names of the above-listed copyright holders nor the names
+.\" of any contributors may be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
+.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" $FreeBSD$
+.\"/
+.Dd October 21, 2009
+.Dt MALO 4
+.Os
+.Sh NAME
+.Nm malo
+.Nd "Marvell Libertas IEEE 802.11b/g wireless network driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device malo"
+.Cd "device pci"
+.Cd "device wlan"
+.Cd "device firmware"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_malo_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Marvell Libertas 88W8335 based PCI
+and Cardbus network adapters.
+.Nm
+supports
+.Cm station
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+This driver requires the
+.Nm malofw
+firmware kernel module be installed before it will work.
+The firmware files are not publicly available.
+A port of the firmware can be found at:
+.Bd -literal -offset indent
+http://weongyo.org/project/malo/malo-firmware-1.4.tar.gz
+.Ed
+.Pp
+The firmware kernel module can be installed by extracting
+the archive and running
+.Ql make install clean
+in the
+.Pa malo-firmware-1.4
+directory.
+.Sh HARDWARE
+The following cards are among those supported by the
+.Nm
+driver:
+.Bl -column "Netgear WG311v3" "88W8335" "PCI" "b/g"
+.Em "Card" Ta Em "Chip" Ta Em "Bus" Ta Em "Standard"
+.It "Netgear WG311v3" Ta "88W8335" Ta "PCI" Ta "b/g"
+.It "Tenda TWL542P" Ta "88W8335" Ta "PCI" Ta "b/g"
+.It "U-Khan UW-2054i" Ta "88W8335" Ta "PCI" Ta "b/g"
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev malo0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev malo0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev malo0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Sh SEE ALSO
+.Xr cardbus 4 ,
+.Xr pci 4 ,
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 7.1 .
diff --git a/share/man/man4/man4.arm/Makefile b/share/man/man4/man4.arm/Makefile
new file mode 100644
index 0000000..73e7bf7
--- /dev/null
+++ b/share/man/man4/man4.arm/Makefile
@@ -0,0 +1,13 @@
+# $FreeBSD$
+
+MAN= devcfg.4 \
+ mge.4 \
+ npe.4 \
+ ti_adc.4
+
+MLINKS= mge.4 if_mge.4
+MLINKS+=npe.4 if_npe.4
+
+MANSUBDIR=/arm
+
+.include <bsd.prog.mk>
diff --git a/share/man/man4/man4.arm/devcfg.4 b/share/man/man4/man4.arm/devcfg.4
new file mode 100644
index 0000000..83c4168
--- /dev/null
+++ b/share/man/man4/man4.arm/devcfg.4
@@ -0,0 +1,95 @@
+.\"
+.\" Copyright (c) 2013 Thomas Skibo
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 28, 2013
+.Dt DEVCFG 4
+.Os
+.Sh NAME
+.Nm devcfg
+.Nd Zynq PL device config interface
+.Sh SYNOPSIS
+.Cd device devcfg
+.Sh DESCRIPTION
+The special file
+.Pa /dev/devcfg
+can be used to configure the PL (FPGA) section of the Xilinx Zynq-7000.
+.Pp
+On the first write to the character device at file offset 0, the
+.Nm
+driver
+asserts the top-level PL reset signals, disables the PS-PL level shifters,
+and clears the PL configuration.
+Write data is sent to the PCAP (processor configuration access port).
+When the PL asserts the DONE signal, the devcfg driver will enable the level
+shifters and release the top-level PL reset signals.
+.Pp
+The PL (FPGA) can be configured by writing the bitstream to the character
+device like this:
+.Bd -literal -offset indent
+cat design.bit.bin > /dev/devcfg
+.Ed
+.Pp
+The file should not be confused with the .bit file output by the FPGA
+design tools.
+It is the binary form of the configuration bitstream.
+The Xilinx
+.Ic promgen
+tool can do the conversion:
+.Bd -literal -offset indent
+promgen -b -w -p bin -data_width 32 -u 0 design.bit -o design.bit.bin
+.Ed
+.Sh SYSCTL VARIABLES
+The
+.Nm
+driver provides the following
+.Xr sysctl 8
+variables:
+.Bl -tag -width 4n
+.It Va hw.fpga.pl_done
+.Pp
+This variable always reflects the status of the PL's DONE signal.
+A 1 means the PL section has been properly programmed.
+.It Va hw.fpga.en_level_shifters
+.Pp
+This variable controls if the PS-PL level shifters are enabled after the
+PL section has been reconfigured.
+This variable is 1 by default but setting it to 0 allows the PL section to be
+programmed with configurations that do not interface to the PS section of the
+part.
+Changing this value has no effect on the level shifters until the next device
+reconfiguration.
+.El
+.Sh FILES
+.Bl -tag -width 12n
+.It Pa /dev/devcfg
+Character device for the
+.Nm
+driver.
+.El
+.Sh SEE ALSO
+Zynq-7000 SoC Technical Reference Manual (Xilinx doc UG585)
+.Sh AUTHORS
+Thomas Skibo
diff --git a/share/man/man4/man4.arm/mge.4 b/share/man/man4/man4.arm/mge.4
new file mode 100644
index 0000000..a0f05bd
--- /dev/null
+++ b/share/man/man4/man4.arm/mge.4
@@ -0,0 +1,158 @@
+.\"
+.\" Copyright (c) 2008 Semihalf, Rafal Jaworowski
+.\"
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 27, 2008
+.Dt MGE 4
+.Os
+.Sh NAME
+.Nm mge
+.Nd "Marvell Gigabit Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device mge"
+.Cd "device miibus"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for gigabit Ethernet controller integrated in Marvell
+system-on-chip devices.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It autoselect
+Enable autoselection of the media type and options
+.It 10baseT/UTP
+Set 10Mbps operation
+.It 100baseTX
+Set 100Mbps operation
+.It 1000baseT
+Set 1000baseT operation
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It full-duplex
+Set full duplex operation
+.El
+.Pp
+The
+.Nm
+driver supports polled operation when the system is configured with
+DEVICE_POLLING kernel option, see
+.Xr polling 4
+for more details.
+.Pp
+The
+.Nm
+driver supports reception and transmission of extended frames
+for
+.Xr vlan 4 .
+This capability of
+.Nm
+can be controlled by means of the
+.Cm vlanmtu
+parameter
+to
+.Xr ifconfig 8 .
+.Pp
+The
+.Nm
+driver supports interrupts coalescing (IC) so that raising a transmit/receive
+frame interrupt is delayed, if possible, until a threshold-defined period of
+time has elapsed. The following sysctls regulate this behaviour (separately
+for each path):
+.Bl -tag -width indent
+.It Va dev.mge.X.int_coal.rx_time
+.It Va dev.mge.X.int_coal.tx_time
+.Pp
+Value of 0 disables IC on the given path, value greater than zero corresponds
+to a real time period and is expressed in units equivalent to 64 ticks of the
+MGE clock. Maximum allowed value depends on MGE hardware revision. User
+provided values larger than supported will be trimmed to the maximum
+supported. More details are available in the reference manual of the device.
+.El
+.Sh HARDWARE
+Gigabit Ethernet controllers built into the following Marvell systems-on-chip
+are known to work with the
+.Nm
+driver:
+.Pp
+.Bl -bullet -compact
+.It
+Orion 88F5182
+.It
+Orion 88F5281
+.It
+Kirkwood 88F6281 (MGE V2)
+.It
+Discovery MV78100 (MGE V2)
+.El
+.Pp
+There are also Marvell system controllers for PowerPC processors, which
+include a variation of this gigabit Ethernet module integrated on chip, and
+they should also work with the
+.Nm
+driver, but this wasn't tested:
+.Pp
+.Bl -bullet -compact
+.It
+MV64430
+.It
+MV64460, MV64461, MV64462
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The base version of
+.Nm
+device driver was written by
+.An Grzegorz Bernacki.
+It has been extended with advanced features (polling, interrupt coalescing,
+multicast, h/w checksum calculation etc.) by
+.An Piotr Ziecik .
+This manual page was written by
+.An Rafal Jaworowski .
diff --git a/share/man/man4/man4.arm/npe.4 b/share/man/man4/man4.arm/npe.4
new file mode 100644
index 0000000..035dea1
--- /dev/null
+++ b/share/man/man4/man4.arm/npe.4
@@ -0,0 +1,163 @@
+.\"
+.\" Copyright (c) 2006 Sam Leffler, Errno Consulting
+.\"
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 4, 2006
+.Dt NPE 4 arm
+.Os
+.Sh NAME
+.Nm npe
+.Nd "Intel XScale Network Processing Engine (NPE) Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device npe"
+.Cd "device npe_fw"
+.Cd "device firmware"
+.Cd "device qmgr"
+.Cd "device miibus"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Ethernet adapters based on the Intel
+XScale Network Processing Engine (NPE).
+The NPE must be loaded with firmware that is typically distributed
+with boards that have this part.
+Otherwise the firmware may be obtained at no cost from the Intel web site.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Set full duplex operation.
+.El
+.Pp
+The
+.Nm
+driver supports polled operation when the system is
+configured with device polling support,
+.Xr polling 4 .
+Note that for multi-port configurations polling and interrupt-style
+operation should not be combined as one of the hardware queues
+is shared by all ports.
+.Pp
+For further information on configuring this device, see
+.Xr ifconfig 8 .
+.\".Pp
+.\"The
+.\".Nm
+.\"driver supports reception and transmission of extended frames
+.\"for
+.\".Xr vlan 4 .
+.\"This capability of
+.\".Nm
+.\"can be controlled by means of the
+.\".Cm vlanmtu
+.\"parameter
+.\"to
+.\".Xr ifconfig 8 .
+.Sh HARDWARE
+The adapters supported by the
+.Nm
+driver exist only on boards that have an XScale processor.
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "npe%d: unit %d not supported"
+The unit is larger than the maximum number built into the driver.
+This should not happen as
+.Nm
+devices are not really probed for; they are statically enumerated.
+.It "npe%d: Cannot find my PHY."
+The associated PHY did not appear while probing the MII bus.
+The relationship between PHYs and NPEs is statically defined
+in the driver and may require alterations to the driver for new boards.
+.It "npe%d: unable to allocate memory for %s ... buffers"
+There is not enough memory available for allocation.
+The driver pre-allocated memory during attach so this should not happen.
+.It "npe%d: remember to fix rx q setup"
+See
+.Sx BUGS
+below.
+.It "npe%d: free mbuf at entry %u"
+An mbuf was unexpectedly found on the device queue; the index of
+the queue entry is printed.
+.It "npe%d: too many fragments %u"
+A frame was dropped on transmit because it was too fragmented and
+the logic to de-fragment failed.
+This should not happen.
+.It "npe%d: device timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Pp
+Other diagnostics exist and are not listed here;
+they should be self-explanatory.
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr polling 4 ,
+.Xr qmgr 4 ,
+.\".Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 6.3 .
+.Sh CAVEATS
+This driver has been tested only with dual-port boards using the IXP425
+such as the Gateworks Avila 2348.
+Some changes to the driver may be required for other configurations.
+.Sh BUGS
+The hardware queues are not properly flushed when the interface
+is marked down.
+.Pp
+The assignment of receive traffic classes to hardware queues
+is presently incomplete.
+Only the first 4 classes are assigned while there are 8 total.
+The driver will print
+.Dq Li "remember to fix rx q setup"
+on startup as a reminder.
+For the moment it is not a problem as all traffic arrives classified
+with class 0.
diff --git a/share/man/man4/man4.arm/ti_adc.4 b/share/man/man4/man4.arm/ti_adc.4
new file mode 100644
index 0000000..aa80016
--- /dev/null
+++ b/share/man/man4/man4.arm/ti_adc.4
@@ -0,0 +1,128 @@
+.\"
+.\" Copyright (c) 2014 Luiz Otavio O Souza <loos@freebsd.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 1, 2014
+.Dt TI_ADC 4
+.Os
+.Sh NAME
+.Nm ti_adc
+.Nd TI AM3XXX analog to digital converter driver
+.Sh SYNOPSIS
+.Cd "device ti_adc"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides access to the AIN (analog inputs) on am3xxx SoCs.
+.Pp
+It provides raw readings of the converted values for each analog inputs.
+.Pp
+The access to
+.Nm
+data is made via the
+.Xr sysctl 8
+interface:
+.Bd -literal
+dev.ti_adc.0.%desc: TI ADC controller
+dev.ti_adc.0.%driver: ti_adc
+dev.ti_adc.0.%pnpinfo: name=adc@44E0D000 compat=ti,adc
+dev.ti_adc.0.%parent: simplebus0
+dev.ti_adc.0.clockdiv: 2400
+dev.ti_adc.0.ain.0.enable: 0
+dev.ti_adc.0.ain.0.open_delay: 0
+dev.ti_adc.0.ain.0.samples_avg: 0
+dev.ti_adc.0.ain.0.input: 0
+dev.ti_adc.0.ain.1.enable: 0
+dev.ti_adc.0.ain.1.open_delay: 0
+dev.ti_adc.0.ain.1.samples_avg: 0
+dev.ti_adc.0.ain.1.input: 0
+dev.ti_adc.0.ain.2.enable: 0
+dev.ti_adc.0.ain.2.open_delay: 0
+dev.ti_adc.0.ain.2.samples_avg: 0
+dev.ti_adc.0.ain.2.input: 0
+dev.ti_adc.0.ain.3.enable: 0
+dev.ti_adc.0.ain.3.open_delay: 0
+dev.ti_adc.0.ain.3.samples_avg: 0
+dev.ti_adc.0.ain.3.input: 0
+dev.ti_adc.0.ain.4.enable: 0
+dev.ti_adc.0.ain.4.open_delay: 0
+dev.ti_adc.0.ain.4.samples_avg: 0
+dev.ti_adc.0.ain.4.input: 0
+dev.ti_adc.0.ain.5.enable: 0
+dev.ti_adc.0.ain.5.open_delay: 0
+dev.ti_adc.0.ain.5.samples_avg: 0
+dev.ti_adc.0.ain.5.input: 0
+dev.ti_adc.0.ain.6.enable: 1
+dev.ti_adc.0.ain.6.open_delay: 0
+dev.ti_adc.0.ain.6.samples_avg: 4
+dev.ti_adc.0.ain.6.input: 2308
+dev.ti_adc.0.ain.7.enable: 1
+dev.ti_adc.0.ain.7.open_delay: 0
+dev.ti_adc.0.ain.7.samples_avg: 0
+dev.ti_adc.0.ain.7.input: 3812
+.Ed
+.Pp
+On Beaglebone-black the analog input 7 is connected to the 3V3B rail through
+a voltage divisor (2:1).
+The 3V3B voltage rail comes from the TL5209 LDO regulator which is limited
+to 500mA maximum.
+.Pp
+Global settings:
+.Bl -tag -width ".Va dev.ti_adc.0.clockdiv"
+.It Va dev.ti_adc.0.clockdiv
+Sets the ADC clock prescaler.
+The minimum value is 10 and the maximum is 65535.
+The ADC clock is based on CLK_M_OSC (24Mhz) / clockdiv.
+This gives a maximum of ~2.4Mhz for the ADC clock and ~10Khz for the default
+setting (clockdiv = 2400).
+.El
+.Pp
+Settings per input:
+.Bl -tag -width ".Va dev.ti_adc.0.ain.%d.samples_avg"
+.It Va dev.ti_adc.0.ain.%d.enable
+Enable the conversion for the input.
+Each input should be individually enabled before it can be used.
+When all the inputs are disabled, the ADC is turned off.
+.It Va dev.ti_adc.0.ain.%d.open_delay
+Sets the number of ADC clock cycles to wait after applying the input
+configuration and before start the ADC conversion.
+.It Va dev.ti_adc.0.ain.%d.samples_avg
+Sets the number of samples average used on each input, it can be set to 0
+(no samples average), 2, 4, 8, or 16.
+.It Va dev.ti_adc.0.ain.%d.input
+Is the converted raw value of the voltage applied on the analog input.
+It is made of a 12 bit value (0 ~ 4095).
+.El
+.Sh SEE ALSO
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 10.1 .
+.Sh AUTHORS
+.An -nosplit
+The driver and this manual page was written by
+.An Luiz Otavio O Souza Aq loos@FreeBSD.org .
diff --git a/share/man/man4/man4.i386/CPU_ELAN.4 b/share/man/man4/man4.i386/CPU_ELAN.4
new file mode 100644
index 0000000..4a0611f
--- /dev/null
+++ b/share/man/man4/man4.i386/CPU_ELAN.4
@@ -0,0 +1,159 @@
+.\" Copyright (c) 2003 Poul-Henning Kamp <phk@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 23, 2003
+.Dt CPU_ELAN 4 i386
+.Os
+.Sh NAME
+.Nm CPU_ELAN
+.Nd AMD Elan 520 CPU support
+.Sh SYNOPSIS
+.Cd "options CPU_ELAN"
+.Cd "options CPU_ELAN_PPS"
+.Cd "options CPU_ELAN_XTAL"
+.Bl -item -compact
+.It
+.Va machdep.elan_gpio_config
+.It
+.Va machdep.elan_freq
+.El
+.Cd "options CPU_SOEKRIS"
+.Sh DESCRIPTION
+The
+.Cd "options CPU_ELAN"
+enables support for the AMD Elan 520 CPU.
+.Pp
+A device
+.Pa /dev/elan-mmcr
+exports the MMCR register bank to userland
+using
+.Xr mmap 2 .
+.Pp
+The
+.Tn i8254
+timer will be adjusted to the slightly unorthodox
+frequency 1189161 Hz (32768 * 45 * 25 / 31) employed by the Elan.
+.Pp
+A timecounter named
+.Dq Li ELAN
+is implemented using the general purpose timer 2,
+but it will not be usable unless HZ is configured at 150 or higher.
+This timecounter is much better than the
+.Dq Li i8254
+timecounter and should be
+used at all times.
+.Pp
+The
+.Va machdep.elan_gpio_config
+.Xr sysctl 8
+variable
+enables configuration of the GPIO pins of the CPU.
+The string must be exactly 32 characters long.
+A
+.Ql -
+means the GPIO is unavailable.
+A
+.Ql l
+(lower-case ell) configures a
+.Xr led 4
+device (active low).
+A
+.Ql L
+configures a
+.Xr led 4
+device (active high).
+A
+.Ql \&.
+means no configuration for this GPIO.
+These
+.Xr led 4
+devices will be named
+.Pa /dev/led/gpio%d .
+For meaning of
+.Ql P ,
+.Ql e
+and
+.Ql E ,
+see under
+.Cd "options CPU_ELAN_PPS" .
+.Pp
+The
+.Cd "options CPU_ELAN_XTAL"
+and the
+.Va machdep.elan_freq
+.Xr sysctl 8
+variable
+can be used to set the CPU clock crystal frequency in Hz.
+The default is 33333333 Hz.
+.Pp
+The
+.Cd "options CPU_ELAN_PPS"
+enables precision timestamping using the RFC2783 PPS-API via the
+.Pa /dev/elan-mmcr
+device.
+The resolution will be approximately 125 nsec
+and the precision \(+- 125 nsec.
+(For 125 nsec read
+.Dq "4 / CPU clock crystal frequency" . )
+.Pp
+The input signal must be connected to the TMR1IN pin and
+a GPIO pin.
+The GPIO pin must be configured with a
+.Ql P
+in
+.Va machdep.elan_gpio_config .
+.Pp
+In addition, one GPIO pin can be configured with either
+.Ql e
+(active low)
+or
+.Ql E
+(active high) to become a
+.Dq echo
+output of the input signal.
+Please notice that this signal is not suitable for calibration.
+.Pp
+If the
+.Cd "options CPU_SOEKRIS"
+is given, the support will additionally be tailored to the
+Soekris Engineering 45xx series of embedded computers.
+The
+.Dq error
+led will be configured (as
+.Pa /dev/led/error )
+and the GPIO pins which are not
+available will be disabled.
+.Sh SEE ALSO
+.Xr led 4 ,
+.Xr timecounters 4 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+code first appeared in
+.Fx 4.7 .
+.Sh AUTHORS
+.An "Poul-Henning Kamp" Aq phk@FreeBSD.org
diff --git a/share/man/man4/man4.i386/Makefile b/share/man/man4/man4.i386/Makefile
new file mode 100644
index 0000000..974eec0
--- /dev/null
+++ b/share/man/man4/man4.i386/Makefile
@@ -0,0 +1,41 @@
+# $FreeBSD$
+
+MAN= aic.4 \
+ apm.4 \
+ ce.4 \
+ cp.4 \
+ CPU_ELAN.4 \
+ cs.4 \
+ ct.4 \
+ ctau.4 \
+ cx.4 \
+ ep.4 \
+ ex.4 \
+ fe.4 \
+ glxiic.4 \
+ glxsb.4 \
+ ie.4 \
+ longrun.4 \
+ mse.4 \
+ npx.4 \
+ pae.4 \
+ pbio.4 \
+ perfmon.4 \
+ pnp.4 \
+ pnpbios.4 \
+ sbni.4 \
+ smapi.4 \
+ snc.4 \
+ streams.4 \
+ svr4.4 \
+ vpd.4 \
+ vx.4 \
+ wl.4
+
+MLINKS= CPU_ELAN.4 CPU_SOEKRIS.4
+MLINKS+=pae.4 PAE.4
+MLINKS+=sbni.4 if_sbni.4
+
+MANSUBDIR=/i386
+
+.include <bsd.prog.mk>
diff --git a/share/man/man4/man4.i386/aic.4 b/share/man/man4/man4.i386/aic.4
new file mode 100644
index 0000000..991a0c5
--- /dev/null
+++ b/share/man/man4/man4.i386/aic.4
@@ -0,0 +1,84 @@
+.\"
+.\" Copyright (c) 1994 James A. Jegers
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 8, 2003
+.Dt AIC 4 i386
+.Os
+.Sh NAME
+.Nm aic
+.Nd Adaptec AIC-6260 and AIC-6360 SCSI driver
+.Sh SYNOPSIS
+.Cd "device aic"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.aic.0.at="isa"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Adaptec AIC-6260 and AIC-6360 SCSI
+controller chips.
+Many systems that use these controller chips do not have a boot ROM
+and therefore cannot be booted from.
+.Sh HARDWARE
+The adapters supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Adaptec AHA-1505 (ISA)
+.It
+Adaptec AHA-1510A, AHA-1510B (ISA)
+.It
+Adaptec AHA-1520A, AHA-1520B (ISA)
+.It
+Adaptec AHA-1522A, AHA-1522B (ISA)
+.It
+Adaptec AHA-1535 (ISA)
+.It
+Creative Labs SoundBlaster SCSI host adapter (ISA)
+.It
+Adaptec AHA-1460, AHA-1460B, AHA-1460C, AHA-1460D (PC Card)
+.It
+Adaptec AHA-1030B, AHA-1030P (PC98)
+.It
+NEC PC-9801-100 (PC98)
+.El
+.Sh SEE ALSO
+.Xr aha 4 ,
+.Xr ahb 4 ,
+.Xr ahc 4 ,
+.Xr cd 4 ,
+.Xr ch 4 ,
+.Xr da 4 ,
+.Xr intro 4 ,
+.Xr sa 4
+.Sh BUGS
+The driver does not work well with multiple devices on the SCSI bus.
+The driver works well with devices like CDROMs and Tape drives.
+The driver works not so well with disk drives.
+The PC Card version appears to work better than the ISA version, but
+that may be due to differing levels of testing of the devices.
diff --git a/share/man/man4/man4.i386/apm.4 b/share/man/man4/man4.i386/apm.4
new file mode 100644
index 0000000..6d7b524
--- /dev/null
+++ b/share/man/man4/man4.i386/apm.4
@@ -0,0 +1,158 @@
+.\" LP (Laptop Package)
+.\"
+.\" Copyright (c) 1994 by HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp>
+.\"
+.\" This software may be used, modified, copied, and distributed, in
+.\" both source and binary form provided that the above copyright and
+.\" these terms are retained. Under no circumstances is the author
+.\" responsible for the proper functioning of this software, nor does
+.\" the author assume any responsibility for damages incurred with its
+.\" use.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 1, 1994
+.Dt APM 4 i386
+.Os
+.Sh NAME
+.Nm apm
+.Nd APM BIOS interface
+.Sh SYNOPSIS
+.Cd device apm
+.Sh DESCRIPTION
+.Nm
+is an interface to the Intel / Microsoft APM (Advanced Power Management) BIOS
+on laptop PCs.
+.Pp
+.Nm
+provides the following power management functions.
+.Bl -enum -offset indent
+.It
+When the system wakes up from suspended mode,
+.Nm
+adjusts the system clock to RTC.
+.It
+When the system wakes up from suspended mode,
+.Nm
+passes a message to
+.Xr syslogd 8
+comprising of system wakeup time and elapsed time during suspended mode.
+.It
+.Nm
+slows CPU clock when there are no system activities (runnable processes,
+interrupts, etc.).
+This function is available only on systems whose APM
+supports CPU idling.
+.It
+.Nm
+exports an application interface as a character device.
+Applications
+can control APM, or retrieve APM status information via this interface.
+.Nm
+exports the following interfaces.
+These symbols are defined in
+.In machine/apm_bios.h .
+.Bl -tag -width 4n -offset indent
+.It Sy APMIO_SUSPEND
+Suspend system.
+.It Sy APMIO_GET
+Get power management information.
+.It Sy APMIO_ENABLE
+.It Sy APMIO_DISABLE
+Enable / Disable power management.
+.It Sy APMIO_HALTCPU
+.It Sy APMIO_NOTHALTCPU
+Control execution of HLT in the kernel context switch routine.
+.It Sy APMIO_GETPWSTATUS
+Get per battery information.
+.Pp
+Some APM implementations execute the HLT
+(Halt CPU until an interrupt occurs)
+instruction in the
+.Dq Em Idle CPU
+call, while others do not.
+Thus enabling this may result in
+redundant HLT executions because
+.Dq Em Idle CPU
+is called from the kernel context switch routine that inherently executes
+HLT.
+This may reduce peak system performance.
+.Pp
+Also the system hangs up if HLT instruction is disabled in the kernel
+context switch routine, and if the APM implementation of the machine
+does not execute HLT in
+.Dq Em Idle CPU .
+On some implementations that do not support CPU clock slowdown, APM
+might not execute HLT.
+.Nm
+disables
+.Sy APMIO_NOTHALTCPU
+operation on such machines.
+.Pp
+The current version of
+.Nm
+does not call
+.Dq Em Idle CPU
+from the kernel context switch routine if clock slowdown is not supported,
+and it executes HLT instruction by default.
+Therefore, there is
+no need to use these two operations in most cases.
+.El
+.Pp
+These interfaces are used by
+.Xr apm 8 .
+.It
+.Nm
+polls APM events and handles the following events.
+.Bl -column "xxxxxxxxxxxxxxxxx" "xxxxxxxxxxxxx" "xxxxxxxx"
+.It Sy "Name" Ta Sy "Action" Ta Sy "Description"
+.It Dv "PMEV_STANDBYREQ" Ta No "suspend system" Ta "standby request"
+.It Dv "PMEV_SUSPENDREQ" Ta No "suspend system" Ta "suspend request"
+.It Dv "PMEV_USERSUSPENDREQ" Ta No "suspend system" Ta "user suspend request"
+.It Dv "PMEV_CRITSUSPEND" Ta No "suspend system" Ta "critical suspend request"
+.It Dv "PMEV_NORMRESUME" Ta No "resume system" Ta "normal resume"
+.It Dv "PMEV_CRITRESUME" Ta No "resume system" Ta "critical resume"
+.It Dv "PMEV_STANDBYRESUME" Ta No "resume system" Ta "standby resume"
+.It Dv "PMEV_BATTERYLOW" Ta No "notify message" Ta "battery low"
+.It Dv "PMEV_UPDATETIME" Ta No "adjust clock" Ta "update time"
+.El
+.El
+.Sh SEE ALSO
+.Xr apm 8 ,
+.Xr zzz 8
+.Sh AUTHORS
+Tatsumi Hosokawa <hosokawa@jp.FreeBSD.org>
+.Sh BUGS
+WARNING!
+Many, if not most, of the implementations of APM-bios in laptops
+today are buggy.
+You may be putting your LCD-display and batteries at
+a risk by using this interface.
+(The reason this is not a problem for
+MS-Windows is that they use the real-mode interface.)
+If you see any
+weird behavior from your system with this code in use, unplug the
+power and batteries ASAP, if not immediately, and disable this code.
+.Pp
+We are very interested in getting this code working, so please send your
+observations of any anomalous behavior to us.
+.Pp
+When
+.Nm
+is active, calling the BIOS setup routine by using hot-keys,
+may cause serious trouble when resuming the system.
+BIOS setup programs should be called during bootstrap, or from DOS.
+.Pp
+Some APM implementations cannot handle events such as pushing the
+power button or closing the cover.
+On such implementations, the system
+.Ar must
+be suspended
+.Ar only
+by using
+.Xr apm 8
+or
+.Xr zzz 8 .
+.Pp
+Disk spin-down, LCD backlight control, and power on demand have not
+been supported on the current version.
diff --git a/share/man/man4/man4.i386/ce.4 b/share/man/man4/man4.i386/ce.4
new file mode 100644
index 0000000..fec2dab
--- /dev/null
+++ b/share/man/man4/man4.i386/ce.4
@@ -0,0 +1,111 @@
+.\" Copyright (c) 2006 Roman Kurakin <rik@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 30, 2006
+.Dt CE 4 i386
+.Os
+.Sh NAME
+.Nm ce
+.Nd "driver for synchronous Cronyx Tau-PCI/32 WAN adapters"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ce"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ce_load="YES"
+.Ed
+.Pp
+Additional options:
+.Cd "device sppp"
+.Cd "options NETGRAPH"
+.Cd "options NETGRAPH_CRONYX"
+.Sh DESCRIPTION
+The
+.Nm
+driver needs either
+.Xr sppp 4
+or
+.Xr netgraph 4 .
+Which one to use is determined by the
+.Dv NETGRAPH_CRONYX
+option.
+If this option is present in your kernel configuration file, the
+.Nm
+driver will be compiled with
+.Xr netgraph 4
+support.
+Otherwise, it will be compiled with
+.Xr sppp 4
+support.
+.Pp
+Refer to
+.Xr sconfig 8
+for information about the
+.Nm
+adapter configuration.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following models of Tau-PCI/32 WAN adapters:
+.Pp
+.Bl -tag -width 20n -compact
+.It Cronyx Tau-PCI/32
+two fractional/unframed E1 interfaces,
+with 32 HDLC channels shared between them with total adapter throughput
+2048 kbps.
+.It Cronyx Tau-PCI/32-Lite
+single fractional/unframed E1 interface,
+with 32 HDLC channels.
+.El
+.Sh SEE ALSO
+.Xr cp 4 ,
+.Xr ctau 4 ,
+.Xr cx 4 ,
+.Xr sppp 4 ,
+.Xr ifconfig 8 ,
+.Xr sconfig 8 ,
+.Xr spppcontrol 8
+.Sh HISTORY
+The
+.Nm
+driver was added in
+.Fx 6.2 ,
+.Fx 5.5
+and
+.Fx 4.11 .
+The
+.Nm
+driver for previous versions of
+.Fx
+is available from
+.Pa http://www.cronyx.ru/ .
diff --git a/share/man/man4/man4.i386/cp.4 b/share/man/man4/man4.i386/cp.4
new file mode 100644
index 0000000..049bb08
--- /dev/null
+++ b/share/man/man4/man4.i386/cp.4
@@ -0,0 +1,113 @@
+.\" Copyright (c) 2003-2004 Roman Kurakin <rik@cronyx.ru>
+.\" Copyright (c) 2003-2004 Cronyx Engineering
+.\" All rights reserved.
+.\"
+.\" This software is distributed with NO WARRANTIES, not even the implied
+.\" warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\" Authors grant any other persons or organisations a permission to use,
+.\" modify and redistribute this software in source and binary forms,
+.\" as long as this message is kept with the software, all derivative
+.\" works or modified versions.
+.\"
+.\" Cronyx Id: cp.4,v 1.1.2.5 2004/06/21 17:47:40 rik Exp $
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt CP 4 i386
+.Os
+.Sh NAME
+.Nm cp
+.Nd "driver for synchronous Cronyx Tau-PCI WAN adapters"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device cp"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_cp_load="YES"
+.Ed
+.Pp
+Additional options:
+.Cd "device sppp"
+.Cd "options NETGRAPH"
+.Cd "options NETGRAPH_CRONYX"
+.Sh DESCRIPTION
+The
+.Nm
+driver needs either
+.Xr sppp 4
+or
+.Xr netgraph 4 .
+Which one to use is determined by the
+.Dv NETGRAPH_CRONYX
+option.
+If this option is present in your kernel configuration file, the
+.Nm
+driver will be compiled with
+.Xr netgraph 4
+support.
+Otherwise, it will be compiled with
+.Xr sppp 4
+support.
+.Pp
+Refer to
+.Xr sconfig 8
+for information about the
+.Nm
+adapter configuration.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following models of Tau-PCI WAN adapters:
+.Pp
+.Bl -tag -width 20n -compact
+.It Cronyx Tau-PCI
+V.35 and RS-232 interfaces
+.It Cronyx Tau-PCI/R
+RS-530(RS-449) and X.21 interfaces
+.It Cronyx Tau-PCI-L
+one V.35 and RS-232 interface, low profile
+.It Cronyx Tau-PCI-L/R
+one RS-530(RS-449) and X.21 interface, low profile
+.It Cronyx Tau-PCI-E1
+fractional E1 interfaces
+.It Cronyx Tau-PCI-G703
+unframed E1 interfaces
+.It Cronyx Tau-PCI-2E1
+fractional E1 and unframed E1 interfaces
+.It Cronyx Tau-PCI-4E1
+fractional E1 and unframed E1 interfaces
+.It Cronyx Tau-PCI-E3
+E3 interface
+.It Cronyx Tau-PCI-T3
+T3 interface
+.It Cronyx Tau-PCI-STS1
+STS-1 interface
+.El
+.Sh SEE ALSO
+.Xr ctau 4 ,
+.Xr cx 4 ,
+.Xr sppp 4 ,
+.Xr ifconfig 8 ,
+.Xr sconfig 8 ,
+.Xr spppcontrol 8
+.Sh HISTORY
+The
+.Nm
+driver was added in
+.Fx 5.3
+and
+.Fx 4.11 .
+The
+.Nm
+driver for previous versions of
+.Fx
+is available from
+.Pa http://www.cronyx.ru/ .
diff --git a/share/man/man4/man4.i386/cs.4 b/share/man/man4/man4.i386/cs.4
new file mode 100644
index 0000000..b7e0389
--- /dev/null
+++ b/share/man/man4/man4.i386/cs.4
@@ -0,0 +1,152 @@
+.\"
+.\" Copyright (c) 1998 Michael Smith
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt CS 4 i386
+.Os
+.Sh NAME
+.Nm cs
+.Nd "Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device cs"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_cs_load="YES"
+.Ed
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.cs.0.at="isa"
+.Cd hint.cs.0.port="0x300"
+.Cd hint.cs.0.irq="10"
+.Cd hint.cs.0.maddr="0xd000"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for ISA Ethernet adapters based on the
+.Tn Crystal Semiconductor CS8900
+and
+.Tn CS8920
+NICs.
+These devices are used on the
+.Tn IBM EtherJet ISA
+adapters and in many embedded applications where the high integration, small
+size and low cost of the CS89x0 family compensate for their drawbacks.
+.Pp
+The
+.Nm
+driver will obtain configuration parameters either from
+.Pa /boot/device.hints
+or from the card.
+At least the I/O port number must be specified.
+Other parameters specified in
+.Pa /boot/device.hints
+will be used if present;
+the card may be soft-configured so these may be any valid
+value.
+Adapters based on the CS8920 normally offer PnP configuration and the driver
+will detect the
+.Tn IBM EtherJet
+and the
+.Tn CSC6040
+adapters automatically.
+.Pp
+Note that the CS8900 is limited to 4 IRQ values; these are normally implemented
+as 5, 10, 11 and 12.
+The CS8920 has no such limitation.
+.Pp
+Memory-mapped and DMA operation are not supported at this time.
+.Pp
+In addition to the ISA devices, the PC Card devices based on the CS889x0
+family are also supported.
+The IBM EtherJet PCMCIA Card is the only known device based on this
+chip.
+The PC Card support does not need the above specific ISA hints to work.
+The PC Card support may not work for 10base2 (thinnet) connections and may
+bogusly claim to support 10base5 (there are no known cards that have an
+AUI necessary for 10base5 support on their dongles).
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "cs%d: full/half duplex negotiation timeout"
+The attempt to negotiate duplex settings with the hub timed out.
+This may
+indicate a cabling problem or a faulty or incompatible hub.
+.It "cs%d: failed to enable <media>"
+The CS89x0 failed to select the nominated media, either because it is not
+present or not operating correctly.
+.It "cs%d: No EEPROM, assuming defaults"
+The CS89x0 does not have an EEPROM, or the EEPROM is hopelessly damaged.
+Operation
+will only be successful if the configuration entry lists suitable values for
+the adapter.
+.It "cs%d: Invalid irq"
+The IRQ specified in the configuration entry is not valid for the adapter.
+.It "cs%d: Could not allocate memory for NIC"
+There is a critical memory shortage.
+The adapter will not function.
+.It "cs%d: Adapter has no media"
+The adapter is not configured for a specific media type.
+The media type will have
+to be manually set.
+.It "This is a %s, but LDN %d is disabled"
+The PnP probe code found a recognised adapter, but the adapter is disabled.
+.It "failed to read pnp parms"
+A PnP adapter was found, but configuration parameters for it could not be read.
+.It "failed to pnp card parameters"
+The parameters obtained via PnP were not accepted by the driver.
+The adapter
+may not function.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An Maxim Bolotin
+and
+.An Oleg Sharoiko .
+This manpage was written by
+.An Michael Smith .
+.Sh CAVEATS
+The CS89x0 family of adapters have a very small RAM buffer (4K).
+This may
+cause problems with extremely high network loads or bursty network traffic.
+In particular, NFS operations should be limited to 1k read/write transactions
+in order to avoid overruns.
diff --git a/share/man/man4/man4.i386/ct.4 b/share/man/man4/man4.i386/ct.4
new file mode 100644
index 0000000..ac8d6c2
--- /dev/null
+++ b/share/man/man4/man4.i386/ct.4
@@ -0,0 +1,162 @@
+.\" Copyright (c) 2003 Noriaki MITSUNAGA. All rights reserved.
+.\" Copyright (c) 2003 Hideyuki KURASHINA. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 18, 2003
+.Dt CT 4 i386
+.Os
+.Sh NAME
+.Nm ct
+.Nd "WD33C93[ABC] based CBUS SCSI host adapter driver"
+.Sh SYNOPSIS
+.Cd "device ct"
+.Cd "device scbus"
+.Pp
+In
+.Pa /boot/device.hints:
+.Pp
+For most PC-9801-55, -92 and compatibles:
+.Cd hint.ct.0.at="isa"
+.Pp
+For ELECOM bus-master
+.Tn SCSI
+adapters:
+.Cd hint.ct.0.at="isa"
+.Cd hint.ct.0.flags="0x30000"
+.Pp
+For I-O DATA SC98 adapters:
+.Cd hint.ct.0.at="isa"
+.Cd hint.ct.0.flags="0x10000"
+.Pp
+For LOGITEC adapters:
+.Cd hint.ct.0.at="isa"
+.Cd hint.ct.0.flags="0x50000"
+.Pp
+For TEXA adapters:
+.Cd hint.ct.0.at="isa"
+.Cd hint.ct.0.flags="0x20000"
+.Pp
+For adapters with SMIT transfer mode to enable SMIT transfer:
+.Cd hint.ct.0.at="isa"
+.Cd hint.ct.0.flags="0x40000"
+.Cd hint.ct.0.maddr="0xdc000"
+.Pp
+Flags meaning:
+.Bl -tag -offset indent -compact -width 0x000000
+.It 0x00000
+DMA transfer mode for an NEC PC-9801-55, -92 (or
+compatibles), ICM IF-2660, Midori-Denshi MDC-554NA, or
+Logitec LHA-N151
+.It 0x10000
+DMA transfer mode for an I-O DATA SC-98II
+.It 0x20000
+bus-master transfer mode for a TEXA HA-55BS2, its
+successors, or Midori-Denshi MDC-926R
+.It 0x30000
+bus-master transfer mode for an ELECOM bus-master SCSI
+adapter
+.It 0x40000
+SMIT transfer mode (for supported adapters only)
+.It 0x50000
+bus-master transfer mode for a Logitec LHA-20x series,
+ICM IF-2766, IF-2766ET, IF-2767 or IF-2769
+.El
+.Sh DESCRIPTION
+The
+.Nm
+driver provides access to the
+.Tn SCSI
+bus connected to a WD33C93[ABC] based host adapter.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following adapters:
+.Pp
+.Bl -bullet -compact
+.It
+ELECOM bus-master
+.Tn SCSI
+adapters
+.It
+I-O DATA SC-98II
+.It
+ICM IF-2660, IF-2766, IF-2766ET, IF-2767 and IF-2769
+.It
+Logitec LHA-N151 and LHA-20x series
+.It
+Midori-Denshi MDC-554NA and MDC-926R
+.It
+NEC PC-9801-55, 92 and compatibles
+.It
+SMIT transfer type
+.Tn SCSI
+host adapters
+.It
+TEXA HA-55BS2 and its later models
+.El
+.Sh SEE ALSO
+.Xr cd 4 ,
+.Xr ch 4 ,
+.Xr ctau 4 ,
+.Xr da 4 ,
+.Xr intro 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.Sh NOTES
+Historically, the driver for the Cronyx Tau WAN adapters was
+.Dq ct .
+This device name was changed to
+.Dq ctau
+to avoid conflicts
+with this pc98
+.Nm
+driver.
+The network device name for
+.Xr ctau 4
+is
+.Dq Li ct .
+Please see
+.Xr ctau 4
+for the details for that device.
+.Sh HISTORY
+The
+.Nm
+device driver has been developed for
+.Nx Ns /pc98
+and ported for
+.Fx .
+It first appeared in
+.Fx 4.4 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Naofumi HONDA .
+.Pp
+This manual page was written by
+.An -nosplit
+.An Noriaki MITSUNAGA Aq non@FreeBSD.org
+and
+.An Hideyuki KURASHINA Aq rushani@FreeBSD.org .
diff --git a/share/man/man4/man4.i386/ctau.4 b/share/man/man4/man4.i386/ctau.4
new file mode 100644
index 0000000..e18dc34
--- /dev/null
+++ b/share/man/man4/man4.i386/ctau.4
@@ -0,0 +1,119 @@
+.\" Copyright (c) 2004 Roman Kurakin <rik@cronyx.ru>
+.\" Copyright (c) 2004 Cronyx Engineering
+.\" All rights reserved.
+.\"
+.\" This software is distributed with NO WARRANTIES, not even the implied
+.\" warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\" Authors grant any other persons or organisations a permission to use,
+.\" modify and redistribute this software in source and binary forms,
+.\" as long as this message is kept with the software, all derivative
+.\" works or modified versions.
+.\"
+.\" Cronyx Id: ct.4,v 1.1.2.6 2004/06/21 17:56:40 rik Exp $
+.\" $FreeBSD$
+.\"
+.Dd September 6, 2004
+.Dt CTAU 4 i386
+.Os
+.Sh NAME
+.Nm ctau
+.Nd driver for synchronous Cronyx Tau WAN adapters
+.Sh SYNOPSIS
+.Cd "device ctau"
+.Pp
+Additional options:
+.Cd "device sppp"
+.Cd "options NETGRAPH"
+.Cd "options NETGRAPH_CRONYX"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.ctau.0.at="isa"
+.Cd hint.ctau.0.port="0x240"
+.Cd hint.ctau.0.irq="15"
+.Cd hint.ctau.0.drq="7"
+.Sh DESCRIPTION
+The
+.Nm
+driver needs either
+.Xr sppp 4
+or
+.Xr netgraph 4 .
+Which one to use is determined by the
+.Dv NETGRAPH_CRONYX
+option.
+If this option is present in your kernel configuration file, the
+.Nm
+driver will be compiled with
+.Xr netgraph 4
+support.
+Otherwise, it will be compiled with
+.Xr sppp 4
+support.
+.Pp
+The base I/O port address specified in
+.Pa /boot/device.hints
+must match the port address set by the jumpers on the board.
+The DMA I/O channel and interrupt request numbers are configured
+by software at adapter initialization.
+Legal values are:
+.Pp
+.Bl -tag -compact -width Port:
+.It Port :
+0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0,
+0x300, 0x320, 0x340, 0x360, 0x380, 0x3a0, 0x3c0, 0x3e0
+.It IRQ :
+3, 5, 7, 10, 11, 12, 15
+.It DMA :
+5, 6, 7
+.El
+.Pp
+The
+.Nm
+driver supports autodetection.
+As for all non-PNP hardware, using
+autodetection could lead to some potential problems with other devices during
+the hardware detection process.
+It is always better to specify hardware resources manually.
+.Pp
+Refer to
+.Xr sconfig 8
+for information about the
+.Nm
+adapter configuration.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following cards:
+.Pp
+.Bl -bullet -compact
+.It
+Cronyx Tau (RS-232/V.35)
+.It
+Cronyx Tau/R (RS-530/RS-449)
+.It
+Cronyx Tau/E1 (fractional E1)
+.It
+Cronyx Tau/G703 (unframed E1)
+.El
+.Sh SEE ALSO
+.Xr cp 4 ,
+.Xr cx 4 ,
+.Xr sppp 4 ,
+.Xr ifconfig 8 ,
+.Xr sconfig 8 ,
+.Xr spppcontrol 8
+.Sh HISTORY
+The
+.Nm
+driver was added in
+.Fx 5.3
+and
+.Fx 4.10 .
+The
+.Nm
+driver for previous versions of
+.Fx
+is available from
+.Pa http://www.cronyx.ru/ .
diff --git a/share/man/man4/man4.i386/cx.4 b/share/man/man4/man4.i386/cx.4
new file mode 100644
index 0000000..00df603
--- /dev/null
+++ b/share/man/man4/man4.i386/cx.4
@@ -0,0 +1,139 @@
+.\" Copyright (c) 2003-2004 Roman Kurakin <rik@cronyx.ru>
+.\" Copyright (c) 2003-2004 Cronyx Engineering
+.\" All rights reserved.
+.\"
+.\" This software is distributed with NO WARRANTIES, not even the implied
+.\" warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\" Authors grant any other persons or organisations a permission to use,
+.\" modify and redistribute this software in source and binary forms,
+.\" as long as this message is kept with the software, all derivative
+.\" works or modified versions.
+.\"
+.\" Cronyx Id: cx.4,v 1.1.2.6 2004/06/21 17:56:40 rik Exp $
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt CX 4 i386
+.Os
+.Sh NAME
+.Nm cx
+.Nd "driver for synchronous/asynchronous Cronyx Sigma WAN adapters"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device cx"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_cx_load="YES"
+.Ed
+.Pp
+Additional options:
+.Cd "device sppp"
+.Cd "options NETGRAPH"
+.Cd "options NETGRAPH_CRONYX"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.cx.0.at="isa"
+.Cd hint.cx.0.port="0x240"
+.Cd hint.cx.0.irq="15"
+.Cd hint.cx.0.drq="7"
+.Sh DESCRIPTION
+The
+.Nm
+driver needs either
+.Xr sppp 4
+or
+.Xr netgraph 4 .
+Which one to use is determined by the
+.Dv NETGRAPH_CRONYX
+option.
+If this option is present in your kernel configuration file, the
+.Nm
+driver will be compiled with
+.Xr netgraph 4
+support.
+Otherwise, it will be compiled with
+.Xr sppp 4
+support.
+.Pp
+The base I/O port address specified in
+.Pa /boot/device.hints
+must match the port address set by the jumpers on the board.
+The DMA I/O channel and interrupt request numbers are configured
+by software at adapter initialization.
+Legal values are:
+.Pp
+.Bl -tag -compact -width Port:
+.It Port :
+0x240, 0x260, 0x280, 0x300, 0x320, 0x380
+.It IRQ :
+3, 5, 7, 10, 11, 12, 15
+.It DMA :
+5, 6, 7
+.El
+.Pp
+The
+.Nm
+driver supports autodetection.
+As for all non-PNP hardware, using
+autodetection could lead to some potential problems with other devices during
+the hardware detection process.
+It is always better to specify hardware resources manually.
+.Pp
+Refer to
+.Xr sconfig 8
+for information about the
+.Nm
+adapter configuration.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following cards:
+.Pp
+.Bl -bullet -compact
+.It
+Cronyx Sigma-22, Sigma-24
+.It
+Cronyx Sigma-100
+.It
+Cronyx Sigma-400, Sigma-401, Sigma-404, Sigma-410, Sigma-440
+.It
+Cronyx Sigma-500
+.It
+Cronyx Sigma-703
+.It
+Cronyx Sigma-800, Sigma-801, Sigma-810, Sigma-840
+.El
+.Sh SEE ALSO
+.Xr cp 4 ,
+.Xr ctau 4 ,
+.Xr sppp 4 ,
+.Xr ifconfig 8 ,
+.Xr sconfig 8 ,
+.Xr spppcontrol 8
+.Sh HISTORY
+The
+.Nm
+driver was updated in
+.Fx 5.2
+and
+.Fx 4.10 .
+In most of the previous versions of
+.Fx
+the
+.Nm
+driver is out of date.
+The
+.Nm
+driver for previous versions of
+.Fx
+is available from
+.Pa http://www.cronyx.ru/ .
diff --git a/share/man/man4/man4.i386/ep.4 b/share/man/man4/man4.i386/ep.4
new file mode 100644
index 0000000..6524ef7
--- /dev/null
+++ b/share/man/man4/man4.i386/ep.4
@@ -0,0 +1,212 @@
+.\"
+.\" Copyright (c) 1994 Herb Peyerl
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Herb Peyerl
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 1, 2011
+.Dt EP 4 i386
+.Os
+.Sh NAME
+.Nm ep
+.Nd "Ethernet driver for 3Com Etherlink III (3c5x9) interfaces"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ep"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ep_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver supports network adapters based on the 3Com 3C5x9 Etherlink III
+Parallel Tasking chipset.
+.Pp
+Various models of these cards come with a different assortment of
+connectors:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It AUI/DIX
+Standard 15 pin connector, also known as 10base5 (thick-net)
+.It 10Base2
+BNC, also known as thin-net
+.It 10BaseT
+UTP, also known as twisted pair
+.El
+.Pp
+The default port to use is the port that has been selected with the
+setup utility.
+To override this, use the following media options with
+.Xr ifconfig 8
+or in your
+.Pa /etc/rc.conf
+file.
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It 10base5/AUI
+Use the AUI port.
+.It 10base2/BNC
+Use the BNC port.
+.It 10baseT/UTP
+Use the UTP port.
+.El
+.Sh HARDWARE
+The
+.Nm
+driver supports Ethernet adapters based on the
+3Com 3C5x9 Etherlink III Parallel Tasking chipset, including:
+.Pp
+.Bl -bullet -compact
+.It
+3Com 3C1 CF
+.It
+3Com 3C509-TP, 3C509-BNC, 3C509-Combo, 3C509-TPO, 3C509-TPC ISA
+.It
+3Com 3C509B-TP, 3C509B-BNC, 3C509B-Combo, 3C509B-TPO, 3C509B-TPC ISA
+.It
+3Com 3C529, 3C529-TP MCA
+.It
+3Com 3C562/3C563 PCMCIA
+.It
+3Com 3C569B-J-TPO, 3C569B-J-COMBO CBUS
+.It
+3Com 3C574, 3C574TX, 3C574-TX, 3CCFE574BT, 3CXFE574BT, 3C3FE574BT PCMCIA
+.It
+3Com 3C579-TP, 3C579-BNC EISA
+.It
+3Com 3C589, 3C589B, 3C589C, 3C589D, 3CXE589DT PCMCIA
+.It
+3Com 3CCFEM556B, 3CCFEM556BI PCMCIA
+.It
+3Com 3CXE589EC, 3CCE589EC, 3CXE589ET, 3CCE589ET PCMCIA
+.It
+3Com Megahertz 3CCEM556, 3CXEM556, 3CCEM556B, 3CXEM556B, 3C3FEM556C PCMCIA
+.It
+3Com OfficeConnect 3CXSH572BT, 3CCSH572BT PCMCIA
+.It
+Farallon EtherWave and EtherMac PC Card (P/n 595/895 with BLUE arrow)
+.El
+.Sh NOTES
+The 3c509 card has no jumpers to set the address.
+3Com supplies software to set the address of the card in software.
+To find the card on the ISA bus, the kernel performs a complex
+scan operation at IO address 0x110.
+Beware!
+Avoid placing other cards at that address!
+.Pp
+Furthermore, the 3c509 should only be configured in EISA mode
+when installed in a computer that has actual EISA slots
+(and an EISA-aware BIOS).
+The normal driver auto-detection support is sufficient for non-EISA systems.
+.Pp
+Cards in PnP mode may conflict with other resources in the system.
+Ensure your BIOS is configured correctly to exclude resources used by
+the 3c509, especially IRQs, to avoid unpredictable behavior.
+.Pp
+Many different companies sold the 3Com PC Cards under their own private
+label.
+These cards also work.
+.Pp
+The Farallon EtherWave and EtherMac card came in two varieties.
+The
+.Nm
+driver supports the 595 and 895 cards.
+These cards have the blue arrow on the front along with a 3Com logo.
+The Farallon 595a cards, which have a red arrow on the front,
+are also called EtherWave and EtherMac.
+They are supported by the
+.Xr sn 4
+driver.
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ep0: reset (status: %x)"
+The driver has encountered a FIFO underrun or overrun.
+The driver will reset the card and the packet will be lost.
+This is not fatal.
+.It "ep0: eeprom failed to come ready"
+The eeprom failed to come ready.
+This probably means the card is wedged.
+.It "ep0: 3c509 in test mode. Erase pencil mark!"
+This means that someone has scribbled with pencil
+in the test area on the card.
+Erase the pencil mark and reboot.
+(This is not a joke).
+.It "ep0: No I/O space?!"
+The driver was unable to allocate the I/O space that it thinks
+should be there.
+Look for conflicts with other devices.
+.It "ep0: No irq?!"
+The driver could not allocate the interrupt it wanted.
+Look for conflicts, although sharing interrupts for PC Card is normal.
+.It "ep0: No connectors!"
+The driver queried the hardware for what ethernet attachment were
+present, but the hardware reported none that the driver recognized.
+.It "ep0: Unable to get Ethernet address!"
+The driver was unable to read the ethernet address from the EEPROM.
+This is likely the result of the card being wedged.
+.It "ep0: if_alloc() failed"
+The driver was unable to allocate a ifnet structure.
+This may happen in extremely low memory conditions.
+.It "ep0: strange connector type in EEPROM: assuming AUI"
+The driver does not know what to do with the information the EEPROM
+has about connectors, so it is assuming the worst.
+.It "ep0: unknown ID 0xXXXXXXXX"
+The driver has found an ID that it believes it supports, but does not
+have a specific identification string to present to the user.
+.It "ep0: <%s> at port 0x%03x in EISA mode"
+The 3C509 ISA card is in EISA mode.
+This message appears to be purely informational.
+.It "ep0: <%s> at x0%03x in PnP mode"
+This card appears to be in Plug and Play mode.
+It should be probed as part of the plug and play phase of the ISA
+probes.
+.It "ep0: Invalid EEPROM checksum!"
+The EEPROM has a bad checksum, so the driver is ignoring the card.
+.It "ep0: bus_setup_intr() failed!"
+The driver was unable to setup the interrupt handler.
+This should never happen.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr ed 4 ,
+.Xr el 4 ,
+.Xr ie 4 ,
+.Xr intro 4 ,
+.Xr ng_ether 4 ,
+.Xr sn 4 ,
+.Xr vx 4 ,
+.Xr ifconfig 8
+.Sh STANDARDS
+are great.
+There is so many to choose from.
diff --git a/share/man/man4/man4.i386/ex.4 b/share/man/man4/man4.i386/ex.4
new file mode 100644
index 0000000..3ffb3fc
--- /dev/null
+++ b/share/man/man4/man4.i386/ex.4
@@ -0,0 +1,119 @@
+.\"
+.\" Copyright (c) 1997 David E. O'Brien
+.\"
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt EX 4 i386
+.Os
+.Sh NAME
+.Nm ex
+.Nd "Ethernet device driver for the Intel EtherExpress Pro/10 and Pro/10+"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ex"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ex_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Ethernet adapters based on the Intel
+i82595 chip.
+.Pp
+On the ISA bus, the card will be searched for in the
+I/O address range 0x200 - 0x3a0.
+The IRQ will be read from the EEPROM on the card.
+For correct operation Plug-N-Play support should be disabled.
+.Pp
+On the PC Card bus, the card will be automatically recognized and
+configured.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following Ethernet adapters:
+.Pp
+.Bl -bullet -compact
+.It
+Intel EtherExpress Pro/10 ISA
+.It
+Intel EtherExpress Pro/10+ ISA
+.It
+Olicom OC2220 Ethernet PC Card
+.It
+Olicom OC2232 Ethernet/Modem PC Card
+.It
+Silicom Ethernet LAN PC Card
+.It
+Silicom EtherSerial LAN PC Card
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ex%d: Intel EtherExpress Pro/10, address %6D, connector %s"
+The device probe found an installed card, and was able to correctly install
+the device driver.
+.It "ex%d: WARNING: board's EEPROM is configured for IRQ %d, using %d"
+The device probe detected that the board is configured for a different
+interrupt than the one specified in the kernel configuration file.
+.It "ex%d: invalid IRQ."
+The device probe detected an invalid IRQ setting.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 2.2 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An Javier Mart\('in Rueda .
+The PC Card attachment was written by
+.An Mitsuru ISAWAKI
+and
+.An Warner Losh .
+This manual page was written by
+.An David E. O'Brien .
+.Sh BUGS
+Currently the driver does not support multicast.
+.Pp
+The Silicom EtherSerial card's serial port does not currently work.
+The Olicom OC2232 PC Card should work with the
+.Nm
+driver, but is currently completely broken.
diff --git a/share/man/man4/man4.i386/fe.4 b/share/man/man4/man4.i386/fe.4
new file mode 100644
index 0000000..22bbf2a
--- /dev/null
+++ b/share/man/man4/man4.i386/fe.4
@@ -0,0 +1,318 @@
+.\" All Rights Reserved, Copyright (C) Fujitsu Limited 1995
+.\"
+.\" This document may be used, modified, copied, distributed, and sold, in
+.\" both source and printed form provided that the above copyright, these
+.\" terms and the following disclaimer are retained. The name of the author
+.\" and/or the contributor may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS DOCUMENT IS PROVIDED BY THE AUTHOR AND THE CONTRIBUTOR ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE CONTRIBUTOR BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS DOCUMENT, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Contributed by M. Sekiguchi <seki@sysrap.cs.fujitsu.co.jp>.
+.\" for fe driver.
+.\"
+.\" $FreeBSD$
+.Dd July 16, 2005
+.Dt FE 4 i386
+.Os
+.Sh NAME
+.Nm fe
+.Nd "Fujitsu MB86960A/MB86965A based Ethernet adapters"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device fe"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_fe_load="YES"
+.Ed
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.fe.0.at="isa"
+.Cd hint.fe.0.port="0x300"
+.Cd hint.fe.0.flags="0x0"
+.Sh DESCRIPTION
+The
+.Nm
+is a network device driver
+for Ethernet adapters based on Fujitsu MB86960A, MB86965A,
+or other compatible chips.
+.Pp
+The driver provides automatic I/O port address configuration and
+automatic IRQ configuration,
+when used with suitable adapter hardware.
+.Pp
+The driver works with program I/O data transfer technique.
+It gives a fair performance.
+Shared memory is never used, even if the adapter has one.
+.Pp
+It currently works with Fujitsu FMV-180 series for ISA,
+Allied-Telesis AT1700 series and RE2000 series for ISA,
+and Fujitsu MBH10302 PC card.
+.Ss Parameters
+In the
+.Pa /boot/device.hints
+file, two parameters,
+.Ar port
+and
+.Ar irq ,
+must be specified to reflect adapter hardware settings.
+Another parameter
+.Ar flags
+can be specified to provide additional configuration as an option.
+.Pp
+The
+.Ar port
+parameter specifies a base I/O port address of the adapter.
+It must match with the hardware setting of the adapter.
+The
+.Ar port
+may be left unspecified by removing
+.Dl hint.fe.0.port="..."
+from the file.
+In that case, the driver tries to detect the hardware setting
+of the I/O address automatically.
+This feature may not work with some adapter hardware.
+.Pp
+The
+.Ar irq
+parameter specifies an IRQ number used by the adapter.
+It must match the hardware setting of the adapter.
+.Ar Irq
+may be left unspecified by removing
+.Dl hint.fe.0.irq="..."
+from the file.
+in that case, the driver tries to detect
+the hardware setting of the IRQ automatically.
+This feature may not work on some adapters.
+.Pp
+The
+.Ar flags
+is a numeric value which consists of a combination of various device settings.
+The following flags are defined in the current version.
+To specify two or more settings for a device,
+use a numeric sum of each flag value.
+Flag bits not specified below are reserved and must be set to 0.
+Actually, each bit is either just ignored by the driver,
+or tested and used to control undocumented features of the driver.
+Consult the source program for undocumented features.
+.Bl -tag -width 8n
+.It Li 0x007F
+These flag bits are used
+to initialize DLCR6 register of MB86960A/MB86965A chip,
+when the
+.Li 0x0080
+bit of the
+.Ar flags
+is set.
+See below for more about DLCR6 override feature.
+The
+.Li 0x007F
+flag bits must be 0 unless the
+.Li 0x0080
+bit is set,
+to maintain the compatibility with future versions of the driver.
+.It Li 0x0080
+This flag overrides the default setting to the DLCR6 register
+of MB86960A/MB86965A chip by a user supplied value,
+which is taken from the lower 7 bits of the flag value.
+This is a troubleshooting flag and should not be used
+without understanding of the adapter hardware.
+Consult the Fujitsu manual for more information
+on DLCR6 settings.
+.El
+.Sh HARDWARE
+Controllers and cards supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Allied Telesis RE1000, RE1000Plus, ME1500 (110-pin)
+.It
+CONTEC C-NET(98)P2, C-NET (9N)E (110-pin), C-NET(9N)C (ExtCard)
+.It
+CONTEC C-NET(PC)C PC Card Ethernet
+.It
+Eagle Tech NE200T
+.It
+Eiger Labs EPX-10BT
+.It
+Fujitsu FMV-J182, FMV-J182A
+.It
+Fujitsu MB86960A, MB86965A
+.It
+Fujitsu MBH10303, MBH10302 PC Card Ethernet
+.It
+Fujitsu Towa LA501 Ethernet
+.It
+HITACHI HT-4840-11 PC Card Ethernet
+.It
+NextCom J Link NC5310
+.It
+RATOC REX-5588, REX-9822, REX-4886, and REX-R280
+.It
+RATOC REX-9880/9881/9882/9883
+.It
+TDK LAC-98012, LAC-98013, LAC-98025, LAC-9N011 (110-pin)
+.It
+TDK LAK-CD011, LAK-CD021, LAK-CD021A, LAK-CD021BX
+.It
+Ungermann-Bass Access/PC N98C+(PC85152, PC85142), Access/NOTE
+N98(PC86132) (110-pin)
+.El
+.Sh FEATURES SPECIFIC TO HARDWARE MODELS
+The
+.Nm
+driver has some features and limitations
+which depend on adapter hardware models.
+The following is a summary of these dependencies.
+.Ss Fujitsu FMV-180 series adapters
+Both automatic IRQ detection and automatic I/O port address detection
+is available with these adapters.
+.Pp
+Automatic I/O port address detection feature of
+.Nm
+works mostly fine for FMV-180 series.
+It works even if there are two or more FMV-180s in a system.
+However, some combination of other adapters may confuse the driver.
+It is recommended to explicitly specify
+.Ar port
+when you experience some difficulties with hardware probe.
+.Pp
+Automatic IRQ detection feature of
+.Nm
+works reliably for FMV-180 series.
+It is recommended to explicitly specify
+.Ar irq
+always for FMV-180.
+The hardware setting of IRQ is read
+from the configuration EEPROM on the adapter,
+even when the kernel config file specifies an IRQ value.
+The driver will generate a warning message,
+if the IRQ setting specified in
+.Pa /boot/device.hints
+does not match one stored in EEPROM.
+Then, it will use the value specified in the file.
+(This behavior has been changed from the previous releases.)
+.Ss Allied-Telesis AT1700 series and RE2000 series adapters
+Automatic I/O port address detection
+is available with Allied-Telesis AT1700 series and RE2000 series,
+while it is less reliable than FMV-180 series.
+Using the feature with Allied-Telesis adapters
+is not recommended.
+.Pp
+Automatic IRQ detection is also available with some limitation.
+The
+.Nm
+driver
+tries to get IRQ setting from the configuration EEPROM on the board,
+if
+.Ar irq
+is not specified in
+.Pa /boot/device.hints .
+Unfortunately,
+AT1700 series and RE2000 series seems to have two types of models;
+One type allows IRQ selection from 3/4/5/9,
+while the other from 10/11/12/15.
+Identification of the models are not well known.
+Hence, automatic IRQ detection with Allied-Telesis adapters
+may not be reliable.
+Specify an exact IRQ number if any troubles are encountered.
+.Pp
+Differences between AT1700 series and RE2000 series
+or minor models in those series are not recognized.
+.Ss Fujitsu MBH10302 PC card
+The
+.Nm
+driver supports Fujitsu MBH10302 and compatible PC cards.
+It requires the PC card (PCMCIA) support package.
+.Sh SEE ALSO
+.Xr netstat 1 ,
+.Xr ed 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver appeared in
+.Fx 2.0.5 .
+.Sh AUTHORS, COPYRIGHT AND DISCLAIMER
+The
+.Nm
+driver was originally written and contributed by
+.An M. Sekiguchi Aq seki@sysrap.cs.fujitsu.co.jp ,
+following the
+.Nm ed
+driver written by
+.An David Greenman .
+PC card support in
+.Nm
+is written by
+.An Hidetoshi Kimura Aq h-kimura@tokyo.se.fujitsu.co.jp .
+This manual page was written by
+.An M. Sekiguchi .
+.Pp
+.Em "All Rights Reserved, Copyright (C) Fujitsu Limited 1995"
+.Pp
+This document and the associated software may be used, modified,
+copied, distributed, and sold, in both source and binary form provided
+that the above copyright, these terms and the following disclaimer are
+retained.
+The name of the author and/or the contributor may not be
+used to endorse or promote products derived from this document and the
+associated software without specific prior written permission.
+.Pp
+THIS DOCUMENT AND THE ASSOCIATED SOFTWARE IS PROVIDED BY THE AUTHOR
+AND THE CONTRIBUTOR
+.Dq AS IS
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR OR THE
+CONTRIBUTOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+DOCUMENT AND THE ASSOCIATED SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+.Sh BUGS
+Following are major known bugs:
+.Pp
+Statistics on the number of collisions maintained by the
+.Nm
+driver is not accurate;
+the
+.Fl i
+option of
+.Xr netstat 1
+shows slightly less value than true number of collisions.
+.Pp
+More mbuf clusters are used than expected.
+The packet receive routine has an intended violation
+against the mbuf cluster allocation policy.
+The unnecessarily allocated clusters are freed within short lifetime,
+and it will not affect long term kernel memory usage.
+.Pp
+Although XNS and IPX support is included in the driver,
+it has never been tested and it is expected to have a lot of bugs.
diff --git a/share/man/man4/man4.i386/glxiic.4 b/share/man/man4/man4.i386/glxiic.4
new file mode 100644
index 0000000..30d3ffe
--- /dev/null
+++ b/share/man/man4/man4.i386/glxiic.4
@@ -0,0 +1,106 @@
+.\" Copyright (c) 2011 Henrik Brix Andersen <brix@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 15, 2011
+.Dt GLXIIC 4 i386
+.Os
+.Sh NAME
+.Nm glxiic
+.Nd Geode LX CS5536 I2C controller driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device isa"
+.Cd "device glxiic"
+.Cd "device iicbus"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+glxiic_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports the System Management Bus controller of the Geode LX
+series CS5536 Companion Device. The Geode LX is a member of the AMD
+Geode family of integrated x86 system chips.
+.Pp
+Although AMD refers to this device as a System Management Bus (SMBus)
+controller, it is really an I2C controller (it lacks SMBus ALERT# and
+Alert Response support).
+.Pp
+The
+.Nm
+driver supports both I2C master and slave mode.
+.Sh SYSCTL VARIABLE
+The
+.Nm
+driver supports the following variable as both
+.Xr sysctl 8
+and
+.Xr loader 8
+tunable:
+.Bl -tag -width indent
+.It Va dev.glxiic.0.timeout
+This variable controls the I2C bus timeout in milliseconds. The
+default timeout is 35 milliseconds. A value of zero disables the
+timeout.
+.El
+.Sh CAVEAT
+The
+.Nm
+driver uses the interrupt line number configured by the board firmware
+by default. If no interrupt line number has been configured by the
+board firmware (or to override the interrupt line number configured by
+board firmware), place the following line in
+.Xr device.hints 5 :
+.Bd -ragged -offset indent
+hint.glxiic.0.irq="10"
+.Ed
+.Pp
+The interrupt line number must be between 1 and 15.
+.Sh SEE ALSO
+.Xr iicbus 4 ,
+.Xr device.hints 5 ,
+.Xr loader.conf 5 ,
+.Xr loader 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+device driver and manual page first appeared in
+.Fx 9.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver and manual page were written by
+.An Henrik Brix Andersen Aq brix@FreeBSD.org .
diff --git a/share/man/man4/man4.i386/glxsb.4 b/share/man/man4/man4.i386/glxsb.4
new file mode 100644
index 0000000..fb2669f
--- /dev/null
+++ b/share/man/man4/man4.i386/glxsb.4
@@ -0,0 +1,97 @@
+.\" $OpenBSD: glxsb.4,v 1.5 2007/05/31 19:19:54 jmc Exp $
+.\"
+.\"Copyright (c) 2006 Tom Cosgrove <tom@openbsd.org>
+.\"
+.\"Permission to use, copy, modify, and distribute this software for any
+.\"purpose with or without fee is hereby granted, provided that the above
+.\"copyright notice and this permission notice appear in all copies.
+.\"
+.\"THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\"WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\"MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\"ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\"WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\"OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 8, 2008
+.Dt GLXSB 4 i386
+.Os
+.Sh NAME
+.Nm glxsb
+.Nd Geode LX Security Block crypto accelerator
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device crypto"
+.Cd "device glxsb"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+glxsb_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports the security block of the Geode LX series processors.
+The Geode LX is a member of the AMD Geode family
+of integrated x86 system chips.
+.Pp
+Driven by periodic checks for available data from the generator,
+.Nm
+supplies entropy to the
+.Xr random 4
+driver for common usage.
+.Pp
+.Nm
+also supports acceleration of AES-128-CBC operations for
+.Xr crypto 4 .
+It also registers itself to accelerate other HMAC algorithms, although
+there is no hardware acceleration for those algorithms.
+This is only needed so
+.Nm
+can work with
+.Xr ipsec 4 .
+.Sh CAVEAT
+The
+.Xr crypto 9
+framework will fail to open the crypto session on the device if the AES
+key's length is != 128 bits.
+This prevents the use of the
+.Nm
+device driver with AES keys of length != 128 bits.
+.Sh SEE ALSO
+.Xr crypto 4 ,
+.Xr intro 4 ,
+.Xr pci 4 ,
+.Xr ipsec 4 ,
+.Xr random 4 ,
+.Xr crypto 9
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Ox 4.1 .
+The
+.Nm
+device driver was imported into
+.Fx 7.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written for
+.Ox
+by
+.An Tom Cosgrove .
+It was ported to
+.Fx
+by
+.An Patrick Lamaiziere Aq patfbsd@davenulle.org .
diff --git a/share/man/man4/man4.i386/ie.4 b/share/man/man4/man4.i386/ie.4
new file mode 100644
index 0000000..2ef9d05
--- /dev/null
+++ b/share/man/man4/man4.i386/ie.4
@@ -0,0 +1,143 @@
+.\"
+.\" Copyright (c) 1994, Wilko Bulte
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt IE 4 i386
+.Os
+.Sh NAME
+.Nm ie
+.Nd "Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ie"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ie_load="YES"
+.Ed
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.ie.0.at="isa"
+.Cd hint.ie.0.port="0x300"
+.Cd hint.ie.0.irq="5"
+.Cd hint.ie.0.maddr="0xd0000"
+.Sh HARDWARE
+The
+.Nm
+driver provides supports the following 8 and 16bit ISA Ethernet cards
+that are based on the Intel i82586 chip:
+.Pp
+.Bl -bullet -compact
+.It
+3COM 3C507
+.It
+AT&T EN100
+.It
+AT&T Starlan 10
+.It
+AT&T Starlan Fiber
+.It
+Intel EtherExpress 16
+.It
+RACAL Interlan NI5210
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ie%d: unknown board type code %d"
+An i82586 chip was found, but the driver was unable to determine the actual
+board type during the probe.
+.It "ie%d: kernel configured maddr %x doesn't match board configured maddr %x"
+The device probe detected a different maddr than the one specified in the
+kernel configuration file.
+.It "ie%d: can't find shared memory"
+The device probe could not access the shared memory to determine its size.
+.It "ie%d: kernel configured msize %d doesn't match board configured msize %d"
+The device probe found a different size for the shared memory than the one
+specified in the kernel configuration file.
+.It "ie%d: kernel configured irq %d doesn't match board configured irq %d"
+The device probe detected that the board is configured for a different
+interrupt than the one specified in the kernel configuration file.
+.It "ie%d: reset"
+The Intel i82586 had to be reset by the driver.
+.It "ie%d: transceiver problem"
+The driver has detected a problem with the Ethernet transceiver.
+This is
+usually due to a loose or broken transceiver cable when using an external
+transceiver.
+When you experience this problem with an on-card transceiver
+your card may be incorrectly jumpered for to use an external transceiver.
+Worst case your on-board transceiver may be broken.
+.It "ie%d: TDR detected an open %d clocks away"
+The driver detected an open circuit in the Ethernet cable.
+Check your
+coax cable and terminator resistors.
+.It "ie%d: TDR detected a short %d clocks away"
+The driver detected a short circuit in the Ethernet cable.
+Check your
+coax cable and terminator resistors.
+.It "ie%d: TDR returned unknown status %x"
+The driver got an unknown status from the card during the Ethernet cable
+test.
+.It "ie%d: multicast address setup command failed"
+The card could not be put into multicast mode.
+.It "ie%d: configure command failed"
+The card refused to respond correctly during configuration.
+.It "ie%d: individual address setup command failed"
+The programming of the Ethernet (MAC) address failed.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An Garrett A. Wollman ,
+based on code by
+.An William F. Jolitz
+and Lawrence Berkeley Laboratories.
+.Tn 3C507
+support was written by
+.An Charles M. Hannum .
+This manual page was written by
+.An Wilko C. Bulte .
+.Sh CAVEATS
+The Racal Interlan NI5210 comes in variants with 8 and 16 kbytes of
+shared memory.
+It is strongly advisable to use the 16 kbyte variant.
+You can upgrade your 8 kbyte card to 16 kbyte by adding an additional
+RAM chip.
diff --git a/share/man/man4/man4.i386/longrun.4 b/share/man/man4/man4.i386/longrun.4
new file mode 100644
index 0000000..b9bfc66
--- /dev/null
+++ b/share/man/man4/man4.i386/longrun.4
@@ -0,0 +1,67 @@
+.\" Copyright (c) 2001 Tamotsu HATTORI <athlete@kta.att.ne.jp>
+.\" Copyright (c) 2001 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.Dd June 30, 2001
+.Dt LONGRUN 4 i386
+.Os
+.Sh NAME
+.Nm longrun
+.Nd Transmeta(TM) Crusoe(TM) LongRun(TM) support
+.Sh SYNOPSIS
+LongRun support is a collection of power saving modes for the
+Transmeta Crusoe chips, similar in scope to Intel's SpeedStep.
+The following
+.Xr sysctl 8
+MIBs control the different CPU modes:
+.Bl -column ".Va hw.crusoe.percentage" ".Vt integer" "Changeable"
+.It Sy "Name Type Changeable Description"
+.It Va hw.crusoe.longrun Ta Vt integer Ta yes Ta "LongRun mode:"
+.It Ta Ta Ta "0: minimum frequency mode"
+.It Ta Ta Ta "1: power-saving mode"
+.It Ta Ta Ta "2: performance mode"
+.It Ta Ta Ta "3: maximum frequency mode"
+.It Va hw.crusoe.frequency Ta Vt integer Ta no Ta "Current frequency (MHz)."
+.It Va hw.crusoe.voltage Ta Vt integer Ta no Ta "Current voltage (mV)."
+.It Va hw.crusoe.percentage Ta Vt integer Ta no Ta "Processing performance (%)."
+.El
+.Sh EXAMPLES
+Print the current status:
+.Pp
+.Dl "% sysctl hw.crusoe"
+.Pp
+To set LongRun mode to performance oriented variable frequency mode
+(less power savings):
+.Pp
+.Dl "# sysctl hw.crusoe.longrun=2"
+.Sh HISTORY
+The Transmeta(TM) Crusoe(TM) LongRun(TM) support first appeared in
+.Fx 4.4 .
+.Sh AUTHORS
+.An -nosplit
+LongRun support and this manual page were written by
+.An Tamotsu HATTORI Aq athlete@kta.att.ne.jp
+and
+.An Mitsuru IWASAKI Aq iwasaki@FreeBSD.org .
diff --git a/share/man/man4/man4.i386/mse.4 b/share/man/man4/man4.i386/mse.4
new file mode 100644
index 0000000..bea73e1
--- /dev/null
+++ b/share/man/man4/man4.i386/mse.4
@@ -0,0 +1,385 @@
+.\" Copyright 1992 by the University of Guelph
+.\"
+.\" Permission to use, copy and modify this
+.\" software and its documentation for any purpose and without
+.\" fee is hereby granted, provided that the above copyright
+.\" notice appear in all copies and that both that copyright
+.\" notice and this permission notice appear in supporting
+.\" documentation.
+.\" University of Guelph makes no representations about the suitability of
+.\" this software for any purpose. It is provided "as is"
+.\" without express or implied warranty.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 3, 1997
+.Dt MSE 4 i386
+.Os
+.Sh NAME
+.Nm mse
+.Nd bus and InPort mice driver
+.Sh SYNOPSIS
+.\" .Cd "options MSE_XXX=N"
+.Cd "device mse"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.mse.0.at="isa"
+.Cd hint.mse.0.port="0x23c"
+.Cd hint.mse.0.irq="5"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the bus mouse and the InPort mouse, which
+are often collectively called ``bus'' mice, as these mice are sold with
+an interface card which needs to be installed in an expansion bus slot.
+The interface circuit may come on an integrated I/O card or as an option
+on video cards.
+.Pp
+The bus and InPort mice have two or three buttons,
+and a D-sub 9-pin male connector or a round DIN 9-pin
+male connector.
+.Pp
+The primary port address of the bus and InPort mouse interface cards
+is usually 0x23c.
+Some cards may also be set to use the secondary port
+address at 0x238.
+The interface cards require a single IRQ, which may be
+2, 3, 4 or 5.
+Some cards may offer additional IRQs.
+The port number and the IRQ number are configured by jumpers on the cards
+or by software provided with the card.
+.Pp
+Frequency, or report rate, at which the device sends movement
+and button state reports to the host system, may also be configurable on
+some interface cards.
+It may be 15, 30, 60 or 120Hz.
+.Pp
+The difference between the two types of the mice is not in mouse devices
+(in fact they are exactly the same).
+But in the circuit on the interface
+cards.
+This means that the device from a bus mouse package can be
+connected to the interface card from an InPort mouse package, or vice
+versa, provided that their connectors match.
+.Ss Operation Levels
+The
+.Nm
+driver has two levels of operation.
+The current operation level can be set via an ioctl call.
+.Pp
+At the level zero the basic support is provided; the device driver will report
+horizontal and vertical movement of the attached device
+and state of up to three buttons in the format described below.
+It is a subset of the MouseSystems protocol.
+.Pp
+.Bl -tag -width Byte_1 -compact
+.It Byte 1
+.Bl -tag -width bit_7 -compact
+.It bit 7
+Always one.
+.It bit 6..3
+Always zero.
+.It bit 2
+Left button status; cleared if pressed, otherwise set.
+.It bit 1
+Middle button status; cleared if pressed, otherwise set.
+Always one,
+if the device does not have the middle button.
+.It bit 0
+Right button status; cleared if pressed, otherwise set.
+.El
+.It Byte 2
+Horizontal movement count in two's compliment; -128 through 127.
+.It Byte 3
+Vertical movement count in two's compliment; -128 through 127.
+.It Byte 4
+Always zero.
+.It Byte 5
+Always zero.
+.El
+.Pp
+This is the default level of operation and the driver is initially
+at this level when opened by the user program.
+.Pp
+At the operation level one (extended level), a data packet is encoded
+in the standard format
+.Dv MOUSE_PROTO_SYSMOUSE
+as defined in
+.Xr mouse 4 .
+.Ss Acceleration
+The
+.Nm
+driver can somewhat `accelerate' the movement of the pointing device.
+The faster you move the device, the further the pointer
+travels on the screen.
+The driver has an internal variable which governs the effect of
+the acceleration.
+Its value can be modified via the driver flag
+or via an ioctl call.
+.Ss Device Number
+The minor device number of the
+.Nm
+is made up of:
+.Bd -literal -offset indent
+minor = (`unit' << 1) | `non-blocking'
+.Ed
+.Pp
+where `unit' is the device number (usually 0) and the `non-blocking' bit
+is set to indicate ``do not block waiting for mouse input,
+return immediately''.
+The `non-blocking' bit should be set for \fIXFree86\fP,
+therefore the minor device number usually used for \fIXFree86\fP is 1.
+See
+.Sx FILES
+for device node names.
+.Sh DRIVER CONFIGURATION
+.\" .Ss Kernel Configuration Options
+.Ss Driver Flags
+The
+.Nm
+driver accepts the following driver flag.
+Set it in the
+kernel configuration file
+(see
+.Xr config 8 )
+or in the User Configuration Menu at
+the boot time
+(see
+.Xr boot 8 ) .
+.Bl -tag -width MOUSE
+.It bit 4..7 ACCELERATION
+This flag controls the amount of acceleration effect.
+The smaller the value of this flag is, more sensitive the movement becomes.
+The minimum value allowed, thus the value for the most sensitive setting,
+is one.
+Setting this flag to zero will completely disables the
+acceleration effect.
+.El
+.Sh IOCTLS
+There are a few
+.Xr ioctl 2
+commands for mouse drivers.
+These commands and related structures and constants are defined in
+.In sys/mouse.h .
+General description of the commands is given in
+.Xr mouse 4 .
+This section explains the features specific to the
+.Nm
+driver.
+.Pp
+.Bl -tag -width MOUSE -compact
+.It Dv MOUSE_GETLEVEL Ar int *level
+.It Dv MOUSE_SETLEVEL Ar int *level
+These commands manipulate the operation level of the
+.Nm
+driver.
+.Pp
+.It Dv MOUSE_GETHWINFO Ar mousehw_t *hw
+Returns the hardware information of the attached device in the following
+structure.
+Only the
+.Dv iftype
+field is guaranteed to be filled with the correct value by the current
+version of the
+.Nm
+driver.
+.Bd -literal
+typedef struct mousehw {
+ int buttons; /* number of buttons */
+ int iftype; /* I/F type */
+ int type; /* mouse/track ball/pad... */
+ int model; /* I/F dependent model ID */
+ int hwid; /* I/F dependent hardware ID */
+} mousehw_t;
+.Ed
+.Pp
+The
+.Dv buttons
+field holds the number of buttons on the device.
+.Pp
+The
+.Dv iftype
+is either
+.Dv MOUSE_IF_BUS
+or
+.Dv MOUSE_IF_INPORT .
+.Pp
+The
+.Dv type
+may be
+.Dv MOUSE_MOUSE ,
+.Dv MOUSE_TRACKBALL ,
+.Dv MOUSE_STICK ,
+.Dv MOUSE_PAD ,
+or
+.Dv MOUSE_UNKNOWN .
+.Pp
+The
+.Dv model
+is always
+.Dv MOUSE_MODEL_GENERIC
+at the operation level 0.
+It may be
+.Dv MOUSE_MODEL_GENERIC
+or one of
+.Dv MOUSE_MODEL_XXX
+constants at higher operation levels.
+.Pp
+The
+.Dv hwid
+is always 0.
+.Pp
+.It Dv MOUSE_GETMODE Ar mousemode_t *mode
+The command gets the current operation parameters of the mouse
+driver.
+.Bd -literal
+typedef struct mousemode {
+ int protocol; /* MOUSE_PROTO_XXX */
+ int rate; /* report rate (per sec), -1 if unknown */
+ int resolution; /* MOUSE_RES_XXX, -1 if unknown */
+ int accelfactor; /* acceleration factor */
+ int level; /* driver operation level */
+ int packetsize; /* the length of the data packet */
+ unsigned char syncmask[2]; /* sync. bits */
+} mousemode_t;
+.Ed
+.Pp
+The
+.Dv protocol
+is either
+.Dv MOUSE_PROTO_BUS
+or
+.Dv MOUSE_PROTO_INPORT
+at the operation level zero.
+.Dv MOUSE_PROTO_SYSMOUSE
+at the operation level one.
+.Pp
+The
+.Dv rate
+is the status report rate (reports/sec) at which the device will send
+movement report to the host computer.
+As there is no standard to detect the current setting,
+this field is always set to -1.
+.Pp
+The
+.Dv resolution
+is always set to -1.
+.Pp
+The
+.Dv accelfactor
+field holds a value to control acceleration feature
+(see
+.Sx Acceleration ) .
+It is zero or greater.
+If it is zero, acceleration is disabled.
+.Pp
+The
+.Dv packetsize
+field specifies the length of the data packet.
+It depends on the
+operation level.
+.Pp
+.Bl -tag -width level_0__ -compact
+.It Em level 0
+5 bytes
+.It Em level 1
+8 bytes
+.El
+.Pp
+The array
+.Dv syncmask
+holds a bit mask and pattern to detect the first byte of the
+data packet.
+.Dv syncmask[0]
+is the bit mask to be ANDed with a byte.
+If the result is equal to
+.Dv syncmask[1] ,
+the byte is likely to be the first byte of the data packet.
+Note that this detection method is not 100% reliable,
+thus, should be taken only as an advisory measure.
+.Pp
+Only
+.Dv level
+and
+.Dv accelfactor
+are modifiable by the
+.Dv MOUSE_SETMODE
+command.
+Changing the other field does not cause error, but has no effect.
+.Pp
+.It Dv MOUSE_SETMODE Ar mousemode_t *mode
+The command changes the current operation parameters of the mouse driver
+as specified in
+.Ar mode .
+Only
+.Dv level
+and
+.Dv accelfactor
+may be modifiable.
+Setting values in the other field does not generate
+error and has no effect.
+.\" .Pp
+.\" .It Dv MOUSE_GETVARS Ar mousevar_t *vars
+.\" .It Dv MOUSE_SETVARS Ar mousevar_t *vars
+.\" These commands are not supported by the
+.\" .Nm
+.\" driver.
+.Pp
+.It Dv MOUSE_READDATA Ar mousedata_t *data
+.It Dv MOUSE_READSTATE Ar mousedata_t *state
+These commands are not supported by the
+.Nm
+driver.
+.Pp
+.It Dv MOUSE_GETSTATUS Ar mousestatus_t *status
+The command returns the current state of buttons and
+movement counts as described in
+.Xr mouse 4 .
+.El
+.Sh FILES
+.Bl -tag -width /dev/nmse0 -compact
+.It Pa /dev/mse0
+`non-blocking' device node in the system without
+.Em devfs ,
+`blocking' under
+.Em devfs .
+.It Pa /dev/nmse0
+`non-blocking' device node under
+.Em devfs .
+.El
+.Sh EXAMPLES
+.Dl "device mse"
+.Pp
+In
+.Pa /boot/device.hints :
+.Dl hint.mse.0.at="isa"
+.Dl hint.mse.0.port="0x23c"
+.Dl hint.mse.0.irq="5"
+.Pp
+Add the
+.Nm
+driver at the primary port address with the IRQ 5.
+.Pp
+.Dl "device mse"
+.Pp
+.Dl hint.mse.1.at="isa"
+.Dl hint.mse.1.port="0x238"
+.Dl hint.mse.1.irq="4"
+.Dl hint.mse.1.flags="0x30"
+.Pp
+Define the
+.Nm
+driver at the secondary port address with the IRQ 4 and the acceleration
+factor of 3.
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr mouse 4 ,
+.Xr psm 4 ,
+.Xr sysmouse 4 ,
+.Xr moused 8
+.\".Sh HISTORY
+.Sh CAVEATS
+Some bus mouse interface cards generate interrupts at the fixed report rate
+when enabled, whether or not the mouse state is changing.
+The others generate interrupts only when the state is changing.
diff --git a/share/man/man4/man4.i386/npx.4 b/share/man/man4/man4.i386/npx.4
new file mode 100644
index 0000000..14a8eef
--- /dev/null
+++ b/share/man/man4/man4.i386/npx.4
@@ -0,0 +1,111 @@
+.\"
+.\" Copyright (c) 1993 Christopher G. Demetriou
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Christopher G. Demetriou.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $Id: npx.4,v 1.1 1993/08/06 10:58:03 cgd Exp $
+.\" $FreeBSD$
+.\"
+.Dd August 28, 1993
+.Dt NPX 4 i386
+.Os
+.Sh NAME
+.Nm npx
+.Nd Numeric Processing Extension coprocessor
+.Sh SYNOPSIS
+.Cd "device npx"
+.Cd hint.npx.0.at="nexus"
+.Cd hint.npx.0.port="0x0F0"
+.Cd hint.npx.0.flags="0x0"
+.Cd hint.npx.0.irq="13"
+.Sh DESCRIPTION
+The
+.Nm
+driver enables the use of the system's Numeric Processing Extension
+coprocessor.
+Numeric processing extensions are present in
+systems with
+.Tn 486DX
+CPUs and in systems with
+.Tn 387
+or
+.Tn 487SX
+coprocessors.
+The
+.Nm
+driver is required for proper system functioning.
+If there is no NPX in the system, the system will not boot.
+.Pp
+The flags for
+.Pa npx0
+are:
+.Pp
+.Bl -tag -width indent -compact
+.It 0x01
+do not use the NPX registers to optimize bcopy.
+.It 0x02
+do not use the NPX registers to optimize bzero.
+.It 0x04
+do not use the NPX registers to optimize copyin or copyout.
+.El
+.Pp
+The NPX registers are normally used
+to optimize copying and zeroing
+when all of the following conditions are satisfied:
+.Pp
+.Bl -enum -compact
+.It
+.Cd "cpu I586_CPU"
+is an option
+.It
+the CPU is an i586 (perhaps not a Pentium)
+.It
+the probe for
+.Pa npx0
+succeeds
+.It
+INT 16 exception handling works.
+.El
+.Pp
+Then copying and zeroing
+using the NPX registers
+is normally 30-100% faster.
+.Pp
+The flags can be used
+to control cases
+where it does not work or is slower.
+Setting them at boot time
+using hints works correctly
+(the optimizations are not used
+until later in the bootstrap
+when
+.Pa npx0
+is attached).
+.Sh BUGS
+There are lots of them, especially on old cheap motherboards.
+In particular, some motherboards do not have the interrupt lines from
+the NPX to the CPU wired properly.
diff --git a/share/man/man4/man4.i386/pae.4 b/share/man/man4/man4.i386/pae.4
new file mode 100644
index 0000000..718e2b2
--- /dev/null
+++ b/share/man/man4/man4.i386/pae.4
@@ -0,0 +1,127 @@
+.\"
+.\" Copyright (c) 2003 Networks Associates Technology, Inc.
+.\" All rights reserved.
+.\"
+.\" This software was developed for the FreeBSD Project by Jake Burkholder,
+.\" Safeport Network Services, and Network Associates Laboratories, the
+.\" Security Research Division of Network Associates, Inc. under
+.\" DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA
+.\" CHATS research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 8, 2003
+.Dt PAE 4 i386
+.Os
+.Sh NAME
+.Nm PAE
+.Nd Physical Address Extensions
+.Sh SYNOPSIS
+.Cd "options PAE"
+.Sh DESCRIPTION
+The
+.Dv PAE
+option provides support for the physical address extensions capability
+of the
+.Tn Intel
+.Tn Pentium Pro
+and above CPUs,
+and allows for up to 64 gigabytes of memory to be used in systems capable
+of supporting it.
+With the
+.Dv PAE
+option, memory above 4 gigabytes is simply added to the general page pool.
+The system makes no distinction between memory above or below 4 gigabytes,
+and no specific facility is provided for a process or the kernel to access
+more memory than they would otherwise be able to access, through a sliding
+window or otherwise.
+.Sh SEE ALSO
+.Xr smp 4 ,
+.Xr tuning 7 ,
+.Xr config 8 ,
+.Xr bus_dma 9
+.Sh HISTORY
+The
+.Dv PAE
+option first appeared in
+.Fx 4.9
+and
+.Fx 5.1 .
+.Sh AUTHORS
+.An Jake Burkholder Aq jake@FreeBSD.org
+.Sh BUGS
+Since KLD modules are not compiled with the same options headers that
+the kernel is compiled with,
+they must not be loaded into a kernel compiled with the
+.Dv PAE
+option.
+.Pp
+Many devices or their device drivers are not capable of direct memory access
+to physical addresses above 4 gigabytes.
+In order to make use of direct memory access IO in a system with more than
+4 gigabytes of memory when the
+.Dv PAE
+option is used,
+these drivers must use a facility for remapping or substituting physical
+memory which is not accessible to the device.
+One such facility is provided by the
+.Nm busdma
+interface.
+Device drivers which do not account for such devices will not work reliably
+in a system with more than 4 gigabytes of memory when the
+.Dv PAE
+option is used,
+and may cause data corruption.
+The
+.Pa PAE
+kernel configuration file includes the
+.Dv PAE
+option, and explicitly excludes all device drivers which are known to not work
+or have not been tested in a system with the
+.Dv PAE
+option and more than 4 gigabytes of memory.
+.Pp
+Many parameters which determine how memory is used in the kernel are based on
+the amount of physical memory.
+The formulas used to determine the values of these parameters for specific
+memory configurations may not take into account the fact there may be more
+than 4 gigabytes of memory, and may not scale well to these memory
+configurations.
+In particular,
+it may be necessary to increase the amount of virtual address space available
+to the kernel,
+or to reduce the amount of a specific resource that is heavily used,
+in order to avoid running out of virtual address space.
+The
+.Dv KVA_PAGES
+option may be used to increase the kernel virtual address space,
+and the
+.Va kern.maxvnodes
+.Xr sysctl 8
+may be used to decrease the number of vnodes allowed,
+an example of a resource that the kernel is likely to overallocate in
+large memory configurations.
+For optimal performance and stability it may be necessary to consult the
+.Xr tuning 7
+manual page, and make adjustments to the parameters documented there.
diff --git a/share/man/man4/man4.i386/pbio.4 b/share/man/man4/man4.i386/pbio.4
new file mode 100644
index 0000000..f4fbf3b
--- /dev/null
+++ b/share/man/man4/man4.i386/pbio.4
@@ -0,0 +1,187 @@
+.\" Copyright (c) 2000-2002
+.\" Diomidis D. Spinellis, Athens, Greece
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Diomidis D. Spinellis ``AS IS'' AND ANY
+.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Diomidis D. Spinellis BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 14, 2005
+.Dt PBIO 4 i386
+.Os
+.Sh NAME
+.Nm pbio
+.Nd 8255 parallel peripheral interface basic
+.Tn I/O
+driver
+.Sh SYNOPSIS
+.Cd "device pbio"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.pbio.0.at="isa"
+.Cd hint.pbio.0.port="0x360"
+.Pp
+.In dev/pbio/pbioio.h
+.Sh DESCRIPTION
+The
+.Nm
+driver supports direct access to the Intel 8255A programmable
+peripheral interface (PPI) chip running in mode 0 (simple
+.Tn I/O ) .
+Such an interface provides 24 digital
+.Tn I/O
+lines.
+The driver is designed for performing
+.Tn I/O
+under program control using
+peripherals such as the
+.Tn Advantech
+.Tn PCL-724
+card, which emulates the Intel 8255A PPI in mode 0.
+Other 8255A-based peripherals such as the
+.Tn BMC
+Messsysteme
+.Tn PIO24II
+card have also been reported to work.
+.Pp
+The PPI provides two 8-bit ports (port A and port B) and
+two 4-bit ports (port C upper, port C lower).
+Each port can be individually programmed for input and
+(latched) output,
+and appears at a different offset of the device's base
+.Tn I/O
+address.
+.Pp
+A separate register allows the configuration of ports for input
+or output.
+The device is so simple, that reliably probing for it when
+input data arrives at its terminals is impossible;
+therefore the kernel configuration has to specify the
+device's base address.
+The device driver provides four character devices that
+correspond to the peripheral's
+.Tn I/O
+ports.
+Opening a device for read or write automatically configures
+the corresponding hardware port for input or output.
+At boot time all ports are set configured for input to avoid damaging
+external circuitry.
+.Pp
+A set of
+.Xr ioctl 2
+requests allow polled input and paced output to be
+efficiently performed at the driver level without expensive
+user/kernel context switching.
+The driver can perform
+.Tn I/O
+in three different ways:
+.Bl -tag -width ".No Differential"
+.It Basic
+The read or write operation returns immediately after reading
+or writing the data to the port at bus speed.
+.It Paced
+Data is transferred from or to the port at intervals specified
+by a separate
+.Xr ioctl 2
+call.
+.It Differential
+(Input only.)
+Only port values that differ from the previous port value are returned.
+.El
+.Pp
+The pacing interval is specified in
+.Em Hz
+unit increments.
+Setting a pace of
+.Ar n
+seconds
+will result in no more than one value being read or written every
+.Ar n
+seconds.
+Single byte read/write operations will take at least
+.Ar n
+seconds to complete.
+.Pp
+The following
+.Xr ioctl 2
+calls are supported:
+.Bl -tag -width ".Dv PBIO_SETIPACE"
+.It Dv PBIO_SETDIFF
+accepts a pointer to an integer as the third argument,
+and sets the driver for differential input if the integer is non-zero.
+The input pace speed determines the periodic interval the driver will use to
+examine the port for a changed value.
+.It Dv PBIO_GETDIFF
+accepts a pointer to an integer as the third argument,
+and sets the integer to the last set value for differential input.
+.It Dv PBIO_SETIPACE
+accepts a pointer to an integer as the third argument,
+and sets the driver's input pacing speed to the value of that integer.
+.It Dv PBIO_GETIPACE
+accepts a pointer to an integer as the third argument,
+and sets the integer to the last set value for the input pace.
+.It Dv PBIO_SETOPACE
+accepts a pointer to an integer as the third argument,
+and sets the driver's output pacing speed to the value of that integer.
+.It Dv PBIO_GETOPACE
+accepts a pointer to an integer as the third argument,
+and sets the integer to the last set value for the output pace.
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/pbio0ch" -compact
+.It Pa /dev/pbio0a
+Port A (8 bit
+.Tn I/O ) .
+.It Pa /dev/pbio0b
+Port B (8 bit
+.Tn I/O ) .
+.It Pa /dev/pbio0ch
+Port C upper (4 bit
+.Tn I/O ) .
+.It Pa /dev/pbio0cl
+Port C lower (4 bit
+.Tn I/O ) .
+.El
+.Sh SEE ALSO
+.Rs
+.%A "Diomidis Spinellis"
+.%T "The information furnace: Consolidated home control"
+.%D "2003"
+.%J "Personal and Ubiquitous Computing"
+.%N 1
+.%V 7
+.%P "53-69"
+.Re
+.Sh HISTORY
+The
+.Nm
+device was first used under
+.Fx 4.1 .
+.Sh AUTHORS
+.An "Diomidis D. Spinellis" Aq dds@aueb.gr
+.Sh BUGS
+One of the
+.Tn PCL-724
+card's inputs can optionally be wired to generate an interrupt.
+This feature is not supported.
diff --git a/share/man/man4/man4.i386/perfmon.4 b/share/man/man4/man4.i386/perfmon.4
new file mode 100644
index 0000000..b9a00f5
--- /dev/null
+++ b/share/man/man4/man4.i386/perfmon.4
@@ -0,0 +1,213 @@
+.\"
+.\" Copyright 1996 Massachusetts Institute of Technology
+.\"
+.\" Permission to use, copy, modify, and distribute this software and
+.\" its documentation for any purpose and without fee is hereby
+.\" granted, provided that both the above copyright notice and this
+.\" permission notice appear in all copies, that both the above
+.\" copyright notice and this permission notice appear in all
+.\" supporting documentation, and that the name of M.I.T. not be used
+.\" in advertising or publicity pertaining to distribution of the
+.\" software without specific, written prior permission. M.I.T. makes
+.\" no representations about the suitability of this software for any
+.\" purpose. It is provided "as is" without express or implied
+.\" warranty.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
+.\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
+.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+.\" SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.Dd March 26, 1996
+.Dt PERFMON 4 i386
+.Os
+.Sh NAME
+.Nm perfmon
+.Nd CPU performance-monitoring interface
+.Sh SYNOPSIS
+.Cd cpu I586_CPU
+.Cd cpu I686_CPU
+.Cd options PERFMON
+.Sh DESCRIPTION
+The
+.Nm
+driver provides access to the internal performance-monitoring
+capabilities of the
+.Tn Intel
+.Tn Pentium
+and
+.Tn "Pentium Pro"
+CPUs.
+These processors implement two internal counters which can be
+configured to measure a variety of events for either count or duration
+(in CPU cycles), as well as a cycle counter which counts clock cycles.
+The
+.Nm
+driver provides a device-style interface to these capabilities.
+.Pp
+All access to the performance-monitoring counters is performed through
+the special device file
+.Dq Pa /dev/perfmon .
+This device supports a number of
+.Xr ioctl 2
+requests, defined in
+.In machine/perfmon.h
+along with the definitions of the various counters for both
+.Tn Pentium
+and
+.Tn "Pentium Pro"
+processors.
+.Pp
+.Sy NOTA BENE :
+The set of available events differs from processor to processor.
+It
+is the responsibility of the programmer to ensure that the event
+numbers used are the correct ones for the CPU type being measured.
+.Pp
+The following
+.Xr ioctl 2
+requests are defined:
+.Bl -tag -width PMIOTSTAMP
+.It Dv PMIOSETUP
+.Pq Li "struct pmc"
+Set up a counter with parameters and flags defined in the structure.
+The following fields are defined in
+.Li struct pmc :
+.Bl -tag -width "u_char pmc_eventx"
+.It Li "int pmc_num"
+the number of the counter in question; must be less than
+.Dv NPMC
+(currently 2).
+.It Li "u_char pmc_event"
+the particular event number to be monitored, as defined in
+.In machine/perfmon.h .
+.It Li "u_char pmc_unit"
+the unit mask value, specific to the event type (see the
+.Tn Intel
+documentation).
+.It Li "u_char pmc_flags"
+flags modifying the operation of the counter (see below).
+.It Li "u_char pmc_mask"
+the counter mask value; essentially, this is a threshold used to
+restrict the count to events lasting more (or less) than the specified
+number of clocks.
+.El
+.Pp
+The following
+.Li pmc_flags
+values are defined:
+.Bl -tag -compact -width PMCF_USRxx
+.It Dv PMCF_USR
+count events in user mode
+.It Dv PMCF_OS
+count events in kernel mode
+.It Dv PMCF_E
+count number of events rather than their duration
+.It Dv PMCF_INV
+invert the sense of the counter mask comparison
+.El
+.It Dv PMIOGET
+.Pq Li "struct pmc"
+returns the current configuration of the specified counter.
+.It Dv PMIOSTART
+.It Dv PMIOSTOP
+.Pq Li int
+starts (stops) the specified counter.
+Due to hardware deficiencies,
+counters must be started and stopped in numerical order.
+(That is to
+say, counter 0 can never be stopped without first stopping counter 1.)
+The driver will
+.Em not
+enforce this restriction (since it may not be present in future CPUs).
+.It Dv PMIORESET
+.Pq Li int
+reset the specified counter to zero.
+The counter should be stopped
+with
+.Dv PMIOSTOP
+before it is reset.
+All counters are automatically reset by
+.Dv PMIOSETUP .
+.It Dv PMIOREAD
+.Pq Li "struct pmc_data"
+get the current value of the counter.
+The
+.Li pmc_data
+structure defines two fields:
+.Pp
+.Bl -tag -compact -width "quad_t pmcd_value"
+.It Li "int pmcd_num"
+the number of the counter to read
+.It Li "quad_t pmcd_value"
+the resulting value as a 64-bit signed integer
+.El
+.Pp
+In the future, it may be possible to use the
+.Li RDPMC
+instruction on
+.Tn "Pentium Pro"
+processors to read the counters directly.
+.It Dv PMIOTSTAMP
+.Pq Li "struct pmc_tstamp"
+read the time stamp counter.
+The
+.Li pmc_tstamp
+structure defines two fields:
+.Pp
+.Bl -tag -compact -width "quad_t pmct_value"
+.It Li "int pmct_rate"
+the approximate rate of the counter, in MHz
+.It Li "quad_t pmct_value"
+the current value of the counter as a 64-bit integer
+.El
+.Pp
+It is important to note that the counter rate, as provided in the
+.Li pmct_rate
+field, is often incorrect because of calibration difficulties and
+non-integral clock rates.
+This field should be considered more of a
+hint or sanity-check than an actual representation of the rate of
+clock ticks.
+.El
+.Sh FILES
+.Bl -tag -compact -width "/usr/include/machine/perfmon.h"
+.It Pa /dev/perfmon
+character device interface to counters
+.It Pa /usr/include/machine/perfmon.h
+include file with definitions of structures and event types
+.It Pa /usr/share/examples/perfmon
+sample source code demonstrating use of all the
+.Fn ioctl
+commands
+.El
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr hwpmc 4
+.Rs
+.%A Intel Corporation
+.%B Pentium Pro Family Developer's Manual
+.%D January 1996
+.%V vol. 3
+.%O Operating System Writer's Manual
+.Re
+.Sh HISTORY
+The
+.Nm
+device first appeared in
+.Fx 2.2 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Garrett A. Wollman ,
+MIT Laboratory for Computer Science.
diff --git a/share/man/man4/man4.i386/pnp.4 b/share/man/man4/man4.i386/pnp.4
new file mode 100644
index 0000000..fadde4f
--- /dev/null
+++ b/share/man/man4/man4.i386/pnp.4
@@ -0,0 +1,85 @@
+.\" Copyright (c) 1997 Luigi Rizzo
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 20, 2001
+.Dt PNP 4 i386
+.Os
+.Sh NAME
+.Nm pnp
+.Nd support for
+.Dq "Plug and Play"
+(PnP) ISA devices
+.Sh DESCRIPTION
+The
+.Nm
+driver enumerates ISA devices which support
+.Dq "Plug and Play ISA Specification"
+in the system.
+It assigns ISA bus resources (interrupt line, DMA channel, I/O ports,
+and memory region) to each device and activates it.
+.Pp
+If it cannot assign necessary resources to a PnP ISA device without
+causing conflict with other devices in the system,
+the device will not be activated and will be unavailable
+to programs.
+.Sh SEE ALSO
+.Xr pnpbios 4
+.Sh STANDARDS
+.Rs
+.%A Intel
+.%A Microsoft
+.%T "Plug and Play ISA Specification, Version 1.0a"
+.%D "May 5, 1994"
+.Re
+.Pp
+.Rs
+.%T "Clarifications to the Plug and Play ISA Specification, Version 1.0a"
+.%D "December 10, 1994"
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 2.2.5 .
+It has been substantially updated in subsequent versions.
+.Sh AUTHORS
+.An -nosplit
+PnP support was originally written
+for
+.Fx 2.2.5
+by
+.An Luigi Rizzo ,
+based on initial work done by
+.An Sujal Patel .
+.Sh CAVEATS
+It is not possible to disable individual PnP ISA devices.
+The
+.Nm
+driver will find all devices conforming the PnP ISA specification
+and try to activate them all.
+.Pp
+There is no way to explicitly assign particular resource to
+the PnP ISA device.
+The resource assignment is fully automatic and there is
+no provision for manual override.
diff --git a/share/man/man4/man4.i386/pnpbios.4 b/share/man/man4/man4.i386/pnpbios.4
new file mode 100644
index 0000000..b386be2
--- /dev/null
+++ b/share/man/man4/man4.i386/pnpbios.4
@@ -0,0 +1,85 @@
+.\"
+.\" Copyright (c) 2001
+.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.Dd September 20, 2001
+.Dt PNPBIOS 4 i386
+.Os
+.Sh NAME
+.Nm pnpbios
+.Nd support for embedded devices on the motherboard
+.Sh DESCRIPTION
+The
+.Nm
+driver enumerates embedded ISA devices on the motherboard whose BIOS
+supports
+.Dq "Plug and Play BIOS Specification" .
+It assigns ISA bus resources (interrupt line, DMA channel, I/O ports,
+and memory region) to each device and activates it.
+.Pp
+If it cannot assign necessary resources to a device without
+causing conflict with other devices in the system,
+the device will not be activated and will be unavailable
+to programs.
+.Sh SEE ALSO
+.Xr pnp 4
+.Sh STANDARDS
+.Rs
+.%A Compaq
+.%A Phenix
+.%A Intel
+.%T "Plug and Play BIOS Specification Version 1.0A"
+.%D May 5, 1994
+.Re
+.Pp
+.Rs
+.%A Compaq
+.%A Phenix
+.%A Intel
+.%T "Plug and Play BIOS CLARIFICATION Paper for Plug and Play BIOS Specification Version 1.0A"
+.%D October 6, 1994
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Mike Smith .
+.Sh CAVEATS
+There is no explicit way to disable individual embedded devices.
+The
+.Nm
+driver will find all devices reported by the
+.Dq "Plug and Play (PnP)"
+BIOS and try to activate them all.
+.Pp
+There is no way to explicitly assign particular resource to a device.
+The resource assignment is fully automatic and there is
+no provision for manual override.
diff --git a/share/man/man4/man4.i386/sbni.4 b/share/man/man4/man4.i386/sbni.4
new file mode 100644
index 0000000..779deba
--- /dev/null
+++ b/share/man/man4/man4.i386/sbni.4
@@ -0,0 +1,132 @@
+.\" Written by Denis I. Timofeev, 2002.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 8, 2002
+.Dt SBNI 4 i386
+.Os
+.Sh NAME
+.Nm sbni
+.Nd Granch SBNI12 leased line modem driver
+.Sh SYNOPSIS
+.Cd "device sbni"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for leased line modems of following models:
+.Pp
+.Bl -bullet -compact
+.It
+SBNI12-02, SBNI12D-02
+.It
+SBNI12-04, SBNI12D-04
+.It
+SBNI12-05, SBNI12D-05, ISA and PCI
+.It
+SBNI12-10, SBNI12D-10, ISA and PCI
+.El
+.Pp
+and a kit for data link over a voice band:
+.Bl -bullet
+.It
+SBNI12-11, SBNI12D-11, ISA and PCI.
+.El
+.Pp
+In addition to the standard port and IRQ specifications, the
+.Nm
+driver also supports a number of
+.Va flags
+which can set baud rate, receive level, and low three bytes of Ethernet
+MAC-address (high three are always
+.Li 00:ff:01 ) ,
+because Granch modems are
+presented to the system as Ethernet-like network cards.
+.Pp
+The high byte of the
+.Va flags
+is a bit field, it is used to specify SBNI adapter receive level/baud rate:
+.Bl -tag -width "Bits 0-3:" -offset indent
+.It "Bits 0-3:"
+receive level (0x00..0x0f)
+.It "Bits 4-5:"
+baud rate number:
+.Pp
+.Bl -inset -compact
+.It "00 -"
+0 baud rate (2Mb in fast mode/500kb in slow)
+.It "01 -"
+1 baud rate (1Mb/250kb)
+.It "10 -"
+2 baud rate (500kb/125kb)
+.It "11 -"
+3 baud rate (250kb/62.5kb)
+.El
+.It "Bit 6:"
+use fixed receive level
+.Pp
+if bit 6 is set then receive level will be set according
+to bits 0-3 value, otherwise receive level will be
+autodetected
+.It "Bit 7:"
+use fixed baud rate
+.Pp
+if bit 7 is set then baud rate will be set according to
+bits 4-5 value, otherwise baud rate is set to 2Mb
+.El
+.Sh FILES
+The sources for the driver reside in:
+.Pp
+.Bl -tag -width ".Pa /sys/dev/sbni/if_sbni.c" -compact
+.It Pa /sys/dev/sbni/if_sbni.c
+.It Pa /sys/dev/sbni/if_sbnireg.h
+.It Pa /sys/dev/sbni/if_sbnivar.h
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.6 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver for
+.Fx
+4.x was written by
+.An Denis I. Timofeev ,
+partially based on
+.An David Greenman Ns 's
+.Xr ed 4
+driver.
+Earlier versions (available on
+.Pa ftp.granch.com )
+were written by
+.An Alexey V. Zverev .
+.Pp
+SBNI12 hardware was designed by
+.An Alexey V. Chirkov .
diff --git a/share/man/man4/man4.i386/smapi.4 b/share/man/man4/man4.i386/smapi.4
new file mode 100644
index 0000000..8af17fa
--- /dev/null
+++ b/share/man/man4/man4.i386/smapi.4
@@ -0,0 +1,153 @@
+.\"
+.\" Copyright (c) 2003 Tom Rhodes
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 1, 2003
+.Dt SMAPI 4 i386
+.Os
+.Sh NAME
+.Nm smapi
+.Nd "System Management Application Program Interface driver"
+.Sh DESCRIPTION
+Many
+.Tn IBM Thinkpad
+laptops utilize a special software interface known as
+.Tn SMAPI
+(System Management Application Program Interface).
+This interface controls various aspects of the system including:
+.Bl -bullet
+.It
+System Interface
+(the
+.Tn BIOS
+can store system information such as the system identifier),
+.It
+System Configuration (where devices such as the display can be configured),
+.It
+Power Management (software can interact with the
+.Tn SMAPI BIOS
+for Power Management control).
+.El
+.Pp
+Client software must locate a
+.Dq "header image"
+stored in the
+.Li F000
+segment in the
+.Tn Thinkpad ROM
+(read-only memory), which resides at the 16-byte boundary.
+This is considered the
+.Dq "Entry Point"
+for the service.
+.Pp
+The
+.Dq "header image"
+stores information like:
+.Bl -bullet
+.It
+signature,
+.It
+.Tn SMAPI
+version (major and minor),
+.It
+header image length,
+.It
+checksum information (which verifies the image),
+.It
+an Information Word (used to identify the
+.Tn BIOS
+service level),
+.It
+Real Mode Entry Point (where clients using the
+Real/V86 mode for the far-call value),
+.It
+and finally a 16-bit/32-bit Protected Mode Entry
+Point: base code address which specifies the
+.Tn BIOS
+physical address.
+The client must prepare a 64 kilobyte selector for this
+.Tn BIOS ) .
+.El
+.Pp
+To invoke the
+.Tn SMAPI BIOS ,
+a far-call must be used on the entry point specified in the header file.
+All other information should be stored in the client data area.
+The client is required to prepare both an input and output parameter in a
+data area of its own.
+This area can be
+.Dq informed
+by pushing those pointers into its stack before the far-calls.
+.Pp
+The
+.Tn SMAPI BIOS
+uses the stack and data areas with the selector during a
+.Tn BIOS
+invocation, thus the caller must define the same privilege area as the
+.Tn BIOS .
+.Pp
+The parameter structure will be made up by using the input and output
+fields prepared by the caller.
+The input field will specify the function request to the
+.Tn BIOS .
+The
+.Tn BIOS
+will then drop a return value into the output field.
+These fields are made up of three parts.
+The first holds parameters, function numbers, and return codes.
+The next will contain an offset in hexadecimal.
+Finally a length field which is comprised of Byte, Word, or Double Word.
+.Sh SEE ALSO
+.Rs
+.%B "IBM Thinkpad 560/560E Technical Reference"
+.%O "06J0536 S76H-7587-01"
+.Re
+.Rs
+.%B "IBM Thinkpad 560Z Technical Reference"
+.%O "xxxxxxx xxxx-xxxx-xx"
+.Re
+.Rs
+.%B "IBM Thinkpad 600 Technical Reference"
+.%O "xxxxxxx xxxx-xxxx-xx"
+.Re
+.Rs
+.%B "IBM Thinkpad 760XD/760XL/765D/765L Technical Reference"
+.%O "06J0537 S30H-2433-02"
+.Re
+.Rs
+.%B "IBM Thinkpad 770 Technical Reference"
+.%O "05L1739 S05L-1739-00"
+.Re
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Matthew N. Dodd Aq mdodd@FreeBSD.org .
+This manual page was written by
+.An Tom Rhodes Aq trhodes@FreeBSD.org
+and
+.An Matthew N. Dodd Aq mdodd@FreeBSD.org .
diff --git a/share/man/man4/man4.i386/snc.4 b/share/man/man4/man4.i386/snc.4
new file mode 100644
index 0000000..66b4524
--- /dev/null
+++ b/share/man/man4/man4.i386/snc.4
@@ -0,0 +1,142 @@
+.\"
+.\" Copyright (c) 2004 Tom Rhodes
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 4, 2004
+.Dt SNC 4 i386
+.Os
+.Sh NAME
+.Nm snc
+.Nd National Semiconductor DP8393X SONIC Ethernet adapter driver
+.Sh SYNOPSIS
+.Cd device isa
+.Cd device snc
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the
+.Tn National
+.Tn Semiconductor
+.Tn SONIC
+Ethernet adapters.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following cards:
+.Pp
+.Bl -bullet -compact
+.It
+National Semiconductor DP83934AVQB
+.It
+NEC PC-9801-83
+.It
+NEC PC-9801-84
+.It
+NEC PC-9801-103
+.It
+NEC PC-9801-104
+.It
+NEC PC-9801N-15
+.It
+NEC PC-9801N-25
+.It
+NEC PC-9801N-J02 PCMCIA
+.It
+NEC PC-9801N-J02R PCMCIA
+.El
+.Pp
+The
+.Nm
+driver also includes support for the
+.Tn National
+.Tn Semiconductor
+.Tn NS46C46
+as
+64 * 16 bits Microwave Serial
+.Tn EEPROM .
+.Sh IMPLEMENTATION NOTES
+Accessing
+.Tn SONIC
+card data structures and registers as 32 bit values
+makes code endianness independent.
+The
+.Tn SONIC
+is however always in big-endian mode so it is necessary to
+ensure that data structures shared
+between the
+.Tn CPU
+and the
+.Tn SONIC
+card are always in big-endian order.
+The
+.Nm
+driver supports the
+.Tn PC-98
+C-Bus,
+and
+.Tn PnP
+buses.
+Support is also provided for the legacy C-Bus.
+.Sh DIAGNOSTICS
+The following driver specific error messages
+may be reported:
+.Bl -diag
+.It "snc%d: snc_nec16_register_irq: unsupported irq (%d)"
+The card returned an
+.Tn IRQ
+which is not supported by the driver.
+.It "snc%d: invalid packet length %d bytes"
+An attempt to transfer a data packet failed due to an
+invalid packet length.
+.El
+.Sh SEE ALSO
+.Xr netintro 4 ,
+.Xr bus_alloc_resource_any 9
+.Sh HISTORY
+The
+.Nm
+driver was ported from
+.Nx
+by
+.An -nosplit
+.An Motomichi Matsuzaki Aq mzaki@e-mail.ne.jp
+and
+.An Hiroshi Yamashita Aq bluemoon@msj.biglobe.ne.jp .
+It first appeared in
+.Fx 4.2 .
+This manual page first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+This manual page was written by
+.An Tom Rhodes Aq trhodes@FreeBSD.org .
+.Sh BUGS
+Currently the
+.Nm
+driver only works on the
+.Tn PC-98
+architecture.
+It should probably work on the i386 architecture
+as well.
diff --git a/share/man/man4/man4.i386/streams.4 b/share/man/man4/man4.i386/streams.4
new file mode 100644
index 0000000..acb1808
--- /dev/null
+++ b/share/man/man4/man4.i386/streams.4
@@ -0,0 +1,85 @@
+.\" Copyright (c) 2000 Mark Newton
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 17, 2008
+.Dt STREAMS 4 i386
+.Os
+.Sh NAME
+.Nm streams
+.Nd System V STREAMS networking ABI support
+.Sh SYNOPSIS
+To compile support for this ABI into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device streams"
+.Ed
+.Pp
+Alternatively, to load the ABI as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+streams_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+module provides limited
+System V Release 4 STREAMS interprocess communication ABI
+(application binary interface) compatibility
+for userland applications.
+.Pp
+Internally,
+.Nm
+provides STREAMS handles by using socket creation kernel routines, and
+adding state-tracking information to the socket to permit manipulation
+by STREAMS emulation code in
+.Xr svr4 4 .
+Hence, opening a stream device produces a result similar to what would be
+obtained by calling
+.Xr socket 2 .
+.Pp
+Applications should never use this interface directly: STREAMS
+emulation is only provided as a service to support ABI requirements in
+the SVR4 environment which
+.Xr svr4 4
+needs to present to client binaries.
+.Sh SEE ALSO
+.Xr svr4 4
+.Sh HISTORY
+System V Release 4 ABI support first appeared in
+.Fx 4.0 .
+The ABI was ported from an equivalent facility present in
+.Nx 1.3
+written by Christos Zoulas.
+.Sh BUGS
+This whole interface is a crude hack to produce STREAMS semantics
+through emulation over sockets.
+.Pp
+Programmers who hope to be able to use this interface to provide
+SVR4 STREAMS services to
+.Bx
+applications will be sorely disappointed.
diff --git a/share/man/man4/man4.i386/svr4.4 b/share/man/man4/man4.i386/svr4.4
new file mode 100644
index 0000000..f470c43
--- /dev/null
+++ b/share/man/man4/man4.i386/svr4.4
@@ -0,0 +1,225 @@
+.\" Copyright (c) 2000 Mark Newton
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 17, 2008
+.Dt SVR4 4 i386
+.Os
+.Sh NAME
+.Nm svr4
+.Nd System V Release 4 ABI support
+.Sh SYNOPSIS
+To compile support for this ABI into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options COMPAT_SVR4"
+.Ed
+.Pp
+Alternatively, to load the ABI as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+svr4_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+module provides limited
+System V Release 4 ABI (application binary interface) compatibility
+for userland applications.
+The module provides the following significant facilities:
+.Bl -bullet
+.It
+An image activator
+for correctly branded
+.Xr elf 5
+executable images
+.It
+Special signal handling for activated images
+.It
+SVR4 to native system call translation
+.It
+STREAMS network API emulation (via the
+.Xr streams 4
+loadable module, or by means of
+.Dl device streams
+in a kernel configuration file)
+.It
+Mappings between
+.Fx
+and SVR4
+.Xr ioctl 2
+calls, or, where no such mappings exist, reverse-engineered implementations
+of the SVR4 calls.
+.El
+.Pp
+It is important to note that the SVR4 ABI support
+it not provided through an emulator.
+Rather, a true (albeit limited) "clean room" reverse-engineered ABI
+implementation is provided.
+.Sh LIMITATIONS
+Because the provided ABI has been developed in ignorance of actual SVR4
+source code, there are bound to be unforeseen interactions between SVR4
+client applications and the emulated ABI which cause applications to
+malfunction.
+.Pp
+Additionally, some SVR4 operating systems do not adhere to the SVR4
+ELF standard.
+In particular, Solaris does not set the ELF interpreter field in the
+ELF header to a value which would allow the kernel to correctly
+identify a client executable as an SVR4 application.
+Thus, in certain instances it is necessary to use the
+.Xr brandelf 1
+utility to explicitly brand the executable, or to set the
+kern.fallback_elf_brand
+.Xr sysctl 8
+variable to define a "default" ABI for unbranded executables.
+Value ELFOSABI_SOLARIS represents Solaris; ELFOSABI_SYSV represents other
+SysVR4 operating systems.
+See
+.In sys/elf_common.h
+for ELFOSABI branding definitions, and
+.Xr brandelf 1
+for information on branding executables.
+.Pp
+The
+.Nm
+module can be linked into the kernel statically with the
+.Dv COMPAT_SVR4
+kernel configuration option
+or loaded as required.
+The following command will load the module
+if it is neither linked into the kernel
+nor already loaded as a module:
+.Bd -literal -offset indent
+if ! kldstat -v | grep -E 'svr4elf' > /dev/null; then
+ kldload svr4 > /dev/null 2>&1
+fi
+.Ed
+.Pp
+The kernel
+will check for the presence of the
+.Xr streams 4
+module, and load it if necessary.
+.Pp
+Note that dynamically linked SVR4 executables
+will require a suitable environment in
+.Pa /compat/svr4 .
+.Pp
+For information on loading the
+.Nm
+kernel loadable module automatically on system startup,
+see
+.Xr rc.conf 5 .
+This information applies
+regardless of whether the
+.Nm
+module is statically linked into the kernel
+or loaded as a module.
+.Pp
+STREAMS emulation is limited but (largely) functional.
+Assuming the
+.Xr streams 4
+module is loaded, a STREAMS handle can be obtained by opening one of the
+relevant files in
+.Pa /dev
+or
+.Pa /compat/svr4/dev .
+Internally, the
+.Xr streams 4
+driver produces a socket descriptor and
+.Dq tags
+it with additional STREAMS
+state information before returning it to the client application.
+The
+.Nm
+environment uses the additional state information to recognize and
+manipulate emulated STREAMS handles when STREAMS-specific
+.Xr ioctl 2
+calls are executed.
+.Pp
+The subset of STREAMS functionality which is provided is small, probably
+little more than what is required to enable programs on the Solaris CD
+sets to run.
+.Sh FILES
+.Bl -tag -width /sys/compat/svr4/syscalls.master -compact
+.It Pa /compat/svr4
+minimal SVR4 run-time environment
+.It Pa /sys/compat/svr4/syscalls.master
+mappings between SVR4 syscalls and
+.Nm
+module entrypoints.
+.El
+.Sh SEE ALSO
+.Xr brandelf 1 ,
+.Xr streams 4 ,
+.Xr elf 5
+.Sh HISTORY
+System V Release 4 ABI support first appeared in
+.Fx 4.0 .
+The ABI was ported from an equivalent facility present in
+.Nx 1.3
+written by Christos Zoulas.
+.Sh BUGS
+Emulation of signal handlers is buggy.
+.Pp
+Emulated connectionless STREAMS fail to receive data from the network in
+some circumstances (but succeed in others -- probably due to particular
+ways of initializing them which the
+.Xr streams 4
+module is mishandling, and interaction between STREAMS and
+.Xr poll 2 ) .
+Connection-oriented STREAMS appear to be functional.
+.Pp
+Ironically, this SVR4 emulator does not (yet) support SVR4 semaphores or
+shared memory.
+.Pp
+.Xr ports 7
+to automatically create the
+.Pa /compat/svr4
+environment do not exist.
+.Xr tar 1
+archives containing pre-populated trees can be obtained from
+.Pa http://people.FreeBSD.org/~newton/freebsd-svr4/ .
+.Pp
+Extensive testing has only really been carried out with Solaris 2.x binaries,
+with anecdotal reports of limited success coming from testers with
+early-revision SCO media.
+In theory, the basic SVR4 ABI should be constant
+across the set of vendors who produce SVR4 operating systems, but in
+practice that is probably not the case.
+If necessary, future work can
+either implement additional
+.Xr kld 4
+modules which produce functionality which contains OS-dependent
+departures from the behaviour which has been implemented in this
+ABI implementation.
+Alternatively,
+.Xr sysctl 8
+variables could set the
+.Dq personality
+the environment should present to
+client applications.
diff --git a/share/man/man4/man4.i386/vpd.4 b/share/man/man4/man4.i386/vpd.4
new file mode 100644
index 0000000..7ed2063
--- /dev/null
+++ b/share/man/man4/man4.i386/vpd.4
@@ -0,0 +1,90 @@
+.\" Copyright (c) 2003 Matthew N. Dodd <winter@jurai.net>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 31, 2004
+.Dt VPD 4 i386
+.Os
+.Sh NAME
+.Nm vpd
+.Nd "Vital Product Data kernel interface"
+.Sh SYNOPSIS
+.Cd "device vpd"
+.Sh DESCRIPTION
+.Tn IBM ThinkPad
+notebooks (and most
+.Tn IBM
+desktop PCs) have a 48-byte
+Vital Product Data (VPD) structure located in the BIOS Shadow RAM.
+.Pp
+The VPD provides machine type and model information, the build ID
+(this is roughly the BIOS version) and serial number information.
+.Pp
+The
+.Nm
+driver scans the BIOS area and claims the memory used by the VPD
+structure.
+It provides the
+.Xr sysctl 3
+branch
+.Va hw.vpd
+to allow this information to be accessed by the userland.
+The following variables are provided, one per VPD attachment (there should
+only be one):
+.Pp
+.Bl -tag -width ".Dv MACHINE_MODEL" -compact
+.It Dv MACHINE_TYPE
+.Pq Va machine.type
+Machine type.
+.It Dv MACHINE_MODEL
+.Pq Va machine.model
+Machine model.
+.It Dv BUILD_ID
+.Pq Va build.id
+BIOS Build ID.
+.It Dv SERIAL_BOX
+.Pq Va serial.box
+Box Serial Number.
+.It Dv SERIAL_PLANAR
+.Pq Va serial.planar
+Motherboard Serial Number.
+.El
+.Sh SEE ALSO
+.Rs
+.%T "TP General - Using the BIOS Build ID to identify IBM ThinkPad systems"
+.%N "Reference #: MIGR-45120"
+.%D "November 22, 2002"
+.%U "http://www.ibm.com/support/docview.wss?uid=psg1MIGR-45120"
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.1 .
+.Sh AUTHORS
+The
+.Nm
+driver and this manual page were written by
+.An Matthew N. Dodd Aq mdodd@FreeBSD.org .
diff --git a/share/man/man4/man4.i386/vx.4 b/share/man/man4/man4.i386/vx.4
new file mode 100644
index 0000000..ab0472b
--- /dev/null
+++ b/share/man/man4/man4.i386/vx.4
@@ -0,0 +1,140 @@
+.\"
+.\" Copyright (c) 1996, Fred Gray
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by David Greenman.
+.\" 4. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt VX 4 i386
+.Os
+.Sh NAME
+.Nm vx
+.Nd "3Com EtherLink III / Fast EtherLink III (3c59x) Ethernet driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device vx"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_vx_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the 3Com
+.Dq Vortex
+chipset.
+.Pp
+The medium selection
+can be influenced by the following link flags to the
+.Xr ifconfig 8
+command:
+.Pp
+.Bl -tag -width LINK0X -compact
+.It Em link0
+Use the AUI port.
+.It Em link1
+Use the BNC port.
+.It Em link2
+Use the UTP port.
+.El
+.Sh HARDWARE
+The
+.Nm
+driver supports the following cards:
+.Pp
+.Bl -bullet -compact
+.It
+3Com 3c590 EtherLink III PCI
+.It
+3Com 3c592 EtherLink III EISA
+.It
+3Com 3c595 Fast EtherLink III PCI in 10 Mbps mode
+.It
+3Com 3c597 Fast EtherLink III EISA in 10 Mbps mode
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "vx%d: not configured; kernel is built for only %d devices."
+There are not enough devices in the kernel configuration file for the number
+of adapters present in the system.
+Add devices to the configuration file,
+rebuild the kernel, and reboot.
+.El
+.Pp
+All other diagnostics indicate either a hardware problem or a bug in the
+driver.
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 2.1 .
+It was derived from the
+.Nm ep
+driver, from which it inherits most of its limitations.
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver and this manual page were written by
+.An Fred Gray Aq fgray@rice.edu ,
+based on the work of
+.An Herb Peyerl
+and with the assistance of numerous others.
+.Sh CAVEATS
+Some early-revision 3c590 cards are defective and suffer from many receive
+overruns, which cause lost packets.
+The author has attempted to implement
+a test for it based on the information supplied by 3Com, but the test resulted
+mostly in spurious warnings.
+.Pp
+The performance of this driver is somewhat limited by the fact that it uses
+only polled-mode I/O and does not make use of the bus-mastering capability
+of the cards.
+.Sh BUGS
+The
+.Nm
+driver is known not to reset the adapter correctly following a warm boot
+on some systems.
+.Pp
+The
+.Nm
+driver has not been exhaustively tested with all the models of cards that it
+claims to support.
diff --git a/share/man/man4/man4.i386/wl.4 b/share/man/man4/man4.i386/wl.4
new file mode 100644
index 0000000..a1eacda
--- /dev/null
+++ b/share/man/man4/man4.i386/wl.4
@@ -0,0 +1,191 @@
+.\"
+.\" Copyright (c) 1997, Jim Binkley
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Jim Binkley
+.\" 4. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.Dd September 29, 2006
+.Dt WL 4 i386
+.Os
+.Sh NAME
+.Nm wl
+.Nd T1 speed ISA/radio lan card
+.Sh SYNOPSIS
+.Cd "device wl0 at isa? port 0x300 irq 5"
+.Sh DESCRIPTION
+The
+.Nm
+driver controls a radio lan card system made originally by
+NCR, then ATT, now Lucent.
+The system is spread-spectrum radio
+at around 915 MHz (or 2.4 GHz).
+With the supplied omni-directional antennae,
+about 400 feet (indoors, more outdoors) can be covered in circumference.
+This card can talk to the companion (wlp0) pccard.
+Speeds vary
+from 1 megabit to theoretically 2 megabits (roughly T1 in speed).
+.Pp
+The card has three fundamental hardware
+units, a so-called PSA or programmable storage area, a radio modem,
+and a Ethernet lan controller.
+The latter component is the
+ancient (and not very honorable) Intel 82586 Ethernet chip.
+Fundamentally it appears to the operating system as an Ethernet system,
+and speaks IEEE MAC addresses.
+The radio modem simply translates
+Ethernet packets to/from radio packets, that are either at 2.4 GHz
+or 915 MHz depending on the radio modem.
+It supports a collision
+avoidance scheme.
+The lan controller
+supports promiscuous mode, broadcast, and multicasting
+(although there is a glitch
+in the latter).
+"It thinks it is Ethernet".
+.Pp
+How it is used
+depends on the kind of antennae deployed with it.
+Point to point
+applications are possible as are Ethernet-like lan use.
+The vendor
+ships an omni-directional antennae that works in the
+vicinity of 400 feet (indoors).
+Point to point antennae can be purchased that will go miles.
+.Sh SETUP
+The card can either be initialized with the vendor supplied DOS setup software.
+Typically minimally an IRQ, port, and Network ID must be supplied.
+Michael Smith's
+.Xr wlconfig 8
+utility can now be used to do this work from
+the UNIX side.
+The card is "not" plug and play.
+The network id controls whether one set of cards can hear another.
+If different, cards will read physical packets, but they will be discarded
+by the radio modem.
+.Sh CONTROL
+In addition to the config utility, there are several sysctl
+switches that can be used to modify runtime parameters.
+The
+.Xr sysctl 8
+variables are as follows:
+.Bl -diag
+.It "machdep.wl_xmit_delay <useconds>"
+This variable will cause the driver to insert a delay on transmit.
+250 is the default.
+The delay should probably be a bit longer
+on faster cpus and less on slower cpus.
+It exists because the 82586
+was not designed to work with Pentium-speed cpu systems and if overdriven
+will have copious xmit side errors.
+.It machdep.wl_ignore_nwid <0 | 1>
+This switch defaults to 0; i.e., the nwid is not ignored.
+It can
+be set to 1 to cause the nwid to not be used.
+This may be useful
+when the device is in promiscuous mode as one can watch for all
+packets and ignore nwid differences.
+.It machdep.wl_xmit_watch <milliseconds>
+This switch is not currently useful.
+.It machdep.wl_gather_snr <milliseconds>
+This switch is not currently useful.
+.Pp
+There is also a signal strength cache in the driver.
+It may be interrogated
+with
+.Xr wlconfig 8 .
+Incoming packets
+are checked for certain hardware radio-modem values including signal
+strength, silence, and quality, which range fro 0..63, 0..63, and 0..15
+respectively.
+Thus one can read out signal strenth values to see
+how close/far peer nodes are.
+The signal strength cache is indexed by
+sender MAC address.
+There are two sysctls that change how it filters packets.
+Both are on
+by default.
+.It machdep.wl_wlcache_mcastonly <0 | 1>
+By default this switch is on.
+It forces the cache to filter out
+unicast packets.
+Only broadcast or multicast packets are accepted.
+.It machdep.wl_wlcache_iponly <0 | 1>
+By default this switch is on.
+It forces the driver to discard non-IP
+packets and also stores the IP src address.
+ARP packets are ignored,
+as are any other network protocol barring IPv4 packets.
+.El
+.Sh SEE ALSO
+.Xr sysctl 8 ,
+.Xr wlconfig 8
+.Pp
+.Pa http://www.wavelan.com
+.Sh HISTORY
+The
+.Nm
+driver was written by
+.An Anders Klemets
+(thousands of years ago?) and
+appears to be based on an even older Intel 82586 driver.
+The 82586
+controller was one of the first (if not the first?) integrated lan
+controller on the block.
+That does not mean it was the best either.
+Anders ported and or created a driver for the ISA wavelan and PCCARD
+wavelan system too (wlp).
+.An Robert T. Morris, Jr.
+ported the Mach drivers to BSDI.
+.An Jim Binkley
+ported them to
+.Fx 2.1 .
+.An Michael Smith
+ported the wl driver only to 2.2.2.
+Jim and Michael have been
+maintaining them.
+The current state of the driver is NOT ANYONE'S
+FAULT.
+Thanks to
+.An Bernie Doehner
+and
+.An Robert Buaas
+for contributions.
+.Sh AUTHORS
+Too numerous to mention.
+See above.
+.Sh CAVEATS
+The 82586 has numerous defects.
+It may experience transmit-side
+errors when modern faster cpus send packets at it faster than it can handle.
+The driver (and probably the chip) does not support an all multicast mode.
+As a result, it can be used with applications like
+.Xr mrouted 8 Pq Pa ports/net/mrouted ,
+but it must go into promiscuous mode for that to work.
+The driver
+is slow to change modes from "normal" to promiscuous mode, presumably
+due to delays in the configuration code.
diff --git a/share/man/man4/man4.powerpc/Makefile b/share/man/man4/man4.powerpc/Makefile
new file mode 100644
index 0000000..09d8b70
--- /dev/null
+++ b/share/man/man4/man4.powerpc/Makefile
@@ -0,0 +1,18 @@
+# $FreeBSD$
+
+MAN= adb.4 \
+ akbd.4 \
+ abtn.4 \
+ ams.4 \
+ bm.4 \
+ cuda.4 \
+ pmu.4 \
+ powermac_nvram.4 \
+ smu.4 \
+ snd_ai2s.4 \
+ snd_davbus.4 \
+ tsec.4
+
+MANSUBDIR=/powerpc
+
+.include <bsd.prog.mk>
diff --git a/share/man/man4/man4.powerpc/abtn.4 b/share/man/man4/man4.powerpc/abtn.4
new file mode 100644
index 0000000..670f5a27
--- /dev/null
+++ b/share/man/man4/man4.powerpc/abtn.4
@@ -0,0 +1,115 @@
+.\"-
+.\" Copyright (c) 2011 Justin Hibbits
+.\" Copyright (c) 2009 Nathan Whitehorn <nwhitehorn@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 16, 2011
+.Dt ABTN 4
+.Os
+.Sh NAME
+.Nm abtn
+.Nd ADB Keyboard Special Keys Driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device adb"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the extended Fn keys on Apple notebooks with an ADB
+interface.
+.Sh HARDWARE
+The
+.Nm
+driver supports extended keyboard keys (special F-keys) on the following devices:
+.Pp
+.Bl -bullet -compact
+.It
+Apple iBook Keyboard
+.It
+Apple PowerBook Keyboard
+.El
+.Sh EVENTS
+The
+.Nm
+driver sends events to
+.Xr devd 8
+for the following events under the
+.Cd PMU
+system, and
+.Cd keys
+subsystem:
+.Pp
+.Bl -bullet -compact
+.It
+.Cd brightness
+- Generates
+.Cd up
+and
+.Cd down
+notify types matching the pressed key.
+.It
+.Cd mute
+.It
+.Cd volume
+- Generates
+.Cd up
+and
+.Cd down
+notify types matching the pressed key.
+.It
+.Cd eject
+.El
+.Pp
+Examples are included in /etc/devd/apple.conf.
+.Sh SEE ALSO
+.Xr adb 4 ,
+.Xr akbd 4 ,
+.Xr cuda 4 ,
+.Xr pmu 4 ,
+.Xr devd 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Nx 5.0
+and was ported to
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Tsubai Masanari
+for
+.Nx
+and ported to
+.Fx
+by
+.An Justin Hibbits .
diff --git a/share/man/man4/man4.powerpc/adb.4 b/share/man/man4/man4.powerpc/adb.4
new file mode 100644
index 0000000..eb34eca
--- /dev/null
+++ b/share/man/man4/man4.powerpc/adb.4
@@ -0,0 +1,70 @@
+.\"-
+.\" Copyright (c) 2009 Nathan Whitehorn <nwhitehorn@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 3, 2009
+.Dt ADB 4
+.Os
+.Sh NAME
+.Nm adb
+.Nd Apple Desktop Bus
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device adb"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Apple Desktop Bus, which is a simple
+multi-drop bus used in general for input peripherals in older Apple
+Macintosh hardware.
+.Pp
+The Apple Desktop Bus provides attachment for up to 16 devices,
+including multiple devices of a single type, but not does support
+hot-plugging.
+.Sh SEE ALSO
+Apple Tech Note HW01: ADB - The Untold Story: Space Aliens Ate My Mouse:
+.Pa http://developer.apple.com/legacy/mac/library/technotes/hw/hw_01.html
+.Pp
+.Xr akbd 4 ,
+.Xr ams 4 ,
+.Xr cuda 4 ,
+.Xr pmu 4
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Nathan Whitehorn
+.Aq nwhitehorn@FreeBSD.org .
diff --git a/share/man/man4/man4.powerpc/akbd.4 b/share/man/man4/man4.powerpc/akbd.4
new file mode 100644
index 0000000..e56676a
--- /dev/null
+++ b/share/man/man4/man4.powerpc/akbd.4
@@ -0,0 +1,105 @@
+.\"-
+.\" Copyright (c) 2009 Nathan Whitehorn <nwhitehorn@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 3, 2009
+.Dt AKBD 4
+.Os
+.Sh NAME
+.Nm akbd
+.Nd ADB Keyboard Driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device adb"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for all keyboards attached to the Apple Desktop
+Bus (ADB).
+.Sh HARDWARE
+Devices supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Apple Extended Keyboard
+.It
+Apple Keyboard II
+.It
+Apple iBook Keyboard
+.It
+Apple PowerBook Keyboard
+.El
+.Sh EVENTS
+The
+.Nm
+driver sends events to
+.Xr devd 8
+for the following events under the
+.Cd PMU
+system:
+.Pp
+.Bl -bullet -compact
+.It
+Power button -
+.Cd "Button"
+subsystem,
+.Cd "pressed"
+type.
+.El
+.Sh SYSCTL VARIABLES
+The
+.Nm
+driver supports the following sysctl variable for configuring the Fn keys:
+.Bl -tag -width indent
+.It Va dev.akbd.%d.fn_keys_function_as_primary
+Set the Fn keys to be their F-key type as default. A value of 0 causes the
+F-keys keys to work as special keys by default (
+.Xr abtn 4 )
+and a value of 1 sets them to behave as F-keys by default.
+.El
+.Sh SEE ALSO
+.Xr abtn 4 ,
+.Xr adb 4 ,
+.Xr cuda 4 ,
+.Xr pmu 4
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Nathan Whitehorn
+.Aq nwhitehorn@FreeBSD.org .
diff --git a/share/man/man4/man4.powerpc/ams.4 b/share/man/man4/man4.powerpc/ams.4
new file mode 100644
index 0000000..15560cf
--- /dev/null
+++ b/share/man/man4/man4.powerpc/ams.4
@@ -0,0 +1,87 @@
+.\"-
+.\" Copyright (c) 2009 Nathan Whitehorn <nwhitehorn@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 3, 2009
+.Dt AMS 4
+.Os
+.Sh NAME
+.Nm ams
+.Nd ADB Mouse Driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device adb"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for mice and trackpads attached to the Apple Desktop
+Bus (ADB) implementing both the base and extended ADB mouse protocols.
+.Sh HARDWARE
+Devices supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Apple Mouse
+.It
+ADB Extended Mouse
+.It
+MacAlly 2-Button Mouse
+.It
+Apple iBook Trackpad
+.It
+Apple PowerBook Trackpad
+.El
+.Sh SYSCTL VARIABLES
+.Bl -tag -width indent
+.It Va dev.ams.%d.tapping
+On ADB trackpads, setting this sysctl to 1 causes taps on the trackpad to
+be interpreted as button clicks.
+.El
+.Sh SEE ALSO
+Apple Tech Note HW01: ADB - The Untold Story: Space Aliens Ate My Mouse:
+.Pa http://developer.apple.com/legacy/mac/library/technotes/hw/hw_01.html
+.Pp
+.Xr adb 4 ,
+.Xr cuda 4 ,
+.Xr pmu 4
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Nathan Whitehorn
+.Aq nwhitehorn@FreeBSD.org .
diff --git a/share/man/man4/man4.powerpc/bm.4 b/share/man/man4/man4.powerpc/bm.4
new file mode 100644
index 0000000..9d6a029
--- /dev/null
+++ b/share/man/man4/man4.powerpc/bm.4
@@ -0,0 +1,87 @@
+.\"-
+.\" Copyright (c) 2008 Nathan Whitehorn <nwhitehorn@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 3, 2008
+.Dt BM 4
+.Os
+.Sh NAME
+.Nm bm
+.Nd BMAC Ethernet device driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device bm"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_bm_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the BMac ethernet hardware found mostly in
+G3-based Apple hardware.
+It is a close relative of the Sun HME controller found in contemporary
+Sun workstations.
+.Sh HARDWARE
+Chips supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Apple BMAC Onboard Ethernet
+.It
+Apple BMAC+ Onboard Ethernet
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr hme 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Fx 7.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Nathan Whitehorn
+.Aq nwhitehorn@FreeBSD.org
+based on work by
+.An Peter Grehan
+.Aq grehan@FreeBSD.org .
diff --git a/share/man/man4/man4.powerpc/cuda.4 b/share/man/man4/man4.powerpc/cuda.4
new file mode 100644
index 0000000..f1faaf2
--- /dev/null
+++ b/share/man/man4/man4.powerpc/cuda.4
@@ -0,0 +1,79 @@
+.\"-
+.\" Copyright (c) 2009 Nathan Whitehorn <nwhitehorn@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 3, 2009
+.Dt CUDA 4
+.Os
+.Sh NAME
+.Nm cuda
+.Nd Apple CUDA I/O Controller Driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device adb"
+.Cd "device cuda"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the CUDA VIA (Versatile Interface Attachment)
+chip found in pre-Core99 Apple hardware, such as the Power Macintosh G3.
+.Pp
+The Apple CUDA controller is a multi-purpose ASIC that provides power
+control and an
+.Xr adb 4
+interface.
+.Sh HARDWARE
+Chips supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Apple CUDA I/O Controller
+.El
+.Sh SEE ALSO
+.Xr adb 4
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Nx 4.0 ,
+and then in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Michael Lorenz
+.Aq macallan@NetBSD.org
+and ported to FreeBSD by
+.An Nathan Whitehorn
+.Aq nwhitehorn@FreeBSD.org .
diff --git a/share/man/man4/man4.powerpc/pmu.4 b/share/man/man4/man4.powerpc/pmu.4
new file mode 100644
index 0000000..ab99877
--- /dev/null
+++ b/share/man/man4/man4.powerpc/pmu.4
@@ -0,0 +1,116 @@
+.\"-
+.\" Copyright (c) 2008 Nathan Whitehorn <nwhitehorn@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 6, 2008
+.Dt PMU 4
+.Os
+.Sh NAME
+.Nm pmu
+.Nd Apple PMU99 Power Management Driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device adb"
+.Cd "device pmu"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Power Management Unit (PMU) found in Apple
+Core99 hardware.
+This includes late G3 laptops, all G4 machines, early G5
+desktops and all G5 XServes.
+.Pp
+The Apple PMU controller is a multi-purpose ASIC that provides power
+management and thermal control, as well as an ADB bus for the internal
+keyboard and mouse on laptops.
+.Sh HARDWARE
+Chips supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Apple KeyLargo PMU
+.It
+Apple K2-KeyLargo PMU
+.El
+.Sh SYSCTL VARIABLES
+The
+.Nm
+driver provides power management services in addition to an
+.Xr adb 4
+interface.
+The following sysctls can be used to control the
+power management behavior and to examine current system power and
+thermal conditions.
+.Bl -tag -width indent
+.It Va dev.pmu.%d.server_mode
+Restart after power failure behavior (1 causes system to reboot after power
+cut, 0 causes system to remain off).
+.It Va dev.pmu.%d.batteries.%d.present
+Indicates whether the relevant battery is inserted.
+.It Va dev.pmu.%d.batteries.%d.charging
+Indicates whether the battery is currently charging.
+.It Va dev.pmu.%d.batteries.%d.charge
+The current battery charge, in milliamp hours.
+.It Va dev.pmu.%d.batteries.%d.maxcharge
+The battery's self-reported maximum charge, in milliamp hours.
+.It Va dev.pmu.%d.batteries.%d.rate
+The current into the battery, in milliamps.
+While the battery is discharging,
+this will be negative.
+.It Va dev.pmu.%d.batteries.%d.voltage
+Battery voltage, in millivolts.
+.It Va dev.pmu.%d.batteries.%d.time
+Estimated time until full battery charge (or discharge), in minutes.
+.It Va dev.pmu.%d.batteries.%d.life
+Current fraction of the battery's maximum charge, in percent.
+.El
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr adb 4 ,
+.Xr led 4
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Nx 4.0 ,
+and then in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Michael Lorenz
+.Aq macallan@NetBSD.org
+and ported to FreeBSD by
+.An Nathan Whitehorn
+.Aq nwhitehorn@FreeBSD.org .
diff --git a/share/man/man4/man4.powerpc/powermac_nvram.4 b/share/man/man4/man4.powerpc/powermac_nvram.4
new file mode 100644
index 0000000..9aae920
--- /dev/null
+++ b/share/man/man4/man4.powerpc/powermac_nvram.4
@@ -0,0 +1,65 @@
+.\"-
+.\" Copyright (c) 2006 Maxim Sobolev <sobomax@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 5, 2010
+.Dt POWERMAC_NVRAM 4 powerpc
+.Os
+.Sh NAME
+.Nm powermac_nvram
+.Nd "non-volatile RAM"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device powermac_nvram"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+powermac_nvram_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides access to the Open Firmware configuration NVRAM
+available on the Apple PowerPC-based machines.
+.Sh SEE ALSO
+.Xr eeprom 8 ,
+.Xr nvram 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 7.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Maxim Sobolev Aq sobomax@FreeBSD.org .
diff --git a/share/man/man4/man4.powerpc/smu.4 b/share/man/man4/man4.powerpc/smu.4
new file mode 100644
index 0000000..2550a0d
--- /dev/null
+++ b/share/man/man4/man4.powerpc/smu.4
@@ -0,0 +1,125 @@
+.\"-
+.\" Copyright (c) 2010 Nathan Whitehorn <nwhitehorn@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 22, 2010
+.Dt SMU 4
+.Os
+.Sh NAME
+.Nm smu
+.Nd Apple System Management Unit Driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device smu"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the System Management Unit (SMU) found in many
+Apple G5 systems.
+This includes most Power Macintosh G5 and all iMac G5 systems.
+.Pp
+The Apple SMU controller provides software power management and thermal
+control functionality, and is responsible for managing system cooling
+devices.
+.Sh HARDWARE
+Chips supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Apple System Management Unit
+.El
+.Sh THERMAL MANAGEMENT
+The
+.Nm
+driver provides basic automatic thermal management. Without a userspace
+daemon providing more advanced control, the driver will attempt to maintain
+system temperatures in a conservative range through coarse-grained control of
+system cooling devices (see below). Automatic kernel-level thermal control
+will take over if more than 3 seconds elapses between userspace cooling
+setting adjustments.
+.Sh SYSCTL VARIABLES
+The
+.Nm
+driver provides power management services and thermal readout through a
+sysctl interface.
+The following sysctls can be used to control the
+power management behavior and to examine current system power and
+thermal conditions.
+.Bl -tag -width indent
+.It Va dev.smu.%d.server_mode
+Restart after power failure behavior (1 causes system to reboot after power
+cut, 0 causes system to remain off).
+.It Va dev.smu.%d.target_temp
+Target system temperature, in degrees Celsius. The
+.Nm
+driver will attempt to adjust fans to maintain the temperature of the
+warmest component in the system at or below this level.
+.It Va dev.smu.%d.critical_temp
+System critical temperature, in degrees Celsius. If any component in
+the system exceeds this temperature, the machine will be shut down within
+500 ms.
+.It Va dev.smu.%d.fans.%s.minrpm
+Minimum allowed speed for this fan.
+.It Va dev.smu.%d.fans.%s.maxrpm
+Maximum allowed speed for this fan.
+.It Va dev.smu.%d.fans.%s.rpm
+Current speed for this fan. The fan speed can be adjusted by changing this
+sysctl. If more than 3 seconds elapses between fan speed adjustments, the
+kernel will resume automatic control of the fan.
+.It Va dev.smu.%d.sensors.%s
+Current reading from this sensor. Four sensor types are supported. Temperature
+sensors are in units of degrees Celsius, current sensors in milliamps, voltage
+sensors in millivolts, and power sensors in milliwatts.
+.El
+.Sh LED INTERFACE
+The
+.Nm
+driver provides an
+.Xr led 4
+annunciator interface at
+.Pa /dev/led/sleepled .
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr pmu 4 ,
+.Xr led 4
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Nathan Whitehorn
+.Aq nwhitehorn@FreeBSD.org .
diff --git a/share/man/man4/man4.powerpc/snd_ai2s.4 b/share/man/man4/man4.powerpc/snd_ai2s.4
new file mode 100644
index 0000000..472a518
--- /dev/null
+++ b/share/man/man4/man4.powerpc/snd_ai2s.4
@@ -0,0 +1,88 @@
+.\"-
+.\" Copyright (c) 2009 Nathan Whitehorn <nwhitehorn@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 20, 2009
+.Dt SND_AI2S 4
+.Os
+.Sh NAME
+.Nm snd_ai2s
+.Nd "Apple I2S audio device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_ai2s"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_ai2s_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Apple I2S audio controllers found
+predominantly in G4 and G5 machines, along with the snapper and tumbler
+codecs. Some machines (e.g. the Mac Mini) do not have configurable
+codecs and so lack hardware volume control.
+.Sh HARDWARE
+Chips supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Apple Tumbler Audio
+.It
+Apple Snapper Audio
+.El
+.Sh SEE ALSO
+.Xr sound 4 ,
+.Xr snd_davbus 4
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Nx 2.0
+and then in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Tsubai Masanari
+.Aq tsubai@netbsd.org ,
+and ported to FreeBSD by
+.An Marco Trillo
+.Aq marcotrillo@gmail.com .
+.Sh BUGS
+Recording and operation with non-44.1 Khz audio are not currently supported.
diff --git a/share/man/man4/man4.powerpc/snd_davbus.4 b/share/man/man4/man4.powerpc/snd_davbus.4
new file mode 100644
index 0000000..e220de2
--- /dev/null
+++ b/share/man/man4/man4.powerpc/snd_davbus.4
@@ -0,0 +1,81 @@
+.\"-
+.\" Copyright (c) 2009 Nathan Whitehorn <nwhitehorn@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 20, 2009
+.Dt SND_DAVBUS 4
+.Os
+.Sh NAME
+.Nm snd_davbus
+.Nd "Apple Davbus audio device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_davbus"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_davbus_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Apple Davbus audio controllers found in
+many G3-era Apple machines.
+.Sh HARDWARE
+Chips supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Apple Burgundy Audio
+.It
+Apple Screamer Audio
+.El
+.Sh SEE ALSO
+.Xr sound 4 ,
+.Xr snd_ai2s 4
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Marco Trillo
+.Aq marcotrillo@gmail.com .
+.Sh BUGS
+Recording is not currently supported.
diff --git a/share/man/man4/man4.powerpc/tsec.4 b/share/man/man4/man4.powerpc/tsec.4
new file mode 100644
index 0000000..84db70e
--- /dev/null
+++ b/share/man/man4/man4.powerpc/tsec.4
@@ -0,0 +1,154 @@
+.\"
+.\" Copyright (c) 2009 Semihalf, Rafal Jaworowski
+.\"
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 22, 2009
+.Dt TSEC 4
+.Os
+.Sh NAME
+.Nm tsec
+.Nd "Freescale Three-Speed Ethernet Controller device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device tsec"
+.Cd "device miibus"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the gigabit Ethernet controller integrated in
+some of the Freescale system-on-chip devices.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It autoselect
+Enable autoselection of the media type and options
+.It 10baseT/UTP
+Set 10Mbps operation
+.It 100baseTX
+Set 100Mbps operation
+.It 1000baseT
+Set 1000baseT operation
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It full-duplex
+Set full duplex operation
+.El
+.Pp
+The
+.Nm
+driver supports polled operation when the system is configured with
+DEVICE_POLLING kernel option, see
+.Xr polling 4
+for more details.
+.Pp
+The
+.Nm
+driver supports reception and transmission of extended frames
+for
+.Xr vlan 4 .
+This capability of
+.Nm
+can be controlled by means of the
+.Cm vlanmtu
+parameter
+to
+.Xr ifconfig 8 .
+.Pp
+The
+.Nm
+driver supports interrupts coalescing (IC) so that raising a transmit/receive
+frame interrupt is delayed, if possible, until a threshold-defined period of
+time has elapsed, or a threshold-defined frame counter has been reached
+(whichever occurs first). The following sysctls regulate this behaviour:
+.Bl -tag -width indent
+.It Va dev.tsec.X.int_coal.rx_time
+.It Va dev.tsec.X.int_coal.rx_count
+.It Va dev.tsec.X.int_coal.tx_time
+.It Va dev.tsec.X.int_coal.tx_count
+.Pp
+Value of 0 for either time or count disables IC on the given path. Time value
+1-65535 corresponds to a real time period and is expressed in units equivalent
+to 64 ticks of the TSEC clock. Count 1-255 represents the number of frames
+(note that value of 1 is equivalent to IC disabled). User provided values
+larger than supported will be trimmed to the maximum supported. More details
+are available in the reference manual of the device.
+.El
+.Sh HARDWARE
+Gigabit Ethernet controllers built into the following Freescale
+system-on-chip devices are known to work with the
+.Nm
+driver:
+.Pp
+.Bl -bullet -compact
+.It
+MPC8349
+.It
+MPC8533, MPC8541, MPC8555
+.El
+.Pp
+The enhanced version of the controller (eTSEC), integrated in the following
+devices, is also supported by this driver:
+.Pp
+.Bl -bullet -compact
+.It
+MPC8548, MPC8572
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The base version of
+.Nm
+device driver was written by
+.An Piotr Kruszynski.
+It has been extended with polling and interrupt coalescing support by
+.An Rafal Jaworowski.
+It has been further enhanced with multicast, h/w checksum calculation and vlan
+support by
+.An Piotr Ziecik .
+This manual page was written by
+.An Rafal Jaworowski .
diff --git a/share/man/man4/man4.sparc64/Makefile b/share/man/man4/man4.sparc64/Makefile
new file mode 100644
index 0000000..06d99c0
--- /dev/null
+++ b/share/man/man4/man4.sparc64/Makefile
@@ -0,0 +1,22 @@
+# $FreeBSD$
+
+MAN= auxio.4 \
+ central.4 \
+ clkbrd.4 \
+ creator.4 \
+ ebus.4 \
+ eeprom.4 \
+ fhc.4 \
+ machfb.4 \
+ ofw_console.4 \
+ openfirm.4 \
+ openprom.4 \
+ rtc.4 \
+ sbus.4 \
+ snd_audiocs.4
+
+MLINKS= openfirm.4 openfirmware.4
+
+MANSUBDIR=/sparc64
+
+.include <bsd.prog.mk>
diff --git a/share/man/man4/man4.sparc64/auxio.4 b/share/man/man4/man4.sparc64/auxio.4
new file mode 100644
index 0000000..fb3cdbd
--- /dev/null
+++ b/share/man/man4/man4.sparc64/auxio.4
@@ -0,0 +1,80 @@
+.\"-
+.\" Copyright (c) 2004 Pyun YongHyeon
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 18, 2005
+.Dt AUXIO 4 sparc64
+.Os
+.Sh NAME
+.Nm auxio
+.Nd "Sun Auxiliary I/O"
+.Sh SYNOPSIS
+.Cd "device auxio"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the auxiliary I/O device found on the
+.Tn EBus
+and
+.Tn SBus
+busses of
+.Tn Sun UltraSPARC
+workstation and small server class systems.
+This device contains miscellaneous system controls,
+including the front panel LED.
+This LED can be made to blink by writing
+.Tn ASCII
+strings to the
+.Pa /dev/led/auxioled
+device.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/led/auxioled"
+.It Pa /dev/led/auxioled
+Auxiliary I/O device node
+.El
+.Sh SEE ALSO
+.Xr ebus 4 ,
+.Xr led 4 ,
+.Xr sbus 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Nx 1.5 .
+The first
+.Fx
+version to include it was
+.Fx 5.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Matthew R. Green
+and ported to
+.Fx
+by
+.An Pyun YongHyeon Aq yongari@FreeBSD.org .
diff --git a/share/man/man4/man4.sparc64/central.4 b/share/man/man4/man4.sparc64/central.4
new file mode 100644
index 0000000..3fa09bd
--- /dev/null
+++ b/share/man/man4/man4.sparc64/central.4
@@ -0,0 +1,60 @@
+.\"-
+.\" Copyright (c) 2004 Jason L. Wright (jason@thought.net)
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" from: OpenBSD: central.4,v 1.3 2004/09/24 07:03:47 miod Exp
+.\" $FreeBSD$
+.\"
+.Dd June 18, 2005
+.Dt CENTRAL 4 sparc64
+.Os
+.Sh NAME
+.Nm central
+.Nd "Central host controller and bus"
+.Sh SYNOPSIS
+.Cd "device central"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the
+.Tn Central
+host controller and bus found in
+.Tn Sun Enterprise xx00
+systems.
+It provides an attachment point for the main
+.Xr fhc 4
+.Tn FireHose
+controller used to control board level functions on the host.
+.Sh SEE ALSO
+.Xr fhc 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.1 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An "Jake Burkholder" Aq jake@FreeBSD.org .
diff --git a/share/man/man4/man4.sparc64/clkbrd.4 b/share/man/man4/man4.sparc64/clkbrd.4
new file mode 100644
index 0000000..ad74ee2
--- /dev/null
+++ b/share/man/man4/man4.sparc64/clkbrd.4
@@ -0,0 +1,88 @@
+.\"-
+.\" Copyright (c) 2004 Jason L. Wright (jason@thought.net)
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" from: OpenBSD: clkbrd.4,v 1.2 2005/02/21 11:29:36 jmc Exp
+.\" $FreeBSD$
+.\"
+.Dd June 18, 2005
+.Dt CLKBRD 4 sparc64
+.Os
+.Sh NAME
+.Nm clkbrd
+.Nd "clock board"
+.Sh SYNOPSIS
+.Cd "device clkbrd"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the clock board found in
+.Tn Sun Enterprise xx00
+systems.
+The clock board has three status LEDs labeled
+.Dq Li Power ,
+.Dq Li Failure
+and
+.Dq Li Cycling .
+These LEDs are also mirrored on the main front panel.
+The
+.Dq Li Cycling
+LED can be made to blink by writing
+.Tn ASCII
+strings to the
+.Pa /dev/led/clockboard
+device.
+.Pp
+On attach the
+.Nm
+driver also prints out the number of board slots the chassis provides.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/led/clockboard"
+.It Pa /dev/led/clockboard
+clock board LED device node
+.El
+.Sh SEE ALSO
+.Xr fhc 4 ,
+.Xr led 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 3.7 .
+The first
+.Fx
+version to include it was
+.Fx 6.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An "Jason L. Wright"
+and ported to
+.Fx
+by
+.An "Marius Strobl" Aq marius@FreeBSD.org .
+.Sh CAVEATS
+Hardware management functionality is not implemented.
diff --git a/share/man/man4/man4.sparc64/creator.4 b/share/man/man4/man4.sparc64/creator.4
new file mode 100644
index 0000000..5d7205b
--- /dev/null
+++ b/share/man/man4/man4.sparc64/creator.4
@@ -0,0 +1,88 @@
+.\"-
+.\" Copyright (c) 2002 Jason L. Wright (jason@thought.net)
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" from: OpenBSD: creator.4,v 1.20 2005/03/05 01:48:59 miod Exp
+.\" $FreeBSD$
+.\"
+.Dd June 18, 2005
+.Dt CREATOR 4 sparc64
+.Os
+.Sh NAME
+.Nm creator
+.Nd "accelerated color frame buffer"
+.Sh SYNOPSIS
+.Cd "device creator"
+.Sh DESCRIPTION
+The
+.Tn Sun Creator ,
+.Tn Sun Creator3D
+and
+.Tn Sun Elite3D
+cards are color frame buffers with graphics acceleration available for
+.Tn UltraSPARC
+workstations with
+.Tn UPA
+slots.
+The
+.Nm
+driver interfaces those frame buffers with the
+.Xr syscons 4
+console driver.
+It also provides separate character devices
+.Pa /dev/fb*
+allowing to
+.Xr mmap 2
+these frame buffers
+(used by X11).
+.Sh FILES
+.Bl -tag -width ".Pa /dev/fb*"
+.It Pa /dev/fb*
+.Nm
+device nodes
+.El
+.Sh SEE ALSO
+.Xr machfb 4 ,
+.Xr syscons 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 3.2 .
+The first
+.Fx
+version to include it was
+.Fx 5.2 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An "Jake Burkholder" Aq jake@FreeBSD.org
+roughly based on the
+.Ox
+driver written by
+.An "Jason L. Wright" .
+.Sh CAVEATS
+Font loading and mode switching are not implemented.
diff --git a/share/man/man4/man4.sparc64/ebus.4 b/share/man/man4/man4.sparc64/ebus.4
new file mode 100644
index 0000000..2dd9807
--- /dev/null
+++ b/share/man/man4/man4.sparc64/ebus.4
@@ -0,0 +1,122 @@
+.\"-
+.\" Copyright (c) 1999 Matthew R. Green
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" from: OpenBSD: ebus.4,v 1.6 2004/09/23 18:28:51 jason Exp
+.\" from: NetBSD: ebus.4,v 1.3 2002/03/13 21:42:20 wiz Exp
+.\" $FreeBSD$
+.\"
+.Dd September 1, 2006
+.Dt EBUS 4 sparc64
+.Os
+.Sh NAME
+.Nm ebus
+.Nd "EBus controller and bus"
+.Sh SYNOPSIS
+.Cd "device ebus"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the EBus controller and bus found in most
+.Tn PCI
+based
+.Tn UltraSPARC
+systems.
+The
+.Tn EBus
+bus is designed to provide the ability to put
+.Tn ISA
+and traditional
+.Tn Intel
+style peripherals in a
+.Tn SPARC
+based system with a minimal amount of glue logic.
+In
+.Tn UltraSPARC
+systems it is implemented with either a PCIO or a PCIO-2 chip from
+.Tn Sun Microelectronics .
+The PCIO chip also implements a
+.Xr hme 4
+compatible
+.Tn PCI
+network device.
+The PCIO-2 chip also implements a
+.Xr fwohci 4
+compatible
+.Tn IEEE
+.Tn 1394
+.Tn OHCI
+interface, a
+.Xr gem 4
+compatible
+.Tn PCI
+network device and an
+.Xr ohci 4
+compatible
+.Tn OHCI
+.Tn USB
+controller.
+The
+.Tn EBus
+has four DMA channels,
+similar to the DMA seen in the
+.Xr esp 4
+.Tn SCSI
+DMA.
+.Sh SEE ALSO
+.Xr atkbdc 4 ,
+.Xr auxio 4 ,
+.Xr eeprom 4 ,
+.Xr rtc 4 ,
+.Xr scc 4 ,
+.Xr snd_audiocs 4 ,
+.Xr uart 4
+.Rs
+.%Q "Sun Microelectronics"
+.%T "Peripheral Component Interconnect Input Output Controller"
+.%V "Part No.: 802-7837-01"
+.%D "March 1997"
+.%U "http://www.sun.com/oem/products/manuals/802-7837.pdf"
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Nx 1.5 .
+The first
+.Fx
+version to include it was
+.Fx 5.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An "Matthew R. Green"
+and ported to
+.Fx
+by
+.An "Thomas Moestl" Aq tmm@FreeBSD.org .
diff --git a/share/man/man4/man4.sparc64/eeprom.4 b/share/man/man4/man4.sparc64/eeprom.4
new file mode 100644
index 0000000..58af4e8
--- /dev/null
+++ b/share/man/man4/man4.sparc64/eeprom.4
@@ -0,0 +1,130 @@
+.\"-
+.\" Copyright (c) 2004 Jason L. Wright (jason@thought.net)
+.\" Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" from: OpenBSD: clock.4,v 1.3 2004/09/24 07:04:15 miod Exp
+.\" $FreeBSD$
+.\"
+.Dd February 15, 2006
+.Dt EEPROM 4 sparc64
+.Os
+.Sh NAME
+.Nm eeprom
+.Nd "non-volatile RAM / real time clock"
+.Sh SYNOPSIS
+.Cd "device genclock"
+.Cd "device mk48txx"
+.Cd "device eeprom"
+.Sh DESCRIPTION
+The
+.Nm
+driver is a front-end for the machine-independent
+.Tn Mostek
+MK48Txx driver.
+The
+.Tn Mostek
+MK48Txx driver provides access to the real time clock and the watchdog part
+of the supported chips to
+.Fx
+by interfacing them with the generic clock code and
+.Xr watchdog 4
+respectively.
+.Pp
+.Tn Mostek
+MK48Txx chips providing real time clock functionality are found on the
+.Tn EBus ,
+.Tn FireHose
+and
+.Tn SBus
+busses of
+.Tn UltraSPARC
+systems.
+On systems where the hostid is stored in the NVRAM part of the
+.Tn Mostek
+MK48Txx chip the
+.Nm
+driver prints out the hostid on attach.
+.Pp
+On
+.Tn Sun Enterprise
+250 and 450 systems additionally the watchdog functionality of the
+.Tn Mostek
+MK48Txx chips is available.
+The
+.Nm
+driver automatically registers the watchdog part with
+.Xr watchdog 4
+on these systems.
+Thus it can be used with
+.Xr watchdog 8
+and
+.Xr watchdogd 8 .
+The timeout interval supported by the
+.Tn Mostek
+MK48Txx watchdog is 1/16 second to 128 seconds.
+In the
+.Tn Sun Enterprise
+machines a system reset is triggered when the
+.Tn Mostek
+MK48Txx watchdog times out regardless of what the
+.Tn Open Firmware
+environment variable
+.Va watchdog-reboot?
+is set to.
+.Sh DIAGNOSTICS
+The following driver specific error message may be reported:
+.Bl -diag
+.It "mk48txx_attach: battery low"
+The device signals that its battery is low and should be replaced.
+The
+.Nm
+driver refused to attach the device in this case as the time in the real time
+clock is probably invalid.
+This gives the generic clock code the chance to use another device as the
+system real time clock that otherwise would not have been chosen.
+.El
+.Sh SEE ALSO
+.Xr ebus 4 ,
+.Xr fhc 4 ,
+.Xr rtc 4 ,
+.Xr sbus 4 ,
+.Xr watchdog 4 ,
+.Xr watchdog 8 ,
+.Xr watchdogd 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An "Thomas Moestl" Aq tmm@FreeBSD.org
+based on the
+.Nx
+sparc64 clock code written by
+.An "Paul Kranenburg" .
diff --git a/share/man/man4/man4.sparc64/fhc.4 b/share/man/man4/man4.sparc64/fhc.4
new file mode 100644
index 0000000..3787370
--- /dev/null
+++ b/share/man/man4/man4.sparc64/fhc.4
@@ -0,0 +1,82 @@
+.\"-
+.\" Copyright (c) 2004 Jason L. Wright (jason@thought.net)
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" from: OpenBSD: fhc.4,v 1.5 2004/09/28 21:42:59 jmc Exp
+.\" $FreeBSD$
+.\"
+.Dd June 18, 2005
+.Dt FHC 4 sparc64
+.Os
+.Sh NAME
+.Nm fhc
+.Nd "FireHose controller and bus"
+.Sh SYNOPSIS
+.Cd "device fhc"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the
+.Tn FireHose
+controllers and busses found in
+.Tn Sun Enterprise xx00
+systems.
+These controllers are also used for board level functions on these systems.
+Each board has three status LEDs labeled
+.Dq Li Power ,
+.Dq Li Failure
+and
+.Dq Li Cycling .
+The
+.Dq Li Cycling
+LEDs can be made to blink by writing
+.Tn ASCII
+strings to the
+.Pa /dev/led/board Ns Ar N
+devices where
+.Ar N
+represents the physical slot number of the board.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/led/board Ns Ar N"
+.It Pa /dev/led/board Ns Ar N
+board
+.Ar N
+LED device node
+.El
+.Sh SEE ALSO
+.Xr central 4 ,
+.Xr clkbrd 4 ,
+.Xr eeprom 4 ,
+.Xr led 4 ,
+.Xr uart 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.1 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An "Jake Burkholder" Aq jake@FreeBSD.org .
diff --git a/share/man/man4/man4.sparc64/machfb.4 b/share/man/man4/man4.sparc64/machfb.4
new file mode 100644
index 0000000..c42eb9b
--- /dev/null
+++ b/share/man/man4/man4.sparc64/machfb.4
@@ -0,0 +1,180 @@
+.\"-
+.\" Copyright (c) 2002 Jason L. Wright (jason@thought.net)
+.\" Copyright (c) 2005, 2006 Marius Strobl <marius@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" from: OpenBSD: creator.4,v 1.20 2005/03/05 01:48:59 miod Exp
+.\" $FreeBSD$
+.\"
+.Dd September 2, 2006
+.Dt MACHFB 4 sparc64
+.Os
+.Sh NAME
+.Nm machfb
+.Nd "accelerated color frame buffer"
+.Sh SYNOPSIS
+.Cd "device machfb"
+.Sh DESCRIPTION
+The
+.Tn ATI Mach64
+family of chips are color frame buffers with graphics acceleration.
+The
+.Nm
+driver interfaces those frame buffers with the
+.Xr syscons 4
+console driver.
+.Pp
+.Tn ATI Mach64
+chips are very common as low-end graphics chips in
+.Tn PCI
+based
+.Tn UltraSPARC
+systems.
+They are found on-board in
+.Tn Sun Blade 100 ,
+.Tn Sun Blade 150 ,
+.Tn Sun Ultra 5
+and
+.Tn Sun Ultra 10
+as well as on
+.Tn Sun
+OEM mainboards like the
+.Tn Sun AXe .
+They are also used on add-on cards like the
+.Tn Sun PGX
+and
+.Tn Sun PGX64 .
+.Pp
+The
+.Nm
+driver requires the chip which it is supposed to drive to be also
+supported by the
+.Tn Open Firmware ,
+either by a built-in FCode driver package of the on-board firmware
+or by additional FCode on the add-on card.
+As a matter of course
+.Tn UltraSPARC
+systems with an on-board
+.Tn ATI Mach64 chip
+also have a built-in FCode driver package for this chip.
+There are also mainboards like the
+.Tn Sun AX1105
+and
+.Tn Sun AXi
+boards however,
+which have built-in FCode for certain
+.Tn ATI Mach64
+chips although they are not equipped with an on-board one.
+Mainboards with built-in FCode for certain
+.Tn ATI Mach64
+chips can be used with any add-on card which is based on one of those
+chips,
+including cards which are equipped with x86 firmware and intended for
+use in PCs.
+Otherwise an add-on card which comes with its own FCode like the
+.Tn Sun PGX
+or
+.Tn Sun PGX64
+has to be used.
+.Sh HARDWARE
+The
+.Nm
+driver provides support for the following chips:
+.Pp
+.Bl -bullet -compact
+.It
+.Tn ATI 3D Rage II+
+.It
+.Tn ATI 3D Rage IIC
+.It
+.Tn ATI 3D Rage I/II
+.It
+.Tn ATI 3D Rage LT
+.It
+.Tn ATI 3D Rage LT Pro
+.It
+.Tn ATI 3D Rage Pro
+.It
+.Tn ATI 3D Rage Pro Turbo
+.It
+.Tn ATI Mach64 CT
+.It
+.Tn ATI Mach64 VT
+.It
+.Tn ATI Mach64 VT4
+.It
+.Tn ATI Mach64 VTB
+.It
+.Tn ATI Rage L Mobility
+.It
+.Tn ATI Rage Mobility
+.It
+.Tn ATI Rage Mobility M1
+.It
+.Tn ATI Rage Mobility M3
+.It
+.Tn ATI Rage XC
+.It
+.Tn ATI Rage XL
+.El
+.Pp
+The
+following add-on cards are known to work with the
+.Nm
+driver at this time:
+.Pp
+.Bl -bullet -compact
+.It
+.Tn ATI 3D Charger PCI
+.It
+.Tn Sun PGX 8-Bit Color Frame Buffer
+(part no.\& 370-2256)
+.It
+.Tn Sun PGX64 8/24-Bit Color Frame Buffer
+(part no.\& 370-4362)
+.El
+.Sh SEE ALSO
+.Xr creator 4 ,
+.Xr syscons 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Nx 2.0 .
+The first
+.Fx
+version to include it was
+.Fx 6.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An "Marius Strobl" Aq marius@FreeBSD.org
+based on the
+.Nx
+driver written by
+.An "Bang Jun-Young" .
+.Sh CAVEATS
+Font loading and mode switching are not implemented.
diff --git a/share/man/man4/man4.sparc64/ofw_console.4 b/share/man/man4/man4.sparc64/ofw_console.4
new file mode 100644
index 0000000..9a4513b
--- /dev/null
+++ b/share/man/man4/man4.sparc64/ofw_console.4
@@ -0,0 +1,126 @@
+.\"-
+.\" Copyright (c) 2001 Miodrag Vallat.
+.\" Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistribution of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" from: OpenBSD: pcons.4,v 1.4 2003/06/02 16:16:26 miod Exp
+.\" $FreeBSD$
+.\"
+.Dd June 18, 2005
+.Dt OFW_CONSOLE 4 sparc64
+.Os
+.Sh NAME
+.Nm ofw_console
+.Nd "Open Firmware console"
+.Sh SYNOPSIS
+.Cd "device ofw_console"
+.Cd "options OFWCONS_POLL_HZ=N"
+.Pp
+.Cd "options KDB"
+.Cd "options DDB"
+.Cd "options ALT_BREAK_TO_DEBUGGER"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides a simple text console,
+using the Open Firmware services for input and output.
+It will use the Open Firmware console devices set via the
+.Va input-device
+and
+.Va output-device
+variables.
+.Pp
+This driver is deprecated and only provided as a fallback console mechanism
+if the real console hardware can not be driven by
+.Fx .
+.Pp
+In case the
+.Nm
+console appears to work too slowly, its responsiveness probably can be improved
+by including
+.Cd "options OFWCONS_POLL_HZ=N" .
+When omitted,
+.Dv OFWCONS_POLL_HZ
+defaults to 4.
+For example, on
+.Tn Sun Ultra 2
+a value of 20 or higher works best.
+Too high values, on the other hand, can cause
+.Nm
+to unnecessarily consume CPU.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/keyboard" -compact
+.It Pa /dev/console
+.It Pa /dev/keyboard
+terminal input device in case the console input device is the keyboard
+.It Pa /dev/screen
+terminal output device in case the console output device is the screen
+.It Pa /dev/tty[a-z]
+terminal device in case both the console input and output device is tty[a-z]
+.El
+.Sh SEE ALSO
+.Xr creator 4 ,
+.Xr machfb 4 ,
+.Xr syscons 4 ,
+.Xr uart 4 ,
+.Xr eeprom 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An "Benno Rice" Aq benno@FreeBSD.org .
+.Sh CAVEATS
+Since the Open Firmware will handle BREAK
+(or Stop-A)
+sequences before
+.Nm ,
+the preferred way to enter
+.Xr ddb 4
+when using
+.Nm
+is to include
+.Cd "options ALT_BREAK_TO_DEBUGGER"
+in a ddb-enabled kernel, and enter the alternate BREAK sequence
+(RETURN TILDE CTRL-b).
+.Sh BUGS
+The
+.Nm
+driver
+is not a real
+.Xr tty 4
+driver and is not MPSAFE.
+The
+.Nm
+driver also does not attach to the hardware resources it actually talks to.
+Therefore it cannot be included in the kernel together with real console
+hardware drivers
+like
+.Xr creator 4 ,
+.Xr machfb 4
+and
+.Xr uart 4 .
diff --git a/share/man/man4/man4.sparc64/openfirm.4 b/share/man/man4/man4.sparc64/openfirm.4
new file mode 100644
index 0000000..4b6bde7
--- /dev/null
+++ b/share/man/man4/man4.sparc64/openfirm.4
@@ -0,0 +1,300 @@
+.\"-
+.\" Copyright (c) 1992, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" This software was developed by the Computer Systems Engineering group
+.\" at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+.\" contributed to Berkeley.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" from: @(#)openprom.4 8.1 (Berkeley) 6/5/93
+.\" from: OpenBSD: openprom.4,v 1.9 2004/03/22 22:07:21 miod Exp
+.\"
+.\"-
+.\" Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 1, 2006
+.Dt OPENFIRM 4 sparc64
+.Os
+.Sh NAME
+.Nm openfirm
+.Nd "Open Firmware interface"
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/ioctl.h
+.In dev/ofw/openfirmio.h
+.Sh DESCRIPTION
+The
+.Pa /dev/openfirm
+device is an interface to the
+.Tn Open Firmware
+device tree.
+This interface is similar to the
+.Tn SunOS /
+.Tn Solaris
+compatible
+.Xr openprom 4
+interface and highly stylized.
+It uses
+.Xr ioctl 2
+calls for all operations.
+These calls refer to the nodes in the
+.Tn Open Firmware
+device tree.
+The nodes are represented by package handles,
+which are simply integer values describing data areas.
+Occasionally a package handle of 0 may be used or returned instead,
+as described below.
+.Pp
+The calls that only take and/or return the package handle of a node
+use a pointer to a
+.Vt phandle_t
+for this purpose.
+The others use a pointer to a
+.Vt "struct ofiocdesc"
+descriptor,
+which has the following definition:
+.Bd -literal
+struct ofiocdesc {
+ phandle_t of_nodeid;
+ int of_namelen;
+ const char *of_name;
+ int of_buflen;
+ char *of_buf;
+};
+.Ed
+.Pp
+The
+.Va of_nodeid
+member is the package handle of the node that is passed in or returned.
+Strings are passed in via the
+.Va of_name
+member of
+.Va of_namelen
+length.
+The maximum accepted length of
+.Va of_name
+is
+.Dv OFIOCMAXNAME .
+The
+.Va of_buf
+member is used to return strings except for the
+.Dv OFIOCSET
+call where it is also used to pass in a string.
+In the latter case the maximum accepted length of
+.Va of_buf
+is
+.Dv OFIOCMAXVALUE .
+Generally,
+.Va of_buf
+works in a value-result fashion.
+At entry to the
+.Xr ioctl 2
+call,
+.Va of_buflen
+is expected to reflect the buffer size.
+On return,
+.Va of_buflen
+is updated to reflect the buffer contents.
+.Pp
+The following
+.Xr ioctl 2
+calls are supported:
+.Bl -tag -width ".Dv OFIOCGETOPTNODE"
+.It Dv OFIOCGETOPTNODE
+Uses a
+.Vt phandle_t .
+Takes nothing and returns the package handle of the
+.Pa /options
+node.
+.It Dv OFIOCGETNEXT
+Uses a
+.Vt phandle_t .
+Takes the package handle of a node and returns the package handle of the next
+node in the
+.Tn Open Firmware
+device tree.
+The node following the last node has a package handle of 0.
+The node following the node with the package handle of 0 is the first node.
+.It Dv OFIOCGETCHILD
+Uses a
+.Vt phandle_t .
+Takes the package handle of a node and returns the package handle of the first
+child of that node.
+This child may have siblings.
+These can be determined by using
+.Dv OFIOCGETNEXT .
+If the node does not have a child,
+a package handle of 0 is returned.
+.It Dv OFIOCGET
+Uses a
+.Vt "struct ofiocdesc" .
+Takes the package handle of a node and the name of a property.
+Returns the property value and its length.
+If no such property is associated with that node,
+the length of the value is set to \-1.
+If the named property exists but has no value,
+the length of the value is set to 0.
+.It Dv OFIOCGETPROPLEN
+Uses a
+.Vt "struct ofiocdesc" .
+Takes the package handle of a node and the name of a property.
+Returns the length of the property value.
+This call is the same as
+.Dv OFIOCGET
+except that only the length of the property value is returned.
+It can be used to determine whether a node has a particular property or whether
+a property has a value without the need to provide memory for storing the value.
+.It Dv OFIOCSET
+Uses a
+.Vt "struct ofiocdesc" .
+Takes the package handle of a node,
+the name of a property and a property value.
+Returns the property value and the length that actually have been written.
+The
+.Tn Open Firmware
+may choose to truncate the value if it is too long or write a valid value
+instead if the given value is invalid for the particular property.
+Therefore the returned value should be checked.
+The
+.Tn Open Firmware
+may also completely refuse to write the given value to the property.
+In this case
+.Er EINVAL
+is returned.
+.It Dv OFIOCNEXTPROP
+Uses a
+.Vt "struct ofiocdesc" .
+Takes the package handle of a node and the name of a property.
+Returns the name and the length of the next property of the node.
+If the property referenced by the given name is the last property of the node,
+.Er ENOENT
+is returned.
+.It Dv OFIOCFINDDEVICE
+Uses a
+.Vt "struct ofiocdesc" .
+Takes the name or alias name of a device node.
+Returns package handle of the node.
+If no matching node is found,
+.Er ENOENT
+is returned.
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/openfirm"
+.It Pa /dev/openfirm
+Open Firmware interface node
+.El
+.Sh DIAGNOSTICS
+The following may result in rejection of an operation:
+.Bl -tag -width Er
+.It Bq Er EBADF
+The requested operation requires permissions not specified at the call to
+.Fn open .
+.It Bq Er EINVAL
+The given package handle is not 0 and does not correspond to any valid node,
+or the given package handle is 0 where 0 is not allowed.
+.It Bq Er ENAMETOOLONG
+The given name or value exceeds the maximum allowed length of
+.Dv OFIOCMAXNAME
+and
+.Dv OFIOCMAXVALUE
+bytes respectively.
+.It Bq Er ENOMEM
+The kernel could not allocate memory to copy in data from user-space or to
+retrieve data from the
+.Tn Open Firmware .
+.El
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr openprom 4 ,
+.Xr eeprom 8 ,
+.Xr ofwdump 8
+.Rs
+.%Q "IEEE Standards Organization"
+.%B "IEEE Std 1275-1994:"
+.%B "IEEE Standard for Boot Firmware (Initialization Configuration) Firmware:"
+.%B Core Requirements and Practices"
+.%O ISBN 1-55937-426-8
+.Re
+.Sh HISTORY
+The
+.Nm
+interface first appeared in
+.Nx 1.6 .
+The first
+.Fx
+version to include it was
+.Fx 5.0 .
+.Sh AUTHORS
+The
+.Nm
+interface was ported to
+.Fx
+by
+.An "Thomas Moestl" Aq tmm@FreeBSD.org .
+.Sh CAVEATS
+Due to limitations within
+.Tn Open Firmware
+itself,
+these functions run at elevated priority and may adversely affect system
+performance.
+.Pp
+For at least the
+.Pa /options
+node the property value passed in to the
+.Dv OFIOCSET
+call has to be null-terminated and the value length passed in has to include
+the terminating
+.Ql \e0 .
+However, as with the
+.Dv OFIOCGET
+call,
+the returned value length does not include the terminating
+.Ql \e0 .
diff --git a/share/man/man4/man4.sparc64/openprom.4 b/share/man/man4/man4.sparc64/openprom.4
new file mode 100644
index 0000000..38a2291
--- /dev/null
+++ b/share/man/man4/man4.sparc64/openprom.4
@@ -0,0 +1,240 @@
+.\"-
+.\" Copyright (c) 1992, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" This software was developed by the Computer Systems Engineering group
+.\" at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+.\" contributed to Berkeley.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" from: @(#)openprom.4 8.1 (Berkeley) 6/5/93
+.\" from: OpenBSD: openprom.4,v 1.9 2004/03/22 22:07:21 miod Exp
+.\"
+.\"-
+.\" Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 18, 2005
+.Dt OPENPROM 4 sparc64
+.Os
+.Sh NAME
+.Nm openprom
+.Nd "OPENPROM interface"
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/ioctl.h
+.In dev/ofw/openpromio.h
+.Sh DESCRIPTION
+The
+.Pa /dev/openfirm
+device is a
+.Tn SunOS /
+.Tn Solaris
+compatible interface to the
+.Tn Open Firmware
+device tree.
+This interface is similar to the
+.Xr openprom 4
+interface.
+It uses
+.Xr ioctl 2
+calls for all operations.
+These calls refer to the nodes in the
+.Tn Open Firmware
+device tree.
+However,
+.Fx
+only implements a subset of the
+.Xr ioctl 2
+calls
+.Tn SunOS /
+.Tn Solaris
+does.
+The nodes are represented by integer values,
+which are simply describing data areas.
+Occasionally the number 0 may be used or returned instead,
+as described below.
+.Pp
+All calls use a pointer to a
+.Vt "struct openpromio"
+descriptor,
+which has the following definition:
+.Bd -literal
+struct openpromio {
+ uint32_t oprom_size;
+ char oprom_array[];
+};
+.Ed
+.Pp
+The
+.Va oprom_size
+member refers to the size of
+.Va oprom_array .
+The
+.Va oprom_array
+member actually works like a union.
+Depending on the
+.Xr ioctl 2
+call and whether the
+.Vt "struct openpromio"
+is used to pass in or return data,
+.Va oprom_array
+either contains an integer referring to a node or a string referring to a
+property name or property value.
+The maximum size of
+.Va oprom_array
+is
+.Dv OPROMMAXPARAM .
+.Pp
+The following
+.Xr ioctl 2
+calls are currently implemented:
+.Bl -tag -width ".Dv OPROMGETPROP"
+.It Dv OPROMNEXT
+Takes the number of a node and returns the number of the next node in the
+.Tn Open Firmware
+device tree.
+The node following the last node is number 0.
+The node following number 0 is the first node.
+.It Dv OPROMCHILD
+Takes the number of a node and returns the number of the first child of that
+node.
+This child may have siblings.
+These can be determined by using
+.Dv OPROMNEXT .
+If the node does not have a child,
+0 is returned.
+.It Dv OPROMGETPROP
+Takes the name of a property.
+Returns the property value.
+The
+.Dv OPROMGETPROP
+call refers to the node previously returned by either the
+.Dv OPROMNEXT
+or the
+.Dv OPROMCHILD
+call,
+depending on which one was invoked last.
+If the property referenced by the given name is not associated with that node,
+.Er EINVAL
+is returned.
+If the named property exists but has no value,
+an empty string is returned.
+.It Dv OPROMNXTPROP
+Takes the name of a property.
+Returns the name of the next property of the node.
+As with the
+.Dv OPROMGETPROP
+call,
+the
+.Dv OPROMNXTPROP
+call refers to the node previously returned by either the
+.Dv OPROMNEXT
+or the
+.Dv OPROMCHILD
+call.
+If the property referenced by the given name is the last property of the node,
+an empty string is returned.
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/openprom"
+.It Pa /dev/openprom
+OPENPROM interface node
+.El
+.Sh DIAGNOSTICS
+The following may result in rejection of an operation:
+.Bl -tag -width Er
+.It Bq Er EBUSY
+The
+.Pa /dev/openprom
+node is already opened.
+.It Bq Er EINVAL
+The given node number is not 0 and does not correspond to any valid node,
+or the given node number is 0 where 0 is not allowed,
+or the given size value is invalid,
+or the given property name exceeds the maximum allowed length of
+.Dv OPROMMAXPARAM
+bytes.
+.It Bq Er ENOMEM
+The kernel could not allocate memory to copy in data from user-space or to
+retrieve data from the
+.Tn Open Firmware .
+.El
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr openfirm 4 ,
+.Xr eeprom 8 ,
+.Xr ofwdump 8
+.Sh HISTORY
+The first
+.Fx
+version to include the
+.Nm
+interface was
+.Fx 5.0 .
+.Sh AUTHORS
+The
+.Nm
+interface was written by
+.An "Jake Burkholder" Aq jake@FreeBSD.org .
+.Sh CAVEATS
+Due to limitations within
+.Tn Open Firmware
+itself,
+these functions run at elevated priority and may adversely affect system
+performance.
+.Pp
+The
+.Nm
+interface exists entirely for compatibility with software like X11,
+and only the features that are actually needed for that are implemented.
+The interface sucks too much to actually use,
+new code should use the
+.Xr openfirm 4
+interface instead.
diff --git a/share/man/man4/man4.sparc64/rtc.4 b/share/man/man4/man4.sparc64/rtc.4
new file mode 100644
index 0000000..9117bf3
--- /dev/null
+++ b/share/man/man4/man4.sparc64/rtc.4
@@ -0,0 +1,88 @@
+.\"-
+.\" Copyright (c) 2004 Jason L. Wright (jason@thought.net)
+.\" Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" from: OpenBSD: clock.4,v 1.3 2004/09/24 07:04:15 miod Exp
+.\" $FreeBSD$
+.\"
+.Dd June 18, 2005
+.Dt RTC 4 sparc64
+.Os
+.Sh NAME
+.Nm rtc
+.Nd "non-volatile RAM / real time clock"
+.Sh SYNOPSIS
+.Cd "device genclock"
+.Cd "device mc146818"
+.Cd "device rtc"
+.Sh DESCRIPTION
+The
+.Nm
+driver is a front-end for the machine-independent
+.Tn Motorola
+MC146818 and compatible clocks driver.
+The
+.Tn Motorola
+MC146818 and compatible clocks driver provides access to the real time clock
+part of the chips it supports to
+.Fx
+by interfacing with the generic clock code.
+.Pp
+.Tn Dallas /
+.Tn Maxim Semiconductor
+DS1287 chips
+(those are compatible to the
+.Tn Motorola
+MC146818 clocks)
+are found on the ISA bus of
+.Tn UltraSPARC II
+systems and the EBus bus of
+.Tn UltraSPARC III
+systems.
+.Sh DIAGNOSTICS
+The following driver specific error message may be reported:
+.Bl -diag
+.It "mc146818_attach_attach: battery low"
+The device signals that its battery is low and should be replaced.
+The
+.Nm
+driver refused to attach the device in this case as the time in the real time
+clock is probably invalid.
+This gives the generic clock code the chance to use another device as the
+system real time clock that otherwise would not have been chosen.
+.El
+.Sh SEE ALSO
+.Xr ebus 4 ,
+.Xr eeprom 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.4 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An "Marius Strobl" Aq marius@FreeBSD.org .
diff --git a/share/man/man4/man4.sparc64/sbus.4 b/share/man/man4/man4.sparc64/sbus.4
new file mode 100644
index 0000000..7955727
--- /dev/null
+++ b/share/man/man4/man4.sparc64/sbus.4
@@ -0,0 +1,79 @@
+.\"-
+.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Paul Kranenburg.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" from: OpenBSD: sbus.4,v 1.27 2005/03/05 01:44:48 miod Exp
+.\" from: NetBSD: sbus.4,v 1.5 2002/01/21 17:54:10 wiz Exp
+.\" $FreeBSD$
+.\"
+.Dd September 1, 2006
+.Dt SBUS 4 sparc64
+.Os
+.Sh NAME
+.Nm sbus
+.Nd SBus controller and bus
+.Sh SYNOPSIS
+.Cd "device sbus"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the SBus controllers and busses found in older
+.Tn UltraSPARC
+workstations and small to medium server class systems.
+The SBus is an I/O interconnect bus supporting both on-board peripherals and
+extension boards.
+The SBus specifications define the bus protocol as well as the electrical and
+mechanical properties of the extension slots.
+.Sh SEE ALSO
+.Xr auxio 4 ,
+.Xr eeprom 4 ,
+.Xr esp 4 ,
+.Xr hme 4 ,
+.Xr isp 4 ,
+.Xr le 4 ,
+.Xr scc 4 ,
+.Xr snd_audiocs 4 ,
+.Xr uart 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Nx 1.3 .
+The first
+.Fx
+version to include it was
+.Fx 5.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An "Paul Kranenburg"
+and ported to
+.Fx
+by
+.An "Thomas Moestl" Aq tmm@FreeBSD.org .
diff --git a/share/man/man4/man4.sparc64/snd_audiocs.4 b/share/man/man4/man4.sparc64/snd_audiocs.4
new file mode 100644
index 0000000..5fcc44a
--- /dev/null
+++ b/share/man/man4/man4.sparc64/snd_audiocs.4
@@ -0,0 +1,88 @@
+.\"-
+.\" Copyright (c) 2004 Pyun YongHyeon
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2005
+.Dt SND_AUDIOCS 4 sparc64
+.Os
+.Sh NAME
+.Nm snd_audiocs
+.Nd "Crystal Semiconductor CS4231 audio device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_audiocs"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_audiocs_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to the CS4231 audio device.
+Speaker output is enabled by default.
+SBus based
+.Tn UltraSPARC
+workstations have no internal CD-ROM audio input capability.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following audio devices:
+.Pp
+.Bl -bullet -compact
+.It
+CS4231 on SBus based UltraSPARC
+.It
+CS4231 on PCI/EBus based UltraSPARC
+.El
+.Sh SEE ALSO
+.Xr ebus 4 ,
+.Xr sbus 4 ,
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was ported by
+.An Pyun YongHyeon
+.Aq yongari@FreeBSD.org
+from the
+.Ox
+driver written by
+.An Jason L. Wright .
diff --git a/share/man/man4/mcd.4 b/share/man/man4/mcd.4
new file mode 100644
index 0000000..8efa7db
--- /dev/null
+++ b/share/man/man4/mcd.4
@@ -0,0 +1,169 @@
+.\"
+.\" Copyright (c) 1994 Keith E. Walker
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 8, 1994
+.Dt MCD 4
+.Os
+.Sh NAME
+.Nm mcd
+.Nd Mitsumi CD-ROM driver
+.Sh SYNOPSIS
+.Cd "device mcd"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.mcd.0.at="isa"
+.Cd hint.mcd.0.port="0x300"
+.Cd hint.mcd.0.irq="10"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides a data and audio interface to the Mitsumi-brand CD-ROM
+player.
+The CD-ROM player must be interfaced to the ISA bus through
+one of the Mitsumi proprietary controller boards.
+The controller
+boards supported are the LU002S, LU005S, the FX001 and the quite
+common FX001D.
+.Pp
+The
+.Nm
+driver responds to disk-specific
+.Fn ioctl
+commands, namely the
+.Dv DIOCGDINFO ,
+.Dv DIOCGPART ,
+.Dv DIOCWDINFO ,
+and
+.Dv DIOCSDINFO ,
+commands.
+Other disk-specific
+.Fn ioctl
+commands will return an error.
+.Pp
+The
+.Nm
+driver also responds to special CD-ROM
+.Fn ioctl
+commands.
+These commands
+control the CD-ROM player's audio features.
+The commands are:
+.Pp
+.Bl -tag -width CDIOCREADSUBCHANNEL -compact -offset indent
+.It CDIOCREADSUBCHANNEL
+get sub-channel information on current status of disc playing
+.It CDIOCREADTOCHEADER
+get table of contents header
+.It CDIOCREADTOCENTRYS
+gets all of the table of contents
+.It CDIOCPLAYTRACKS
+begins audio playing at location specified
+.It CDIOCPLAYBLOCKS
+fails with error
+.Er EINVAL
+.It CDIOCPLAYMSF
+begins audio playing at location specified
+.It CDIOCRESUME
+resumes playing a previously paused disc
+.It CDIOCPAUSE
+pauses a playing disc
+.It CDIOCSTART
+begins playing a disc
+.It CDIOCSTOP
+stops a previously playing disc
+.It CDIOCEJECT
+opens the disc tray (there is no support for a corresponding un-eject
+command).
+.It CDIOCRESET
+stops any play and resets the Mitsumi controller board
+.It CDIOCSETDEBUG
+cause the kernel to print debug messages to the console about the
+.Nm
+driver
+.It CDIOCCLRDEBUG
+cause the kernel to quit printing debug messages about the
+.Nm
+driver
+.El
+.Pp
+The
+.Fn ioctl
+commands defined above are the only ones that the
+.Nm
+driver supports.
+There are other CD-ROM related
+.Fn ioctl
+commands (such as
+.Dv CDIOCSETVOL
+and
+.Dv CDIOCSETSTERIO )
+which are available
+and may be supported by future versions of the driver.
+.Sh FILES
+.Bl -tag -width /dev/(r)mcd0a -compact
+.It Pa /dev/(r)mcd0a
+accesses
+.Bx
+partition on the disc.
+Normally, there is only
+one file system on a CD-ROM disc.
+.It Pa /dev/(r)mcd0c
+accesses raw device.
+.El
+.Sh NOTES
+The character-mode devices for the
+.Nm
+driver should only be used for accessing the audio features of the
+CD-ROM player as the performance on data is abysmal.
+.Pp
+The current version of the driver uses neither the DMA or IRQ
+features of the interface board, although it has an interrupt handler
+for any IRQ requests that are generated.
+Until the DMA features are
+supported, the only interrupts that the board generates are those that
+are not supported by the driver anyway.
+.Sh SEE ALSO
+.In sys/cdio.h
+.Sh HISTORY
+An
+.Nm
+driver appeared in
+.Fx 1.0 .
+.Sh AUTHORS
+.An -nosplit
+The driver was written by
+.An Holger Veit
+(data part) and
+.An Brian Moore
+(audio part).
+Changes were provided by
+.An Gary Clark II ,
+.An Andrew A. Chernov ,
+and
+.An Jordan K. Hubbard .
diff --git a/share/man/man4/md.4 b/share/man/man4/md.4
new file mode 100644
index 0000000..49b0069
--- /dev/null
+++ b/share/man/man4/md.4
@@ -0,0 +1,114 @@
+.\" ----------------------------------------------------------------------------
+.\" "THE BEER-WARE LICENSE" (Revision 42):
+.\" <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
+.\" can do whatever you want with this stuff. If we meet some day, and you think
+.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
+.\" ----------------------------------------------------------------------------
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 30, 2007
+.Dt MD 4
+.Os
+.Sh NAME
+.Nm md
+.Nd memory disk
+.Sh SYNOPSIS
+.Cd device md
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for four kinds of memory backed virtual disks:
+.Bl -tag -width preload
+.It Cm malloc
+Backing store is allocated using
+.Xr malloc 9 .
+Only one malloc-bucket is used, which means that all
+.Nm
+devices with
+.Cm malloc
+backing must share the malloc-per-bucket-quota.
+The exact size of this quota varies, in particular with the amount
+of RAM in the
+system.
+The exact value can be determined with
+.Xr vmstat 8 .
+.It Cm preload
+A file loaded by
+.Xr loader 8
+with type
+.Sq md_image
+is used for backing store.
+For backwards compatibility the type
+.Sq mfs_root
+is also recognized.
+If the kernel is created with option
+.Dv MD_ROOT
+the first preloaded image found will become the root file system.
+.It Cm vnode
+A regular file is used as backing store.
+This allows for mounting ISO images without the tedious
+detour over actual physical media.
+.It Cm swap
+Backing store is allocated from buffer memory.
+Pages get pushed out to the swap when the system is under memory
+pressure, otherwise they stay in the operating memory.
+Using
+.Cm swap
+backing is generally preferable over
+.Cm malloc
+backing.
+.El
+.Pp
+For more information, please see
+.Xr mdconfig 8 .
+.Sh EXAMPLES
+To create a kernel with a ramdisk or MD file system, your kernel config
+needs the following options:
+.Bd -literal -offset indent
+options MD_ROOT # MD is a potential root device
+options MD_ROOT_SIZE=8192 # 8MB ram disk
+makeoptions MFS_IMAGE=/h/foo/ARM-MD
+options ROOTDEVNAME=\\"ufs:md0\\"
+.Ed
+.Pp
+The image in
+.Pa /h/foo/ARM-MD
+will be loaded as the initial image each boot.
+To create the image to use, please follow the steps to create a file-backed
+disk found in the
+.Xr mdconfig 8
+man page.
+Other tools will also create these images, such as NanoBSD.
+.Sh SEE ALSO
+.Xr disklabel 8 ,
+.Xr fdisk 8 ,
+.Xr loader 8 ,
+.Xr mdconfig 8 ,
+.Xr mdmfs 8 ,
+.Xr newfs 8 ,
+.Xr vmstat 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.0
+as a cleaner replacement
+for the MFS functionality previously used in
+.Tn PicoBSD
+and in the
+.Fx
+installation process.
+.Pp
+The
+.Nm
+driver did a hostile takeover of the
+.Xr vn 4
+driver in
+.Fx 5.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Poul-Henning Kamp
+.Aq phk@FreeBSD.org .
diff --git a/share/man/man4/mem.4 b/share/man/man4/mem.4
new file mode 100644
index 0000000..94da2aa
--- /dev/null
+++ b/share/man/man4/mem.4
@@ -0,0 +1,207 @@
+.\" Copyright (c) 1991 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)mem.4 5.3 (Berkeley) 5/2/91
+.\" $FreeBSD$
+.\"
+.Dd October 3, 2004
+.Dt MEM 4
+.Os
+.Sh NAME
+.Nm mem ,
+.Nm kmem
+.Nd memory files
+.Sh SYNOPSIS
+.Cd "device mem"
+.Sh DESCRIPTION
+The special file
+.Pa /dev/mem
+is an interface to the physical memory of the computer.
+Byte offsets in this file are interpreted as physical memory addresses.
+Reading and writing this file is equivalent to reading and writing
+memory itself.
+Only offsets within the bounds of
+.Pa /dev/mem
+are allowed.
+.Pp
+Kernel virtual memory is accessed through the interface
+.Pa /dev/kmem
+in the same manner as
+.Pa /dev/mem .
+Only kernel virtual addresses that are currently mapped to memory are allowed.
+.Pp
+On
+.Tn ISA
+the
+.Tn I/O
+memory space begins at physical address 0x000a0000
+and runs to 0x00100000.
+The
+per-process data
+size
+for the current process
+is
+.Dv UPAGES
+long, and ends at virtual
+address 0xf0000000.
+.Sh IOCTL INTERFACE
+Several architectures allow attributes to be associated with ranges of physical
+memory.
+These attributes can be manipulated via
+.Fn ioctl
+calls performed on
+.Pa /dev/mem .
+Declarations and data types are to be found in
+.In sys/memrange.h .
+.Pp
+The specific attributes, and number of programmable ranges may vary between
+architectures.
+The full set of supported attributes is:
+.Bl -tag -width indent
+.It Dv MDF_UNCACHEABLE
+The region is not cached.
+.It Dv MDF_WRITECOMBINE
+Writes to the region may be combined or performed out of order.
+.It Dv MDF_WRITETHROUGH
+Writes to the region are committed synchronously.
+.It Dv MDF_WRITEBACK
+Writes to the region are committed asynchronously.
+.It Dv MDF_WRITEPROTECT
+The region cannot be written to.
+.El
+.Pp
+Memory ranges are described by
+.Vt struct mem_range_desc :
+.Bd -literal -offset indent
+uint64_t mr_base; /\(** physical base address \(**/
+uint64_t mr_len; /\(** physical length of region \(**/
+int mr_flags; /\(** attributes of region \(**/
+char mr_owner[8];
+.Ed
+.Pp
+In addition to the region attributes listed above, the following flags
+may also be set in the
+.Fa mr_flags
+field:
+.Bl -tag -width indent
+.It MDF_FIXBASE
+The region's base address cannot be changed.
+.It MDF_FIXLEN
+The region's length cannot be changed.
+.It MDF_FIRMWARE
+The region is believed to have been established by the system firmware.
+.It MDF_ACTIVE
+The region is currently active.
+.It MDF_BOGUS
+We believe the region to be invalid or otherwise erroneous.
+.It MDF_FIXACTIVE
+The region cannot be disabled.
+.It MDF_BUSY
+The region is currently owned by another process and may not be
+altered.
+.El
+.Pp
+Operations are performed using
+.Fa struct mem_range_op :
+.Bd -literal -offset indent
+struct mem_range_desc *mo_desc;
+int mo_arg[2];
+.Ed
+.Pp
+The
+.Dv MEMRANGE_GET
+ioctl is used to retrieve current memory range attributes.
+If
+.Va mo_arg[0]
+is set to 0, it will be updated with the total number of memory range
+descriptors.
+If greater than 0, the array at
+.Va mo_desc
+will be filled with a corresponding number of descriptor structures,
+or the maximum, whichever is less.
+.Pp
+The
+.Dv MEMRANGE_SET
+ioctl is used to add, alter and remove memory range attributes.
+A range
+with the
+.Dv MDF_FIXACTIVE
+flag may not be removed; a range with the
+.Dv MDF_BUSY
+flag may not be removed or updated.
+.Pp
+.Va mo_arg[0]
+should be set to
+.Dv MEMRANGE_SET_UPDATE
+to update an existing or establish a new range, or to
+.Dv MEMRANGE_SET_REMOVE
+to remove a range.
+.Sh RETURN VALUES
+.Bl -tag -width Er
+.It Bq Er EOPNOTSUPP
+Memory range operations are not supported on this architecture.
+.It Bq Er ENXIO
+No memory range descriptors are available (e.g.\& firmware has not enabled
+any).
+.It Bq Er EINVAL
+The memory range supplied as an argument is invalid or overlaps another
+range in a fashion not supported by this architecture.
+.It Bq Er EBUSY
+An attempt to remove or update a range failed because the range is busy.
+.It Bq Er ENOSPC
+An attempt to create a new range failed due to a shortage of hardware
+resources (e.g.\& descriptor slots).
+.It Bq Er ENOENT
+An attempt to remove a range failed because no range matches the descriptor
+base/length supplied.
+.It Bq Er EPERM
+An attempt to remove a range failed because the range is permanently
+enabled.
+.El
+.Sh FILES
+.Bl -tag -width /dev/kmem -compact
+.It Pa /dev/mem
+.It Pa /dev/kmem
+.El
+.Sh SEE ALSO
+.Xr kvm 3 ,
+.Xr memcontrol 8
+.Sh HISTORY
+The
+.Nm mem
+and
+.Nm kmem
+files appeared in
+.At v6 .
+The ioctl interface for memory range attributes was added in
+.Fx 3.2 .
+.Sh BUGS
+Busy range attributes are not yet managed correctly.
+.Pp
+This device is required for all users of
+.Xr kvm 3
+to operate.
diff --git a/share/man/man4/meteor.4 b/share/man/man4/meteor.4
new file mode 100644
index 0000000..77765de
--- /dev/null
+++ b/share/man/man4/meteor.4
@@ -0,0 +1,873 @@
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 15, 1995
+.Dt METEOR 4
+.Os
+.Sh NAME
+.Nm meteor
+.Nd "video capture driver interface"
+.Sh DESCRIPTION
+The
+.Nm
+driver defined a video capture interface.
+The
+.Nm
+driver is no longer in the tree, but other devices support this interface
+so the interface portion is documented here.
+.Ss Meteor Capture Modes
+The
+.Nm
+capture driver has three modes of capture operation.
+.Bl -enum
+.It
+Conventional
+.Xr read 2
+interface.
+.Pp
+This mode is the easiest and slowest to use.
+This mode is great for
+capturing a single field at little programming cost.
+.Pp
+In this mode, the user opens the device, sets the capture mode
+and size (see:
+.Dv METEORSETGEO
+.Xr ioctl 2
+call), and uses the
+.Xr read 2
+system
+call to load the data into a buffer.
+.Pp
+.Pa meteor_read.c ;
+read 400x300 RGB24 into a viewable PPM file
+.Bd -literal
+#include <sys/fcntl.h>
+#include <machine/ioctl_meteor.h>
+
+extern int errno;
+#define ROWS 300
+#define COLS 400
+#define SIZE (ROWS * COLS * 4)
+main()
+{
+ struct meteor_geomet geo;
+ char buf[SIZE],b[4],header[16],*p;
+ int i,o,c;
+
+ if ((i = open("/dev/meteor0", O_RDONLY)) < 0) {
+ printf("open failed: %d\\n", errno);
+ exit(1);
+ }
+ /* set up the capture type and size */
+ geo.rows = ROWS;
+ geo.columns = COLS;
+ geo.frames = 1;
+ geo.oformat = METEOR_GEO_RGB24 ;
+
+ if (ioctl(i, METEORSETGEO, &geo) < 0) {
+ printf("ioctl failed: %d\\n", errno);
+ exit(1);
+ }
+
+ c = METEOR_FMT_NTSC;
+
+ if (ioctl(i, METEORSFMT, &c) < 0) {
+ printf("ioctl failed: %d\\n", errno);
+ exit(1);
+ }
+
+ c = METEOR_INPUT_DEV0;
+
+ if (ioctl(i, METEORSINPUT, &c) < 0) {
+ printf("ioctl failed: %d\\n", errno);
+ exit(1);
+ }
+
+ if ((c=read(i, &buf[0], SIZE)) < SIZE) {
+ printf("read failed %d %d %d\\n", c, i, errno);
+ close(i);
+ exit(1);
+ }
+ close(i);
+
+ if ((o = open("rgb24.ppm", O_WRONLY | O_CREAT, 0644)) < 0) {
+ printf("ppm open failed: %d\\n", errno);
+ exit(1);
+ }
+
+ /* make PPM header and save to file */
+ strcpy(&header[0], "P6 400 300 255 ");
+ header[2] = header[6] = header[10] = header[14] = '\\n';
+ write (o, &header[0], 15);
+ /* save the RGB data to PPM file */
+ for (p = &buf[0]; p < &buf[SIZE]; ) {
+ b[2] = *p++; /* blue */
+ b[1] = *p++; /* green */
+ b[0] = *p++; /* red */
+ *p++; /* NULL byte */
+ write(o,&b[0], 3); /* not very efficient */
+ }
+ close(o);
+ exit(0);
+}
+.Ed
+.It
+Memory mapped single capture or unsynchronized continuous capture.
+.Pp
+The single capture mode is designed for conferencing tools such as
+.Nm nv .
+These tools need to control the starting of the image capture and also
+need several frames a second.
+The continuous capture mode is designed
+for applications that want free-running data.
+.Pp
+In this mode, the user opens the device, sets the capture mode
+and size (see:
+.Dv METEORSETGEO
+.Xr ioctl 2
+call),
+.Xr mmap 2 Ns s
+the frame buffer
+memory into the user process space, and issues either the
+single-capture or the continuous capture call (see:
+.Dv METEORCAPTUR
+.Xr ioctl 2
+call) to load the data into the memory mapped buffer.
+.Pp
+As explained in the
+.Dv METEORCAPTUR
+.Xr ioctl 2
+call, the single frame capture
+.Xr ioctl 2
+will block until the capture is complete, the continuous capture
+will return immediately.
+.Pp
+.Pa meteor_mmap_single_continuous.c
+.Bd -literal
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/fcntl.h>
+#include <machine/ioctl_meteor.h>
+
+extern int errno;
+#define ROWS 480
+#define COLS 640
+#define SIZE (ROWS * COLS * 2)
+main()
+{
+ struct meteor_geomet geo;
+ char buf[SIZE];
+ char *mmbuf;
+ int i,c;
+
+ if ((i = open("/dev/meteor0", O_RDONLY)) < 0) {
+ printf("open failed\\n");
+ exit(1);
+ }
+
+ geo.rows = ROWS;
+ geo.columns = COLS;
+ geo.frames = 1;
+ geo.oformat = METEOR_GEO_RGB16 ;
+
+ if (ioctl(i, METEORSETGEO, &geo) < 0) {
+ printf("ioctl failed: %d\\n", errno);
+ exit(1);
+ }
+
+ c = METEOR_FMT_NTSC;
+
+ if (ioctl(i, METEORSFMT, &c) < 0) {
+ printf("ioctl failed: %d\\n", errno);
+ exit(1);
+ }
+
+ c = METEOR_INPUT_DEV0;
+
+ if (ioctl(i, METEORSINPUT, &c) < 0) {
+ printf("ioctl failed: %d\\n", errno);
+ exit(1);
+ }
+
+ mmbuf=(char *)mmap((caddr_t)0, SIZE, PROT_READ,
+ MAP_SHARED, i, (off_t)0);
+
+#ifdef SINGLE_MODE
+ /* single frame capture */
+ c = METEOR_CAP_SINGLE ;
+ ioctl(i, METEORCAPTUR, &c); /* wait for the frame */
+
+ /* directly access the frame buffer array data in mmbuf */
+#else
+ /* continuous frame capture */
+ c = METEOR_CAP_CONTINOUS ;
+ ioctl(i, METEORCAPTUR, &c); /* returns immediately */
+
+ /* directly access the frame buffer array data in mmbuf */
+
+ c = METEOR_CAP_STOP_CONT ;
+ ioctl(i, METEORCAPTUR, &c); /* close will also stop capture */
+#endif
+
+ close(i);
+ exit(0);
+}
+.Ed
+.It
+Memory mapped, multi-frame ring buffer synchronize capture.
+.Pp
+This continuous capture mode is synchronized with the application that
+processes up to 32 frames.
+This gives the advantages of both single and
+continuous capture modes.
+.Pp
+The kernel notifies the application of a new data by raising an
+application defined signal.
+The driver also shares a structure with
+the application that allows them to communicate which frame has been
+written by the kernel and which frame has been read by the application.
+.Pp
+The shared structure starts on the first page after your data.
+The
+structure address can be found by calculation:
+.Pp
+.Dl "(number_rows * number_columns * pixel_depth + 4095) & 0xfffff000"
+or
+.Dl "((number_rows * number_columns * pixel_depth + 4095)/4096) * 4096"
+.Pp
+The shared structure is of type
+.Va struct meteor_mem .
+The two most
+important fields are called
+.Va active
+and
+.Va num_active_buf .
+.Va active
+is a bitmap of frames written by the kernel.
+.Va num_active_bufs
+is
+a count of frames marked in the
+.Va active
+field.
+When a frame is read
+in by the driver, the
+.Va num_active_bufs
+count is tested, if this
+count is below the threshold of number of active frames (value
+in
+.Va meteor_mem Ns 's
+.Va hiwat
+variable), the bit representing frame
+number in the buffer is stored in the
+.Va active
+variable, the
+.Va num_active_bufs
+is incremented, the kernel then raises the specified
+signal to activate the user application.
+The user application's
+responsibility when getting the signal is to check the active bitmap
+to determine the lowest active frame, use the data as the application
+desires, clear the bitmap entry for that frame, and decrement the
+.Va num_active_bufs .
+If the threshold of number of active frames
+.Pq Va hiwat
+has been exceeded, no new frames or signal from the kernel will occur
+until the
+.Va num_active_bufs
+is less than or equal to
+.Va lowat .
+.Pp
+The driver loads the frames in a round-robin fashion.
+It is expected
+that the user removes them in the same order.
+The driver does not
+check to see if the frame is already active.
+.Pp
+The
+.Va frame_size
+and number of frames in the buffer are also provided
+to the
+.Va meteor_mem
+structure, but changing these fields in the
+application will not change the operation of the driver.
+.Pp
+In programming for this mode, the user opens the device, sets the
+geometry,
+.Xr mmap 2 Ns s
+the data/common control structure, then starts the
+continuous capture mode.
+A special signal catcher is required to
+process the frames as they are read by the kernel.
+.Pp
+When specifying the geometry (see:
+.Dv METEORSETGEO
+.Xr ioctl 2
+call),
+it
+is important that the number of frames is set greater than 1.
+.Pp
+.Pa skeleton_capture_n.c
+.Bd -literal
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/fcntl.h>
+#include <sys/signal.h>
+#include <machine/ioctl_meteor.h>
+
+int video; /* made global if you wish to stop capture in signal handler */
+caddr_t data_frames;
+struct meteor_mem *common_mem;
+extern int errno;
+
+#define FRAME_MAX
+
+void
+usr2_catcher()
+{
+#ifdef SIGNAL_STOP
+ struct meteor_capframe capframe; /* for ioctl */
+#endif
+ char *frame;
+
+ /* find frame */
+ frame = (char *) (data_frames + sig_cnt * common_mem->frame_size) ;
+
+ /* add frame processing here */
+ /* deactivate frame */
+ common_mem->active &= ~(1 << (sig_cnt % 16));
+ common_mem->num_active_bufs--;
+
+ /* process next frame on next interrupt */
+ sig_cnt = ((sig_cnt+1) % FRAME_MAX);
+
+#ifdef SIGNAL_STOP
+ if (some_condition_requiring_stopping) {
+ capframe.command=METEOR_CAP_STOP_FRAMES;
+
+ if (ioctl(i, METEORCAPFRM, &capframe) < 0) {
+ printf("METEORCAPFRM failed %d\\n", errno);
+ exit(1);
+ }
+ }
+#endif
+}
+
+main()
+{
+ struct meteor_geomet geo;
+ int height, width, depth, frames, size;
+ struct meteor_capframe capframe;
+
+ if ((i = open("/dev/meteor0", O_RDONLY)) < 0) {
+ printf("open failed\\n");
+ exit(1);
+ }
+ printf("test %d %d\\n", errno, i);
+
+ height = geo.rows = 120;
+ width= geo.columns = 320;
+ frames = geo.frames = FRAME_MAX;
+ depth = 2; /* 2 bytes per pixel for RGB*/
+
+
+ geo.oformat = METEOR_GEO_RGB16;
+
+ if (ioctl(i, METEORSETGEO, &geo) < 0) {
+ printf("METEORSETGEO failed %d\\n", errno);
+ exit(1);
+ }
+
+ c = METEOR_FMT_NTSC;
+
+ if (ioctl(i, METEORSFMT, &c) < 0) {
+ printf("ioctl failed: %d\\n", errno);
+ exit(1);
+ }
+
+ c = METEOR_INPUT_DEV0;
+
+ if (ioctl(i, METEORSINPUT, &c) < 0) {
+ printf("ioctl failed: %d\\n", errno);
+ exit(1);
+ }
+
+ size = ((width*height*depth*frames+4095)/4096)*4096;
+ /* add one page after data for meteor_mem */
+ data_frames = mmap((caddr_t)0, size + 4096, PROT_READ | PROT_WRITE,
+ MAP_SHARED, i, (off_t)0);
+
+ if (data_frames == (caddr_t) MAP_FAILED) return (0);
+
+ /* common_mem is located at page following data */
+ common_mem = (struct meteor_mem *) (y + size);
+
+ signal(SIGUSR2, usr2_catcher); /* catch new frame message */
+
+ capframe.command=METEOR_CAP_N_FRAMES;
+ capframe.signal=SIGUSR2;
+ capframe.lowat=12; /* must be < hiwat */
+ capframe.hiwat=14; /* must be < FRAME_MAX */
+
+ /* start the sync capture */
+ if (ioctl(i, METEORCAPFRM, &capframe) < 0) {
+ printf("METEORCAPFRM failed %d\\n", errno);
+ exit(1);
+ }
+
+ /* this is the background working area, or you can sleep */
+
+
+ /* to stop capture */
+ capframe.command=METEOR_CAP_STOP_FRAMES;
+
+ if (ioctl(i, METEORCAPFRM, &capframe) < 0) {
+ printf("METEORCAPFRM failed %d\\n", errno);
+ exit(1);
+ }
+}
+.Ed
+.El
+.Ss Meteor IOCTL Call and Parameters
+The
+.Nm
+capture driver has
+.Xr ioctl 2
+requests for capturing, reading card
+status, for setting and reading the geometry, and for setting and reading the
+attributes.
+.Pp
+.Bf -symbolic
+IT IS VERY IMPORTANT TO CHECK FOR ERRORS ON THESE RETURNING IOCTLs.
+.Ef
+Errors indicate that something is very wrong with the
+.Xr ioctl 2
+and the
+application should not attempt to proceed further with capturing.
+The
+.Nm
+capture driver still makes attempts to stop the next capture step if
+an error occurred in a previous step but was ignored by the application
+programmer.
+.Bl -enum
+.It
+.Xr ioctl 2
+requests
+.Dv METEORSETGEO
+and
+.Dv METEORGETGEO
+.Pp
+.Dv METEORSETGEO
+and
+.Dv METEORGETGEO
+are used to set and read the input
+size, input device, and output format for frame capture.
+.Pp
+These
+.Xr ioctl 2
+routines use the
+.Va meteor_geomet
+structure that has the
+following entries:
+.Bl -tag -width columns
+.It Va rows
+number of rows (lines high) in output image
+.It Va columns
+number of pixels in a row (width) in output image
+.It Va frames
+number of frames in buffer.
+Should be 1, unless using
+the multi-framed synchronous capture mode
+.Pq Dv METEORCAPFRM
+which REQUIRES frames to be larger than 1.
+.Pp
+Note: if
+.Va rows , columns
+or
+.Va frames
+is not changed, then
+the existing values are used.
+The system defaults
+is 640x480x1.
+.It Va oformat
+you may choose one of the following output format:
+.Bl -tag -width METEOR_GEO_YUV_PACKED
+.It Dv METEOR_GEO_RGB16
+(RGB 16 bits xrrrrrgg gggbbbbb default)
+.It Dv METEOR_GEO_RGB24
+(RGB 24 bits packed in 32 bits:
+00000000 rrrrrrrr gggggggg bbbbbbbb)
+.It Dv METEOR_GEO_YUV_PACKED
+(4-2-2 YUV 16 bits packed byte format:
+u0 y0 v0 y1 u1 y2 v1 y3 ...)
+.It Dv METEOR_GEO_YUV_PLANER
+(4-2-2 YUV 16 bits planer format:
+rows * columns bytes of y
+rows * column / 4 bytes of even u
+rows * column / 4 bytes of even v
+rows * column / 4 bytes of odd u
+rows * column / 4 bytes of odd v)
+.El
+.El
+.Pp
+The
+.Dv METEORSETGEO
+.Xr ioctl 2
+will fail if more than one entry from a category
+is selected.
+It is highly recommended that a
+.Dv METEORSETGEO
+is done
+before capturing data because you cannot guarantee the initial mode
+the card.
+.Pp
+The
+.Dv METEORSETGEO
+will also attempt to reallocate a new contiguous
+kernel buffer if the new geometry exceeds the old geometry.
+On the
+other hand, if the new geometry will fit in the existing buffer,
+the existing buffer is used.
+.Pp
+If
+.Dv METEORSETGEO
+fails the
+.Xr ioctl 2
+will return a value of -1 and the
+external variable
+.Va errno
+will be set to:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+invalid
+.Va meteor_geomet
+structure pointer,
+.Va rows , columns , frames
+were invalid.
+.It Bq Er ENOMEM
+could not allocate the contiguous block.
+.El
+.It
+.Xr ioctl 2
+requests
+.Dv METEORSFMT
+and
+.Dv METEORGFMT
+.Pp
+.Dv METEORSFMT
+and
+.Dv METEORGFMT
+are used to set and read the camera input
+standard format.
+.Pp
+Possible formats are:
+.Pp
+.Bl -tag -width METEOR_FMT_AUTOMODE -compact
+.It Dv METEOR_FMT_NTSC
+NTSC (default mode)
+.It Dv METEOR_FMT_PAL
+PAL
+.It Dv METEOR_FMT_SECAM
+SECAM
+.It Dv METEOR_FMT_AUTOMODE
+Autodetect.
+.El
+.It
+.Xr ioctl 2
+requests
+.Dv METEORSINPUT
+and
+.Dv METEORGINPUT
+.Pp
+.Dv METEORSINPUT
+and
+.Dv METEORGINPUT
+are used to set and read the camera
+input device.
+Using the DB9 connector on the
+.Tn Meteor
+card, 4 input
+devices can be connected and an input camera can be selected with this
+.Xr ioctl 2 .
+.Pp
+Possible formats are:
+.Pp
+.Bl -tag -width METEOR_INPUT_DEV_SVIDEO -compact
+.It Dv METEOR_INPUT_DEV0
+(default if none specified)
+.It Dv METEOR_INPUT_DEV_RCA
+(same as METEOR_INPUT_DEV0)
+.It Dv METEOR_INPUT_DEV1
+.It Dv METEOR_INPUT_DEV2
+.It Dv METEOR_INPUT_DEV_SVIDEO
+(same as METEOR_INPUT_DEV2)
+.El
+.It
+.Xr ioctl 2
+request
+.Dv METEORSTATUS
+.Pp
+.Dv METEORSTATUS
+is used to read the status of the
+.Tn Meteor
+capture card
+and returns the following information:
+.Bl -column "METEOR_STATUS_ID_MASK" "\&"
+.It Dv METEOR_STATUS_ID_MASK " 4 bit ID of the SAA7196 scaler chip."
+.Pp
+.It Dv METEOR_STATUS_DIR " 0 = scaler uses internal source."
+.It " 1 = scaler uses external data of expansion bus."
+.Pp
+.It Dv METEOR_STATUS_OEF " 0 = even field detected."
+.It " 1 = odd field detected."
+.Pp
+.It Dv METEOR_STATUS_SVP " VRAM Port state:"
+.It " 0 = inputs HFL and INCADDR inactive."
+.It " 1 = inputs HFL and INCADDR active."
+.Pp
+.It Dv METEOR_STATUS_STTC " 0 = TV horizontal time constant (slow)."
+.It " 1 = VCR horizontal time constant (fast)."
+.Pp
+.It Dv METEOR_STATUS_HCLK " 0 = Horizontal Phase Lock Loop locked."
+.It " 1 = Horizontal Phase Lock Loop unlocked."
+.Pp
+.It Dv METEOR_STATUS_FIDT " 0 = 50 Hz Field detected."
+.It " 1 = 60 Hz Field detected."
+.Pp
+.It Dv METEOR_STATUS_ALTD " 0 = no line alternating color burst detected."
+.It " 1 = line alternating color burst detected (PAL/SECAM)."
+.Pp
+.It Dv METEOR_STATUS_CODE " 0 = no color information detected."
+.It " 1 = color information detected."
+.El
+.It
+.Xr ioctl 2
+request
+.Dv METEORCAPTUR
+.Pp
+.Dv METEORCAPTUR
+is used to single frame capture or unsynchronized
+continuous capture.
+.Pp
+The single frame capture
+.Xr ioctl 2
+request will return only after a
+frame has been captured and transferred to the frame buffer.
+.Pp
+The unsynchronized continuous capture will return immediately and
+data is directly deposited into the buffer when it is available.
+Since this is unsynchronized, it is possible the data is being
+written by the kernel while being read by the application.
+.Pp
+These
+.Xr ioctl 2
+routines use the following settings:
+.Pp
+.Bl -tag -width METEOR_CAP_CONTINOUS -compact
+.It Dv METEOR_CAP_SINGLE
+capture one frame
+.It Dv METEOR_CAP_CONTINOUS
+unsynchronized continuous capture
+.It Dv METEOR_CAP_STOP_CONT
+stop the unsynchronized continuous
+capture
+.El
+.Pp
+If
+.Dv METEORCAPTUR
+fails the
+.Xr ioctl 2
+will return a value of -1 and the
+external variable
+.Va errno
+will be set to:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+invalid capture command value
+.It Bq Er ENXIO
+there is not internal buffer to hold the frame.
+This indicates the previous set geometry
+.Xr ioctl 2
+failed.
+.It Bq Er EIO
+card is already capturing.
+.El
+.It
+.Xr ioctl 2
+request
+.Dv METEORCAPFRM
+.Pp
+.Dv METEORCAPFRM
+is used for synchronous capture of multiple frames.
+.Pp
+This
+.Xr ioctl 2
+routine uses the
+.Va meteor_capture
+structure that has the
+following entries:
+.Bl -tag -width command
+.It Va command
+possible values for
+.Va command
+are:
+.Bl -tag -width METEOR_CAP_STOP_FRAMES
+.It Dv METEOR_CAP_STOP_FRAMES
+stop the capture; does not use the
+other variable in structure.
+.It Dv METEOR_CAP_N_FRAMES
+start the capture using the other
+variables in the structure as inputs
+.El
+.It Va signal
+signal to send to application when a new
+frame has been captured.
+This signal will
+only be raised if the captured frame is saved.
+.It Va lowat
+see below
+.It Va hiwat
+see below
+.El
+.Pp
+When a new frame is completed, the driver checks the current unread
+frame count stored in shared variable (the shared variable is stored
+in the
+.Va meteor_mem
+structure)
+.Va num_active_buf ;
+if the count is larger
+than
+.Va hiwat ,
+the driver will not store any new frames and will not
+send capture signal to the user application until the
+.Va num_active_buf
+is lower than
+.Va lowat .
+.Pp
+If
+.Dv METEORCAPFRM
+fails the
+.Xr ioctl 2
+will return a value of -1 and the
+external variable
+.Va errno
+will be set to:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+invalid meteor_geomet structure pointer or bad command.
+.It Bq Er ENXIO
+there is not internal buffer to hold the frame.
+This indicates the previous set geometry
+.Xr ioctl 2
+failed.
+.It Bq Er EIO
+card is already capturing.
+.El
+.It
+.Xr ioctl 2
+requests
+.Dv METEORSCHCV
+and
+.Dv METEORGCHCV
+.Pp
+.Dv METEORSCHCV
+and
+.Dv METEORGCHCV
+are used to set and get the chrominance
+gain control and effects the UV output amplitude.
+.Pp
+If
+.Dv METEORSCHCV
+or
+.Dv METEORGCHCV
+fails the
+.Xr ioctl 2
+will return a value
+of -1 and the external variable
+.Va errno
+will be set to:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+invalid unsigned char pointer.
+.El
+.It
+.Xr ioctl 2
+requests
+.Dv METEORGHUE
+and
+.Dv METEORSHUE
+.Pp
+.Dv METEORGHUE
+and
+.Dv METEORSHUE
+are used to get and set the hue.
+The
+signed character has legal values are from +127 which represent
++178.6 degrees to -128 which represents -180 degrees.
+.Pp
+If
+.Dv METEORGHUE
+or
+.Dv METEORSHUE
+fails the
+.Xr ioctl 2
+will return a value of
+-1 and the external variable
+.Va errno
+will be set to:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+invalid signed char pointer.
+.El
+.It
+.Xr ioctl 2
+requests
+.Dv METEORSCOUNT
+and
+.Dv METEORGCOUNT
+.Pp
+.Dv METEORGCOUNT
+is used to get the count of frame errors, DMA errors and
+count of the number of frames captured that have occurred since
+the device was opened.
+.Dv METEORSCOUNT
+can be used to reinitialize the
+counters.
+.Pp
+This
+.Xr ioctl 2
+routines use the
+.Va meteor_counts
+structure that has the
+following entries:
+.Bl -tag -width frame_count
+.It Va fifo_errors
+number of FIFO errors since device was opened.
+.It Va dma_errors
+number of DMA errors since device was opened.
+.It Va frame_count
+number of frames captured since device was opened.
+.El
+.Pp
+If
+.Dv METEORSCOUNT
+or
+.Dv METEORGCOUNT
+fails the
+.Xr ioctl 2
+will return a value
+of -1 and the external variable
+.Va errno
+will be set to:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+invalid meteor_counts structure pointer.
+.El
+.El
+.Sh AUTHORS
+.An Jim Lowe Aq james@miller.cs.uwm.edu ,
+.An Mark Tinguely Aq tinguely@plains.nodak.edu
+.Sh BUGS
+The
+.Nm
+driver no longer works at all.
diff --git a/share/man/man4/mfi.4 b/share/man/man4/mfi.4
new file mode 100644
index 0000000..a6d6278
--- /dev/null
+++ b/share/man/man4/mfi.4
@@ -0,0 +1,148 @@
+.\" Copyright (c) 2006 Scott Long
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 15, 2013
+.Dt MFI 4
+.Os
+.Sh NAME
+.Nm mfi
+.Nd "LSI MegaRAID SAS driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device mfi"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mfi_load="YES"
+.Ed
+.Sh DESCRIPTION
+This driver is for LSI's next generation PCI Express SAS RAID controllers.
+Access to RAID arrays (logical disks) from this driver is provided via
+.Pa /dev/mfid?
+device nodes.
+A simple management interface is also provided on a per-controller basis via
+the
+.Pa /dev/mfi?
+device node.
+.Pp
+The
+.Nm
+name is derived from the phrase "MegaRAID Firmware Interface", which is
+substantially different than the old "MegaRAID" interface and thus requires
+a new driver.
+Older SCSI and SATA MegaRAID cards are supported by
+.Xr amr 4
+and will not work with this driver.
+.Pp
+Two sysctls are provided to tune the
+.Nm
+driver's behavior when a request is made to remove a mounted volume.
+By default the driver will disallow any requests to remove a mounted volume.
+If the sysctl
+.Va dev.mfi.%d.delete_busy_volumes
+is set to 1,
+then the driver will allow mounted volumes to be removed.
+.Pp
+A tunable is provided to adjust the
+.Nm
+driver's behaviour when attaching to a card. By default the driver will
+attach to all known cards with high probe priority. If the tunable
+.Va hw.mfi.mrsas_enable
+is set to 1,
+then the driver will reduce its probe priority to allow
+.Cd mrsas
+to attach to the card instead of
+.Nm .
+.Sh HARDWARE
+The
+.Nm
+driver supports the following hardware:
+.Pp
+.Bl -bullet -compact
+.It
+LSI MegaRAID SAS 1078
+.It
+LSI MegaRAID SAS 8408E
+.It
+LSI MegaRAID SAS 8480E
+.It
+LSI MegaRAID SAS 9240
+.It
+LSI MegaRAID SAS 9260
+.It
+Dell PERC5
+.It
+Dell PERC6
+.It
+IBM ServeRAID M1015 SAS/SATA
+.It
+IBM ServeRAID M1115 SAS/SATA
+.It
+IBM ServeRAID M5015 SAS/SATA
+.It
+IBM ServeRAID M5110 SAS/SATA
+.It
+IBM ServeRAID-MR10i
+.It
+Intel RAID Controller SRCSAS18E
+.It
+Intel RAID Controller SROMBSAS18E
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/mfid?" -compact
+.It Pa /dev/mfid?
+array/logical disk interface
+.It Pa /dev/mfi?
+management interface
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "mfid%d: Unable to delete busy device"
+An attempt was made to remove a mounted volume.
+.El
+.Sh SEE ALSO
+.Xr amr 4 ,
+.Xr pci 4 ,
+.Xr mfiutil 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.1 .
+.Sh AUTHORS
+The
+.Nm
+driver and this manual page were written by
+.An Scott Long Aq scottl@FreeBSD.org .
+.Sh BUGS
+The driver does not support big-endian architectures at this time.
diff --git a/share/man/man4/miibus.4 b/share/man/man4/miibus.4
new file mode 100644
index 0000000..2affa56
--- /dev/null
+++ b/share/man/man4/miibus.4
@@ -0,0 +1,188 @@
+.\" Written by Tom Rhodes for the FreeBSD Project.
+.\" Please see the /usr/src/COPYRIGHT file for copyright information.
+.\"
+.\" This document takes information from the IEEE 802.3 Standard
+.\" along with various comments from Peter Wemm, Robert Watson, and Bill Paul.
+.\" Originally this file looked much like the NetBSD mii(4) manual page, but
+.\" I doubt you would ever notice due to large differences.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 15, 2011
+.Dt MIIBUS 4
+.Os
+.Sh NAME
+.Nm miibus
+.Nd IEEE 802.3 Media Independent Interface network bus
+.Sh SYNOPSIS
+For most network interface cards (NIC):
+.Cd "device miibus"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides an interconnection between the Media Access Control (MAC)
+sublayer, the Physical Layer entities (PHY), Station Management (STA)
+entities, and the PHY Layer as defined by the IEEE 802.3 Standard.
+.Pp
+The
+.Nm
+layer allows network device drivers to share common support
+code for various external PHY devices.
+Most 10/100 network interface cards either use an MII transceiver
+or have built-in transceivers that can be programmed using an MII
+interface.
+The
+.Nm
+driver currently handles all of the media detection,
+selection, and reporting using the ifmedia interface.
+A generic driver has been included for all PHYs that are not
+handled by a specific driver, this is possible because all
+10/100 PHYs implement the same general register set along with
+their vendor specific register set.
+.Pp
+The following network device drivers use the
+.Nm
+interface:
+.Pp
+.Bl -tag -compact -width ".Xr fxp 4"
+.It Xr ae 4
+Attansic/Atheros L2 Fast Ethernet
+.It Xr age 4
+Attansic/Atheros L1 Gigabit Ethernet
+.It Xr alc 4
+Atheros AR8131/AR8132 PCIe Ethernet
+.It Xr ale 4
+Atheros AR8121/AR8113/AR8114 PCIe Ethernet
+.It Xr aue 4
+ADMtek USB Ethernet
+.It Xr axe 4
+ASIX Electronics AX88172 USB Ethernet
+.It Xr bce 4
+Broadcom NetXtreme II Gigabit Ethernet
+.It Xr bfe 4
+Broadcom BCM4401 Ethernet
+.It Xr bge 4
+Broadcom BCM570xx Gigabit Ethernet
+.It Xr cas 4
+Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn
+.It Xr dc 4
+DEC/Intel 21143 and various workalikes
+.It Xr ed 4
+NE[12]000, SMC Ultra, 3c503, DS8390 cards
+.It Xr et 4
+Agere ET1310 Gigabit Ethernet
+.It Xr fxp 4
+Intel EtherExpress PRO/100B
+.It Xr gem 4
+Sun ERI, Sun GEM and Apple GMAC Ethernet
+.It Xr hme 4
+Sun HME Ethernet
+.It Xr jme 4
+JMicron JMC250 Gigabit/JMC260 Fast Ethernet
+.It Xr lge 4
+Level 1 LXT1001 NetCellerator Gigabit Ethernet
+.It Xr msk 4
+Marvell/SysKonnect Yukon II Gigabit Ethernet
+.It Xr nfe 4
+NVIDIA nForce MCP Networking Adapter
+.It Xr nge 4
+National Semiconductor DP83820/DP83821 Gigabit Ethernet
+.It Xr pcn 4
+AMD Am79C97x PCI 10/100
+.It Xr re 4
+RealTek 8139C+/8169/8169S/8110S
+.It Xr rl 4
+RealTek 8129/8139
+.It Xr rue 4
+RealTek RTL8150 USB To Fast Ethernet
+.It Xr sf 4
+Adaptec AIC-6915
+.It Xr sge 4
+Silicon Integrated Systems SiS190/191 Ethernet
+.It Xr sis 4
+Silicon Integrated Systems SiS 900/SiS 7016
+.It Xr sk 4
+SysKonnect SK-984x and SK-982x Gigabit Ethernet
+.It Xr ste 4
+Sundance ST201 (D-Link DFE-550TX)
+.It Xr stge 4
+Sundance/Tamarack TC9021 Gigabit Ethernet
+.It Xr tl 4
+Texas Instruments ThunderLAN
+.It Xr tx 4
+SMC EtherPower II (83c170)
+.It Xr udav 4
+Davicom DM9601 USB Ethernet
+.It Xr vge 4
+VIA VT612x PCI Gigabit Ethernet
+.It Xr vr 4
+VIA Rhine, Rhine II
+.It Xr vte 4
+DM&P Vortex86 RDC R6040 Fast Ethernet
+.It Xr wb 4
+Winbond W89C840F
+.It Xr xl 4
+3Com 3c90x
+.El
+.Sh COMPATIBILITY
+The implementation of
+.Nm
+was originally intended to have similar API interfaces
+to
+.Bsx 3.0
+and
+.Nx ,
+but as a result are not well behaved newbus device drivers.
+.Sh SEE ALSO
+.Xr ae 4 ,
+.Xr age 4 ,
+.Xr alc 4 ,
+.Xr ale 4 ,
+.Xr arp 4 ,
+.Xr aue 4 ,
+.Xr axe 4 ,
+.Xr bce 4 ,
+.Xr bfe 4 ,
+.Xr bge 4 ,
+.Xr cas 4 ,
+.Xr dc 4 ,
+.Xr ed 4 ,
+.Xr et 4 ,
+.Xr fxp 4 ,
+.Xr gem 4 ,
+.Xr hme 4 ,
+.Xr jme 4 ,
+.Xr lge 4 ,
+.Xr msk 4 ,
+.Xr netintro 4 ,
+.Xr nfe 4 ,
+.Xr nge 4 ,
+.Xr pcn 4 ,
+.Xr re 4 ,
+.Xr rgephy 4 ,
+.Xr rl 4 ,
+.Xr rue 4 ,
+.Xr sf 4 ,
+.Xr sge 4 ,
+.Xr sis 4 ,
+.Xr sk 4 ,
+.Xr ste 4 ,
+.Xr stge 4 ,
+.Xr tl 4 ,
+.Xr tx 4 ,
+.Xr udav 4 ,
+.Xr vge 4 ,
+.Xr vr 4 ,
+.Xr vte 4 ,
+.Xr wb 4 ,
+.Xr xl 4
+.Sh STANDARDS
+More information on MII can be found in the IEEE 802.3 Standard.
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 3.3 .
+.Sh AUTHORS
+This manual page was written by
+.An Tom Rhodes Aq trhodes@FreeBSD.org .
diff --git a/share/man/man4/mk48txx.4 b/share/man/man4/mk48txx.4
new file mode 100644
index 0000000..303ccc9
--- /dev/null
+++ b/share/man/man4/mk48txx.4
@@ -0,0 +1,228 @@
+.\" $NetBSD: mk48txx.4,v 1.16 2009/04/10 17:14:07 joerg Exp $
+.\"
+.\" Copyright (c) 2000, 2002 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Paul Kranenburg.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 25, 2009
+.Dt MK48TXX 4
+.Os
+.Sh NAME
+.Nm mk48txx
+.Nd
+.Tn Mostek
+time-of-day clock driver
+.Sh SYNOPSIS
+.In sys/eventhandler.h
+.In sys/lock.h
+.In sys/mutex.h
+.In dev/mk48txx/mk48txxvar.h
+.Pp
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device mk48txx"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver is a back-end for several models of
+.Tn Mostek
+time-of-day clock chips.
+It provides access methods to retrieve and set date and time for use with the
+.Dq Li clock
+KOBJ interface.
+.Pp
+To tie an instance of this device to the system, use the
+.Fn mk48txx_attach
+function and the mk48txx_softc structure defined as follows:
+.Pp
+.Ft "int"
+.Fn mk48txx_attach "device_t dev"
+.Bd -literal
+typedef uint8_t (*mk48txx_nvrd_t)(device_t dev, int off);
+typedef void (*mk48txx_nvwr_t)(device_t dev, int off, uint8_t v);
+.Ed
+.Bd -literal
+struct mk48txx_softc {
+ struct resource sc_res;
+ struct mtx sc_mtx;
+ eventhandler_tag sc_wet;
+ const char *sc_model;
+ bus_size_t sc_nvramsz;
+ bus_size_t sc_clkoffset;
+ u_int sc_year0;
+ u_int sc_flag;
+ mk48txx_nvrd_t sc_nvrd;
+ mk48txx_nvwr_t sc_nvwr;
+};
+.Ed
+.Bl -tag -width indent
+.It Fa sc_res
+The bus resource used for accessing the chip's non-volatile memory
+.Pq including the clock registers ,
+which must be supplied by the front-end when using the default access methods
+.Pq see below .
+Otherwise this member is optional.
+.It Fa sc_mtx
+The hardware mutex used when accessing the chip's non-volatile memory
+.Pq including the clock registers ,
+which must be initialized with
+.Dv MTX_DEF
+by the front-end.
+.It Fa sc_wet
+The event handler tag for the watchdog functionality,
+which is registered by the
+.Fn mk48txx_attach
+function if supported by the chip and specified as part of the
+machine-dependent features
+.Pq see below .
+.It Fa sc_model
+The chip model which this instance should serve.
+This member must be set to one of
+.Dq mk48t02 ,
+.Dq mk48t08 ,
+.Dq mk48t18 ,
+or
+.Dq mk48t59
+by the front-end.
+.It Fa sc_nvramsz
+The size of the non-volatile RAM in the
+.Tn Mostek
+chip,
+which is set by the
+.Fn mk48txx_attach
+function.
+.It Fa sc_clkoffset
+The offset into the control registers of the
+.Tn Mostek
+chip,
+which is set by the
+.Fn mk48txx_attach
+function.
+.It Fa sc_year0
+The year offset to be used with the
+.Sq year
+counter of the clock,
+which must be set by the front-end.
+This value is generally dependent on the system configuration in which
+the clock device is mounted.
+For instance, on
+.Tn Sun Microsystems
+machines the convention is to have clock's two-digit year represent
+the year since 1968.
+.It Fa sc_flag
+This flag is used to specify machine-dependent features.
+The following flags are supported:
+.Bl -tag -width ".Dv MK48TXX_WDOG_ENABLE_WDS"
+.It Dv MK48TXX_NO_CENT_ADJUST
+If the resulting date retrieved with the
+.Dq Li clock_gettime() method
+would be earlier than January 1, 1970,
+the driver will assume that the chip's year counter actually represents a
+year in the 21st century.
+This behavior can be overridden by setting this flag,
+which causes the
+.Nm
+driver to respect the clock's century bit instead.
+.It Dv MK48TXX_WDOG_REGISTER
+When this flag is set,
+the
+.Nm
+driver will register as a watchdog via the interface defined in
+.Xr watchdog 9
+if supported by the specific chip model.
+.It Dv MK48TXX_WDOG_ENABLE_WDS
+When this flag is set,
+the
+.Nm
+driver will set the watchdog steering
+.Pq WDS
+bit when enabling the watchdog functionality of the chip.
+enabled
+.Pq see the chip documentation for further information regarding the WDS bit .
+.El
+.It Fa sc_nvread
+.It Fa sc_nvwrite
+These members specify the access methods for reading respectively writing
+clock device registers.
+The default,
+when
+.Dv NULL
+is passed as an access method,
+is to access the chip memory
+.Pq and clock registers
+as if they were direct-mapped using the specified bus resource.
+.Pp
+Otherwise, the driver will call the respective function supplied by the
+front-end to perform the access,
+passing it the offset
+.Va off
+of the chip memory
+.Pq or clock register
+location to be read from or written to, respectively.
+.El
+.Sh HARDWARE
+The following models are supported:
+.Pp
+.Bl -tag -width indent -offset indent -compact
+.It Tn Mostek MK48T02
+.It Tn Mostek MK48T08
+.It Tn Mostek MK48T18
+.It Tn Mostek MK48T59
+.El
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr watchdog 9
+.Sh HISTORY
+The
+.Nm mk48txx
+driver appeared in
+.Nx 1.5 .
+The first
+.Fx
+version to include it was
+.Fx 5.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written for
+.Nx
+by
+.An Paul Kranenburg
+.Aq pk@NetBSD.org .
+It was ported to
+.Fx
+by
+.An Thomas Moestl
+.Aq tmm@FreeBSD.org
+and later on improved by
+.An Marius Strobl
+.Aq marius@FreeBSD.org .
diff --git a/share/man/man4/mld.4 b/share/man/man4/mld.4
new file mode 100644
index 0000000..8d35c05
--- /dev/null
+++ b/share/man/man4/mld.4
@@ -0,0 +1,102 @@
+.\"
+.\" Copyright (c) 2009 Bruce Simpson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the project nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 8, 2013
+.Dt MLD 4
+.Os
+.Sh NAME
+.Nm mld
+.Nd Multicast Listener Discovery Protocol
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In netinet/in.h
+.In netinet/in_systm.h
+.In netinet/ip6.h
+.In netinet/icmp6.h
+.In netinet6/mld6.h
+.Ft int
+.Fn socket AF_INET6 SOCK_RAW IPPROTO_ICMPV6
+.Sh DESCRIPTION
+.Tn MLD
+is a control plane protocol used by IPv6 hosts and routers to
+propagate multicast group membership information.
+Normally this protocol is not used directly, except by the kernel
+itself, in response to multicast membership requests by user
+applications.
+Multicast routing protocol daemons may open a raw socket to directly
+interact with
+.Nm
+and receive membership reports.
+.Pp
+As of
+.Fx 8.0 ,
+MLD version 2 is implemented.
+This adds support for Source-Specific Multicast (SSM), whereby
+applications may communicate to upstream multicast routers that
+they are only interested in receiving multicast streams from
+particular sources.
+The retransmission of state-change reports adds some robustness
+to the protocol.
+.\"
+.Sh SYSCTL VARIABLES
+.Bl -tag -width indent
+.\"
+.It net.inet6.mld.ifinfo
+This opaque read-only variable exposes the per-link MLDv2 status to
+.Xr ifmcstat 8 .
+.\"
+.It net.inet6.mld.gsrdelay
+This variable specifies the time threshold, in seconds, for processing
+Group-and-Source Specific Queries (GSR).
+As GSR query processing requires maintaining state on the host,
+it may cause memory to be allocated, and is therefore a potential
+attack point for Denial-of-Service (DoS).
+If more than one GSR query is received within this threshold,
+it will be dropped, to mitigate the potential for DoS.
+.\"
+.It net.inet6.mld.v1enable
+If this variable is non-zero, then MLDv1 membership queries (and host
+reports) will be processed by this host, and backwards compatibility
+will be enabled until the v1 'Older Version Querier Present' timer expires.
+This sysctl is normally enabled by default.
+.\"
+.El
+.Sh SEE ALSO
+.Xr netstat 1 ,
+.Xr sourcefilter 3 ,
+.Xr icmp6 4 ,
+.Xr inet 4 ,
+.Xr multicast 4 ,
+.Xr ifmcstat 8
+.Sh HISTORY
+The
+.Nm
+manual page appeared in
+.Fx 8.0 .
diff --git a/share/man/man4/mlx.4 b/share/man/man4/mlx.4
new file mode 100644
index 0000000..696d048
--- /dev/null
+++ b/share/man/man4/mlx.4
@@ -0,0 +1,256 @@
+.\"
+.\" Copyright (c) 2003 David O'Brien
+.\" Copyright (c) 2000 Jeroen Ruigrok van der Werven
+.\" Copyright (c) 2000 Michael Smith
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 10, 2004
+.Dt MLX 4
+.Os
+.Sh NAME
+.Nm mlx
+.Nd Mylex DAC-family RAID driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device mlx"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mlx_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Mylex DAC-family PCI to SCSI RAID controllers,
+including versions relabeled by Digital/Compaq.
+.Sh HARDWARE
+Controllers supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Mylex DAC960P
+.It
+Mylex DAC960PD / DEC KZPSC (Fast Wide)
+.It
+Mylex DAC960PDU
+.It
+Mylex DAC960PL
+.It
+Mylex DAC960PJ
+.It
+Mylex DAC960PG
+.It
+Mylex DAC960PU / DEC PZPAC (Ultra Wide)
+.It
+Mylex AcceleRAID 150 (DAC960PRL)
+.It
+Mylex AcceleRAID 250 (DAC960PTL1)
+.It
+Mylex eXtremeRAID 1100 (DAC1164P)
+.It
+RAIDarray 230 controllers, aka the Ultra-SCSI DEC KZPAC-AA (1-ch, 4MB
+cache), KZPAC-CA (3-ch, 4MB), KZPAC-CB (3-ch, 8MB cache)
+.El
+.Pp
+All major firmware revisions (2.x, 3.x, 4.x and 5.x) are supported, however
+it is always advisable to upgrade to the most recent firmware
+available for the controller.
+.Pp
+Compatible Mylex controllers not listed should work, but have not been
+verified.
+.Sh DIAGNOSTICS
+.Ss Controller initialisation phase
+.Bl -diag
+.It mlx%d: controller initialisation in progress...
+.It mlx%d: initialisation complete
+.Pp
+The controller firmware is performing/has completed initialisation.
+.It mlx%d: physical drive %d:%d not responding
+.Pp
+The drive at channel:target is not responding; it may have failed or
+been removed.
+.It mlx%d: spinning up drives...
+.Pp
+Drive startup is in progress; this may take several minutes.
+.It mlx%d: configuration checksum error
+.Pp
+The array configuration has become corrupted.
+.It mlx%d: mirror race recovery in progress
+.It mlx%d: mirror race on a critical system drive
+.It mlx%d: mirror race recovery failed
+.Pp
+These error codes are undocumented.
+.It mlx%d: physical drive %d:%d COD mismatch
+.Pp
+Configuration data on the drive at channel:target does not match the
+rest of the array.
+.It mlx%d: system drive installation aborted
+.Pp
+Errors occurred preventing one or more system drives from being configured.
+.It mlx%d: new controller configuration found
+.Pp
+The controller has detected a configuration on disk which supersedes the
+configuration in its nonvolatile memory.
+It will reset and come up with the new configuration.
+.It mlx%d: FATAL MEMORY PARITY ERROR
+.Pp
+Firmware detected a fatal memory error; the driver will not attempt to
+attach to this controller.
+.It mlx%d: unknown firmware initialisation error %x:%x:%x
+.Pp
+An unknown error occurred during initialisation; it will be ignored.
+.El
+.Ss Driver initialisation/shutdown phase:
+.Bl -diag
+.It mlx%d: can't allocate scatter/gather DMA tag
+.It mlx%d: can't allocate buffer DMA tag
+.It mlx%d: can't allocate s/g table
+.It mlx%d: can't make initial s/g list mapping
+.It mlx%d: can't make permanent s/g list mapping
+.It mlx%d: can't allocate interrupt
+.It mlx%d: can't set up interrupt
+.Pp
+A resource allocation error occurred while initialising the driver;
+initialisation has failed and the driver will not attach to this
+controller.
+.It mlx%d: error fetching drive status
+.Pp
+The current status of all system drives could not be fetched; attachment
+of system drives will be aborted.
+.It mlx%d: device_add_child failed
+.It mlx%d: bus_generic_attach returned %d
+.Pp
+Creation of the system drive instances failed; attachment of one or more
+system drives may have been aborted.
+.It mlxd%d: detaching...
+.Pp
+The indicated system drive is being detached.
+.It mlxd%d: still open, can't detach
+.Pp
+The indicated system drive is still open or mounted;
+the controller cannot be detached.
+.It mlx%d: flushing cache...
+.Pp
+The controller cache is being flushed prior to detach or shutdown.
+.El
+.Ss Operational diagnostics:
+.Bl -diag
+.It mlx%d: ENQUIRY failed - %s
+.It mlx%d: ENQUIRY2 failed
+.It mlx%d: ENQUIRY_OLD failed
+.It mlx%d: FLUSH failed - %s
+.It mlx%d: CHECK ASYNC failed - %s
+.It mlx%d: REBUILD ASYNC failed - %s
+.It mlx%d: command failed - %s
+.Pp
+The controller rejected a command for the reason given.
+.It mlx%d: I/O beyond end of unit (%u,%d > %u)
+.It mlx%d: I/O error - %s
+.Pp
+An I/O error was reported by the controller.
+.It mlx%d: periodic enquiry failed - %s
+.Pp
+An attempt to poll the controller for status failed for the reason given.
+.It mlx%d: mlx_periodic_enquiry: unknown command %x
+.Pp
+The periodic status poll has issued a command which has become corrupted.
+.It mlxd%d: drive offline
+.It mlxd%d: drive online
+.It mlxd%d: drive critical
+.Pp
+The system disk indicated has changed state.
+.It mlx%d: physical drive %d:%d reset
+.It mlx%d: physical drive %d:%d killed %s
+.It "mlx%d: physical drive %d:%d error log: sense = %d asc = %x asq = %x"
+.It "mlx%d: info %4D csi %4D"
+.Pp
+The drive at channel:target has been reset, killed for the given reason,
+or experienced a SCSI error.
+.It mlx%d: unknown log message type %x
+.It mlx%d: error reading message log - %s
+.Pp
+An error occurred while trying to read the controller's message log.
+.It mlxd%d: consistency check started
+.It mlx%d: consistency check completed
+.Pp
+A user-initiated consistency check has started/completed.
+.It mlx%d: drive rebuild started for %d:%d
+.It mlx%d: drive rebuild completed
+.Pp
+A user-initiated physical drive rebuild has started/completed.
+.It mlx%d: background check/rebuild operation started
+.It mlx%d: background check/rebuild operation completed
+.Pp
+An automatic system drive consistency check
+or physical drive rebuild has started/completed.
+.It mlx%d: channel %d pausing for %d seconds
+.It mlx%d: channel %d resuming
+.It mlx%d: pause command failed - %s
+.It mlx%d: pause failed for channel %d
+.It mlx%d: resume command failed - %s
+.It mlx%d: resume failed for channel %d
+.Pp
+Controller/channel pause operation notification.
+(Channel pause is not currently supported on any controller.)
+.It mlx%d: controller wedged (not taking commands)
+.Pp
+The controller is not responding to attempts to submit new commands.
+.It mlx%d: duplicate done event for slot %d
+.It mlx%d: done event for nonbusy slot %d
+.Pp
+Corruption has occurred in either the controller's onboard list of commands
+or in the driver.
+.El
+.Sh SEE ALSO
+.Xr mlxcontrol 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Michael Smith
+.Aq msmith@FreeBSD.org .
+.Pp
+This manual page was written by
+.An Jeroen Ruigrok van der Werven
+.Aq asmodai@FreeBSD.org
+and
+.An Michael Smith
+.Aq msmith@FreeBSD.org .
+.Sh BUGS
+The driver does not yet support EISA adapters.
+The DEC KZPSC has insufficient flash ROM to hold any reasonably recent firmware.
+This has caused problems for this driver.
+.Pp
+The driver does not yet support the version 6.x firmware as found in the
+AcceleRAID 352 and eXtremeRAID 2000 and 3000 products.
diff --git a/share/man/man4/mly.4 b/share/man/man4/mly.4
new file mode 100644
index 0000000..3affcac
--- /dev/null
+++ b/share/man/man4/mly.4
@@ -0,0 +1,272 @@
+.\"
+.\" Copyright (c) 2000 Michael Smith
+.\" Copyright (c) 2000 BSDi
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 10, 2004
+.Dt MLY 4
+.Os
+.Sh NAME
+.Nm mly
+.Nd Mylex AcceleRAID/eXtremeRAID family driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device scbus"
+.Cd "device da"
+.Cd "device mly"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mly_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Mylex AcceleRAID and eXtremeRAID-family
+PCI to SCSI RAID controllers with version 6.00 and later
+firmware.
+.Pp
+Logical devices (array drives) attached to the controller are presented
+to the SCSI subsystem as though they were direct-access devices on a
+virtual SCSI bus.
+Physical devices which are not claimed by a logical
+device are presented on SCSI channels which match the physical channels
+on the controller.
+.Sh HARDWARE
+Controllers supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Mylex AcceleRAID 160
+.It
+Mylex AcceleRAID 170
+.It
+Mylex AcceleRAID 352
+.It
+Mylex eXtremeRAID 2000
+.It
+Mylex eXtremeRAID 3000
+.El
+.Pp
+Compatible Mylex controllers not listed should work, but have not been
+verified.
+.Sh DIAGNOSTICS
+.Ss Controller initialisation phase
+.Bl -diag
+.It "mly%d: controller initialisation started"
+.It "mly%d: initialisation complete"
+.Pp
+The controller firmware has started initialisation.
+Normally this process is performed by the controller BIOS,
+but the driver may need
+to do this in cases where the BIOS has failed, or is not compatible
+(e.g.\& on non-x86 systems).
+.It "mly%d: drive spinup in progress"
+.Pp
+Drive startup is in progress; this may take several minutes.
+.It "mly%d: mirror race recovery failed, one or more drives offline"
+.It "mly%d: mirror race recovery in progress"
+.It "mly%d: mirror race recovery on a critical drive"
+.Pp
+These error codes are undocumented.
+.It "mly%d: FATAL MEMORY PARITY ERROR"
+.Pp
+Firmware detected a fatal memory error; the driver will not attempt to
+attach to this controller.
+.It "mly%d: unknown initialisation code %x"
+.Pp
+An unknown error occurred during initialisation; it will be ignored.
+.El
+.Ss Driver initialisation/shutdown phase
+.Bl -diag
+.It "mly%d: can't enable busmaster feature"
+.It "mly%d: memory window not available"
+.It "mly%d: can't allocate register window"
+.It "mly%d: can't allocate interrupt"
+.It "mly%d: can't set up interrupt"
+.Pp
+The system's PCI BIOS has not correctly configured the controller's
+PCI interface; initialisation has failed and the driver will not
+attach to this controller.
+.It "mly%d: can't allocate parent DMA tag"
+.It "mly%d: can't allocate buffer DMA tag"
+.It "mly%d: can't allocate command packet DMA tag"
+.It "mly%d: can't allocate scatter/gather DMA tag"
+.It "mly%d: can't allocate s/g table"
+.It "mly%d: can't allocate memory mailbox DMA tag"
+.It "mly%d: can't allocate memory mailbox"
+.Pp
+A resource allocation error occurred while initialising the driver;
+initialisation has failed and the driver will not attach to this
+controller.
+.It "mly%d: BTL rescan result corrupted"
+.Pp
+The results of a scan for an attached device were corrupted.
+One or more devices may not be correctly reported.
+.It "mly%d: flushing cache..."
+.Pp
+The controller cache is being flushed prior to detach or shutdown.
+.El
+.Ss Operational diagnostics
+.Bl -diag
+.It "mly%d: physical device %d:%d online"
+.It "mly%d: physical device %d:%d standby"
+.It "mly%d: physical device %d:%d automatic rebuild started"
+.It "mly%d: physical device %d:%d manual rebuild started"
+.It "mly%d: physical device %d:%d rebuild completed"
+.It "mly%d: physical device %d:%d rebuild cancelled"
+.It "mly%d: physical device %d:%d rebuild failed for unknown reasons"
+.It "mly%d: physical device %d:%d rebuild failed due to new physical device"
+.It "mly%d: physical device %d:%d rebuild failed due to logical drive failure"
+.It "mly%d: physical device %d:%d found"
+.It "mly%d: physical device %d:%d gone"
+.It "mly%d: physical device %d:%d unconfigured"
+.It "mly%d: physical device %d:%d expand capacity started"
+.It "mly%d: physical device %d:%d expand capacity completed"
+.It "mly%d: physical device %d:%d expand capacity failed"
+.It "mly%d: physical device %d:%d parity error"
+.It "mly%d: physical device %d:%d soft error"
+.It "mly%d: physical device %d:%d miscellaneous error"
+.It "mly%d: physical device %d:%d reset"
+.It "mly%d: physical device %d:%d active spare found"
+.It "mly%d: physical device %d:%d warm spare found"
+.It "mly%d: physical device %d:%d initialization started"
+.It "mly%d: physical device %d:%d initialization completed"
+.It "mly%d: physical device %d:%d initialization failed"
+.It "mly%d: physical device %d:%d initialization cancelled"
+.It "mly%d: physical device %d:%d write recovery failed"
+.It "mly%d: physical device %d:%d scsi bus reset failed"
+.It "mly%d: physical device %d:%d double check condition"
+.It "mly%d: physical device %d:%d device cannot be accessed"
+.It "mly%d: physical device %d:%d gross error on scsi processor"
+.It "mly%d: physical device %d:%d bad tag from device"
+.It "mly%d: physical device %d:%d command timeout"
+.It "mly%d: physical device %d:%d system reset"
+.It "mly%d: physical device %d:%d busy status or parity error"
+.It "mly%d: physical device %d:%d host set device to failed state"
+.It "mly%d: physical device %d:%d selection timeout"
+.It "mly%d: physical device %d:%d scsi bus phase error"
+.It "mly%d: physical device %d:%d device returned unknown status"
+.It "mly%d: physical device %d:%d device not ready"
+.It "mly%d: physical device %d:%d device not found at startup"
+.It "mly%d: physical device %d:%d COD write operation failed"
+.It "mly%d: physical device %d:%d BDT write operation failed"
+.It "mly%d: physical device %d:%d missing at startup"
+.It "mly%d: physical device %d:%d start rebuild failed due to physical drive too small"
+.It "mly%d: physical device %d:%d sense data received"
+.It "mly%d: sense key %d asc %02x ascq %02x"
+.It "mly%d: info %4D csi %4D"
+.It "mly%d: physical device %d:%d offline"
+.It "mly%d: sense key %d asc %02x ascq %02x"
+.It "mly%d: info %4D csi %4D"
+.Pp
+The reported event refers to the physical device at the given channel:target
+address.
+.It "mly%d: logical device %d (%s) consistency check started"
+.It "mly%d: logical device %d (%s) consistency check completed"
+.It "mly%d: logical device %d (%s) consistency check cancelled"
+.It "mly%d: logical device %d (%s) consistency check completed with errors"
+.It "mly%d: logical device %d (%s) consistency check failed due to logical drive failure"
+.It "mly%d: logical device %d (%s) consistency check failed due to physical device failure"
+.It "mly%d: logical device %d (%s) automatic rebuild started"
+.It "mly%d: logical device %d (%s) manual rebuild started"
+.It "mly%d: logical device %d (%s) rebuild completed"
+.It "mly%d: logical device %d (%s) rebuild cancelled"
+.It "mly%d: logical device %d (%s) rebuild failed for unknown reasons"
+.It "mly%d: logical device %d (%s) rebuild failed due to new physical device"
+.It "mly%d: logical device %d (%s) rebuild failed due to logical drive failure"
+.It "mly%d: logical device %d (%s) offline"
+.It "mly%d: logical device %d (%s) critical"
+.It "mly%d: logical device %d (%s) online"
+.It "mly%d: logical device %d (%s) initialization started"
+.It "mly%d: logical device %d (%s) initialization completed"
+.It "mly%d: logical device %d (%s) initialization cancelled"
+.It "mly%d: logical device %d (%s) initialization failed"
+.It "mly%d: logical device %d (%s) found"
+.It "mly%d: logical device %d (%s) gone"
+.It "mly%d: logical device %d (%s) expand capacity started"
+.It "mly%d: logical device %d (%s) expand capacity completed"
+.It "mly%d: logical device %d (%s) expand capacity failed"
+.It "mly%d: logical device %d (%s) bad block found"
+.It "mly%d: logical device %d (%s) size changed"
+.It "mly%d: logical device %d (%s) type changed"
+.It "mly%d: logical device %d (%s) bad data block found"
+.It "mly%d: logical device %d (%s) read of data block in bdt"
+.It "mly%d: logical device %d (%s) write back data for disk block lost"
+.Pp
+The event report will include the name of the SCSI device which has
+attached to the device if possible.
+.It "mly%d: enclosure %d fan %d failed"
+.It "mly%d: enclosure %d fan %d ok"
+.It "mly%d: enclosure %d fan %d not present"
+.It "mly%d: enclosure %d power supply %d failed"
+.It "mly%d: enclosure %d power supply %d ok"
+.It "mly%d: enclosure %d power supply %d not present"
+.It "mly%d: enclosure %d temperature sensor %d failed"
+.It "mly%d: enclosure %d temperature sensor %d critical"
+.It "mly%d: enclosure %d temperature sensor %d ok"
+.It "mly%d: enclosure %d temperature sensor %d not present"
+.It "mly%d: enclosure %d unit %d access critical"
+.It "mly%d: enclosure %d unit %d access ok"
+.It "mly%d: enclosure %d unit %d access offline"
+.Pp
+These events refer to external enclosures by number.
+The driver does not attempt to name the enclosures.
+.It "mly%d: controller cache write back error"
+.It "mly%d: controller battery backup unit found"
+.It "mly%d: controller battery backup unit charge level low"
+.It "mly%d: controller battery backup unit charge level ok"
+.It "mly%d: controller installation aborted"
+.It "mly%d: controller mirror race recovery in progress"
+.It "mly%d: controller mirror race on critical drive"
+.It "mly%d: controller memory soft ecc error"
+.It "mly%d: controller memory hard ecc error"
+.It "mly%d: controller battery backup unit failed"
+.Pp
+These events report controller status changes.
+.El
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Michael Smith
+.Aq msmith@FreeBSD.org .
+.Pp
+This manual page was written by
+.An Michael Smith
+.Aq msmith@FreeBSD.org .
+.Sh BUGS
+The driver does not yet provide an external management interface.
+.Pp
+Enclosures are not named or otherwise identified in event messages.
diff --git a/share/man/man4/mmc.4 b/share/man/man4/mmc.4
new file mode 100644
index 0000000..95fe976
--- /dev/null
+++ b/share/man/man4/mmc.4
@@ -0,0 +1,60 @@
+.\"
+.\" Copyright (c) 2007 M. Warner Losh
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 8, 2008
+.Dt MMC 4
+.Os
+.Sh NAME
+.Nm mmc
+.Nd MultiMediaCard and SD Card bus driver
+.Sh SYNOPSIS
+.Cd device mmc
+.Sh DESCRIPTION
+The
+.Nm
+driver implements the MMC and SD Card bus.
+The
+.Nm
+driver supports all MMC and SD bridges in the system.
+All SD or MMC cards in the system attach to an instance of
+.Nm .
+The
+.Nm
+bus typically has only one slot, and only memory cards.
+MultiMediaCards exist only in memory.
+SD Cards exist as memory, I/O, or combination cards.
+.Sh SEE ALSO
+.Xr mmcsd 4 ,
+.Xr at91_mci 4 ,
+.Xr sdhci 4
+.Rs
+.%T "SD Specifications, Part 1, Physical Layer, Simplified Specification"
+.Re
+.Rs
+.%T "The MultiMediaCard System Specification"
+.Re
+.Sh BUGS
+SDIO cards currently do not work.
diff --git a/share/man/man4/mmcsd.4 b/share/man/man4/mmcsd.4
new file mode 100644
index 0000000..646e032
--- /dev/null
+++ b/share/man/man4/mmcsd.4
@@ -0,0 +1,48 @@
+.\"
+.\" Copyright (c) 2007 M. Warner Losh
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 22, 2008
+.Dt MMCSD 4
+.Os
+.Sh NAME
+.Nm mmcsd
+.Nd MMC and SD memory card driver.
+.Sh SYNOPSIS
+.Cd device mmcsd
+.Sh DESCRIPTION
+The
+.Nm
+driver implements direct access block device for MMC and SD memory cards.
+.Sh SEE ALSO
+.Xr mmc 4 ,
+.Xr at91_mci 4 ,
+.Xr sdhci 4
+.Rs
+.%T "SD Specifications, Part 1, Physical Layer, Simplified Specification"
+.Re
+.Rs
+.%T "The MultiMediaCard System Specification"
+.Re
diff --git a/share/man/man4/mn.4 b/share/man/man4/mn.4
new file mode 100644
index 0000000..0b88f2f
--- /dev/null
+++ b/share/man/man4/mn.4
@@ -0,0 +1,55 @@
+.\" Copyright (c) 2005 Christian Brueffer
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND ITS AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 10, 2005
+.Dt MN 4
+.Os
+.Sh NAME
+.Nm mn
+.Nd "Siemens Easy321-R1 E1/T1 device driver"
+.Sh SYNOPSIS
+.Cd "device mn"
+.Cd "options NETGRAPH"
+.Sh HARDWARE
+The
+.Nm
+driver provides support for the Siemens Easy321-R1 E1/T1 reference
+design card.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr netintro 4 ,
+.Xr pci 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Poul-Henning Kamp Aq phk@FreeBSD.org .
diff --git a/share/man/man4/mod_cc.4 b/share/man/man4/mod_cc.4
new file mode 100644
index 0000000..204537f
--- /dev/null
+++ b/share/man/man4/mod_cc.4
@@ -0,0 +1,117 @@
+.\"
+.\" Copyright (c) 2010-2011 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This documentation was written at the Centre for Advanced Internet
+.\" Architectures, Swinburne University of Technology, Melbourne, Australia by
+.\" David Hayes and Lawrence Stewart under sponsorship from the FreeBSD
+.\" Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 15, 2011
+.Dt MOD_CC 4
+.Os
+.Sh NAME
+.Nm mod_cc
+.Nd Modular congestion control
+.Sh DESCRIPTION
+The modular congestion control framework allows the TCP implementation to
+dynamically change the congestion control algorithm used by new and existing
+connections.
+Algorithms are identified by a unique
+.Xr ascii 7
+name.
+Algorithm modules can be compiled into the kernel or loaded as kernel modules
+using the
+.Xr kld 4
+facility.
+.Pp
+The default algorithm is NewReno, and all connections use the default unless
+explicitly overridden using the TCP_CONGESTION socket option (see
+.Xr tcp 4
+for details).
+The default can be changed using a
+.Xr sysctl 3
+MIB variable detailed in the
+.Sx MIB Variables
+section below.
+.Sh MIB Variables
+The framework exposes the following variables in the
+.Va net.inet.tcp.cc
+branch of the
+.Xr sysctl 3
+MIB:
+.Bl -tag -width ".Va available"
+.It Va available
+Read-only list of currently available congestion control algorithms by name.
+.It Va algorithm
+Returns the current default congestion control algorithm when read, and changes
+the default when set.
+When attempting to change the default algorithm, this variable should be set to
+one of the names listed by the
+.Va net.inet.tcp.cc.available
+MIB variable.
+.El
+.Sh SEE ALSO
+.Xr cc_chd 4 ,
+.Xr cc_cubic 4 ,
+.Xr cc_hd 4 ,
+.Xr cc_htcp 4 ,
+.Xr cc_newreno 4 ,
+.Xr cc_vegas 4 ,
+.Xr tcp 4 ,
+.Xr mod_cc 9
+.Sh ACKNOWLEDGEMENTS
+Development and testing of this software were made possible in part by grants
+from the FreeBSD Foundation and Cisco University Research Program Fund at
+Community Foundation Silicon Valley.
+.Sh HISTORY
+The
+.Nm
+modular congestion control framework first appeared in
+.Fx 9.0 .
+.Pp
+The framework was first released in 2007 by James Healy and Lawrence Stewart
+whilst working on the NewTCP research project at Swinburne University of
+Technology's Centre for Advanced Internet Architectures, Melbourne, Australia,
+which was made possible in part by a grant from the Cisco University Research
+Program Fund at Community Foundation Silicon Valley.
+More details are available at:
+.Pp
+http://caia.swin.edu.au/urp/newtcp/
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+facility was written by
+.An Lawrence Stewart Aq lstewart@FreeBSD.org ,
+.An James Healy Aq jimmy@deefa.com
+and
+.An David Hayes Aq david.hayes@ieee.org .
+.Pp
+This manual page was written by
+.An David Hayes Aq david.hayes@ieee.org
+and
+.An Lawrence Stewart Aq lstewart@FreeBSD.org .
diff --git a/share/man/man4/mos.4 b/share/man/man4/mos.4
new file mode 100644
index 0000000..2656dea
--- /dev/null
+++ b/share/man/man4/mos.4
@@ -0,0 +1,97 @@
+.\"
+.\" Copyright (c) 2011 Rick van der Zwet <info@rickvanderzwet.nl>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 14, 2011
+.Dt MOS 4
+.Os
+.Sh NAME
+.Nm mos
+.Nd Moschip MCS7730/MCS7830/MCS7832 USB Ethernet driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device ehci"
+.Cd "device usb"
+.Cd "device miibus"
+.Cd "device mos"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_mos_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB Ethernet adapters based on the
+Moschip MCS7730/MCS7830/MCS7832 chipset.
+.Pp
+The adapters that contain the Moschip MCS7730/MCS7830/MCS7832 chipset
+will operate at 100Base-TX and full-duplex.
+.Pp
+The Moschip contains a 10/100
+Ethernet MAC with MII interface and is designed to work with both
+Ethernet and HomePNA transceivers.
+Although designed to interface with
+100Mbps peripherals, this only works with USB 2.0. The existing USB 1.0
+standard specifies a maximum transfer speed of 12Mbps.
+USB 1.0 Users should therefore not expect to actually achieve 100Mbps speeds
+with these devices.
+.Pp
+The Moschip supports a 64-bit multicast hash table, single perfect
+filter entry for the station address and promiscuous mode.
+Packets are
+received and transmitted over separate USB bulk transfer endpoints.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+Adapters supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Sitecom LN030
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Rs
+.%T ADMtek AN986 data sheet
+.%O http://www.moschip.com/data/products/MCS7830/Data%20Sheet_7830.pdf
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 8.2 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Rick van der Zwet info@rickvanderzwet.nl .
diff --git a/share/man/man4/mouse.4 b/share/man/man4/mouse.4
new file mode 100644
index 0000000..816936a
--- /dev/null
+++ b/share/man/man4/mouse.4
@@ -0,0 +1,403 @@
+.\"
+.\" Copyright (c) 1997
+.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 3, 1997
+.Dt MOUSE 4
+.Os
+.Sh NAME
+.Nm mouse
+.Nd mouse and pointing device drivers
+.Sh SYNOPSIS
+.In sys/mouse.h
+.Sh DESCRIPTION
+The mouse drivers
+.Xr mse 4 ,
+.Xr psm 4 ,
+.Xr ums 4
+and
+.Xr sysmouse 4
+provide user programs with movement and button state information of the mouse.
+Currently there are specific device drivers for bus, InPort, PS/2, and USB mice.
+The serial mouse is not directly supported by a dedicated driver, but
+it is accessible via the serial device driver or via
+.Xr moused 8
+and
+.Xr sysmouse 4 .
+.Pp
+The user program simply opens a mouse device with a
+.Xr open 2
+call and reads
+mouse data from the device via
+.Xr read 2 .
+Movement and button states are usually encoded in fixed-length data packets.
+Some mouse devices may send data in variable length of packets.
+Actual protocol (data format) used by each driver differs widely.
+.Pp
+The mouse drivers may have ``non-blocking'' attribute which will make
+the driver return immediately if mouse data is not available.
+.Pp
+Mouse device drivers often offer several levels of operation.
+The current operation level can be examined and changed via
+.Xr ioctl 2
+commands.
+The level zero is the lowest level at which the driver offers the basic
+service to user programs.
+Most drivers provide horizontal and vertical movement of the mouse
+and state of up to three buttons at this level.
+At the level one, if supported by the driver, mouse data is encoded
+in the standard format
+.Dv MOUSE_PROTO_SYSMOUSE
+as follows:
+.Pp
+.Bl -tag -width Byte_1 -compact
+.It Byte 1
+.Bl -tag -width bit_7 -compact
+.It bit 7
+Always one.
+.It bit 6..3
+Always zero.
+.It bit 2
+Left button status; cleared if pressed, otherwise set.
+.It bit 1
+Middle button status; cleared if pressed, otherwise set.
+Always one,
+if the device does not have the middle button.
+.It bit 0
+Right button status; cleared if pressed, otherwise set.
+.El
+.It Byte 2
+The first half of horizontal movement count in two's complement;
+-128 through 127.
+.It Byte 3
+The first half of vertical movement count in two's complement;
+-128 through 127.
+.It Byte 4
+The second half of the horizontal movement count in two's complement;
+-128 through 127.
+To obtain the full horizontal movement count, add
+the byte 2 and 4.
+.It Byte 5
+The second half of the vertical movement count in two's complement;
+-128 through 127.
+To obtain the full vertical movement count, add
+the byte 3 and 5.
+.It Byte 6
+The bit 7 is always zero.
+The lower 7 bits encode the first half of
+Z axis movement count in two's complement; -64 through 63.
+.It Byte 7
+The bit 7 is always zero.
+The lower 7 bits encode the second half of
+the Z axis movement count in two's complement; -64 through 63.
+To obtain the full Z axis movement count, add the byte 6 and 7.
+.It Byte 8
+The bit 7 is always zero.
+The bits 0 through 6 reflect the state
+of the buttons 4 through 10.
+If a button is pressed, the corresponding bit is cleared.
+Otherwise
+the bit is set.
+.El
+.Pp
+The first 5 bytes of this format is compatible with the MouseSystems
+format.
+The additional 3 bytes have their MSBs always set to zero.
+Thus, if the user program can interpret the MouseSystems data format and
+tries to find the first byte of the format by detecting the bit pattern
+10000xxxb,
+it will discard the additional bytes, thus, be able to decode x, y
+and states of 3 buttons correctly.
+.Pp
+Device drivers may offer operation levels higher than one.
+Refer to manual pages of individual drivers for details.
+.Sh IOCTLS
+The following
+.Xr ioctl 2
+commands are defined for the mouse drivers.
+The degree of support
+varies from one driver to another.
+This section gives general
+description of the commands.
+Refer to manual pages of individual drivers for specific details.
+.Pp
+.Bl -tag -width MOUSE -compact
+.It Dv MOUSE_GETLEVEL Ar int *level
+.It Dv MOUSE_SETLEVEL Ar int *level
+These commands manipulate the operation level of the mouse driver.
+.Pp
+.It Dv MOUSE_GETHWINFO Ar mousehw_t *hw
+Returns the hardware information of the attached device in the following
+Except for the
+.Dv iftype
+field, the device driver may not always fill the structure with correct
+values.
+Consult manual pages of individual drivers for details of support.
+.Bd -literal
+typedef struct mousehw {
+ int buttons; /* number of buttons */
+ int iftype; /* I/F type */
+ int type; /* mouse/track ball/pad... */
+ int model; /* I/F dependent model ID */
+ int hwid; /* I/F dependent hardware ID */
+} mousehw_t;
+.Ed
+.Pp
+The
+.Dv buttons
+field holds the number of buttons detected by the driver.
+The driver
+may put an arbitrary value, such as two, in this field, if it cannot
+determine the exact number.
+.Pp
+The
+.Dv iftype
+is the type of interface:
+.Dv MOUSE_IF_SERIAL ,
+.Dv MOUSE_IF_BUS ,
+.Dv MOUSE_IF_INPORT ,
+.Dv MOUSE_IF_PS2 ,
+.Dv MOUSE_IF_USB ,
+.Dv MOUSE_IF_SYSMOUSE
+or
+.Dv MOUSE_IF_UNKNOWN .
+.Pp
+The
+.Dv type
+tells the device type:
+.Dv MOUSE_MOUSE ,
+.Dv MOUSE_TRACKBALL ,
+.Dv MOUSE_STICK ,
+.Dv MOUSE_PAD ,
+or
+.Dv MOUSE_UNKNOWN .
+.Pp
+The
+.Dv model
+may be
+.Dv MOUSE_MODEL_GENERIC
+or one of
+.Dv MOUSE_MODEL_XXX
+constants.
+.Pp
+The
+.Dv hwid
+is the ID value returned by the pointing device.
+It
+depend on the interface type; refer to the manual page of
+specific mouse drivers for possible values.
+.Pp
+.It Dv MOUSE_GETMODE Ar mousemode_t *mode
+The command reports the current operation parameters of the mouse driver.
+.Bd -literal
+typedef struct mousemode {
+ int protocol; /* MOUSE_PROTO_XXX */
+ int rate; /* report rate (per sec) */
+ int resolution; /* MOUSE_RES_XXX, -1 if unknown */
+ int accelfactor; /* acceleration factor */
+ int level; /* driver operation level */
+ int packetsize; /* the length of the data packet */
+ unsigned char syncmask[2]; /* sync. bits */
+} mousemode_t;
+.Ed
+.Pp
+The
+.Dv protocol
+field tells the format in which the device status is returned
+when the mouse data is read by the user program.
+It is one of
+.Dv MOUSE_PROTO_XXX
+constants.
+.Pp
+The
+.Dv rate
+field is the status report rate (reports/sec) at which the device will send
+movement reports to the host computer.
+-1 if unknown or not applicable.
+.Pp
+The
+.Dv resolution
+field holds a value specifying resolution of the pointing device.
+It is a positive value or one of
+.Dv MOUSE_RES_XXX
+constants.
+.Pp
+The
+.Dv accelfactor
+field holds a value to control acceleration feature.
+It must be zero or greater.
+If it is zero, acceleration is disabled.
+.Pp
+The
+.Dv packetsize
+field tells the length of the fixed-size data packet or the length
+of the fixed part of the variable-length packet.
+The size depends on the interface type, the device type and model, the
+protocol and the operation level of the driver.
+.Pp
+The array
+.Dv syncmask
+holds a bit mask and pattern to detect the first byte of the
+data packet.
+.Dv syncmask[0]
+is the bit mask to be ANDed with a byte.
+If the result is equal to
+.Dv syncmask[1] ,
+the byte is likely to be the first byte of the data packet.
+Note that this method of detecting the first byte is not 100% reliable,
+thus, should be taken only as an advisory measure.
+.Pp
+.It Dv MOUSE_SETMODE Ar mousemode_t *mode
+The command changes the current operation parameters of the mouse driver
+as specified in
+.Ar mode .
+Only
+.Dv rate ,
+.Dv resolution ,
+.Dv level
+and
+.Dv accelfactor
+may be modifiable.
+Setting values in the other field does not generate
+error and has no effect.
+.Pp
+If you do not want to change the current setting of a field, put -1
+there.
+You may also put zero in
+.Dv resolution
+and
+.Dv rate ,
+and the default value for the fields will be selected.
+.\" .Pp
+.\" .It Dv MOUSE_GETVARS Ar mousevar_t *vars
+.\" Get internal variables of the mouse driver.
+.\" The variables which can be manipulated through these commands
+.\" are specific to each driver.
+.\" This command may not be supported by all drivers.
+.\" .Bd -literal
+.\" typedef struct mousevar {
+.\" int var[16]; /* internal variables */
+.\" } mousevar_t;
+.\" .Ed
+.\" .Pp
+.\" If the commands are supported, the first element of the array is
+.\" filled with a signature value.
+.\" Apart from the signature data, there is currently no standard concerning
+.\" the other elements of the buffer.
+.\" .Pp
+.\" .It Dv MOUSE_SETVARS Ar mousevar_t *vars
+.\" Get internal variables of the mouse driver.
+.\" The first element of the array must be a signature value.
+.\" This command may not be supported by all drivers.
+.Pp
+.It Dv MOUSE_READDATA Ar mousedata_t *data
+The command reads the raw data from the device.
+.Bd -literal
+typedef struct mousedata {
+ int len; /* # of data in the buffer */
+ int buf[16]; /* data buffer */
+} mousedata_t;
+.Ed
+.Pp
+The calling process must fill the
+.Dv len
+field with the number of bytes to be read into the buffer.
+This command may not be supported by all drivers.
+.Pp
+.It Dv MOUSE_READSTATE Ar mousedata_t *state
+The command reads the raw state data from the device.
+It uses the same structure as above.
+This command may not be supported by all drivers.
+.Pp
+.It Dv MOUSE_GETSTATUS Ar mousestatus_t *status
+The command returns the current state of buttons and
+movement counts in the following structure.
+.Bd -literal
+typedef struct mousestatus {
+ int flags; /* state change flags */
+ int button; /* button status */
+ int obutton; /* previous button status */
+ int dx; /* x movement */
+ int dy; /* y movement */
+ int dz; /* z movement */
+} mousestatus_t;
+.Ed
+.Pp
+The
+.Dv button
+and
+.Dv obutton
+fields hold the current and the previous state of the mouse buttons.
+When a button is pressed, the corresponding bit is set.
+The mouse drivers may support up to 31 buttons with the bit 0 through 31.
+Few button bits are defined as
+.Dv MOUSE_BUTTON1DOWN
+through
+.Dv MOUSE_BUTTON8DOWN .
+The first three buttons correspond to left, middle and right buttons.
+.Pp
+If the state of the button has changed since the last
+.Dv MOUSE_GETSTATUS
+call, the corresponding bit in the
+.Dv flags
+field will be set.
+If the mouse has moved since the last call, the
+.Dv MOUSE_POSCHANGED
+bit in the
+.Dv flags
+field will also be set.
+.Pp
+The other fields hold movement counts since the last
+.Dv MOUSE_GETSTATUS
+call.
+The internal counters will be reset after every call to this
+command.
+.El
+.Sh FILES
+.Bl -tag -width /dev/sysmouseXX -compact
+.It Pa /dev/cuau%d
+serial ports
+.It Pa /dev/mse%d
+bus and InPort mouse device
+.It Pa /dev/psm%d
+PS/2 mouse device
+.It Pa /dev/sysmouse
+virtual mouse device
+.It Pa /dev/ums%d
+USB mouse device
+.El
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr mse 4 ,
+.Xr psm 4 ,
+.Xr sysmouse 4 ,
+.Xr ums 4 ,
+.Xr moused 8
+.\".Sh HISTORY
+.Sh AUTHORS
+This manual page was written by
+.An Kazutaka Yokota Aq yokota@FreeBSD.org .
diff --git a/share/man/man4/mpr.4 b/share/man/man4/mpr.4
new file mode 100644
index 0000000..4a42fa1
--- /dev/null
+++ b/share/man/man4/mpr.4
@@ -0,0 +1,229 @@
+.\"
+.\" Copyright (c) 2010 Spectra Logic Corporation
+.\" Copyright (c) 2014 LSI Corp
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions, and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" substantially similar to the "NO WARRANTY" disclaimer below
+.\" ("Disclaimer") and any redistribution must be conditioned upon
+.\" including a substantially similar Disclaimer requirement for further
+.\" binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" mpr driver man page.
+.\"
+.\" Author: Ken Merry <ken@FreeBSD.org>
+.\" Author: Stephen McConnell <stephen.mcconnell@lsi.com>
+.\"
+.\" $Id$
+.\" $FreeBSD$
+.\"
+.Dd May 2, 2014
+.Dt MPR 4
+.Os
+.Sh NAME
+.Nm mpr
+.Nd "LSI Fusion-MPT 3 IT/IR 12Gb/s Serial Attached SCSI/SATA driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device scbus"
+.Cd "device mpr"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mpr_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for LSI Fusion-MPT 3 IT/IR
+.Tn SAS
+controllers.
+.Sh HARDWARE
+The following controllers are supported by the
+.Nm
+driver:
+.Pp
+.Bl -bullet -compact
+.It
+LSI SAS 3004 (4 Port SAS)
+.It
+LSI SAS 3008 (8 Port SAS)
+.It
+LSI SAS 3108 (8 Port SAS)
+.El
+.Sh CONFIGURATION
+To disable MSI interrupts for all
+.Nm
+driver instances, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hw.mpr.disable_msi=1
+.Ed
+.Pp
+To disable MSI interrupts for a specific
+.Nm
+driver instance, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dev.mpr.X.disable_msi=1
+.Ed
+.Pp
+where X is the adapter number.
+.Pp
+To disable MSI-X interrupts for all
+.Nm
+driver instances, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hw.mpr.disable_msix=1
+.Ed
+.Pp
+To disable MSI-X interrupts for a specific
+.Nm
+driver instance, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dev.mpr.X.disable_msix=1
+.Ed
+.Pp
+To set the maximum number of DMA chains allocated for all adapters, set
+the following variable in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hw.mpr.max_chains=NNNN
+.Ed
+.Pp
+To set the maximum number of DMA chains allocated for a specific adapter,
+set the following variable in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dev.mpr.X.max_chains=NNNN
+.Ed
+.Pp
+This variable may also be viewed via
+.Xr sysctl 8
+to see the maximum set for a given adapter.
+.Pp
+The current number of free chain frames may be seen via the
+dev.mpr.X.chain_free
+.Xr sysctl 8
+variable.
+.Pp
+The lowest number of free chain frames may be seen via the
+dev.mpr.X.chain_free_lowwater
+.Xr sysctl 8
+variable.
+.Pp
+The current number of active I/O commands is shown in the
+dev.mpr.X.io_cmds_active
+.Xr sysctl 8
+variable.
+.Pp
+The maximum number of active I/O commands seen since boot is shown in the
+dev.mpr.X.io_cmds_highwater
+.Xr sysctl 8
+variable.
+.Pp
+Devices can be excluded from
+.Nm
+control for all adapters by setting the following variable in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hw.mpr.exclude_ids=Y
+.Ed
+.Pp
+where Y is the target ID of the device.
+If more than one device is to be
+excluded, target ID's are separated by commas.
+.Pp
+Devices can be excluded from
+.Nm
+control for a specific adapter by setting the following variable in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dev.mpr.X.exclude_ids=Y
+.Ed
+.Pp
+where X is the adapter number and Y is the target ID of the device.
+If more
+than one device is to be excluded, target ID's are separated by commas.
+.Sh DEBUGGING
+To enable debugging prints from the
+.Nm
+driver, set the
+.Bd -literal -offset indent
+hw.mpr.X.debug_level
+.Ed
+.Pp
+variable, where X is the adapter number, either in
+.Xr loader.conf 5
+or via
+.Xr sysctl 8 .
+The following bits have the described effects:
+.Bd -literal -offset indent
+0x0001 Enable informational prints.
+0x0002 Enable prints for driver faults.
+0x0004 Enable prints for controller events.
+0x0008 Enable prints for controller logging.
+0x0010 Enable prints for tracing recovery operations.
+0x0020 Enable prints for parameter errors and programming bugs.
+0x0040 Enable prints for system initialization operations.
+0x0080 Enable prints for more detailed information.
+0x0100 Enable prints for user-generated commands.
+0x0200 Enable prints for device mapping.
+0x0400 Enable prints for tracing through driver functions.
+.Ed
+.Sh SEE ALSO
+.Xr cam 4 ,
+.Xr cd 4 ,
+.Xr ch 4 ,
+.Xr da 4 ,
+.Xr mps 4 ,
+.Xr mpt 4 ,
+.Xr pci 4 ,
+.Xr sa 4 ,
+.Xr scsi 4 ,
+.Xr targ 4 ,
+.Xr loader.conf 5 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in FreeBSD 9.3.
+.Sh AUTHORS
+The
+.Nm
+driver was originally written by
+.An -nosplit
+.An Scott Long Aq scottl@FreeBSD.org .
+It has been improved and tested by LSI Corporation.
+.Pp
+This man page was written by
+.An Ken Merry Aq ken@FreeBSD.org
+with additional input from
+.An Stephen McConnell Aq stephen.mcconnell@lsi.com .
diff --git a/share/man/man4/mps.4 b/share/man/man4/mps.4
new file mode 100644
index 0000000..6840c21
--- /dev/null
+++ b/share/man/man4/mps.4
@@ -0,0 +1,226 @@
+.\"
+.\" Copyright (c) 2010 Spectra Logic Corporation
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions, and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" substantially similar to the "NO WARRANTY" disclaimer below
+.\" ("Disclaimer") and any redistribution must be conditioned upon
+.\" including a substantially similar Disclaimer requirement for further
+.\" binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" mps driver man page.
+.\"
+.\" Author: Ken Merry <ken@FreeBSD.org>
+.\"
+.\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $
+.\" $FreeBSD$
+.\"
+.Dd January 3, 2013
+.Dt MPS 4
+.Os
+.Sh NAME
+.Nm mps
+.Nd LSI Fusion-MPT 2 Serial Attached SCSI driver
+.Sh SYNOPSIS
+To compile this driver into your kernel,
+place the following lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device mps"
+.Ed
+.Pp
+Or, to load the driver as a module at boot, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mps_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for LSI Logic Fusion-MPT 2
+.Tn SAS
+controllers and WarpDrive solid state storage cards.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following hardware:
+.Pp
+.Bl -bullet -compact
+.It
+LSI Logic SAS2004 (4 Port
+.Tn SAS )
+.It
+LSI Logic SAS2008 (8 Port
+.Tn SAS )
+.It
+LSI Logic SAS2108 (8 Port
+.Tn SAS )
+.It
+LSI Logic SAS2116 (16 Port
+.Tn SAS )
+.It
+LSI Logic SAS2208 (8 Port
+.Tn SAS )
+.It
+LSI Logic SAS2308 (8 Port
+.Tn SAS )
+.It
+LSI Logic SSS6200 Solid State Storage
+.It
+Intel Integrated RAID Module RMS25JB040
+.It
+Intel Integrated RAID Module RMS25JB080
+.It
+Intel Integrated RAID Module RMS25KB040
+.It
+Intel Integrated RAID Module RMS25KB080
+.El
+.Sh CONFIGURATION
+To disable MSI interrupts for all
+.Nm
+driver instances, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hw.mps.disable_msi=1
+.Ed
+.Pp
+To disable MSI interrupts for a specific
+.Nm
+driver instance, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dev.mps.X.disable_msi=1
+.Ed
+.Pp
+where X is the adapter number.
+.Pp
+To disable MSI-X interrupts for all
+.Nm
+driver instances, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hw.mps.disable_msix=1
+.Ed
+.Pp
+To disable MSI-X interrupts for a specific
+.Nm
+driver instance, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dev.mps.X.disable_msix=1
+.Ed
+.Pp
+To set the maximum number of DMA chains allocated for all adapters,
+set the following variable in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hw.mps.max_chains=NNNN
+.Ed
+.Pp
+To set the maximum number of DMA chains allocated for a specific adapter,
+set the following variable in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dev.mps.X.max_chains=NNNN
+.Ed
+.Pp
+This variable may also be viewed via
+.Xr sysctl 8
+to see the maximum set for a given adapter.
+.Pp
+The current number of free chain frames may be seen via the
+dev.mps.X.chain_free
+.Xr sysctl 8
+variable.
+.Pp
+The lowest number of free chain frames may be seen via the
+dev.mps.X.chain_free_lowwater
+.Xr sysctl 8
+variable.
+.Pp
+The current number of active I/O commands is shown in the
+dev.mps.X.io_cmds_active
+.Xr sysctl 8
+variable.
+.Pp
+The maximum number of active I/O command seen since boot is shown in the
+dev.mps.X.io_cmds_highwater
+.Xr sysctl 8
+variable.
+.Sh DEBUGGING
+To enable debugging prints from the
+.Nm
+driver, set the
+.Bd -literal -offset indent
+hw.mps.X.debug_level
+.Ed
+.Pp
+variable, where X is the adapter number, either in
+.Xr loader.conf 5
+or via
+.Xr sysctl 8 .
+The following bits have the described effects:
+.Bl -tag -width 6n -offset indent
+.It 0x01
+Enable informational prints.
+.It 0x02
+Enable tracing prints.
+.It 0x04
+Enable prints for driver faults.
+.It 0x08
+Enable prints for controller events.
+.El
+.Sh SEE ALSO
+.Xr cd 4 ,
+.Xr ch 4 ,
+.Xr da 4 ,
+.Xr mpt 4 ,
+.Xr pci 4 ,
+.Xr sa 4 ,
+.Xr scsi 4 ,
+.Xr targ 4 ,
+.Xr loader.conf 5 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 9.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was originally written by
+.An Scott Long Aq scottl@FreeBSD.org .
+It has been improved and tested by LSI Logic Corporation.
+This man page was written by
+.An Ken Merry Aq ken@FreeBSD.org .
+.Sh BUGS
+This driver has a couple of known shortcomings:
+.Bl -bullet -compact
+.It
+No userland utility available (e.g.
+.Xr mptutil 8 ) .
+.It
+The driver probes devices sequentially.
+If your system has a large number of devices, the probe will take a while.
+.El
diff --git a/share/man/man4/mpt.4 b/share/man/man4/mpt.4
new file mode 100644
index 0000000..9d62d17
--- /dev/null
+++ b/share/man/man4/mpt.4
@@ -0,0 +1,186 @@
+.\" $NetBSD: mpt.4,v 1.1 2003/04/16 22:32:15 thorpej Exp $
+.\"
+.\" Copyright (c) 2003 Wasabi Systems, Inc.
+.\" All rights reserved.
+.\"
+.\" Written by Jason R. Thorpe for Wasabi Systems, Inc.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed for the NetBSD Project by
+.\" Wasabi Systems, Inc.
+.\" 4. The name of Wasabi Systems, Inc. may not be used to endorse
+.\" or promote products derived from this software without specific prior
+.\" written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 23, 2011
+.Dt MPT 4
+.Os
+.Sh NAME
+.Nm mpt
+.Nd LSI Fusion-MPT SCSI/Fibre Channel driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device mpt"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mpt_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support
+for the LSI Logic Fusion-MPT family of
+.Tn SCSI ,
+.Tn Fibre Channel
+and
+.Tn SAS
+controllers.
+.Sh HARDWARE
+The following controllers are supported by the
+.Nm
+driver:
+.Pp
+.Bl -bullet -compact
+.It
+LSI Logic 53c1030,
+LSI Logic LSI2x320-X
+(Single and Dual Ultra320
+.Tn SCSI )
+.It
+LSI Logic AS1064,
+LSI Logic AS1068
+.Pq Tn SAS/SATA
+.It
+LSI Logic FC909
+(1Gb/s
+.Tn Fibre Channel )
+.It
+LSI Logic FC909A
+(Dual 1Gb/s
+.Tn Fibre Channel )
+.It
+LSI Logic FC919,
+LSI Logic 7102XP-LC
+(Single 2Gb/s
+.Tn Fibre Channel )
+.It
+LSI Logic FC929,
+LSI Logic FC929X,
+LSI Logic 7202XP-LC
+(Dual 2Gb/s
+.Tn Fibre Channel )
+.It
+LSI Logic FC949X
+(Dual 4Gb/s
+.Tn Fibre Channel )
+.It
+LSI Logic FC949E,
+LSI Logic FC949ES
+(Dual 4Gb/s
+.Tn Fibre Channel PCI-Express)
+.El
+.Pp
+The
+.Tn Ultra 320 SCSI
+controller chips supported by the
+.Nm
+driver can be found onboard on many systems including:
+.Pp
+.Bl -bullet -compact
+.It
+Dell PowerEdge 1750 thru 2850
+.It
+IBM eServer xSeries 335
+.El
+.Pp
+These systems also contain Integrated RAID Mirroring and Integrated
+RAID Mirroring Enhanced which this driver also supports.
+.Pp
+The
+.Tn SAS
+controller chips are also present on many new AMD/Opteron based systems,
+like the Sun 4100.
+Note that this controller can drive both SAS and SATA
+drives or a mix of them at the same time. The Integrated RAID Mirroring
+available for these controllers is poorly supported at best.
+.Pp
+The
+.Tn Fibre Channel
+controller chipset are supported by a broad variety of speeds and systems.
+The
+.Tn Apple
+Fibre Channel HBA is in fact the
+.Tn FC949ES
+card.
+.Pp
+This driver also supports target mode for Fibre Channel cards.
+This support may be enabled by setting the desired role of the core via
+the LSI Logic firmware utility that establishes what roles the card
+can take on - no separate compilation is required.
+.Sh SEE ALSO
+.Xr cd 4 ,
+.Xr ch 4 ,
+.Xr da 4 ,
+.Xr mps 4 ,
+.Xr pci 4 ,
+.Xr sa 4 ,
+.Xr scsi 4 ,
+.Xr targ 4 ,
+.Xr mptutil 8 ,
+.Xr gmultipath 8
+.Rs
+.%T "LSI Logic Website"
+.%U http://www.lsi.com/
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.6 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was originally written for
+.Fx
+by
+.An Greg Ansley
+and marginally improved upon
+by
+.An Matt Jacob Aq mjacob@FreeBSD.org .
+.Pp
+.An Justin Gibbs Aq gibbs@FreeBSD.org
+and
+.An Scott Long Aq scottl@FreeBSD.org
+have made more substantial improvements.
diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4
new file mode 100644
index 0000000..f56ef31
--- /dev/null
+++ b/share/man/man4/mrsas.4
@@ -0,0 +1,403 @@
+.\" Copyright (c) 2014 LSI Corp
+.\" All rights reserved.
+.\" Author: Kashyap Desai
+.\" Support: freebsdraid@lsi.com
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the <ORGANIZATION> nor the names of its
+.\" contributors may be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+.\" COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" The views and conclusions contained in the software and documentation
+.\" are those of the authors and should not be interpreted as representing
+.\" official policies, either expressed or implied, of the FreeBSD Project.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 8, 2014
+.Dt MRSAS 4
+.Os
+.Sh NAME
+.Nm mrsas
+.Nd "LSI MegaRAID 6Gb/s and 12Gb/s SAS+SATA RAID controller driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device mrsas"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mrsas_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver will detect LSI's next generation (6Gb/s and 12Gb/s) PCI Express
+SAS/SATA RAID controllers.
+See the
+.Nm HARDWARE
+section for the supported devices list.
+A disk (virtual disk/physical disk) attached to the
+.Nm
+driver will be visible to the user through
+.Xr camcontrol 8
+as
+.Pa /dev/da?
+device nodes.
+A simple management interface is also provided on a per-controller basis via the
+.Pa /dev/mrsas?
+device node.
+.Pp
+The
+.Nm
+name is derived from the phrase "MegaRAID SAS HBA", which is
+substantially different than the old "MegaRAID" Driver
+.Xr mfi 4
+which does not connect targets
+to the
+.Xr cam 4
+layer and thus requires a new driver which attaches targets to the
+.Xr cam 4
+layer.
+Older MegaRAID controllers are supported by
+.Xr mfi 4
+and will not work with
+.Nm ,
+but both the
+.Xr mfi 4
+and
+.Nm
+drivers can detect and manage the LSI MegaRAID SAS 2208/2308/3008/3108 series of
+controllers.
+.Pp
+The
+.Xr device.hints 5
+option is provided to tune the
+.Nm
+driver's behavior for LSI MegaRAID SAS 2208/2308/3008/3108 controllers.
+By default, the
+.Xr mfi 4
+driver will detect these controllers.
+See the
+.Nm PRIORITY
+section to know more about driver priority for MR-Fusion devices.
+.Pp
+.Nm
+will provide a priority of (-30) (between
+.Dv BUS_PROBE_DEFAULT
+and
+.Dv BUS_PROBE_LOW_PRIORITY )
+at probe call for device id's 0x005B, 0x005D, and
+0x005F so that
+.Nm
+does not take control of these devices without user intervention.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following hardware:
+.Pp
+[ Thunderbolt 6Gb/s MR controller ]
+.Bl -bullet -compact
+.It
+LSI MegaRAID SAS 9265
+.It
+LSI MegaRAID SAS 9266
+.It
+LSI MegaRAID SAS 9267
+.It
+LSI MegaRAID SAS 9270
+.It
+LSI MegaRAID SAS 9271
+.It
+LSI MegaRAID SAS 9272
+.It
+LSI MegaRAID SAS 9285
+.It
+LSI MegaRAID SAS 9286
+.It
+DELL PERC H810
+.It
+DELL PERC H710/P
+.El
+.Pp
+[ Invader/Fury 12Gb/s MR controller ]
+.Bl -bullet -compact
+.It
+LSI MegaRAID SAS 9380
+.It
+LSI MegaRAID SAS 9361
+.It
+LSI MegaRAID SAS 9341
+.It
+DELL PERC H830
+.It
+DELL PERC H730/P
+.It
+DELL PERC H330
+.El
+.Sh CONFIGURATION
+To disable Online Controller Reset(OCR) for a specific
+.Nm
+driver instance, set the
+following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dev.mrsas.X.disable_ocr=1
+.Ed
+.Pp
+where X is the adapter number.
+.Pp
+To change the I/O timeout value for a specific
+.Nm
+driver instance, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dev.mrsas.X.mrsas_io_timeout=NNNNNN
+.Ed
+.Pp
+where NNNNNN is the timeout value in milli-seconds.
+.Pp
+To change the firmware fault check timer value for a specific
+.Nm
+driver instance, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dev.mrsas.X.mrsas_fw_fault_check_delay=NN
+.Ed
+.Pp
+where NN is the fault check delay value in seconds.
+.Pp
+The current number of active I/O commands is shown in the
+.Va dev.mrsas.X.fw_outstanding
+.Xr sysctl 8
+variable.
+.Sh DEBUGGING
+To enable debugging prints from the
+.Nm
+driver, set the
+.Va hw.mrsas.X.debug_level
+variable, where X is the adapter number, either in
+.Xr loader.conf 5
+or via
+.Xr sysctl 8 .
+The following bits have the described effects:
+.Bl -tag -width indent -offset indent
+.It 0x01
+Enable informational prints.
+.It 0x02
+Enable tracing prints.
+.It 0x04
+Enable prints for driver faults.
+.It 0x08
+Enable prints for OCR and I/O timeout.
+.It 0x10
+Enable prints for AEN events.
+.El
+.Sh PRIORITY
+The
+.Nm
+driver will always set a default (-30) priority in the PCI subsystem for
+selection of MR-Fusion cards.
+(It is between
+.Dv BUS_PROBE_DEFAULT
+and
+.Dv BUS_PROBE_LOW_PRIORITY ) .
+MR-Fusion Controllers include all cards with the
+Device IDs -
+0x005B,
+0x005D,
+0x005F.
+.Pp
+The
+.Xr mfi 4
+driver will set a priority of either
+.Dv BUS_PROBE_DEFAULT
+or
+.Dv BUS_PROBE_LOW_PRIORITY
+(depending on the device.hints setting) in the PCI
+subsystem for selection of MR-Fusion cards.
+With the above design in place, the
+.Xr mfi 4
+driver will attach to a MR-Fusion card given that it has a higher priority than
+.Nm .
+.Pp
+Using
+.Pa /boot/device.hints
+(as mentioned below), the user can provide a preference
+for the
+.Nm
+driver to detect a MR-Fusion card instead of the
+.Xr mfi 4
+driver.
+.Bd -ragged -offset indent
+.Cd hw.mfi.mrsas_enable="1"
+.Ed
+.Pp
+At boot time, the
+.Xr mfi 4
+driver will get priority to detect MR-Fusion controllers by default.
+Before
+changing this default driver selection policy, LSI advises users to understand
+how the driver selection policy works.
+LSI's policy is to provide priority to
+the
+.Xr mfi 4
+driver to detect MR-Fusion cards, but allow for the ability to choose the
+.Nm
+driver to detect MR-Fusion cards.
+.Pp
+LSI recommends setting hw.mfi.mrsas_enable="0" for customers who are using the
+older
+.Xr mfi 4
+driver and do not want to switch to
+.Nm .
+For those customers who are using a MR-Fusion controller for the first time, LSI
+recommends using the
+.Nm
+driver and setting hw.mfi.mrsas_enable="1".
+.Pp
+Changing the default behavior is well tested under most conditions, but
+unexpected behavior may pop up if more complex and unrealistic operations are
+executed by switching between the
+.Xr mfi 4
+and
+.Nm
+drivers for MR-Fusion.
+Switching drivers is designed to happen only one time.
+Although multiple
+switching is possible, it is not recommended.
+The user should decide from
+.Nm Start of Day
+which driver they want to use for the MR-Fusion card.
+.Pp
+The user may see different device names when switching from
+.Xr mfi 4
+to
+.Nm .
+This behavior is
+.Nm Functions As Designed
+and the user needs to change the
+.Xr fstab 5
+entry manually if they are doing any experiments with
+.Xr mfi 4
+and
+.Nm
+interoperability.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/mrsas?" -compact
+.It Pa /dev/da?
+array/logical disk interface
+.It Pa /dev/mrsas?
+management interface
+.El
+.Sh SEE ALSO
+.Xr cam 4 ,
+.Xr mfi 4 ,
+.Xr pci 4 ,
+.Xr device.hints 5 ,
+.Xr camcontrol 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 10.1 .
+.Bd -ragged
+.Cd "mfi Driver:"
+.Xr mfi 4
+is the old
+.Fx
+driver which started with support for Gen-1 Controllers and
+was extended to support up to MR-Fusion (Device ID = 0x005B, 0x005D, 0x005F).
+.Ed
+.Bd -ragged
+.Cd "mrsas Driver:"
+.Nm
+is the new driver reworked by LSI which supports Thunderbolt and onward
+products.
+The SAS+SATA RAID controller with device id 0x005b is referred to as
+the Thunderbolt controller throughout this man page.
+.Ed
+.Bd -ragged
+.Nm cam aware HBA drivers:
+.Fx
+has a
+.Xr cam 4
+layer which attaches storage devices and provides a common access mechanism to
+storage controllers and attached devices.
+The
+.Nm
+driver is
+.Xr cam 4
+aware and devices associated with
+.Nm
+can be seen using
+.Xr camcontrol 8 .
+The
+.Xr mfi 4
+driver does not understand the
+.Xr cam 4
+layer and it directly associates storage disks to the block layer.
+.Pp
+.Nm Thunderbolt Controller:
+This is the 6Gb/s MegaRAID HBA card which has device id 0x005B.
+.Pp
+.Nm Invader Controller:
+This is 12Gb/s MegaRAID HBA card which has device id 0x005D.
+.Pp
+.Nm Fury Controller:
+This is the 12Gb/s MegaRAID HBA card which has device id 0x005F.
+.Ed
+.Sh AUTHORS
+The
+.Nm
+driver and this manual page were written by
+.An Kashyap Desai Aq Kashyap.Desai@lsi.com .
+.Sh TODO
+The driver does not support big-endian architectures at this time.
+.Pp
+The driver does not support alias for device name (it is required when the user
+switches between two drivers and does not want to edit
+.Pa /etc/fstab
+manually).
+.Pp
+The
+.Nm
+driver exposes devices as
+.Pa /dev/da? ,
+whereas
+.Xr mfi 4
+exposes devices as
+.Pa /dev/mfid? .
+.Pp
+.Nm
+does not support the Linux Emulator interface.
+.Pp
+.Nm
+will not work with
+.Xr mfiutil 8 .
diff --git a/share/man/man4/msk.4 b/share/man/man4/msk.4
new file mode 100644
index 0000000..200c6f7
--- /dev/null
+++ b/share/man/man4/msk.4
@@ -0,0 +1,256 @@
+.\" Copyright (c) 2006 Pyun YongHyeon
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 23, 2011
+.Dt MSK 4
+.Os
+.Sh NAME
+.Nm msk
+.Nd Marvell/SysKonnect Yukon II Gigabit Ethernet adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device msk"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_msk_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for various NICs based on the
+Marvell/SysKonnect Yukon II Gigabit Ethernet controller chip.
+.Pp
+All NICs supported by the
+.Nm
+driver have TCP/UDP/IP checksum offload for transmit, TCP
+segmentation offload (TSO), hardware VLAN tag stripping/insertion
+features and an interrupt moderation mechanism as well as a 64-bit
+multicast hash filter.
+The Yukon II supports TBI (ten bit interface) and GMII
+transceivers, which means it can be used with either copper or
+1000baseX fiber applications.
+.Pp
+The Yukon II also supports Jumbo Frames (up to 9022 bytes), which can be
+configured via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 1000baseTX
+Set 1000baseTX operation over twisted pair.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 1000baseSX
+Set 1000Mbps (Gigabit Ethernet) operation.
+Both
+.Cm full-duplex
+and
+.Cm half-duplex
+modes are supported.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver provides support for various NICs based on the Marvell/SysKonnect
+Yukon II based Gigabit Ethernet controller chips, including:
+.Pp
+.Bl -bullet -compact
+.It
+D-Link 550SX Gigabit Ethernet
+.It
+D-Link 560SX Gigabit Ethernet
+.It
+D-Link 560T Gigabit Ethernet
+.It
+Marvell Yukon 88E8021CU Gigabit Ethernet
+.It
+Marvell Yukon 88E8021 SX/LX Gigabit Ethernet
+.It
+Marvell Yukon 88E8022CU Gigabit Ethernet
+.It
+Marvell Yukon 88E8022 SX/LX Gigabit Ethernet
+.It
+Marvell Yukon 88E8061CU Gigabit Ethernet
+.It
+Marvell Yukon 88E8061 SX/LX Gigabit Ethernet
+.It
+Marvell Yukon 88E8062CU Gigabit Ethernet
+.It
+Marvell Yukon 88E8062 SX/LX Gigabit Ethernet
+.It
+Marvell Yukon 88E8035 Fast Ethernet
+.It
+Marvell Yukon 88E8036 Fast Ethernet
+.It
+Marvell Yukon 88E8038 Fast Ethernet
+.It
+Marvell Yukon 88E8039 Fast Ethernet
+.It
+Marvell Yukon 88E8040 Fast Ethernet
+.It
+Marvell Yukon 88E8040T Fast Ethernet
+.It
+Marvell Yukon 88E8042 Fast Ethernet
+.It
+Marvell Yukon 88E8048 Fast Ethernet
+.It
+Marvell Yukon 88E8050 Gigabit Ethernet
+.It
+Marvell Yukon 88E8052 Gigabit Ethernet
+.It
+Marvell Yukon 88E8053 Gigabit Ethernet
+.It
+Marvell Yukon 88E8055 Gigabit Ethernet
+.It
+Marvell Yukon 88E8056 Gigabit Ethernet
+.It
+Marvell Yukon 88E8057 Gigabit Ethernet
+.It
+Marvell Yukon 88E8058 Gigabit Ethernet
+.It
+Marvell Yukon 88E8059 Gigabit Ethernet
+.It
+Marvell Yukon 88E8070 Gigabit Ethernet
+.It
+Marvell Yukon 88E8071 Gigabit Ethernet
+.It
+Marvell Yukon 88E8072 Gigabit Ethernet
+.It
+Marvell Yukon 88E8075 Gigabit Ethernet
+.It
+SysKonnect SK-9Sxx Gigabit Ethernet
+.It
+SysKonnect SK-9Exx Gigabit Ethernet
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va hw.msk.msi_disable
+This tunable disables MSI support on the Ethernet hardware.
+The default value is 0.
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width indent
+.It Va dev.mskc.%d.int_holdoff
+Maximum number of time to delay interrupts.
+The valid range is 0 to 34359738 for 125MHz clock in units of 1us,
+the default is 100 (100us).
+The interface need to be brought down and up again before a change
+takes effect.
+.It Va dev.mskc.%d.process_limit
+Maximum amount of Rx events to be processed in the event loop before
+rescheduling a taskqueue.
+The accepted range is 30 to 256, the default value is 128 events.
+The interface does not need to be brought down and up again before
+a change takes effect.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver was written by
+.An Pyun YongHyeon
+.Aq yongari@FreeBSD.org
+and it is based on
+.Xr sk 4
+and Marvell's
+.Fx
+driver.
+It first appeared in
+.Fx 7.0
+and
+.Fx 6.3 .
diff --git a/share/man/man4/mtio.4 b/share/man/man4/mtio.4
new file mode 100644
index 0000000..b535c92
--- /dev/null
+++ b/share/man/man4/mtio.4
@@ -0,0 +1,303 @@
+.\" Copyright (c) 1996
+.\" Mike Pritchard <mpp@FreeBSD.org>. All rights reserved.
+.\"
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)mtio.4 8.1 (Berkeley) 6/5/93
+.\" $FreeBSD$
+.\"
+.Dd November 11, 2011
+.Dt MTIO 4
+.Os
+.Sh NAME
+.Nm mtio
+.Nd FreeBSD magtape interface
+.Sh DESCRIPTION
+The special files
+named
+.Pa /dev/[n]sa*
+refer to SCSI tape drives,
+which may be attached to the system.
+.Pa /dev/[n]sa*.ctl
+are control devices that can be used to issue ioctls to the SCSI
+tape driver to set parameters that are required to last beyond the
+unmounting of a tape.
+.Pp
+The rewind devices automatically rewind
+when the last requested read, write or seek has finished, or the end of the tape
+has been reached.
+The letter
+.Ql n
+is usually prepended to
+the name of the no-rewind devices.
+.Pp
+Tapes can be written with either fixed length records or variable length
+records.
+See
+.Xr sa 4
+for more information.
+Two end-of-file markers mark the end of a tape, and
+one end-of-file marker marks the end of a tape file.
+If the tape is not to be rewound it is positioned with the
+head in between the two tape marks, where the next write
+will over write the second end-of-file marker.
+.Pp
+All of the magtape devices may be manipulated with the
+.Xr mt 1
+command.
+.Pp
+A number of
+.Xr ioctl 2
+operations are available
+on raw magnetic tape.
+The following definitions are from
+.In sys/mtio.h :
+.Bd -literal
+#ifndef _SYS_MTIO_H_
+#define _SYS_MTIO_H_
+
+#ifndef _KERNEL
+#include <sys/types.h>
+#endif
+#include <sys/ioccom.h>
+
+/*
+ * Structures and definitions for mag tape io control commands
+ */
+
+/* structure for MTIOCTOP - mag tape op command */
+struct mtop {
+ short mt_op; /* operations defined below */
+ int32_t mt_count; /* how many of them */
+};
+
+/* operations */
+#define MTWEOF 0 /* write an end-of-file record */
+#define MTFSF 1 /* forward space file */
+#define MTBSF 2 /* backward space file */
+#define MTFSR 3 /* forward space record */
+#define MTBSR 4 /* backward space record */
+#define MTREW 5 /* rewind */
+#define MTOFFL 6 /* rewind and put the drive offline */
+#define MTNOP 7 /* no operation, sets status only */
+#define MTCACHE 8 /* enable controller cache */
+#define MTNOCACHE 9 /* disable controller cache */
+
+#if defined(__FreeBSD__)
+/* Set block size for device. If device is a variable size dev */
+/* a non zero parameter will change the device to a fixed block size */
+/* device with block size set to that of the parameter passed in. */
+/* Resetting the block size to 0 will restore the device to a variable */
+/* block size device. */
+
+#define MTSETBSIZ 10
+
+/* Set density values for device. Sets the value for the opened mode only. */
+
+#define MTSETDNSTY 11
+
+#define MTERASE 12 /* erase to EOM */
+#define MTEOD 13 /* Space to EOM */
+#define MTCOMP 14 /* select compression mode 0=off, 1=def */
+#define MTRETENS 15 /* re-tension tape */
+#define MTWSS 16 /* write setmark(s) */
+#define MTFSS 17 /* forward space setmark */
+#define MTBSS 18 /* backward space setmark */
+
+#define MT_COMP_ENABLE 0xffffffff
+#define MT_COMP_DISABLED 0xfffffffe
+#define MT_COMP_UNSUPP 0xfffffffd
+
+/*
+ * Values in mt_dsreg that say what the device is doing
+ */
+#define MTIO_DSREG_NIL 0 /* Unknown */
+#define MTIO_DSREG_REST 1 /* Doing Nothing */
+#define MTIO_DSREG_RBSY 2 /* Communicating with tape (but no motion) */
+#define MTIO_DSREG_WR 20 /* Writing */
+#define MTIO_DSREG_FMK 21 /* Writing Filemarks */
+#define MTIO_DSREG_ZER 22 /* Erasing */
+#define MTIO_DSREG_RD 30 /* Reading */
+#define MTIO_DSREG_FWD 40 /* Spacing Forward */
+#define MTIO_DSREG_REV 41 /* Spacing Reverse */
+#define MTIO_DSREG_POS 42 /* Hardware Positioning (direction unknown) */
+#define MTIO_DSREG_REW 43 /* Rewinding */
+#define MTIO_DSREG_TEN 44 /* Retensioning */
+#define MTIO_DSREG_UNL 45 /* Unloading */
+#define MTIO_DSREG_LD 46 /* Loading */
+
+#endif /* __FreeBSD__ */
+
+/* structure for MTIOCGET - mag tape get status command */
+
+struct mtget {
+ short mt_type; /* type of magtape device */
+/* the following two registers are grossly device dependent */
+ short mt_dsreg; /* ``drive status'' register */
+ short mt_erreg; /* ``error'' register */
+/* end device-dependent registers */
+ /*
+ * Note that the residual count, while maintained, may be
+ * be nonsense because the size of the residual may (greatly)
+ * exceed 32 K-bytes. Use the MTIOCERRSTAT ioctl to get a
+ * more accurate count.
+ */
+ short mt_resid; /* residual count */
+#if defined (__FreeBSD__)
+ int32_t mt_blksiz; /* presently operating blocksize */
+ int32_t mt_density; /* presently operating density */
+ uint32_t mt_comp; /* presently operating compression */
+ int32_t mt_blksiz0; /* blocksize for mode 0 */
+ int32_t mt_blksiz1; /* blocksize for mode 1 */
+ int32_t mt_blksiz2; /* blocksize for mode 2 */
+ int32_t mt_blksiz3; /* blocksize for mode 3 */
+ int32_t mt_density0; /* density for mode 0 */
+ int32_t mt_density1; /* density for mode 1 */
+ int32_t mt_density2; /* density for mode 2 */
+ int32_t mt_density3; /* density for mode 3 */
+/* the following are not yet implemented */
+ uint32_t mt_comp0; /* compression type for mode 0 */
+ uint32_t mt_comp1; /* compression type for mode 1 */
+ uint32_t mt_comp2; /* compression type for mode 2 */
+ uint32_t mt_comp3; /* compression type for mode 3 */
+/* end not yet implemented */
+#endif
+ int32_t mt_fileno; /* relative file number of current position */
+ int32_t mt_blkno; /* relative block number of current position */
+};
+
+/* structure for MTIOCERRSTAT - tape get error status command */
+/* really only supported for SCSI tapes right now */
+struct scsi_tape_errors {
+ /*
+ * These are latched from the last command that had a SCSI
+ * Check Condition noted for these operations. The act
+ * of issuing an MTIOCERRSTAT unlatches and clears them.
+ */
+ uint8_t io_sense[32]; /* Last Sense Data For Data I/O */
+ int32_t io_resid; /* residual count from last Data I/O */
+ uint8_t io_cdb[16]; /* Command that Caused the Last Data Sense */
+ uint8_t ctl_sense[32]; /* Last Sense Data For Control I/O */
+ int32_t ctl_resid; /* residual count from last Control I/O */
+ uint8_t ctl_cdb[16]; /* Command that Caused the Last Control Sense */
+ /*
+ * These are the read and write cumulative error counters.
+ * (how to reset cumulative error counters is not yet defined).
+ * (not implemented as yet but space is being reserved for them)
+ */
+ struct {
+ uint32_t retries; /* total # retries performed */
+ uint32_t corrected; /* total # corrections performed */
+ uint32_t processed; /* total # corrections successful */
+ uint32_t failures; /* total # corrections/retries failed */
+ uint64_t nbytes; /* total # bytes processed */
+ } wterr, rderr;
+};
+
+union mterrstat {
+ struct scsi_tape_errors scsi_errstat;
+ char _reserved_padding[256];
+};
+
+/*
+ * Constants for mt_type byte. These are the same
+ * for controllers compatible with the types listed.
+ */
+#define MT_ISTS 0x01 /* TS-11 */
+#define MT_ISHT 0x02 /* TM03 Massbus: TE16, TU45, TU77 */
+#define MT_ISTM 0x03 /* TM11/TE10 Unibus */
+#define MT_ISMT 0x04 /* TM78/TU78 Massbus */
+#define MT_ISUT 0x05 /* SI TU-45 emulation on Unibus */
+#define MT_ISCPC 0x06 /* SUN */
+#define MT_ISAR 0x07 /* SUN */
+#define MT_ISTMSCP 0x08 /* DEC TMSCP protocol (TU81, TK50) */
+#define MT_ISCY 0x09 /* CCI Cipher */
+#define MT_ISCT 0x0a /* HP 1/4 tape */
+#define MT_ISFHP 0x0b /* HP 7980 1/2 tape */
+#define MT_ISEXABYTE 0x0c /* Exabyte */
+#define MT_ISEXA8200 0x0c /* Exabyte EXB-8200 */
+#define MT_ISEXA8500 0x0d /* Exabyte EXB-8500 */
+#define MT_ISVIPER1 0x0e /* Archive Viper-150 */
+#define MT_ISPYTHON 0x0f /* Archive Python (DAT) */
+#define MT_ISHPDAT 0x10 /* HP 35450A DAT drive */
+#define MT_ISMFOUR 0x11 /* M4 Data 1/2 9track drive */
+#define MT_ISTK50 0x12 /* DEC SCSI TK50 */
+#define MT_ISMT02 0x13 /* Emulex MT02 SCSI tape controller */
+
+/* mag tape io control commands */
+#define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */
+#define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */
+/* these two do not appear to be used anywhere */
+#define MTIOCIEOT _IO('m', 3) /* ignore EOT error */
+#define MTIOCEEOT _IO('m', 4) /* enable EOT error */
+/*
+ * When more SCSI-3 SSC (streaming device) devices are out there
+ * that support the full 32 byte type 2 structure, we'll have to
+ * rethink these ioctls to support all the entities they haul into
+ * the picture (64 bit blocks, logical file record numbers, etc..).
+ */
+#define MTIOCRDSPOS _IOR('m', 5, uint32_t) /* get logical blk addr */
+#define MTIOCRDHPOS _IOR('m', 6, uint32_t) /* get hardware blk addr */
+#define MTIOCSLOCATE _IOW('m', 5, uint32_t) /* seek to logical blk addr */
+#define MTIOCHLOCATE _IOW('m', 6, uint32_t) /* seek to hardware blk addr */
+#define MTIOCERRSTAT _IOR('m', 7, union mterrstat) /* get tape errors */
+/*
+ * Set EOT model- argument is number of filemarks to end a tape with.
+ * Note that not all possible values will be accepted.
+ */
+#define MTIOCSETEOTMODEL _IOW('m', 8, uint32_t)
+/* Get current EOT model */
+#define MTIOCGETEOTMODEL _IOR('m', 8, uint32_t)
+
+#ifndef _KERNEL
+#define DEFTAPE "/dev/nsa0"
+#endif
+
+#endif /* !_SYS_MTIO_H_ */
+.Ed
+.Sh FILES
+.Bl -tag -width /dev/[n]sa* -compact
+.It Pa /dev/[n]sa*
+.El
+.Sh SEE ALSO
+.Xr mt 1 ,
+.Xr tar 1 ,
+.Xr ast 4 ,
+.Xr sa 4
+.Sh HISTORY
+The
+.Nm
+manual appeared in
+.Bx 4.2 .
+An i386 version first appeared in
+.Fx 2.2 .
+.Sh BUGS
+The status should be returned in a device independent format.
+.Pp
+The special file naming should be redone in a more consistent and
+understandable manner.
diff --git a/share/man/man4/multicast.4 b/share/man/man4/multicast.4
new file mode 100644
index 0000000..81d6c77
--- /dev/null
+++ b/share/man/man4/multicast.4
@@ -0,0 +1,1011 @@
+.\" Copyright (c) 2001-2003 International Computer Science Institute
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
+.\" and/or sell copies of the Software, and to permit persons to whom the
+.\" Software is furnished to do so, subject to the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included in
+.\" all copies or substantial portions of the Software.
+.\"
+.\" The names and trademarks of copyright holders may not be used in
+.\" advertising or publicity pertaining to the software without specific
+.\" prior permission. Title to copyright in this software and any associated
+.\" documentation will at all times remain with the copyright holders.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+.\" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+.\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+.\" DEALINGS IN THE SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 27, 2009
+.Dt MULTICAST 4
+.Os
+.\"
+.Sh NAME
+.Nm multicast
+.Nd Multicast Routing
+.\"
+.Sh SYNOPSIS
+.Cd "options MROUTING"
+.Pp
+.In sys/types.h
+.In sys/socket.h
+.In netinet/in.h
+.In netinet/ip_mroute.h
+.In netinet6/ip6_mroute.h
+.Ft int
+.Fn getsockopt "int s" IPPROTO_IP MRT_INIT "void *optval" "socklen_t *optlen"
+.Ft int
+.Fn setsockopt "int s" IPPROTO_IP MRT_INIT "const void *optval" "socklen_t optlen"
+.Ft int
+.Fn getsockopt "int s" IPPROTO_IPV6 MRT6_INIT "void *optval" "socklen_t *optlen"
+.Ft int
+.Fn setsockopt "int s" IPPROTO_IPV6 MRT6_INIT "const void *optval" "socklen_t optlen"
+.Sh DESCRIPTION
+.Tn "Multicast routing"
+is used to efficiently propagate data
+packets to a set of multicast listeners in multipoint networks.
+If unicast is used to replicate the data to all listeners,
+then some of the network links may carry multiple copies of the same
+data packets.
+With multicast routing, the overhead is reduced to one copy
+(at most) per network link.
+.Pp
+All multicast-capable routers must run a common multicast routing
+protocol.
+It is recommended that either
+Protocol Independent Multicast - Sparse Mode (PIM-SM),
+or Protocol Independent Multicast - Dense Mode (PIM-DM)
+are used, as these are now the generally accepted protocols
+in the Internet community.
+The
+.Sx HISTORY
+section discusses previous multicast routing protocols.
+.Pp
+To start multicast routing,
+the user must enable multicast forwarding in the kernel
+(see
+.Sx SYNOPSIS
+about the kernel configuration options),
+and must run a multicast routing capable user-level process.
+From developer's point of view,
+the programming guide described in the
+.Sx "Programming Guide"
+section should be used to control the multicast forwarding in the kernel.
+.\"
+.Ss Programming Guide
+This section provides information about the basic multicast routing API.
+The so-called
+.Dq advanced multicast API
+is described in the
+.Sx "Advanced Multicast API Programming Guide"
+section.
+.Pp
+First, a multicast routing socket must be open.
+That socket would be used
+to control the multicast forwarding in the kernel.
+Note that most operations below require certain privilege
+(i.e., root privilege):
+.Bd -literal
+/* IPv4 */
+int mrouter_s4;
+mrouter_s4 = socket(AF_INET, SOCK_RAW, IPPROTO_IGMP);
+.Ed
+.Bd -literal
+int mrouter_s6;
+mrouter_s6 = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
+.Ed
+.Pp
+Note that if the router needs to open an IGMP or ICMPv6 socket
+(in case of IPv4 and IPv6 respectively)
+for sending or receiving of IGMP or MLD multicast group membership messages,
+then the same
+.Va mrouter_s4
+or
+.Va mrouter_s6
+sockets should be used
+for sending and receiving respectively IGMP or MLD messages.
+In case of
+.Bx Ns
+-derived kernel, it may be possible to open separate sockets
+for IGMP or MLD messages only.
+However, some other kernels (e.g.,
+.Tn Linux )
+require that the multicast
+routing socket must be used for sending and receiving of IGMP or MLD
+messages.
+Therefore, for portability reason the multicast
+routing socket should be reused for IGMP and MLD messages as well.
+.Pp
+After the multicast routing socket is open, it can be used to enable
+or disable multicast forwarding in the kernel:
+.Bd -literal
+/* IPv4 */
+int v = 1; /* 1 to enable, or 0 to disable */
+setsockopt(mrouter_s4, IPPROTO_IP, MRT_INIT, (void *)&v, sizeof(v));
+.Ed
+.Bd -literal
+/* IPv6 */
+int v = 1; /* 1 to enable, or 0 to disable */
+setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_INIT, (void *)&v, sizeof(v));
+\&...
+/* If necessary, filter all ICMPv6 messages */
+struct icmp6_filter filter;
+ICMP6_FILTER_SETBLOCKALL(&filter);
+setsockopt(mrouter_s6, IPPROTO_ICMPV6, ICMP6_FILTER, (void *)&filter,
+ sizeof(filter));
+.Ed
+.Pp
+After multicast forwarding is enabled, the multicast routing socket
+can be used to enable PIM processing in the kernel if we are running PIM-SM or
+PIM-DM
+(see
+.Xr pim 4 ) .
+.Pp
+For each network interface (e.g., physical or a virtual tunnel)
+that would be used for multicast forwarding, a corresponding
+multicast interface must be added to the kernel:
+.Bd -literal
+/* IPv4 */
+struct vifctl vc;
+memset(&vc, 0, sizeof(vc));
+/* Assign all vifctl fields as appropriate */
+vc.vifc_vifi = vif_index;
+vc.vifc_flags = vif_flags;
+vc.vifc_threshold = min_ttl_threshold;
+vc.vifc_rate_limit = 0;
+memcpy(&vc.vifc_lcl_addr, &vif_local_address, sizeof(vc.vifc_lcl_addr));
+setsockopt(mrouter_s4, IPPROTO_IP, MRT_ADD_VIF, (void *)&vc,
+ sizeof(vc));
+.Ed
+.Pp
+The
+.Va vif_index
+must be unique per vif.
+The
+.Va vif_flags
+contains the
+.Dv VIFF_*
+flags as defined in
+.In netinet/ip_mroute.h .
+The
+.Dv VIFF_TUNNEL
+flag is no longer supported by
+.Fx .
+Users who wish to forward multicast datagrams over a tunnel should consider
+configuring a
+.Xr gif 4
+or
+.Xr gre 4
+tunnel and using it as a physical interface.
+.Pp
+The
+.Va min_ttl_threshold
+contains the minimum TTL a multicast data packet must have to be
+forwarded on that vif.
+Typically, it would have value of 1.
+.Pp
+The
+.Va max_rate_limit
+argument is no longer supported in
+.Fx
+and should be set to 0.
+Users who wish to rate-limit multicast datagrams should consider the use of
+.Xr dummynet 4
+or
+.Xr altq 4 .
+.Pp
+The
+.Va vif_local_address
+contains the local IP address of the corresponding local interface.
+The
+.Va vif_remote_address
+contains the remote IP address in case of DVMRP multicast tunnels.
+.Bd -literal
+/* IPv6 */
+struct mif6ctl mc;
+memset(&mc, 0, sizeof(mc));
+/* Assign all mif6ctl fields as appropriate */
+mc.mif6c_mifi = mif_index;
+mc.mif6c_flags = mif_flags;
+mc.mif6c_pifi = pif_index;
+setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_ADD_MIF, (void *)&mc,
+ sizeof(mc));
+.Ed
+.Pp
+The
+.Va mif_index
+must be unique per vif.
+The
+.Va mif_flags
+contains the
+.Dv MIFF_*
+flags as defined in
+.In netinet6/ip6_mroute.h .
+The
+.Va pif_index
+is the physical interface index of the corresponding local interface.
+.Pp
+A multicast interface is deleted by:
+.Bd -literal
+/* IPv4 */
+vifi_t vifi = vif_index;
+setsockopt(mrouter_s4, IPPROTO_IP, MRT_DEL_VIF, (void *)&vifi,
+ sizeof(vifi));
+.Ed
+.Bd -literal
+/* IPv6 */
+mifi_t mifi = mif_index;
+setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_DEL_MIF, (void *)&mifi,
+ sizeof(mifi));
+.Ed
+.Pp
+After the multicast forwarding is enabled, and the multicast virtual
+interfaces are
+added, the kernel may deliver upcall messages (also called signals
+later in this text) on the multicast routing socket that was open
+earlier with
+.Dv MRT_INIT
+or
+.Dv MRT6_INIT .
+The IPv4 upcalls have
+.Vt "struct igmpmsg"
+header (see
+.In netinet/ip_mroute.h )
+with field
+.Va im_mbz
+set to zero.
+Note that this header follows the structure of
+.Vt "struct ip"
+with the protocol field
+.Va ip_p
+set to zero.
+The IPv6 upcalls have
+.Vt "struct mrt6msg"
+header (see
+.In netinet6/ip6_mroute.h )
+with field
+.Va im6_mbz
+set to zero.
+Note that this header follows the structure of
+.Vt "struct ip6_hdr"
+with the next header field
+.Va ip6_nxt
+set to zero.
+.Pp
+The upcall header contains field
+.Va im_msgtype
+and
+.Va im6_msgtype
+with the type of the upcall
+.Dv IGMPMSG_*
+and
+.Dv MRT6MSG_*
+for IPv4 and IPv6 respectively.
+The values of the rest of the upcall header fields
+and the body of the upcall message depend on the particular upcall type.
+.Pp
+If the upcall message type is
+.Dv IGMPMSG_NOCACHE
+or
+.Dv MRT6MSG_NOCACHE ,
+this is an indication that a multicast packet has reached the multicast
+router, but the router has no forwarding state for that packet.
+Typically, the upcall would be a signal for the multicast routing
+user-level process to install the appropriate Multicast Forwarding
+Cache (MFC) entry in the kernel.
+.Pp
+An MFC entry is added by:
+.Bd -literal
+/* IPv4 */
+struct mfcctl mc;
+memset(&mc, 0, sizeof(mc));
+memcpy(&mc.mfcc_origin, &source_addr, sizeof(mc.mfcc_origin));
+memcpy(&mc.mfcc_mcastgrp, &group_addr, sizeof(mc.mfcc_mcastgrp));
+mc.mfcc_parent = iif_index;
+for (i = 0; i < maxvifs; i++)
+ mc.mfcc_ttls[i] = oifs_ttl[i];
+setsockopt(mrouter_s4, IPPROTO_IP, MRT_ADD_MFC,
+ (void *)&mc, sizeof(mc));
+.Ed
+.Bd -literal
+/* IPv6 */
+struct mf6cctl mc;
+memset(&mc, 0, sizeof(mc));
+memcpy(&mc.mf6cc_origin, &source_addr, sizeof(mc.mf6cc_origin));
+memcpy(&mc.mf6cc_mcastgrp, &group_addr, sizeof(mf6cc_mcastgrp));
+mc.mf6cc_parent = iif_index;
+for (i = 0; i < maxvifs; i++)
+ if (oifs_ttl[i] > 0)
+ IF_SET(i, &mc.mf6cc_ifset);
+setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_ADD_MFC,
+ (void *)&mc, sizeof(mc));
+.Ed
+.Pp
+The
+.Va source_addr
+and
+.Va group_addr
+are the source and group address of the multicast packet (as set
+in the upcall message).
+The
+.Va iif_index
+is the virtual interface index of the multicast interface the multicast
+packets for this specific source and group address should be received on.
+The
+.Va oifs_ttl[]
+array contains the minimum TTL (per interface) a multicast packet
+should have to be forwarded on an outgoing interface.
+If the TTL value is zero, the corresponding interface is not included
+in the set of outgoing interfaces.
+Note that in case of IPv6 only the set of outgoing interfaces can
+be specified.
+.Pp
+An MFC entry is deleted by:
+.Bd -literal
+/* IPv4 */
+struct mfcctl mc;
+memset(&mc, 0, sizeof(mc));
+memcpy(&mc.mfcc_origin, &source_addr, sizeof(mc.mfcc_origin));
+memcpy(&mc.mfcc_mcastgrp, &group_addr, sizeof(mc.mfcc_mcastgrp));
+setsockopt(mrouter_s4, IPPROTO_IP, MRT_DEL_MFC,
+ (void *)&mc, sizeof(mc));
+.Ed
+.Bd -literal
+/* IPv6 */
+struct mf6cctl mc;
+memset(&mc, 0, sizeof(mc));
+memcpy(&mc.mf6cc_origin, &source_addr, sizeof(mc.mf6cc_origin));
+memcpy(&mc.mf6cc_mcastgrp, &group_addr, sizeof(mf6cc_mcastgrp));
+setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_DEL_MFC,
+ (void *)&mc, sizeof(mc));
+.Ed
+.Pp
+The following method can be used to get various statistics per
+installed MFC entry in the kernel (e.g., the number of forwarded
+packets per source and group address):
+.Bd -literal
+/* IPv4 */
+struct sioc_sg_req sgreq;
+memset(&sgreq, 0, sizeof(sgreq));
+memcpy(&sgreq.src, &source_addr, sizeof(sgreq.src));
+memcpy(&sgreq.grp, &group_addr, sizeof(sgreq.grp));
+ioctl(mrouter_s4, SIOCGETSGCNT, &sgreq);
+.Ed
+.Bd -literal
+/* IPv6 */
+struct sioc_sg_req6 sgreq;
+memset(&sgreq, 0, sizeof(sgreq));
+memcpy(&sgreq.src, &source_addr, sizeof(sgreq.src));
+memcpy(&sgreq.grp, &group_addr, sizeof(sgreq.grp));
+ioctl(mrouter_s6, SIOCGETSGCNT_IN6, &sgreq);
+.Ed
+.Pp
+The following method can be used to get various statistics per
+multicast virtual interface in the kernel (e.g., the number of forwarded
+packets per interface):
+.Bd -literal
+/* IPv4 */
+struct sioc_vif_req vreq;
+memset(&vreq, 0, sizeof(vreq));
+vreq.vifi = vif_index;
+ioctl(mrouter_s4, SIOCGETVIFCNT, &vreq);
+.Ed
+.Bd -literal
+/* IPv6 */
+struct sioc_mif_req6 mreq;
+memset(&mreq, 0, sizeof(mreq));
+mreq.mifi = vif_index;
+ioctl(mrouter_s6, SIOCGETMIFCNT_IN6, &mreq);
+.Ed
+.Ss Advanced Multicast API Programming Guide
+If we want to add new features in the kernel, it becomes difficult
+to preserve backward compatibility (binary and API),
+and at the same time to allow user-level processes to take advantage of
+the new features (if the kernel supports them).
+.Pp
+One of the mechanisms that allows us to preserve the backward
+compatibility is a sort of negotiation
+between the user-level process and the kernel:
+.Bl -enum
+.It
+The user-level process tries to enable in the kernel the set of new
+features (and the corresponding API) it would like to use.
+.It
+The kernel returns the (sub)set of features it knows about
+and is willing to be enabled.
+.It
+The user-level process uses only that set of features
+the kernel has agreed on.
+.El
+.\"
+.Pp
+To support backward compatibility, if the user-level process does not
+ask for any new features, the kernel defaults to the basic
+multicast API (see the
+.Sx "Programming Guide"
+section).
+.\" XXX: edit as appropriate after the advanced multicast API is
+.\" supported under IPv6
+Currently, the advanced multicast API exists only for IPv4;
+in the future there will be IPv6 support as well.
+.Pp
+Below is a summary of the expandable API solution.
+Note that all new options and structures are defined
+in
+.In netinet/ip_mroute.h
+and
+.In netinet6/ip6_mroute.h ,
+unless stated otherwise.
+.Pp
+The user-level process uses new
+.Fn getsockopt Ns / Ns Fn setsockopt
+options to
+perform the API features negotiation with the kernel.
+This negotiation must be performed right after the multicast routing
+socket is open.
+The set of desired/allowed features is stored in a bitset
+(currently, in
+.Vt uint32_t ;
+i.e., maximum of 32 new features).
+The new
+.Fn getsockopt Ns / Ns Fn setsockopt
+options are
+.Dv MRT_API_SUPPORT
+and
+.Dv MRT_API_CONFIG .
+Example:
+.Bd -literal
+uint32_t v;
+getsockopt(sock, IPPROTO_IP, MRT_API_SUPPORT, (void *)&v, sizeof(v));
+.Ed
+.Pp
+would set in
+.Va v
+the pre-defined bits that the kernel API supports.
+The eight least significant bits in
+.Vt uint32_t
+are same as the
+eight possible flags
+.Dv MRT_MFC_FLAGS_*
+that can be used in
+.Va mfcc_flags
+as part of the new definition of
+.Vt "struct mfcctl"
+(see below about those flags), which leaves 24 flags for other new features.
+The value returned by
+.Fn getsockopt MRT_API_SUPPORT
+is read-only; in other words,
+.Fn setsockopt MRT_API_SUPPORT
+would fail.
+.Pp
+To modify the API, and to set some specific feature in the kernel, then:
+.Bd -literal
+uint32_t v = MRT_MFC_FLAGS_DISABLE_WRONGVIF;
+if (setsockopt(sock, IPPROTO_IP, MRT_API_CONFIG, (void *)&v, sizeof(v))
+ != 0) {
+ return (ERROR);
+}
+if (v & MRT_MFC_FLAGS_DISABLE_WRONGVIF)
+ return (OK); /* Success */
+else
+ return (ERROR);
+.Ed
+.Pp
+In other words, when
+.Fn setsockopt MRT_API_CONFIG
+is called, the
+argument to it specifies the desired set of features to
+be enabled in the API and the kernel.
+The return value in
+.Va v
+is the actual (sub)set of features that were enabled in the kernel.
+To obtain later the same set of features that were enabled, then:
+.Bd -literal
+getsockopt(sock, IPPROTO_IP, MRT_API_CONFIG, (void *)&v, sizeof(v));
+.Ed
+.Pp
+The set of enabled features is global.
+In other words,
+.Fn setsockopt MRT_API_CONFIG
+should be called right after
+.Fn setsockopt MRT_INIT .
+.Pp
+Currently, the following set of new features is defined:
+.Bd -literal
+#define MRT_MFC_FLAGS_DISABLE_WRONGVIF (1 << 0) /* disable WRONGVIF signals */
+#define MRT_MFC_FLAGS_BORDER_VIF (1 << 1) /* border vif */
+#define MRT_MFC_RP (1 << 8) /* enable RP address */
+#define MRT_MFC_BW_UPCALL (1 << 9) /* enable bw upcalls */
+.Ed
+.\" .Pp
+.\" In the future there might be:
+.\" .Bd -literal
+.\" #define MRT_MFC_GROUP_SPECIFIC (1 << 10) /* allow (*,G) MFC entries */
+.\" .Ed
+.\" .Pp
+.\" to allow (*,G) MFC entries (i.e., group-specific entries) in the kernel.
+.\" For now this is left-out until it is clear whether
+.\" (*,G) MFC support is the preferred solution instead of something more generic
+.\" solution for example.
+.\"
+.\" 2. The newly defined struct mfcctl2.
+.\"
+.Pp
+The advanced multicast API uses a newly defined
+.Vt "struct mfcctl2"
+instead of the traditional
+.Vt "struct mfcctl" .
+The original
+.Vt "struct mfcctl"
+is kept as is.
+The new
+.Vt "struct mfcctl2"
+is:
+.Bd -literal
+/*
+ * The new argument structure for MRT_ADD_MFC and MRT_DEL_MFC overlays
+ * and extends the old struct mfcctl.
+ */
+struct mfcctl2 {
+ /* the mfcctl fields */
+ struct in_addr mfcc_origin; /* ip origin of mcasts */
+ struct in_addr mfcc_mcastgrp; /* multicast group associated*/
+ vifi_t mfcc_parent; /* incoming vif */
+ u_char mfcc_ttls[MAXVIFS];/* forwarding ttls on vifs */
+
+ /* extension fields */
+ uint8_t mfcc_flags[MAXVIFS];/* the MRT_MFC_FLAGS_* flags*/
+ struct in_addr mfcc_rp; /* the RP address */
+};
+.Ed
+.Pp
+The new fields are
+.Va mfcc_flags[MAXVIFS]
+and
+.Va mfcc_rp .
+Note that for compatibility reasons they are added at the end.
+.Pp
+The
+.Va mfcc_flags[MAXVIFS]
+field is used to set various flags per
+interface per (S,G) entry.
+Currently, the defined flags are:
+.Bd -literal
+#define MRT_MFC_FLAGS_DISABLE_WRONGVIF (1 << 0) /* disable WRONGVIF signals */
+#define MRT_MFC_FLAGS_BORDER_VIF (1 << 1) /* border vif */
+.Ed
+.Pp
+The
+.Dv MRT_MFC_FLAGS_DISABLE_WRONGVIF
+flag is used to explicitly disable the
+.Dv IGMPMSG_WRONGVIF
+kernel signal at the (S,G) granularity if a multicast data packet
+arrives on the wrong interface.
+Usually, this signal is used to
+complete the shortest-path switch in case of PIM-SM multicast routing,
+or to trigger a PIM assert message.
+However, it should not be delivered for interfaces that are not in
+the outgoing interface set, and that are not expecting to
+become an incoming interface.
+Hence, if the
+.Dv MRT_MFC_FLAGS_DISABLE_WRONGVIF
+flag is set for some of the
+interfaces, then a data packet that arrives on that interface for
+that MFC entry will NOT trigger a WRONGVIF signal.
+If that flag is not set, then a signal is triggered (the default action).
+.Pp
+The
+.Dv MRT_MFC_FLAGS_BORDER_VIF
+flag is used to specify whether the Border-bit in PIM
+Register messages should be set (in case when the Register encapsulation
+is performed inside the kernel).
+If it is set for the special PIM Register kernel virtual interface
+(see
+.Xr pim 4 ) ,
+the Border-bit in the Register messages sent to the RP will be set.
+.Pp
+The remaining six bits are reserved for future usage.
+.Pp
+The
+.Va mfcc_rp
+field is used to specify the RP address (in case of PIM-SM multicast routing)
+for a multicast
+group G if we want to perform kernel-level PIM Register encapsulation.
+The
+.Va mfcc_rp
+field is used only if the
+.Dv MRT_MFC_RP
+advanced API flag/capability has been successfully set by
+.Fn setsockopt MRT_API_CONFIG .
+.Pp
+.\"
+.\" 3. Kernel-level PIM Register encapsulation
+.\"
+If the
+.Dv MRT_MFC_RP
+flag was successfully set by
+.Fn setsockopt MRT_API_CONFIG ,
+then the kernel will attempt to perform
+the PIM Register encapsulation itself instead of sending the
+multicast data packets to user level (inside
+.Dv IGMPMSG_WHOLEPKT
+upcalls) for user-level encapsulation.
+The RP address would be taken from the
+.Va mfcc_rp
+field
+inside the new
+.Vt "struct mfcctl2" .
+However, even if the
+.Dv MRT_MFC_RP
+flag was successfully set, if the
+.Va mfcc_rp
+field was set to
+.Dv INADDR_ANY ,
+then the
+kernel will still deliver an
+.Dv IGMPMSG_WHOLEPKT
+upcall with the
+multicast data packet to the user-level process.
+.Pp
+In addition, if the multicast data packet is too large to fit within
+a single IP packet after the PIM Register encapsulation (e.g., if
+its size was on the order of 65500 bytes), the data packet will be
+fragmented, and then each of the fragments will be encapsulated
+separately.
+Note that typically a multicast data packet can be that
+large only if it was originated locally from the same hosts that
+performs the encapsulation; otherwise the transmission of the
+multicast data packet over Ethernet for example would have
+fragmented it into much smaller pieces.
+.\"
+.\" Note that if this code is ported to IPv6, we may need the kernel to
+.\" perform MTU discovery to the RP, and keep those discoveries inside
+.\" the kernel so the encapsulating router may send back ICMP
+.\" Fragmentation Required if the size of the multicast data packet is
+.\" too large (see "Encapsulating data packets in the Register Tunnel"
+.\" in Section 4.4.1 in the PIM-SM spec
+.\" draft-ietf-pim-sm-v2-new-05.{txt,ps}).
+.\" For IPv4 we may be able to get away without it, but for IPv6 we need
+.\" that.
+.\"
+.\" 4. Mechanism for "multicast bandwidth monitoring and upcalls".
+.\"
+.Pp
+Typically, a multicast routing user-level process would need to know the
+forwarding bandwidth for some data flow.
+For example, the multicast routing process may want to timeout idle MFC
+entries, or in case of PIM-SM it can initiate (S,G) shortest-path switch if
+the bandwidth rate is above a threshold for example.
+.Pp
+The original solution for measuring the bandwidth of a dataflow was
+that a user-level process would periodically
+query the kernel about the number of forwarded packets/bytes per
+(S,G), and then based on those numbers it would estimate whether a source
+has been idle, or whether the source's transmission bandwidth is above a
+threshold.
+That solution is far from being scalable, hence the need for a new
+mechanism for bandwidth monitoring.
+.Pp
+Below is a description of the bandwidth monitoring mechanism.
+.Bl -bullet
+.It
+If the bandwidth of a data flow satisfies some pre-defined filter,
+the kernel delivers an upcall on the multicast routing socket
+to the multicast routing process that has installed that filter.
+.It
+The bandwidth-upcall filters are installed per (S,G).
+There can be
+more than one filter per (S,G).
+.It
+Instead of supporting all possible comparison operations
+(i.e., < <= == != > >= ), there is support only for the
+<= and >= operations,
+because this makes the kernel-level implementation simpler,
+and because practically we need only those two.
+Further, the missing operations can be simulated by secondary
+user-level filtering of those <= and >= filters.
+For example, to simulate !=, then we need to install filter
+.Dq bw <= 0xffffffff ,
+and after an
+upcall is received, we need to check whether
+.Dq measured_bw != expected_bw .
+.It
+The bandwidth-upcall mechanism is enabled by
+.Fn setsockopt MRT_API_CONFIG
+for the
+.Dv MRT_MFC_BW_UPCALL
+flag.
+.It
+The bandwidth-upcall filters are added/deleted by the new
+.Fn setsockopt MRT_ADD_BW_UPCALL
+and
+.Fn setsockopt MRT_DEL_BW_UPCALL
+respectively (with the appropriate
+.Vt "struct bw_upcall"
+argument of course).
+.El
+.Pp
+From application point of view, a developer needs to know about
+the following:
+.Bd -literal
+/*
+ * Structure for installing or delivering an upcall if the
+ * measured bandwidth is above or below a threshold.
+ *
+ * User programs (e.g. daemons) may have a need to know when the
+ * bandwidth used by some data flow is above or below some threshold.
+ * This interface allows the userland to specify the threshold (in
+ * bytes and/or packets) and the measurement interval. Flows are
+ * all packet with the same source and destination IP address.
+ * At the moment the code is only used for multicast destinations
+ * but there is nothing that prevents its use for unicast.
+ *
+ * The measurement interval cannot be shorter than some Tmin (currently, 3s).
+ * The threshold is set in packets and/or bytes per_interval.
+ *
+ * Measurement works as follows:
+ *
+ * For >= measurements:
+ * The first packet marks the start of a measurement interval.
+ * During an interval we count packets and bytes, and when we
+ * pass the threshold we deliver an upcall and we are done.
+ * The first packet after the end of the interval resets the
+ * count and restarts the measurement.
+ *
+ * For <= measurement:
+ * We start a timer to fire at the end of the interval, and
+ * then for each incoming packet we count packets and bytes.
+ * When the timer fires, we compare the value with the threshold,
+ * schedule an upcall if we are below, and restart the measurement
+ * (reschedule timer and zero counters).
+ */
+
+struct bw_data {
+ struct timeval b_time;
+ uint64_t b_packets;
+ uint64_t b_bytes;
+};
+
+struct bw_upcall {
+ struct in_addr bu_src; /* source address */
+ struct in_addr bu_dst; /* destination address */
+ uint32_t bu_flags; /* misc flags (see below) */
+#define BW_UPCALL_UNIT_PACKETS (1 << 0) /* threshold (in packets) */
+#define BW_UPCALL_UNIT_BYTES (1 << 1) /* threshold (in bytes) */
+#define BW_UPCALL_GEQ (1 << 2) /* upcall if bw >= threshold */
+#define BW_UPCALL_LEQ (1 << 3) /* upcall if bw <= threshold */
+#define BW_UPCALL_DELETE_ALL (1 << 4) /* delete all upcalls for s,d*/
+ struct bw_data bu_threshold; /* the bw threshold */
+ struct bw_data bu_measured; /* the measured bw */
+};
+
+/* max. number of upcalls to deliver together */
+#define BW_UPCALLS_MAX 128
+/* min. threshold time interval for bandwidth measurement */
+#define BW_UPCALL_THRESHOLD_INTERVAL_MIN_SEC 3
+#define BW_UPCALL_THRESHOLD_INTERVAL_MIN_USEC 0
+.Ed
+.Pp
+The
+.Vt bw_upcall
+structure is used as an argument to
+.Fn setsockopt MRT_ADD_BW_UPCALL
+and
+.Fn setsockopt MRT_DEL_BW_UPCALL .
+Each
+.Fn setsockopt MRT_ADD_BW_UPCALL
+installs a filter in the kernel
+for the source and destination address in the
+.Vt bw_upcall
+argument,
+and that filter will trigger an upcall according to the following
+pseudo-algorithm:
+.Bd -literal
+ if (bw_upcall_oper IS ">=") {
+ if (((bw_upcall_unit & PACKETS == PACKETS) &&
+ (measured_packets >= threshold_packets)) ||
+ ((bw_upcall_unit & BYTES == BYTES) &&
+ (measured_bytes >= threshold_bytes)))
+ SEND_UPCALL("measured bandwidth is >= threshold");
+ }
+ if (bw_upcall_oper IS "<=" && measured_interval >= threshold_interval) {
+ if (((bw_upcall_unit & PACKETS == PACKETS) &&
+ (measured_packets <= threshold_packets)) ||
+ ((bw_upcall_unit & BYTES == BYTES) &&
+ (measured_bytes <= threshold_bytes)))
+ SEND_UPCALL("measured bandwidth is <= threshold");
+ }
+.Ed
+.Pp
+In the same
+.Vt bw_upcall
+the unit can be specified in both BYTES and PACKETS.
+However, the GEQ and LEQ flags are mutually exclusive.
+.Pp
+Basically, an upcall is delivered if the measured bandwidth is >= or
+<= the threshold bandwidth (within the specified measurement
+interval).
+For practical reasons, the smallest value for the measurement
+interval is 3 seconds.
+If smaller values are allowed, then the bandwidth
+estimation may be less accurate, or the potentially very high frequency
+of the generated upcalls may introduce too much overhead.
+For the >= operation, the answer may be known before the end of
+.Va threshold_interval ,
+therefore the upcall may be delivered earlier.
+For the <= operation however, we must wait
+until the threshold interval has expired to know the answer.
+.Pp
+Example of usage:
+.Bd -literal
+struct bw_upcall bw_upcall;
+/* Assign all bw_upcall fields as appropriate */
+memset(&bw_upcall, 0, sizeof(bw_upcall));
+memcpy(&bw_upcall.bu_src, &source, sizeof(bw_upcall.bu_src));
+memcpy(&bw_upcall.bu_dst, &group, sizeof(bw_upcall.bu_dst));
+bw_upcall.bu_threshold.b_data = threshold_interval;
+bw_upcall.bu_threshold.b_packets = threshold_packets;
+bw_upcall.bu_threshold.b_bytes = threshold_bytes;
+if (is_threshold_in_packets)
+ bw_upcall.bu_flags |= BW_UPCALL_UNIT_PACKETS;
+if (is_threshold_in_bytes)
+ bw_upcall.bu_flags |= BW_UPCALL_UNIT_BYTES;
+do {
+ if (is_geq_upcall) {
+ bw_upcall.bu_flags |= BW_UPCALL_GEQ;
+ break;
+ }
+ if (is_leq_upcall) {
+ bw_upcall.bu_flags |= BW_UPCALL_LEQ;
+ break;
+ }
+ return (ERROR);
+} while (0);
+setsockopt(mrouter_s4, IPPROTO_IP, MRT_ADD_BW_UPCALL,
+ (void *)&bw_upcall, sizeof(bw_upcall));
+.Ed
+.Pp
+To delete a single filter, then use
+.Dv MRT_DEL_BW_UPCALL ,
+and the fields of bw_upcall must be set
+exactly same as when
+.Dv MRT_ADD_BW_UPCALL
+was called.
+.Pp
+To delete all bandwidth filters for a given (S,G), then
+only the
+.Va bu_src
+and
+.Va bu_dst
+fields in
+.Vt "struct bw_upcall"
+need to be set, and then just set only the
+.Dv BW_UPCALL_DELETE_ALL
+flag inside field
+.Va bw_upcall.bu_flags .
+.Pp
+The bandwidth upcalls are received by aggregating them in the new upcall
+message:
+.Bd -literal
+#define IGMPMSG_BW_UPCALL 4 /* BW monitoring upcall */
+.Ed
+.Pp
+This message is an array of
+.Vt "struct bw_upcall"
+elements (up to
+.Dv BW_UPCALLS_MAX
+= 128).
+The upcalls are
+delivered when there are 128 pending upcalls, or when 1 second has
+expired since the previous upcall (whichever comes first).
+In an
+.Vt "struct upcall"
+element, the
+.Va bu_measured
+field is filled-in to
+indicate the particular measured values.
+However, because of the way
+the particular intervals are measured, the user should be careful how
+.Va bu_measured.b_time
+is used.
+For example, if the
+filter is installed to trigger an upcall if the number of packets
+is >= 1, then
+.Va bu_measured
+may have a value of zero in the upcalls after the
+first one, because the measured interval for >= filters is
+.Dq clocked
+by the forwarded packets.
+Hence, this upcall mechanism should not be used for measuring
+the exact value of the bandwidth of the forwarded data.
+To measure the exact bandwidth, the user would need to
+get the forwarded packets statistics with the
+.Fn ioctl SIOCGETSGCNT
+mechanism
+(see the
+.Sx Programming Guide
+section) .
+.Pp
+Note that the upcalls for a filter are delivered until the specific
+filter is deleted, but no more frequently than once per
+.Va bu_threshold.b_time .
+For example, if the filter is specified to
+deliver a signal if bw >= 1 packet, the first packet will trigger a
+signal, but the next upcall will be triggered no earlier than
+.Va bu_threshold.b_time
+after the previous upcall.
+.\"
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr dummynet 4 ,
+.Xr getsockopt 2 ,
+.Xr gif 4 ,
+.Xr gre 4 ,
+.Xr recvfrom 2 ,
+.Xr recvmsg 2 ,
+.Xr setsockopt 2 ,
+.Xr socket 2 ,
+.Xr sourcefilter 3 ,
+.Xr icmp6 4 ,
+.Xr igmp 4 ,
+.Xr inet 4 ,
+.Xr inet6 4 ,
+.Xr intro 4 ,
+.Xr ip 4 ,
+.Xr ip6 4 ,
+.Xr mld 4 ,
+.Xr pim 4
+.\"
+.Sh HISTORY
+The Distance Vector Multicast Routing Protocol (DVMRP)
+was the first developed multicast routing protocol.
+Later, other protocols such as Multicast Extensions to OSPF (MOSPF)
+and Core Based Trees (CBT), were developed as well.
+Routers at autonomous system boundaries may now exchange multicast
+routes with peers via the Border Gateway Protocol (BGP).
+Many other routing protocols are able to redistribute multicast routes
+for use with
+.Dv PIM-SM
+and
+.Dv PIM-DM .
+.Sh AUTHORS
+.An -nosplit
+The original multicast code was written by
+.An David Waitzman
+(BBN Labs),
+and later modified by the following individuals:
+.An Steve Deering
+(Stanford),
+.An Mark J. Steiglitz
+(Stanford),
+.An Van Jacobson
+(LBL),
+.An Ajit Thyagarajan
+(PARC),
+.An Bill Fenner
+(PARC).
+The IPv6 multicast support was implemented by the KAME project
+.Pq Pa http://www.kame.net ,
+and was based on the IPv4 multicast code.
+The advanced multicast API and the multicast bandwidth
+monitoring were implemented by
+.An Pavlin Radoslavov
+(ICSI)
+in collaboration with
+.An Chris Brown
+(NextHop).
+The IGMPv3 and MLDv2 multicast support was implemented by
+.An Bruce Simpson .
+.Pp
+This manual page was written by
+.An Pavlin Radoslavov
+(ICSI).
diff --git a/share/man/man4/mvs.4 b/share/man/man4/mvs.4
new file mode 100644
index 0000000..be8c3ea
--- /dev/null
+++ b/share/man/man4/mvs.4
@@ -0,0 +1,178 @@
+.\" Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 3, 2013
+.Dt MVS 4
+.Os
+.Sh NAME
+.Nm mvs
+.Nd Marvell Serial ATA Host Controller driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device scbus"
+.Cd "device mvs"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mvs_load="YES"
+.Ed
+.Pp
+The following tunables are settable from the
+.Xr loader 8 :
+.Bl -ohang
+.It Va hint.mvs. Ns Ar X Ns Va .msi
+controls Message Signaled Interrupts (MSI) usage by the specified controller.
+.It Va hint.mvs. Ns Ar X Ns Va .ccc
+controls Command Completion Coalescing (CCC) usage by the specified controller.
+Non-zero value enables CCC and defines maximum time (in us), request can wait
+for interrupt.
+CCC reduces number of context switches on systems with many parallel requests,
+but it can decrease disk performance on some workloads due to additional
+command latency.
+.It Va hint.mvs. Ns Ar X Ns Va .cccc
+defines number of completed commands for CCC, which trigger interrupt without
+waiting for specified coalescing timeout.
+.It Va hint.mvsch. Ns Ar X Ns Va .pm_level
+controls SATA interface Power Management for the specified channel,
+allowing some power to be saved at the cost of additional command
+latency.
+Possible values:
+.Pp
+.Bl -tag -width 4n -offset indent -compact
+.It 0
+interface Power Management is disabled (default);
+.It 1
+device is allowed to initiate PM state change, host is passive;
+.It 4
+driver initiates PARTIAL PM state transition 1ms after port becomes idle;
+.It 5
+driver initiates SLUMBER PM state transition 125ms after port becomes idle.
+.El
+.Pp
+Note that interface Power Management is not compatible with
+device presence detection.
+A manual bus reset is needed on device hot-plug.
+.It Va hint.mvsch. Ns Ar X Ns Va .sata_rev
+setting to nonzero value limits maximum SATA revision (speed).
+Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps.
+.El
+.Sh DESCRIPTION
+This driver provides the
+.Xr CAM 4
+subsystem with native access to the
+.Tn SATA
+ports of several generations (Gen-I/II/IIe) of Marvell SATA controllers.
+Each SATA port found is represented to CAM as a separate bus with one
+target, or, if HBA supports Port Multipliers (Gen-II/IIe), 16 targets.
+Most of the bus-management details are handled by the SATA-specific
+transport of CAM.
+Connected ATA disks are handled by the ATA protocol disk peripheral driver
+.Xr ada 4 .
+ATAPI devices are handled by the SCSI protocol peripheral drivers
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4 ,
+etc.
+.Pp
+Driver features include support for Serial ATA and ATAPI devices,
+Port Multipliers (including FIS-based switching, when supported),
+hardware command queues (up to 31 command per port),
+Native Command Queuing, SATA interface Power Management, device hot-plug
+and Message Signaled Interrupts.
+.Pp
+The same hardware is also supported by the atamarvell and ataadaptec
+drivers from the
+.Xr ata 4
+subsystem.
+If both drivers are loaded at the same time, this one will be
+given precedence as the more functional of the two.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following controllers:
+.Pp
+Gen-I (SATA 1.5Gbps):
+.Bl -bullet -compact -offset "xxxxxx"
+.It
+88SX5040
+.It
+88SX5041
+.It
+88SX5080
+.It
+88SX5081
+.El
+.Pp
+Gen-II (SATA 3Gbps, NCQ, PMP):
+.Bl -bullet -compact -offset "xxxxxx"
+.It
+88SX6040
+.It
+88SX6041 (including Adaptec 1420SA)
+.It
+88SX6080
+.It
+88SX6081
+.El
+.Pp
+Gen-IIe (SATA 3Gbps, NCQ, PMP with FBS):
+.Bl -bullet -compact -offset "xxxxxx"
+.It
+88SX6042
+.It
+88SX7042 (including Adaptec 1430SA)
+.It
+88F5182 SoC
+.It
+88F6281 SoC
+.It
+MV78100 SoC
+.El
+.Pp
+Note, that this hardware supports command queueing and FIS-based switching
+only for ATA DMA commands.
+ATAPI and non-DMA ATA commands executed one by one for each port.
+.Sh SEE ALSO
+.Xr ada 4 ,
+.Xr ata 4 ,
+.Xr cam 4 ,
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 8.1 .
+.Sh AUTHORS
+.An Alexander Motin Aq mav@FreeBSD.org
diff --git a/share/man/man4/mwl.4 b/share/man/man4/mwl.4
new file mode 100644
index 0000000..910ae08
--- /dev/null
+++ b/share/man/man4/mwl.4
@@ -0,0 +1,193 @@
+.\"-
+.\" Copyright (c) 2009 Sam Leffler, Errno Consulting
+.\" All rights reserved.
+.\""
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+.\" redistribution must be conditioned upon including a substantially
+.\" similar Disclaimer requirement for further binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
+.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" $FreeBSD$
+.\"/
+.Dd July 8, 2009
+.Dt MWL 4
+.Os
+.Sh NAME
+.Nm mwl
+.Nd "Marvell 88W8363 IEEE 802.11n wireless network driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device mwl"
+.Cd "device mwlfw"
+.Cd "device wlan"
+.Cd "device firmware"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_mwl_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for IEEE 802.11n wireless network adapters based on
+Marvell 88W8363 parts.
+PCI and/or CardBus interfaces are supported.
+.Pp
+This driver requires the firmware built with the
+.Nm mwlfw
+module to work.
+Normally this module is loaded on demand by the driver but it may
+also be compiled into the kernel.
+.Pp
+Supported features include 802.11n, power management, BSS, MBSS,
+and host-based access point operation modes.
+All host/device interaction is via DMA.
+.Pp
+The
+.Nm
+driver encapsulates IP and ARP traffic as 802.11 frames, however
+it can receive either 802.11 or 802.3 frames.
+Devices support 802.11n, 802.11a, 802.11g, and 802.11b operation with
+transmit speeds appropriate to each.
+The actual transmit speed used is dependent on signal quality and the
+.Dq "rate control"
+algorithm implemented in the firmware.
+All chips have hardware support for WEP,
+AES-CCM, TKIP, and Michael cryptographic operations.
+.Pp
+The driver supports
+.Cm station ,
+.Cm hostap ,
+.Cm mesh ,
+and
+.Cm wds
+mode operation.
+Multiple
+.Cm hostap
+virtual interfaces may be configured for simultaneous use.
+When multiple interfaces are configured each may have a separate
+mac address that is formed by setting the U/L bits in the mac
+address assigned to the underlying device.
+Any number of
+.Cm wds
+virtual interfaces may be configured together with
+.Cm hostap
+interfaces.
+Multiple
+.Cm station
+interfaces may be operated together with
+.Cm hostap
+interfaces to construct a wireless repeater device.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+Devices supported by the
+.Nm
+driver come in either Cardbus or mini-PCI packages.
+Wireless cards in Cardbus slots may be inserted and ejected on the fly.
+.Sh EXAMPLES
+Join an existing BSS network (ie: connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev mwl0 inet 192.168.0.20 \e
+ netmask 0xffffff00"
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Bd -literal -offset indent
+ifconfig wlan create wlandev mwl0 inet 192.168.0.20 \e
+ netmask 0xffffff00 ssid my_net"
+.Ed
+.Pp
+Join a specific BSS network with WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev mwl0
+ifconfig wlan0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net \e
+ wepmode on wepkey 0x8736639624
+.Ed
+.Pp
+Create an 802.11g host-based access point:
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev mwl0 wlanmode hostap
+ifconfig wlan0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e
+ mode 11g
+.Ed
+.Pp
+Create an 802.11a mesh station:
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev mwl0 wlanmode mesh
+ifconfig wlan0 meshid my_mesh mode 11a inet 192.168.0.10/24
+.Ed
+.Pp
+Create two virtual 802.11a host-based access points, one
+with WEP enabled and one with no security, and bridge them to
+the fxp0 (wired) device:
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev mwl0 wlanmode hostap \e
+ ssid paying-customers wepmode on wepkey 0x1234567890 \e
+ mode 11a up
+ifconfig wlan1 create wlandev mwl0 wlanmode hostap bssid \e
+ ssid freeloaders up
+ifconfig bridge0 create addm wlan0 addm wlan1 addm fxp0 up
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "mwl%d: unable to setup builtin firmware"
+There was a problem downloading and/or setting up the firmware.
+The device is not usable.
+.It "mwl%d: failed to setup descriptors: %d"
+There was a problem setting up the DMA data structures.
+This typically is caused by not being able to allocate contiguous memory.
+.It "mwl%d: transmit timeout"
+A frame dispatched to the hardware for transmission did not complete in time.
+This should not happen.
+.It "mwl%d: device not present"
+A cardbus device was ejected while active; the request to the firmware
+was not completed.
+.El
+.Sh SEE ALSO
+.Xr cardbus 4 ,
+.Xr intro 4 ,
+.Xr mwlfw 4 ,
+.Xr pci 4 ,
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr wlan_xauth 4 ,
+.Xr hostapd 8 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 8.0 .
+.Sh BUGS
+The driver does not support power-save operation in station mode;
+consequently power use is suboptimal (e.g. on a laptop).
diff --git a/share/man/man4/mwlfw.4 b/share/man/man4/mwlfw.4
new file mode 100644
index 0000000..5e557bf
--- /dev/null
+++ b/share/man/man4/mwlfw.4
@@ -0,0 +1,52 @@
+.\" Copyright (c) 2009 Sam Leffler, Errno Consulting
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 9, 2009
+.Dt MWLFW 4
+.Os
+.Sh NAME
+.Nm mwlfw
+.Nd "Firmware Module for Marvell 88W8363 Wireless driver"
+.Sh SYNOPSIS
+To compile this module into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device mwlfw"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mwlfw_load="YES"
+.Ed
+.Sh DESCRIPTION
+This module provides access to firmware sets for the
+Marvell 88W8363 IEEE 802.11n wireless adapters.
+It may be
+statically linked into the kernel, or loaded as a module.
+.Sh SEE ALSO
+.Xr mwl 4 ,
+.Xr firmware 9
diff --git a/share/man/man4/mxge.4 b/share/man/man4/mxge.4
new file mode 100644
index 0000000..cb5738c
--- /dev/null
+++ b/share/man/man4/mxge.4
@@ -0,0 +1,185 @@
+.\" Copyright (c) 2006, Myricom Inc
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright notice,
+.\" this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" 3. Neither the name of the Myricom Inc nor the names of its
+.\" contributors may be used to endorse or promote products derived from
+.\" this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" * Other names and brands may be claimed as the property of others.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 13, 2008
+.Dt MXGE 4
+.Os
+.Sh NAME
+.Nm mxge
+.Nd "Myricom Myri10GE 10 Gigabit Ethernet adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device firmware"
+.Cd "device mxge"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_mxge_load="YES"
+mxge_ethp_z8e_load="YES"
+mxge_eth_z8e_load="YES"
+mxge_rss_ethp_z8e_load="YES"
+mxge_rss_eth_z8e_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Express 10 Gigabit Ethernet adapters based on
+the Myricom LANai Z8E chip.
+The driver supports Transmit/Receive checksum offload,
+Jumbo Frames, TCP segmentation offload (TSO) as well
+as Large Receive Offload (LRO).
+For further hardware information, see
+.Pa http://www.myri.com/ .
+.Pp
+For questions related to hardware requirements,
+refer to the documentation supplied with your Myri10GE adapter.
+All hardware requirements listed apply to use with
+.Fx .
+.Pp
+Support for Jumbo Frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+The maximum MTU size for Jumbo Frames is 9000.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports 10 Gigabit Ethernet adapters based on the
+Myricom LANai Z8E chips:
+.Pp
+.Bl -bullet -compact
+.It
+Myricom 10GBase-CX4 (10G-PCIE-8A-C, 10G-PCIE-8AL-C)
+.It
+Myricom 10GBase-R (10G-PCIE-8A-R, 10G-PCIE-8AL-R)
+.It
+Myricom 10G XAUI over ribbon fiber (10G-PCIE-8A-Q, 10G-PCIE-8AL-Q)
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va hw.mxge.flow_control_enabled
+Whether or not hardware flow control is enabled on the adapter.
+The default value is 1.
+.It Va hw.mxge.intr_coal_delay
+This value delays the generation of all interrupts in units of
+1 microsecond.
+The default value is 30.
+.It Va hw.mxge.skip_pio_read
+This value determines whether or not the driver may omit doing a
+PIO read in the interrupt handler which ensures that the interrupt
+line has been deasserted when using xPIC interrupts.
+A non-zero value
+may result in lower CPU overhead, however it may also result in
+spurious interrupts.
+The default value is 0.
+This tunable has no effect when the device is
+using MSI or MSI-X interrupts.
+.It Va hw.mxge.max_slices
+This value determines the maximum number of slices the driver
+will attempt to use.
+The default value is 1.
+A slice is comprised
+of a set of receive queues and an associated interrupt thread.
+When using multiple slices, the NIC hashes traffic to different slices
+based on the value of
+.Va hw.mxge.rss_hashtype .
+Using multiple slices requires that your motherboard and Myri10GE NIC
+both be capable of MSI-X.
+Older Myri10GE NICs can be field upgraded to add
+MSI-X using the "10G NIC Tool Kit" for FreeBSD which is available from
+.Pa http://www.myri.com/scs/download-10g-tools.html .
+.It Va hw.mxge.rss_hashtype
+This value determines how incoming traffic is steered to different
+slices.
+This tunable is ignored when using just a single slice.
+The legal values for this tunable are:
+.Bl -tag -width "XXXX"
+.It 1
+Hash on the source and destination IPv4 addresses.
+.It 2
+Hash on source and destination IPv4 addresses and if the packet
+is TCP, then also hash on the TCP source and destination ports.
+.It 4
+Hash on the TCP or UDP source ports.
+This is the default value.
+.El
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "mxge%d: Unable to allocate bus resource: memory"
+A fatal initialization error has occurred.
+.It "mxge%d: Unable to allocate bus resource: interrupt"
+A fatal initialization error has occurred.
+.It "mxge%d: Could not find firmware image %s"
+The appropriate firmware kld module was not installed.
+This is a non-fatal initialization error, but will
+result in running in a reduced performance mode.
+.El
+.Sh SUPPORT
+For general information and support,
+go to the Myricom support website at:
+.Pa http://www.myri.com/scs/ .
+.Pp
+If an issue is identified with the released source code on the supported kernel
+with a supported adapter, email the specific information related to the
+issue to
+.Aq help@myri.com .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 6.3 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Andrew Gallatin Aq gallatin@FreeBSD.org .
diff --git a/share/man/man4/my.4 b/share/man/man4/my.4
new file mode 100644
index 0000000..28b67dd
--- /dev/null
+++ b/share/man/man4/my.4
@@ -0,0 +1,90 @@
+.\" Copyright (c) 2003 Hiten M. Pandya
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND ITS AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 11, 2007
+.Dt MY 4
+.Os
+.Sh NAME
+.Nm my
+.Nd "Myson Technology Ethernet PCI driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device my"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_my_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for various NICs based on the Myson chipset.
+The Myson chipset is a variant of the DEC Tulip NIC chipset.
+.Pp
+The driver will work with almost any MII-compliant PHY, thus failure to
+positively identify the chip is not a fatal error.
+.Sh HARDWARE
+The
+.Nm
+driver provides support for various NICs based on the Myson chipset.
+Supported models include:
+.Pp
+.Bl -bullet -compact
+.It
+Myson MTD800 PCI Fast Ethernet chip
+.It
+Myson MTD803 PCI Fast Ethernet chip
+.It
+Myson MTD89X PCI Gigabit Ethernet chip
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr de 4 ,
+.Xr netintro 4 ,
+.Xr pci 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.6 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by Myson Technology Inc.
+.Pp
+This manual page was written by
+.An Hiten M. Pandya Aq hmp@FreeBSD.org .
+.Sh BUGS
+The
+.Nm
+driver does not support Power Management Events (PME).
diff --git a/share/man/man4/nand.4 b/share/man/man4/nand.4
new file mode 100644
index 0000000..d23e292
--- /dev/null
+++ b/share/man/man4/nand.4
@@ -0,0 +1,140 @@
+.\"
+.\" Copyright (c) 2012 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This documentation was written by Semihalf under sponsorship from
+.\" the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 8, 2012
+.Dt NAND 4
+.Os
+.Sh NAME
+.Nm nand
+.Nd NAND Flash framework
+.Sh SYNOPSIS
+.Cd "device nand"
+.Sh DESCRIPTION
+The
+.Fx
+.Nm
+framework consists of a set of interfaces that aim to provide an extensible,
+object oriented environement for NAND controllers and NAND Flash memory chips
+from various hardware vendors, and to allow for uniform and flexible
+management of the NAND devices. It comprises of the following major
+components:
+.Bl -bullet
+.It
+NAND Flash controller (NFC) interface.
+.Pp
+Defines methods which allow to send commands as well as send/receive data
+between the controller and a NAND chip. Back-end drivers for specific NAND
+controllers plug into this interface and implement low-level routines for a
+given NAND controller.
+.Pp
+This layer implements basic functionality of a NAND Flash controller. It
+allows to send command and address to chip, drive CS (chip select line), as
+well as read/write to the selected NAND chip. This layer is independent of
+NAND chip devices actually connected to the controller.
+.It
+NAND chip interface.
+.Pp
+Provides basic operations like read page, program page, erase block. Currently
+three generic classes of drivers are available, which provide support for the
+following chips:
+.Bl -bullet
+.It
+large page
+.It
+small page
+.It
+ONFI-compliant
+.El
+.Pp
+This layer implements basic operations to be performed on a NAND chip, like
+read, program, erase, get status etc. Since these operations use specific
+commands (depending on the vendor), each chip has potentially its own
+implementation of the commands set.
+.Pp
+The framework is extensible so it is also possible to create a custom command
+set for a non standard chip support.
+.It
+NANDbus.
+.Pp
+This layer is responsible for enumerating NAND chips in the system and
+establishing the hierarchy between chips and their supervising controllers.
+.Pp
+Its main purpose is detecting type of NAND chips connected to a given chip
+select (CS line). It also allows manages locking access to the NAND
+controller. NANDbus passes requests from an active chip to the chip
+controller.
+.It
+NAND character / GEOM device.
+.Pp
+For each NAND chip found in a system a character and GEOM devices are created
+which allows to read / write directly to a device, as well as perform other
+specific operations (like via ioctl).
+.Pp
+There are two GEOM devices created for each NAND chip:
+.Bl -bullet
+.It
+raw device
+.It
+normal device
+.El
+.Pp
+Raw device allows to bypass ECC checking when reading/writing to it, while
+normal device always uses ECC algorithm to validate the read data.
+.Pp
+NAND character devices will be created for each NAND chip detected while
+probing the NAND controller.
+.El
+.Sh SEE ALSO
+.Xr libnandfs 3 ,
+.Xr gnand 4 ,
+.Xr nandsim 4 ,
+.Xr nandfs 5 ,
+.Xr makefs 8 ,
+.Xr mount_nandfs 8 ,
+.Xr nandfs 8 ,
+.Xr nandsim 8 ,
+.Xr nandtool 8 ,
+.Xr newfs_nandfs 8 ,
+.Xr umount_nandfs 8
+.Sh STANDARDS
+Open NAND Flash Interface Working Group
+.Pq Vt ONFI .
+.Sh HISTORY
+The
+.Nm
+framework support first appeared in
+.Fx 10.0 .
+.Sh AUTHOR
+The
+.Nm
+framework was designed and developed by
+.An Grzegorz Bernacki .
+This manual page was written by
+.An Rafal Jaworowski .
diff --git a/share/man/man4/nandsim.4 b/share/man/man4/nandsim.4
new file mode 100644
index 0000000..ebb5452
--- /dev/null
+++ b/share/man/man4/nandsim.4
@@ -0,0 +1,92 @@
+.\"
+.\" Copyright (c) 2012 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This documentation was written by Semihalf under sponsorship from
+.\" the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 8, 2012
+.Dt NANDSIM 4
+.Os
+.Sh NAME
+.Nm nandsim
+.Nd NAND Flash simulator driver
+.Sh SYNOPSIS
+.Cd "device nand"
+.Cd "device nandsim"
+.Cd "options ALQ"
+.Sh DESCRIPTION
+The
+.Nm
+is part of the
+.Fx
+NAND framework
+.Xr nand 4
+and can be characterized with the following highlights:
+.Bl -bullet
+.It
+plugs into the
+.Xr nand 4
+framework APIs as if it were a hardware controller (hanging on the nexus bus)
+with real NAND chips connected to it
+.It
+physically part of the kernel code (either statically linked into the kernel
+image or built as a module)
+.It
+controlled with a user space program
+.Xr nandsim 8
+.El
+.Pp
+From the user perspective, the
+.Nm
+allows for imitating ONFI-compliant NAND Flash devices as if they were
+attached to the system via a virtual controller.
+.Pp
+Some
+.Nm
+features rely on the ability to log contents to a file, which is achieved
+through the
+.Xr alq 9
+facility.
+.Sh SEE ALSO
+.Xr nand 4 ,
+.Xr nandsim.conf 5 ,
+.Xr nandsim 8
+.Sh STANDARDS
+Open NAND Flash Interface Working Group
+.Pq Vt ONFI .
+.Sh HISTORY
+The
+.Nm
+support first appeared in
+.Fx 10.0 .
+.Sh AUTHOR
+The
+.Nm
+kernel driver was developed by
+.An Grzegorz Bernacki .
+This manual page was written by
+.An Rafal Jaworowski .
diff --git a/share/man/man4/natm.4 b/share/man/man4/natm.4
new file mode 100644
index 0000000..ce9fe60
--- /dev/null
+++ b/share/man/man4/natm.4
@@ -0,0 +1,102 @@
+.\" $FreeBSD$
+.\"
+.Dd December 29, 1997
+.Dt NATM 4
+.Os
+.Sh NAME
+.Nm natm
+.Nd Native Mode ATM protocol layer
+.Sh DESCRIPTION
+The
+.Bx
+ATM software comes with a
+.Em native mode ATM protocol layer
+which provides socket level access to AAL0 and AAL5 virtual circuits.
+To enable this protocol layer, add
+.Dl options NATM
+.Dl device atm
+to your kernel configuration file and re-make the kernel (do not forget
+to do
+.Dq make clean ) .
+.Sh NATM API
+The NATM layer uses a
+.Vt struct sockaddr_natm
+to specify a virtual circuit:
+.Bd -literal -offset indent
+struct sockaddr_natm {
+ uint8_t snatm_len; /* length */
+ uint8_t snatm_family; /* AF_NATM */
+ char snatm_if[IFNAMSIZ]; /* interface name */
+ uint16_t snatm_vci; /* vci */
+ uint8_t snatm_vpi; /* vpi */
+};
+.Ed
+.Pp
+To create an AAL5 connection to a virtual circuit with VPI 0, VCI 201
+one would use the following:
+.Bd -literal -offset indent
+ struct sockaddr_natm snatm;
+ int s, r;
+ s = socket(AF_NATM, SOCK_STREAM, PROTO_NATMAAL5);
+ /* note: PROTO_NATMAAL0 is AAL0 */
+ if (s < 0) { perror("socket"); exit(1); }
+ bzero(&snatm, sizeof(snatm));
+ snatm.snatm_len = sizeof(snatm);
+ snatm.snatm_family = AF_NATM;
+ sprintf(snatm.snatm_if, "en0");
+ snatm.snatm_vci = 201;
+ snatm.snatm_vpi = 0;
+ r = connect(s, (struct sockaddr *)&snatm, sizeof(snatm));
+ if (r < 0) { perror("connect"); exit(1); }
+ /* s now connected to ATM! */
+.Ed
+.Pp
+The
+.Fn socket
+call simply creates an unconnected NATM socket.
+The
+.Fn connect
+call associates an unconnected NATM socket with a
+virtual circuit and tells the driver to enable that virtual circuit
+for receiving data.
+After the
+.Fn connect
+call one can
+.Fn read
+or
+.Fn write
+to the socket to perform ATM I/O.
+.Sh Internal NATM operation
+Internally, the NATM protocol layer keeps a list of all active virtual
+circuits on the system in
+.Dv natm_pcbs .
+This includes circuits currently being used for IP to prevent NATM and
+IP from clashing over virtual circuit usage.
+.Pp
+When a virtual circuit is enabled for receiving data, the NATM
+protocol layer passes the address of the protocol control block down
+to the driver as a receive
+.Dq handle .
+When inbound data arrives, the driver passes the data back with the
+appropriate receive handle.
+The NATM layer uses this to avoid the
+overhead of a protocol control block lookup.
+This allows us to take
+advantage of the fact that ATM has already demultiplexed the data for
+us.
+.Sh SEE ALSO
+.Xr en 4 ,
+.Xr fatm 4 ,
+.Xr hatm 4 ,
+.Xr natmip 4 ,
+.Xr patm 4
+.Sh AUTHORS
+.An Chuck Cranor
+of Washington University implemented the NATM protocol layer
+along with the EN ATM driver in 1996 for
+.Nx .
+.Sh CAVEATS
+The NATM protocol support is subject to change as
+the ATM protocols develop.
+Users should not depend on details of the current implementation, but rather
+the services exported.
diff --git a/share/man/man4/natmip.4 b/share/man/man4/natmip.4
new file mode 100644
index 0000000..154e97d
--- /dev/null
+++ b/share/man/man4/natmip.4
@@ -0,0 +1,248 @@
+.\"
+.\" Copyright (c) 2003
+.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
+.\" All rights reserved.
+.\"
+.\" Author: Hartmut Brandt <harti@FreeBSD.org>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 11, 2003
+.Dt NATMIP 4
+.Os
+.Sh NAME
+.Nm natmip
+.Nd IP over ATM PVCs
+.Sh SYNOPSIS
+.Cd "device atm"
+.Cd "options NATM"
+.Sh DESCRIPTION
+The NATM protocol stack includes support for IP over ATM.
+Without any
+additional signalling stacks or other modules it is possible to build
+a CLIP (classical IP over ATM) network based on PVCs.
+.Pp
+An ATM network card
+.Li ( en0
+in this example) is configured for IP by something
+like:
+.Pp
+.Dl "ifconfig en0 128.252.200.1 netmask 0xffffff00 up"
+.Pp
+IP routing is done with special interface routes (routes with directly
+reachable destinations) with a link layer gateway address.
+The link layer address specifies the ATM interface through which the
+destination can be reached, the virtual channel that connects to the
+destination and the ATM characteristics of this channel.
+The address part of the link layer address (see
+.Xr link_addr 3 )
+consists of a fixed part (the first 5 bytes) and a part that
+depends on the kind of the PVC (UBR, CBR, VBR, ABR).
+Multi-byte values
+are big-endian encoded: the bytes with the lower numbers contain the
+higher order bits.
+.Bl -tag -width "bytes 12...12" -offset indent
+.It byte 0
+Is a flag byte.
+Currently only flag 0x20 is used.
+When set, all IP frames are LLC/SNAP encapsulated before putting them into
+an AAL5 frame.
+Setting this flag is recommended and allows interoperability with other
+CLIP implementations.
+Note that BPF works only with LLC/SNAP encapsulation.
+.It byte 1
+This is the VPI of the channel.
+.It bytes 2...3
+VCI of the channel.
+Must not be zero.
+.It byte 4
+Traffic type.
+One of 0 (UBR), 1 (CBR), 2 (ABR), 3 (VBR).
+.El
+.Pp
+The variable part for UBR connections may be either empty or three bytes:
+.Bl -tag -width "bytes 12...12" -offset indent
+.It bytes 5...7
+Specifies the peak cell rate for UBR.
+.El
+.Pp
+The variable part for CBR connections must be three bytes:
+.Bl -tag -width "bytes 12...12" -offset indent
+.It bytes 5...7
+Specifies the peak cell rate for CBR.
+.El
+.Pp
+The variable part for VBR connections must be 9 bytes long and specifies three
+values:
+.Bl -tag -width "bytes 12...12" -offset indent
+.It bytes 5...7
+Specifies the peak cell rate for VBR.
+.It bytes 8...10
+This is the sustainable cell rate.
+.It bytes 11...13
+The maximum burst size.
+.El
+.Pp
+The variable part for ABR connections must be 19 bytes long and specifies the
+following values:
+.Bl -tag -width "bytes 12...12" -offset indent
+.It bytes 5...7
+Specifies the peak cell rate for ABR.
+.It bytes 8...10
+The minimum cell rate.
+.It bytes 11...13
+The initial cell rate.
+.It bytes 14...16
+The transient buffer exposure.
+.It byte 17
+The NRM value.
+.It byte 18
+The TRM value.
+.It bytes 19...20
+The ADTF value.
+.It byte 21
+The rate increase factor (RIF).
+.It byte 22
+The rate decrease factor (RDF).
+.It byte 23
+The cutoff decrease factor (CDF).
+.El
+.Pp
+To add a PVC the
+.Xr route 8
+utility can be used:
+.Bd -ragged -offset indent
+.Nm route Cm add
+.Fl iface Aq Ar "remote\ IP\ address"
+.Fl link Ao Ar iface Ac : Ns Aq Ar lladdr
+.Ed
+.Pp
+The
+.Ar iface
+is the ATM interface through which
+.Ar "remote\ IP\ address"
+can be reached and
+.Ar lladdr
+is the link layer address as a string of dot-separated, hexadecimal bytes.
+.Pp
+NATM also supports the old, original format.
+This consists of 4 byte
+link layer addresses (and the channels are implicit UBR):
+.Bl -tag -width "bytes 12...12" -offset indent
+.It byte 0
+Flags:
+.Bl -tag -width "0x02" -offset indent -compact
+.It 0x01
+use AAL5.
+.It 0x02
+if using AAL5, use an LLC/SNAP header.
+.El
+.Pp
+Thus, parameter 3 means AAL5 and LLC/SNAP encapsulation (this is the required
+setting for interworking with other CLIP clients).
+Note that BPF works only with LLC/SNAP encapsulation.
+.It byte 1
+VPI for the channel
+.It bytes 2...3
+VCI for the channel
+.El
+.Sh EXAMPLES
+Suppose you have 3 hosts 128.252.200.1, 128.252.200.2 and
+128.252.200.3 connected by ATM through PVCs:
+.Pp
+.Bl -item -offset indent -compact
+.It
+between 128.252.200.1 and 128.252.200.2: 0xc9 UBR
+.It
+between 128.252.200.1 and 128.252.200.3: 0xca VBR
+.It
+between 128.252.200.2 and 128.252.200.3: 0xcb CBR
+.El
+.Pp
+The parameters for the VBR channel are: PCR 50000, SCR 10000, MBS 10.
+The peak cell rate for the CBR channel is 100000.
+.Pp
+To enable the links use the following commands:
+.Pp
+on host 128.252.200.1:
+.Bd -literal -offset indent -compact
+ifconfig en0 128.252.200.1 netmask 0xffffff00 up
+route add -iface 128.252.200.2 -link en0:3.0.0.c9.0
+route add -iface 128.252.200.3 -link en0:3.0.0.ca.3.0.c3.50.0.27.10.0.0.a
+.Ed
+.Pp
+on host 128.252.200.2:
+.Bd -literal -offset indent -compact
+ifconfig en0 128.252.200.2 netmask 0xffffff00 up
+route add -iface 128.252.200.1 -link en0:3.0.0.c9.0
+route add -iface 128.252.200.3 -link en0:3.0.0.cb.1.1.86.a0
+.Ed
+.Pp
+on host 128.252.200.3:
+.Bd -literal -offset indent -compact
+ifconfig en0 128.252.200.3 netmask 0xffffff00 up
+route add -iface 128.252.200.1 -link en0:3.0.0.ca.3.0.c3.50.0.27.10.0.0.a
+route add -iface 128.252.200.2 -link en0:3.0.0.cb.1.1.86.a0
+.Ed
+.Pp
+This can also be done in
+.Xr rc.conf 5 :
+.Pp
+on host 128.252.200.1:
+.Bd -literal -offset indent -compact
+network_interfaces="lo0 en0"
+ifconfig_en0="inet 128.252.200.1 netmask 255.255.255.0"
+static_routes="host2 host3"
+route_host2="-iface 128.252.200.2 -link en0:3.0.0.c9.0"
+route_host3="-iface 128.252.200.3 -link en0:3.0.0.ca.3.0.c3.50.0.27.10.0.0.a"
+.Ed
+.Pp
+on host 128.252.200.2:
+.Bd -literal -offset indent -compact
+network_interfaces="lo0 en0"
+ifconfig_en0="inet 128.252.200.2 netmask 255.255.255.0"
+static_routes="host1 host3"
+route_host1="-iface 128.252.200.1 -link en0:3.0.0.c9.0"
+route_host3="-iface 128.252.200.3 -link en0:3.0.0.cb.1.1.86.a0"
+.Ed
+.Pp
+on host 128.252.200.3:
+.Bd -literal -offset indent -compact
+network_interfaces="lo0 en0"
+ifconfig_en0="inet 128.252.200.3 netmask 255.255.255.0"
+static_routes="host1 host2"
+route_host1="-iface 128.252.200.1 -link en0:3.0.0.ca.3.0.c3.50.0.27.10.0.0.a"
+route_host2="-iface 128.252.200.2 -link en0:3.0.0.cb.1.1.86.a0"
+.Ed
+.Sh SEE ALSO
+.Xr en 4 ,
+.Xr fatm 4 ,
+.Xr hatm 4 ,
+.Xr natm 4 ,
+.Xr patm 4
+.Sh AUTHORS
+.An Chuck Cranor
+of Washington University implemented the NATM protocol layer
+along with the EN ATM driver in 1996 for
+.Nx .
diff --git a/share/man/man4/ncr.4 b/share/man/man4/ncr.4
new file mode 100644
index 0000000..0521b4d
--- /dev/null
+++ b/share/man/man4/ncr.4
@@ -0,0 +1,91 @@
+.\"
+.\" Copyright (c) 1994 James A. Jegers
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 19, 2004
+.Dt NCR 4
+.Os
+.Sh NAME
+.Nm ncr
+.Nd NCR 53C8xx SCSI driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device scbus"
+.Cd "device ncr"
+.Ed
+.Sh HARDWARE
+The
+.Nm
+driver provides support for the following NCR/Symbios SCSI controller
+chips:
+.Pp
+.Bl -bullet -compact
+.It
+.Tn 53C810
+.It
+.Tn 53C810A
+.It
+.Tn 53C815
+.It
+.Tn 53C820
+.It
+.Tn 53C825A
+.It
+.Tn 53C860
+.It
+.Tn 53C875
+.It
+.Tn 53C875J
+.It
+.Tn 53C885
+.It
+.Tn 53C895
+.It
+.Tn 53C895A
+.It
+.Tn 53C896
+.It
+.Tn 53C1510D
+.El
+.Pp
+The following add-on boards are known to be supported:
+.Pp
+.Bl -bullet -compact
+.It
+I-O DATA SC-98/PCI (PC-98)
+.It
+I-O DATA SC-PCI (PC-98)
+.El
+.Sh SEE ALSO
+.Xr cd 4 ,
+.Xr ch 4 ,
+.Xr da 4 ,
+.Xr intro 4 ,
+.Xr sa 4 ,
+.Xr scsi 4 ,
+.Xr sym 4
diff --git a/share/man/man4/ncv.4 b/share/man/man4/ncv.4
new file mode 100644
index 0000000..8ab7199
--- /dev/null
+++ b/share/man/man4/ncv.4
@@ -0,0 +1,133 @@
+.\" Copyright (C) 2003 The FreeBSD Project. All rights reserved.
+.\" Copyright (c) 2003 Noriaki Mitsunaga. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 10, 2004
+.Dt NCV 4
+.Os
+.Sh NAME
+.Nm ncv
+.Nd "NCR 53C500 based SCSI host adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device ncv"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ncv_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides access to the
+.Tn SCSI
+bus
+connected to an NCR 53C500 based
+PC-Card
+.Tn SCSI
+host adapter or an Adaptec AHA-2920 on the
+.Tn PCI
+bus.
+.Sh HARDWARE
+The following devices are currently supported by the
+.Nm
+driver:
+.Pp
+.Bl -bullet -compact
+.It
+I-O DATA PCSC-DV
+.It
+KME KXLC002 (TAXAN ICD-400PN, etc.), KXLC004, and UJDCD450
+.It
+Macnica Miracle SCSI-II mPS110
+.It
+Media Intelligent MSC-110, MSC-200
+.It
+NEC PC-9801N-J03R
+.It
+New Media Corporation BASICS SCSI
+.It
+Qlogic Fast SCSI
+.It
+RATOC REX-9530, REX-5572 (SCSI only)
+.El
+.Sh DIAGNOSTICS
+The following error messages are sometimes returned:
+.Bl -diag
+.It "SCSI BUS RESET failed"
+Usually returned when a failure occurs during
+the bus reset.
+.It "CMD_NOP failed"
+No operation or the operation has failed.
+.It "CMD_NOP|CMD_DMA"
+A failure occurred during the
+.Tn DMA
+read/write operations.
+.El
+.Pp
+The
+.Nm
+driver should return
+.Bq Er ENODEV
+when any of the previously noted failures occur.
+.Sh SEE ALSO
+.Xr cardbus 4 ,
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr pccard 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.Sh HISTORY
+The
+.Nm
+device driver has been developed for
+.Nx Ns / Ns Tn pc98
+and ported to
+.Fx .
+The
+.Nm
+driver first appeared in
+.Fx 2.2
+with
+.Tn PAO
+and merged in
+.Fx 4.2 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Naofumi Honda .
+This manual page was written by
+.An Tom Rhodes Aq trhodes@FreeBSD.org
+and
+.An Noriaki Mitsunaga Aq non@FreeBSD.org .
diff --git a/share/man/man4/ndis.4 b/share/man/man4/ndis.4
new file mode 100644
index 0000000..874a843
--- /dev/null
+++ b/share/man/man4/ndis.4
@@ -0,0 +1,153 @@
+.\" Copyright (c) 2003
+.\" Bill Paul <wpaul@windriver.com>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 14, 2010
+.Dt NDIS 4
+.Os
+.Sh NAME
+.Nm ndis
+.Nd NDIS miniport driver wrapper
+.Sh SYNOPSIS
+.Cd "options NDISAPI"
+.Cd "device ndis"
+.Cd "device wlan"
+.Sh DESCRIPTION
+The
+.Nm
+driver is a wrapper designed to allow binary
+.Tn Windows\[rg]
+NDIS miniport
+network drivers to be used with
+.Fx .
+The
+.Nm
+driver is provided in source code form and must be combined with
+the
+.Tn Windows\[rg]
+driver supplied with your network adapter.
+The
+.Nm
+driver uses the
+.Nm ndisapi
+kernel subsystem to relocate and link the
+.Tn Windows\[rg]
+binary so
+that it can be used in conjunction with native code.
+The
+.Nm ndisapi
+subsystem provides an interface between the NDIS API and the
+.Fx
+networking infrastructure.
+The
+.Tn Windows\[rg]
+driver is essentially
+fooled into thinking it is running on
+.Tn Windows\[rg] .
+Note that this
+means the
+.Nm
+driver is only useful on x86 machines.
+.Pp
+To build a functional driver, the user must have a copy of the
+driver distribution media for his or her card.
+From this distribution,
+the user must extract two files: the
+.Pa .SYS
+file containing the driver
+binary code, and its companion
+.Pa .INF
+file, which contains the
+definitions for driver-specific registry keys and other installation
+data such as device identifiers.
+These two files can be converted
+into a kernel module file using the
+.Xr ndisgen 8
+utility.
+This file contains a binary image of the driver plus
+registry key data.
+When the
+.Nm
+driver loads, it will create
+.Xr sysctl 3
+nodes for each registry key extracted from the
+.Pa .INF
+file.
+.Pp
+The
+.Nm
+driver is designed to support mainly Ethernet and wireless
+network devices with PCI, PCMCIA and USB bus attachments.
+(Cardbus
+devices are also supported as a subset of PCI.)
+It can
+support many different media types and speeds.
+One limitation
+however, is that there is no consistent way to learn if an
+Ethernet device is operating in full or half duplex mode.
+The NDIS API allows for a generic means for determining link
+state and speed, but not the duplex setting.
+There may be
+driver-specific registry keys to control the media setting
+which can be configured via the
+.Xr sysctl 8
+command.
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ndis%d: watchdog timeout"
+A packet was queued for transmission and a transmit command was
+issued, however the device failed to acknowledge the transmission
+before a timeout expired.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8 ,
+.Xr ndis_events 8 ,
+.Xr ndiscvt 8 ,
+.Xr ndisgen 8 ,
+.Xr wpa_supplicant 8
+.Rs
+.%T "NDIS 5.1 specification"
+.%U http://www.microsoft.com
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@windriver.com .
diff --git a/share/man/man4/net80211.4 b/share/man/man4/net80211.4
new file mode 100644
index 0000000..3773b98
--- /dev/null
+++ b/share/man/man4/net80211.4
@@ -0,0 +1,1318 @@
+.\"-
+.\" Copyright (c) 2009 Sam Leffler, Errno Consulting
+.\" All rights reserved.
+.\""
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+.\" redistribution must be conditioned upon including a substantially
+.\" similar Disclaimer requirement for further binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
+.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 10, 2009
+.Dt NET80211 4
+.Os
+.Sh NAME
+.Nm net80211
+.Nd standard interface to IEEE 802.11 devices
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In net/if.h
+.In net/ethernet.h
+.In net80211/ieee80211_ioctl.h
+.Sh DESCRIPTION
+This section describes the standard programming
+interface to configure and retrieve status information
+for IEEE 802.11 devices that depend on the
+.Xr wlan 4
+module for operation.
+The interface is via one
+of the following
+.Xr ioctl 2
+calls on a socket:
+.Bl -tag -width ".Dv SIOCG80211"
+.It Dv SIOCG80211
+Get configuration or status information.
+.It Dv SIOCS80211
+Set configuration information.
+.El
+.Pp
+These requests are made via a modified
+.Vt ifreq
+structure.
+This structure is defined as follows:
+.Bd -literal
+struct ieee80211req {
+ char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
+ uint16_t i_type; /* req type */
+ int16_t i_val; /* Index or simple value */
+ int16_t i_len; /* Index or simple value */
+ void *i_data; /* Extra data */
+};
+.Ed
+.Pp
+Requests that are not supported by the underlying device return
+-1 and set the global variable errno to
+.Er EOPNOTSUPP .
+.Dv SIOCG80211
+requests that return data to an application place small values in
+.Va i_val
+or in a user-specified buffer pointed to by
+.Va i_data .
+When an indirect buffer is used
+.Va i_len
+specifies how large the indirect buffer is and on return it is set by the
+system to the actual amount of data returned.
+.Dv SIOCS80211
+requests use a similar scheme with data passed to the system taken either
+from
+.Va i_val
+or an indirect buffer pointed to by
+.Va i_data .
+.Pp
+For
+.Dv SIOCG80211
+the following values of
+.Va i_type
+are valid:
+.Bl -tag -width indent
+.It Dv IEEE80211_IOC_AMPDU
+Return whether or not AMPDU is enabled in
+.Va i_val .
+AMPDU is an aggregation scheme that is part of the 802.11n specification
+and is used only when operating on an HT channel.
+The value returned is one of:
+0 (AMPDU disabled),
+1 (AMPDU enabled for transmit),
+2 (AMPDU enabled for receive),
+and
+3 (AMPDU enabled for transmit and receive).
+The 802.11n specification says a compliant station must receive AMPDU but
+may not support transmitting AMPDU frames.
+Disabling AMPDU receive is mainly useful for testing and working around bugs.
+.It Dv IEEE80211_IOC_AMPDU_DENSITY
+Return the minimum density for bursting AMPDU frames in
+.Va i_val .
+The value returned is one of:
+0 (no time restriction),
+1 (1/4 usec),
+2 (1/2 usec),
+3 (1 usec),
+4 (2 usec),
+5 (4 usec),
+6 (8 usec),
+and
+7 (16 usec).
+.It Dv IEEE80211_IOC_AMPDU_LIMIT
+Return the limit on the size of AMPDU frames in
+.Va i_val .
+The value returned is one of:
+0 (8 kilobytes),
+1 (16 kilobytes),
+2 (32 kilobytes),
+and
+3 (64 kilobytes).
+.It Dv IEEE80211_IOC_AMSDU
+Return whether or not AMSDU is enabled in
+.Va i_val .
+AMSDU is an aggregation scheme that is part of the 802.11n specification
+and is used only when operating on an HT channel.
+The value returned is one of:
+0 (AMSDU disabled),
+1 (AMSDU enabled for transmit),
+2 (AMSDU enabled for receive),
+and
+3 (AMSDU enabled for transmit and receive).
+The 802.11n specification says a compliant station must receive AMSDU but
+may not support transmitting AMSDU frames.
+Disabling AMSDU receive is mainly useful for testing and working around bugs.
+.It Dv IEEE80211_IOC_AMSDU_LIMIT
+Return the limit on the size of AMSDU frames in
+.Va i_val .
+The value returned is one of:
+3839 (bytes)
+and
+7935 (bytes).
+Note these values are specified by 802.11n; arbitrary values are not allowed.
+.It Dv IEEE80211_IOC_APBRIDGE
+Return whether AP bridging is enabled in
+.Va i_val .
+Normally packets sent between stations associated
+to the same access point are delivered without going through system layers
+that do packet filtering; when AP bridging is disabled packets are
+passed up the system to be forwarded using some other mechanism.
+This value will be non-zero when AP bridging is enabled and otherwise zero.
+.It Dv IEEE80211_IOC_APPIE
+Return an application information element via
+.Va i_data .
+Application IE's are maintained for many 802.11 frames; the
+request must identify the frame to return an IE for in
+.Va i_val .
+For example, to retrieve the IE sent in each Beacon frame
+.Va i_val
+would be set to
+.Va IEEE80211_FC0_SUBTYPE_BEACON | IEEE80211_FC0_TYPE_MGT .
+If no information element is installed then
+.Er EINVAL
+is returned.
+If the data buffer for returning data is too small to hold the information
+element the value is truncated; this permits querying the presence of
+data by requesting zero bytes of data be returned.
+.It Dv IEEE80211_IOC_AUTHMODE
+Return the current authentication mode in
+.Va i_val .
+Valid values are
+.Dv IEEE80211_AUTH_NONE
+(no authentication),
+.Dv IEEE80211_AUTH_OPEN
+(open authentication),
+.Dv IEEE80211_AUTH_SHARED
+(shared key authentication),
+.Dv IEEE80211_AUTH_8021X
+(802.1x only authentication),
+and
+.Dv IEEE80211_AUTH_WPA
+(WPA/802.11i/802.1x authentication).
+.It Dv IEEE80211_IOC_BEACON_INTERVAL
+Return the time between Beacon frames (in TU) in
+.Va i_val .
+.It Dv IEEE80211_IOC_BGSCAN
+Return whether background scanning is enabled in
+.Va i_val .
+When this value is non-zero and operating in station mode
+the station will periodically leave
+the current channel and scan for neighboring stations.
+See also
+.Dv IEEE80211_IOC_BGSCAN_IDLE
+and
+.Dv IEEE80211_IOC_BGSCAN_INTERVAL .
+.It Dv IEEE80211_IOC_BGSCAN_IDLE
+Return in
+.Va i_val
+the minimum time (msecs) a station must be idle
+(i.e. not transmitting or receiving frames)
+before it will do a background scan.
+See also
+.Dv IEEE80211_IOC_BGSCAN_INTERVAL .
+.It Dv IEEE80211_IOC_BGSCAN_INTERVAL
+Return in
+.Va i_val
+the minimum time (seconds) between background scan operations.
+See also
+.Dv IEEE80211_IOC_BGSCAN_IDLE .
+.It Dv IEEE80211_IOC_BMISSTHRESHOLD
+Return in
+.Va i_val
+the number of consecutive missed Beacon frames before the system will
+attempt to roam to a different/better access point.
+.It Dv IEEE80211_IOC_BSSID
+Return the MAC address for the current BSS identifier via
+.Va i_data .
+When the interface is running, the bssid is either the value
+configured locally (e.g. for an IBSS network started by the local station)
+or the value adopted when joining an existing network.
+For WDS interfaces this value is the address of the remote station.
+When the interface is not running, the bssid returned is the desired
+bssid, if any, that has been configured.
+.It Dv IEEE80211_IOC_BURST
+Return whether or not packet bursting is enabled in
+.Va i_val .
+If this value is non-zero then the system will try to send packets closely
+spaced to improve throughput.
+.It Dv IEEE80211_IOC_CHANINFO
+Return the set of available channels via
+.Va i_data .
+Note this data should be used by user applications to map between
+channel specifications (frequency and attributes) and IEEE channel numbers
+as user applications may not have the necessary information to do
+this directly (e.g. for 900MHz radios, operation in the Public Safety Band).
+.It Dv IEEE80211_IOC_CHANLIST
+Return the current list of usable channels via
+.Va i_data .
+The channel list is returned as a bit vector with bit N set to 1 if
+IEEE channel number N is available for use.
+.It Dv IEEE80211_IOC_CHANNEL
+Return the IEEE channel number of the current channel in
+.Va i_val .
+Note this request is deprecated; use
+.Dv IEEE80211_IOC_CURCHAN
+instead.
+.It Dv IEEE80211_IOC_COUNTERMEASURES
+Return whether TKIP Countermeasures are enabled in
+.Va i_val .
+This value will be non-zero when Countermeasures are enabled and
+otherwise zero.
+.It Dv IEEE80211_IOC_CURCHAN
+Return information for the current channel via
+.Va i_data .
+This information includes the IEEE channel number, the frequency, and
+attributes that describe the operating constraints (e.g. Passive Scan,
+DFS, usage restrictions).
+.It Dv IEEE80211_IOC_DEVCAPS
+Return device capabilities in the data buffer pointed at by
+.Va i_data .
+The buffer must be large enough to return the number of available
+channels but otherwise may be made small to limit how much information
+is returned.
+.It Dv IEEE80211_IOC_DFS
+Return whether or not Dynamic Frequency Selection (DFS) is enabled in
+.Va i_val .
+DFS embodies several facilities including detection of overlapping
+radar signals, dynamic transmit power control, and channel selection
+according to a least-congested criteria.
+DFS support is mandatory for some 5GHz frequencies in certain
+locales (e.g. ETSI).
+By default DFS is enabled according to the regulatory definitions
+and the current country code, regdomain, and channel.
+.It Dv IEEE80211_IOC_DOTD
+Return whether or not 802.11d support is enabled in
+.Va i_val .
+When 802.11d is enabled in station mode, Beacon frames that advertise
+a country code different than the currently configured country code will
+cause an event to be dispatched to user applications.
+This event can be used by the station to adopt that country code and
+operate according to the associated regulatory constraints.
+When operating as an access point with 802.11d enabled the Beacon and
+ProbeResponse frames transmitted will advertise the current regulatory
+domain settings.
+.It Dv IEEE80211_IOC_DOTH
+Return whether 802.11h support is enabled in
+.Va i_val .
+When 802.11h is enabled Beacon and ProbeResponse frames will have
+the SpectrumMgt bit set in the capabilities field and
+country and power constraint information elements will be present.
+802.11h support also includes handling Channel Switch Announcements (CSA)
+which are a mechanism to coordinate channel changes by an access point.
+By default 802.11h is enabled if the device is capable.
+.It Dv IEEE80211_IOC_DROPUNENCRYPTED
+Return, in
+.Va i_val ,
+whether unencrypted packets transmit/received should be discarded.
+This value will be zero if unencrypted packets will be accepted and
+non-zero if they are to be discarded.
+.It Dv IEEE80211_IOC_DTIM_PERIOD
+Return the period (in beacon intervals) between DTIM events in
+.Va i_val .
+.It Dv IEEE80211_IOC_DWDS
+Return, in
+.Va i_val ,
+whether or not Dynamic WDS support is enabled.
+Dynamic WDS is a facility by which packets may be tunneled over normal
+Infrastructure BSS associations using 4-address (WDS) frames.
+.It Dv IEEE80211_IOC_FF
+Return, in
+.Va i_val ,
+whether Atheros fast-frames support is enabled.
+Fast-frames is a non-standard protocol extension that aggregates multiple
+frames to improve throughput.
+Note that enabling fast-frames support does not guarantee use;
+the client and access point must negotiate its use.
+.It Dv IEEE80211_IOC_FRAGTHRESHOLD
+Return, in
+.Va i_val ,
+the threshold (in bytes) for enabling fragmentation frames.
+Packets larger than this value will automatically be split into multiple
+fragmented frames that are sent one after the other.
+.It Dv IEEE80211_IOC_GREENFIELD
+Return, in
+.Va i_val ,
+whether or not Greenfield preamble use is enabled.
+This setting is meaningful only when operating with 802.11n on an HT channel.
+.It Dv IEEE80211_IOC_HIDESSID
+Return, in
+.Va i_val ,
+whether SSID hiding/cloaking is enabled.
+SSID hiding is only meaningful when operating as an access point.
+When this is enabled Beacon frames do not include the SSID and
+ProbeRequest frames are not answered unless they include the AP's SSID.
+This value will be non-zero when SSID hiding is enabled and otherwise zero.
+.It Dv IEEE80211_IOC_HTCOMPAT
+Return, in
+.Va i_val ,
+whether or not 802.11n compatibility support is enabled.
+The 802.11n protocol specification went through several incompatible iterations.
+Some vendors implemented 11n support to older specifications that
+will not interoperate with a purely 11n-compliant station.
+In particular the information elements included in management frames
+for old devices are different.
+When compatibility support is enabled both standard and compatible data
+will be provided and/or accepted.
+.It Dv IEEE80211_IOC_HTCONF
+Return the setting for automatic promotion of HT channels in
+.Va i_val .
+Promotion happens when the system must select a channel and may choose
+between legacy, HT20, and HT40 operation (e.g. when scanning).
+Valid values are:
+0 (do not promote, use legacy),
+1 (promote to HT20),
+and
+2 (promote to HT40).
+.It Dv IEEE80211_IOC_HTPROTMODE
+Return, in
+.Va i_val ,
+the technique used to protect HT frames in a mixed 802.11n network.
+Valid values are:
+.Dv IEEE80211_PROTMODE_OFF
+(no protection enabled)
+and
+.Dv IEEE80211_PROTMODE_RTSCTS
+(send RTS and wait for CTS).
+.It Dv IEEE80211_IOC_HWMP_MAXHOPS
+Return the maximum acceptable hop count in an HWMP path in
+.Va i_val .
+.It Dv IEEE80211_IOC_HWMP_ROOTMODE
+Return the setting for Mesh root mode operation in
+.Va i_val .
+Valid values are:
+.Dv IEEE80211_HWMP_ROOTMODE_DISABLED
+(root mode is disabled),
+.Dv IEEE80211_HWMP_ROOTMODE_NORMAL
+(send broadcast Path Request frames),
+.Dv IEEE80211_HWMP_ROOTMODE_PROACTIVE
+(send broadcast Path Request frames and force replies)
+and
+.Dv IEEE80211_HWMP_ROOTMODE_RANN
+(send broadcast Root Announcement (RANN) frames).
+.It Dv IEEE80211_IOC_INACTIVITY
+Return whether or not the system handles inactivity processing in
+.Va i_val .
+When inactivity processing is enabled the system will track stations
+that have not transmitted frames and periodically probe them to
+check if they are still present.
+Stations that are inactive and do not respond to probes are dropped.
+.It Dv IEEE80211_IOC_MACCMD
+Return information about the state of the MAC address
+access control list (ACL) system.
+There are two requests supported:
+.Dv IEEE80211_MACCMD_POLICY
+(to retrieve the current policy in
+.Va i_val ),
+and
+.Dv IEEE80211_MACCMD_LIST
+to retrieve the list installed/active ACL's via
+.Va i_data .
+The
+.Xr wlan_acl 4
+module must be installed and enabled or
+.Er EINVAL
+will be returned.
+.It Dv IEEE80211_IOC_MESH_AP
+Return whether or not Mesh AP support is enabled in
+.Va i_val .
+.It Dv IEEE80211_IOC_MESH_ID
+Return the Mesh ID in the buffer pointed to by
+.Va i_data .
+.It Dv IEEE80211_IOC_MESH_FWRD
+Return whether or not packet forwarding support is enabled in
+.Va i_val .
+.It Dv IEEE80211_IOC_MESH_PP_METRIC
+Return the link metric protocol in the buffer pointed to by
+.Va i_data .
+.It Dv IEEE80211_IOC_MESH_PP_PATH
+Return the path selection protocol in the buffer pointed to by
+.Va i_data .
+.It Dv IEEE80211_IOC_MESH_RTCMD
+Return information about the state of the Mesh routing tables.
+One request is supported:
+.Dv IEEE80211_MESH_RTCMD_LIST
+to retrieve the contents of the routing table in the buffer pointed to by
+.Va i_data .
+.It Dv IEEE80211_IOC_MESH_TTL
+Return, in
+.Va i_val ,
+the Mesh Time To Live (TTL) setting installed in packets
+transmitted by this mesh node.
+.It Dv IEEE80211_IOC_NUMSSIDS
+Return the number of SSIDs supported in
+.Va i_val .
+.It Dv IEEE80211_IOC_NUMWEPKEYS
+Return the number of WEP keys supported in
+.Va i_val .
+.It Dv IEEE80211_IOC_POWERSAVE
+Return the current powersaving mode in
+.Va i_val .
+Valid values are
+.Dv IEEE80211_POWERSAVE_OFF
+(power save operation is disabled)
+and
+.Dv IEEE80211_POWERSAVE_ON
+(power save operation is enabled).
+.It Dv IEEE80211_IOC_POWERSAVESLEEP
+Return the powersave sleep time in TU in
+.Va i_val .
+This value is also termed the listen interval and represents the maximum time
+a station will sleep before waking to retrieve packets buffered by
+an access point.
+.It Dv IEEE80211_IOC_PRIVACY
+Return the current MLME setting for PRIVACY in
+.Va i_val .
+When PRIVACY is enabled all data packets must be encrypted.
+This value will be zero if PRIVACY is disabled and
+non-zero when PRIVACY is enabled.
+.It Dv IEEE80211_IOC_PROTMODE
+Return the current 802.11g protection mode in
+.Va i_val .
+Protection is the mechanism used to safeguard 802.11b stations operating
+on an 802.11g network.
+Valid values are
+.Dv IEEE80211_PROTMODE_OFF
+(no protection enabled),
+.Dv IEEE80211_PROTMODE_CTS
+(send CTS to yourself),
+and
+.Dv IEEE80211_PROTMODE_RTSCTS
+(send RTS and wait for CTS).
+.It Dv IEEE80211_IOC_PUREG
+Return whether ``pure 11g'' mode is enabled in
+.Va i_val .
+This setting is meaningful only for access point operation;
+when non-zero, 802.11b stations will not be allowed to associate.
+.It Dv IEEE80211_IOC_PUREN
+Return whether ``pure 11n'' mode is enabled in
+.Va i_val .
+This setting is meaningful only for access point operation;
+when non-zero, legacy (non-11n capable) stations will not be
+allowed to associate.
+.It Dv IEEE80211_IOC_REGDOMAIN
+Return the regulatory state in the buffer pointed to by
+.Va i_data .
+.It Dv IEEE80211_IOC_RIFS
+Return whether or not Reduced InterFrame Spacing (RIFS) is enabled in
+.Va i_val .
+This setting is meaningful only when operating with 802.11n on an HT channel.
+.It Dv IEEE80211_IOC_ROAM
+Return station roaming parameters in the buffer pointed to by
+.Va i_data .
+.It Dv IEEE80211_IOC_ROAMING
+Return the current roaming mode in
+.Va i_val .
+Roaming mode specifies which entity controls operation of the MLME
+state machine when operating as a station in an Infrastructure BSS.
+Valid values are:
+.Dv IEEE80211_ROAMING_DEVICE
+(driver/firmware is in control),
+.Dv IEEE80211_ROAMING_AUTO
+(host 802.11 layer is in control),
+and
+.Dv IEEE80211_ROAMING_MANUAL
+(application is in control).
+.It Dv IEEE80211_IOC_RTSTHRESHOLD
+Return the threshold (in bytes) for enabling transmission of RTS frames in
+.Va i_val .
+Packets larger than this value will automatically have an RTS frame
+sent preceding it to reduce the likelihood of packet loss.
+.It Dv IEEE80211_IOC_SCAN_RESULTS
+Return the current contents of the scan cache in the data area pointed to by
+.Va i_data .
+.It Dv IEEE80211_IOC_SCANVALID
+Return in
+.Va i_val
+how long (in seconds) results from a scan operation will be considered valid.
+When scan results are no longer valid and they are needed (e.g. to roam) the
+system will initiate a scan operation to replenish the scan cache.
+.It Dv IEEE80211_IOC_SHORTGI
+Return whether or not Short Guard Interval (SGI) is enabled in
+.Va i_val .
+Note SGI is only used when operating with 802.11n on an HT channel.
+.It Dv IEEE80211_IOC_SMPS
+Return the Spatial Multiplexing Power Save (SMPS) setting in
+.Va i_val .
+This setting is meaningful only when operating with 802.11n on an HT channel.
+Valid values are:
+.Dv IEEE80211_HTCAP_SMPS_DYNAMIC
+(Dynamic SMPS is enabled),
+.Dv IEEE80211_HTCAP_SMPS_ENA
+(Static SMPS is enabled),
+and
+.Dv IEEE80211_HTCAP_SMPS_OFF
+(SMPS is disabled).
+.It Dv IEEE80211_IOC_SSID
+Return the requested SSID in the buffer pointed to by
+.Va i_data .
+If
+.Va i_val
+is \(>= 0 then the request refers to the configured value for that slot.
+Generally, 0 is the only valid value, but some interfaces support more
+SSIDs.
+.It Dv IEEE80211_IOC_STA_INFO
+Return information about the current state of the specified station(s) via
+.Va i_data .
+The MAC address of a single station may be passed in or, if the broadcast
+address is supplied, information about all stations will be returned.
+If a single station is requested and the MAC address is unknown then
+.Er ENOENT
+will be returned.
+.It Dv IEEE80211_IOC_STA_STATS
+Return collected statistics for the specified station via
+.Va i_data .
+The MAC address of the desired station is passed in; if it is unknown
+.Er ENOENT
+will be returned.
+.It Dv IEEE80211_IOC_STA_VLAN
+Return any VLAN tag assigned to a station via
+.Va i_data .
+.It Dv IEEE80211_IOC_TDMA_SLOT
+Return the slot number for the station in
+.Va i_val .
+Slot number zero is the master station in a TDMA network.
+.It Dv IEEE80211_IOC_TDMA_SLOTCNT
+Return the count of slots in the TDMA network in
+.Va i_val .
+.It Dv IEEE80211_IOC_TDMA_SLOTLEN
+Return the length (in usecs) of the TDMA slot assigned to each
+station in the network in
+.Va i_val .
+.It Dv IEEE80211_IOC_TDMA_BINTERVAL
+Return the number of superframes between Beacon frames in
+.Va i_val .
+A TDMA network with N slots and slot length T has a superframe of NxT.
+.It Dv IEEE80211_IOC_TSN
+Return whether or not Transitional Security Network (TSN) is enabled in
+.Va i_val .
+.It Dv IEEE80211_IOC_TURBOP
+Return whether Atheros Dynamic Turbo mode is enabled in
+.Va i_val .
+Dynamic Turbo mode is a non-standard protocol extension available only
+on Atheros devices where channel width is dynamically
+changed between 20MHz and 40MHz.
+Note that enabling Dynamic Turbo mode support does not guarantee use;
+both client and access point must use Atheros devices and support must
+be enabled on both sides.
+.It Dv IEEE80211_IOC_TXPARAMS
+Return transmit parameters in the buffer pointed to by
+.Va i_data .
+.It Dv IEEE80211_IOC_TXPOWER
+Return the transmit power limit in .5 dBm units in
+.Va i_val .
+This value represents the effective maximum and is calculated according to
+the maximum power allowed by local regulations, any user-specified
+power limit, and the maximum power the device is capable of.
+.It Dv IEEE80211_IOC_TXPOWMAX
+Return the user-specified maximum transmit power in .5 dBm units in
+.Va i_val .
+The maximum setting is applied after any regulatory cap.
+.It Dv IEEE80211_IOC_WEP
+Return the current WEP status in
+.Va i_val .
+Valid values are:
+.Dv IEEE80211_WEP_ON
+(enabled for all packets sent and received),
+.Dv IEEE80211_WEP_OFF
+(disabled),
+and
+.Dv IEEE80211_WEP_MIXED
+(enabled for transmit and receive but also willing to receive
+unencrypted frames).
+This request is deprecated; use
+.Dv IEEE80211_IOC_PRIVACY
+and
+.Dv IEEE80211_IOC_UNENCRYPTED
+instead.
+.It Dv IEEE80211_IOC_WEPKEY
+Return the requested WEP key via
+.Va i_data .
+The key number is specified in
+.Va i_val
+and may be 0-3.
+If the device does not support returning the WEP key or the user is not
+root then the key may be returned as all zeros.
+This request is deprecated in favor of
+.Dv IEEE80211_IOC_WPAKEY .
+.It Dv IEEE80211_IOC_WEPTXKEY
+Return the number of the WEP key used for transmission in
+.Va i_val .
+.It Dv IEEE80211_IOC_WME
+Return whether 802.11e/WME/WMM support is enabled in
+.Va i_val .
+This value will be non-zero when support is enabled and otherwise zero.
+.It Dv IEEE80211_IOC_WME_CWMIN
+Return the WME CWmin setting (log2) for the specified Access Class (AC) in
+.Va i_val .
+The AC is passed in through
+.Va i_len
+together with an optional IEEE80211_WMEPARAM_BSS flag to indicate if the
+parameter for the BSS or the channel is desired.
+If WME is not supported then
+.Er EINVAL
+will be returned.
+.It Dv IEEE80211_IOC_WME_CWMAX
+Return the WME CWmax setting (log2) for the specified Access Class (AC) in
+.Va i_val .
+See
+.Dv IEEE80211_IOC_WME_CWMIN
+above for more details.
+.It Dv IEEE80211_IOC_WME_AIFS
+Return the WME AIFS setting for the specified Access Class (AC) in
+.Va i_val .
+See
+.Dv IEEE80211_IOC_WME_CWMIN
+above for more details.
+.It Dv IEEE80211_IOC_WME_TXOPLIMIT
+Return the WME TxOpLimit (msec) for the specified Access Class (AC) in
+.Va i_val .
+See
+.Dv IEEE80211_IOC_WME_CWMIN
+above for more details.
+.It Dv IEEE80211_IOC_WME_ACM
+Return the WME Admission Control Mechanism (ACM) setting
+for the specified Access Class (AC) in
+.Va i_val .
+This value is meaningful only for the BSS (not channel).
+See
+.Dv IEEE80211_IOC_WME_CWMIN
+above for more details.
+.It Dv IEEE80211_IOC_WME_ACKPOLICY
+Return the WME ACK Policy setting
+for the specified Access Class (AC) in
+.Va i_val .
+When this value is zero frames will be transmitted without waiting for
+an Acknowledgement.
+This value is meaningful only for the channel (not BSS).
+See
+.Dv IEEE80211_IOC_WME_CWMIN
+above for more details.
+.It Dv IEEE80211_IOC_WPA
+Return the WPA configuration in
+.Va i_val .
+Valid values are
+0 (WPA is not enabled),
+1 (WPA1 is enabled),
+2 (WPA2/802.11i is enabled),
+and
+3 (WPA1 and WPA2/802.11i are both enabled).
+.It Dv IEEE80211_IOC_WPAIE
+Return any WPA information element for an associated station via
+.Va i_data .
+The request passed in through
+.Va i_data
+identifies the MAC address of the desired station.
+If an RSN (802.11i) element is present it is returned; otherwise any WPA
+element is returned.
+Note this request is deprecated; use
+.Dv IEEE80211_IOC_WPAIE2
+instead.
+.It Dv IEEE80211_IOC_WPAIE2
+Return any WPA information elements for an associated station via
+.Va i_data .
+The request passed in through
+.Va i_data
+identifies the MAC address of the desired station.
+One or both of RSN (802.11i) and WPA elements may be returned.
+.It Dv IEEE80211_IOC_WPAKEY
+Return the requested cryptographic key in the buffer pointed to by
+.Va i_data .
+The key number is specified in
+.Va i_val
+and may be 0-3.
+A key number of zero is used to retrieve a station's unicast cipher key
+when operating with WPA enabled.
+If the user is not root then the key data returned is all zeros.
+.It Dv IEEE80211_IOC_WPS
+Return whether or not Wi-FI Protected Setup (WPS) is enabled in
+.Va i_val .
+.El
+.Pp
+For
+.Dv SIOCS80211
+the following values of
+.Va i_type
+are valid.
+Note that changing a value on an interface that is running may
+cause the interface to be
+.Sq reset .
+Resets may be handled without altering the state if the parameter
+does not affect the MLME state (e.g. RTS threshold), but in some
+cases the interface may need to scan for a new network or clear
+state (including any associated stations); in that case the interface
+is said to be
+.Sq restarted
+(it is equivalent to marking the interface down and back up).
+The information below identifies whether changing a value affects the
+state of a running interface.
+.Bl -tag -width indent
+.It Dv IEEE80211_IOC_ADDMAC
+Add an entry to the MAC address Access Control List (ACL) database using
+the value pointed to by
+.Va i_data .
+The
+.Xr wlan_acl 4
+module must be installed and enabled or
+.Er EINVAL
+will be returned.
+.It Dv IEEE80211_IOC_AMPDU
+Set whether or not AMPDU is enabled for transmit and/or receive
+using the value in
+.Va i_val .
+This request causes a running interface operating on an HT channel
+to be reset.
+See
+.Dv IEEE80211_IOC_AMPDU
+above for details.
+.It Dv IEEE80211_IOC_AMPDU_DENSITY
+Set the minimum density for bursting AMPDU frames to the value in
+.Va i_val .
+This request causes a running interface to be reset.
+See
+.Dv IEEE80211_IOC_AMPDU_DENSITY
+above for details.
+.It Dv IEEE80211_IOC_AMPDU_LIMIT
+Set the limit on the size of AMPDU frames to the value in
+.Va i_val .
+This request causes a running interface to be reset.
+See
+.Dv IEEE80211_IOC_AMPDU_LIMIT
+above for details.
+.It Dv IEEE80211_IOC_AMSDU
+Set whether or not AMSDU is enabled for transmit and/or receive
+using the value in
+.Va i_val .
+This request causes a running interface operating on an HT channel
+to be reset.
+See
+.Dv IEEE80211_IOC_AMSDU
+above for details.
+.It Dv IEEE80211_IOC_AMSDU_LIMIT
+Set the limit on the size of AMSDU frames to the value in
+.Va i_val .
+This request causes a running interface to be reset.
+See
+.Dv IEEE80211_IOC_AMSDU_LIMIT
+above for details.
+.It Dv IEEE80211_IOC_APBRIDGE
+Set whether AP bridging is enabled using the value in
+.Va i_val .
+See
+.Dv IEEE80211_IOC_APBRIDGE
+above for details.
+.It Dv IEEE80211_IOC_APPIE
+Set an application information element using the data pointed to by
+.Va i_data .
+This request causes a running interface to be restarted if the WPA
+information element is changed.
+See
+.Dv IEEE80211_IOC_APPIE
+above for details.
+.It Dv IEEE80211_IOC_AUTHMODE
+Set the current authentication mode using the value in
+.Va i_val .
+This request causes a running interface to be restarted.
+See
+.Dv IEEE80211_IOC_AUTHMODE
+above for details.
+This request causes a running interface to be restarted.
+.It Dv IEEE80211_IOC_BEACON_INTERVAL
+Set the time between Beacon frames (in TU) to the value in
+.Va i_val .
+This request causes a running interface to be restarted.
+.It Dv IEEE80211_IOC_BGSCAN
+Set whether background scanning is enabled using the value in
+.Va i_val .
+.It Dv IEEE80211_IOC_BGSCAN_IDLE
+Set the minimum time (in msecs) a station must be idle
+before it will do a background scan to the value in
+.Va i_val .
+.It Dv IEEE80211_IOC_BGSCAN_INTERVAL
+Set the minimum time (seconds) between background scan operations to the value in
+.Va i_val .
+.It Dv IEEE80211_IOC_BMISSTHRESHOLD
+Set the number of consecutive missed Beacon frames before the system will
+attempt to roam to the value in
+.Va i_val .
+This request causes a running interface to be reset.
+.It Dv IEEE80211_IOC_BSSID
+Set the 802.11 MAC address for the desired BSS identifier according to
+.Va i_data .
+This request causes a running interface to be restarted.
+.It Dv IEEE80211_IOC_BURST
+Set whether or not packet bursting is enabled using the value in
+.Va i_val .
+This request causes a running interface to be reset.
+.It Dv IEEE80211_IOC_CHANNEL
+Set the desired/current channel to the value given by
+.Va i_val .
+This request causes a running interface to
+immediately change to the specified channel if possible;
+otherwise the interface will be restarted.
+Note this request is deprecated; use
+.Dv IEEE80211_IOC_CURCHAN
+instead.
+.It Dv IEEE80211_IOC_CHANLIST
+Set the list of available channels using the channel list pointed to by
+.Va i_data .
+The channel list is a bit vector with bit N set to 1 if
+IEEE channel number N is available for use.
+The specified channel list is checked against the set of supported
+channels and any channels not supported are silently ignored.
+If the intersection of the channel list and the supported channels is empty
+.Er EINVAL
+is returned.
+Note the current channel may be marked invalid after installing a
+new channel list.
+This request causes a running interface to be restarted.
+.It Dv IEEE80211_IOC_COUNTERMEASURES
+Set whether TKIP Countermeasures are enabled using the value in
+.Va i_val .
+This request can only be used when the authentication mode is set
+WPA; otherwise
+.Er EOPNOTSUPP
+will be returned.
+.It Dv IEEE80211_IOC_CURCHAN
+Set the current channel using the information referenced by
+.Va i_data .
+This request causes a running interface to
+immediately change to the specified channel if possible;
+otherwise the interface will be restarted.
+.It Dv IEEE80211_IOC_DELKEY
+Delete the key specified by the information referenced by
+.Va i_data .
+.It Dv IEEE80211_IOC_DELMAC
+Remove an entry in the MAC address Access Control List (ACL) database using
+the value pointed to by
+.Va i_data .
+The
+.Xr wlan_acl 4
+module must be installed and enabled or
+.Er EINVAL
+will be returned.
+.It Dv IEEE80211_IOC_DFS
+Set whether or not Dynamic Frequency Selection (DFS) is enabled
+using the value in
+.Va i_val .
+This request will fail with
+.Er EINVAL
+if 802.11h support is not enabled.
+See
+.Dv IEEE80211_IOC_DFS
+above for details.
+.It Dv IEEE80211_IOC_DOTD
+Set whether or not 802.11d support is enabled using the value in
+.Va i_val .
+This request causes a running interface to be restarted.
+See
+.Dv IEEE80211_IOC_DOTD
+above for details.
+.It Dv IEEE80211_IOC_DOTH
+Return whether 802.11h support is enabled using the value in
+.Va i_val .
+See
+.Dv IEEE80211_IOC_DOTH
+above for details.
+.It Dv IEEE80211_IOC_DROPUNENCRYPTED
+Set whether unencrypted packets transmit/received should be discarded
+using the value in
+.Va i_val .
+.It Dv IEEE80211_IOC_DTIM_PERIOD
+Set the period (in beacon intervals) between DTIM events to the value in
+.Va i_val .
+This request causes a running interface to be restarted.
+.It Dv IEEE80211_IOC_DWDS
+Set whether or not Dynamic WDS support is enabled using the value in
+.Va i_val .
+See
+.Dv IEEE80211_IOC_DWDS
+above for details.
+.It Dv IEEE80211_IOC_FF
+Set whether Atheros fast-frames support is enabled using the value in
+.Va i_val .
+This request causes a running interface to be restarted.
+See
+.Dv IEEE80211_IOC_FF
+above for details.
+.It Dv IEEE80211_IOC_FRAGTHRESHOLD
+Set the threshold (in bytes) for enabling fragmentation frames using the value in
+.Va i_val .
+This request causes a running interface to be reset.
+See
+.Dv IEEE80211_IOC_FRAGTHRESHOLD
+above for details.
+.It Dv IEEE80211_IOC_GREENFIELD
+Set whether or not Greenfield preamble use is enabled using the value in
+.Va i_val .
+This request causes a running interface to be reset.
+See
+.Dv IEEE80211_IOC_GREENFIELD
+above for details.
+.It Dv IEEE80211_IOC_HIDESSID
+Set whether SSID hiding/cloaking is enabled using the value in
+.Va i_val .
+This request causes a running interface to be reset.
+See
+.Dv IEEE80211_IOC_HIDESSID
+above for details.
+.It Dv IEEE80211_IOC_HTCOMPAT
+Set whether or not 802.11n compatibility support is enabled using the value in
+.Va i_val .
+This request causes a running interface to be reset if operating on HT channel.
+See
+.Dv IEEE80211_IOC_HTCOMPAT
+above for details.
+.It Dv IEEE80211_IOC_HTCONF
+Set automatic promotion of HT channels using the value in
+.Va i_val .
+This request causes a running interface to be restarted.
+See
+.Dv IEEE80211_IOC_HTCONF
+above for details.
+.It Dv IEEE80211_IOC_HTPROTMODE
+Set the technique used to protect HT frames in a mixed 802.11n network
+using the value in
+.Va i_val .
+This request causes a running interface to be reset.
+See
+.Dv IEEE80211_IOC_HTPROTMODE
+above for details.
+.It Dv IEEE80211_IOC_HWMP_MAXHOPS
+Set the maximum acceptable hop count in an HWMP path according to
+.Va i_val .
+Values must be in the range [0-255].
+.It Dv IEEE80211_IOC_HWMP_ROOTMODE
+Set the Mesh root mode operation according to
+.Va i_val .
+Valid values are
+.Dv IEEE80211_HWMP_ROOTMODE_DISABLED
+(root mode is disabled),
+.Dv IEEE80211_HWMP_ROOTMODE_NORMAL
+(send broadcast Path Request frames),
+.Dv IEEE80211_HWMP_ROOTMODE_PROACTIVE
+(send broadcast Path Request frames and force replies)
+and
+.Dv IEEE80211_HWMP_ROOTMODE_RANN
+(send broadcast Root Announcement (RANN) frames).
+.It Dv IEEE80211_IOC_INACTIVITY
+Set whether or not the system handles inactivity processing using the value in
+.Va i_val .
+When inactivity processing is enabled the system will track stations
+that have not transmitted frames and periodically probe them to
+check if they are still present.
+Stations that are inactive and do not respond to probes are dropped.
+.It Dv IEEE80211_IOC_MACCMD
+Change the state of the MAC address Access Control List (ACL) system.
+There are several requests supported:
+.Dv IEEE80211_MACCMD_POLICY_OPEN
+(set the current policy to disable ACL use),
+.Dv IEEE80211_MACCMD_POLICY_ALLOW
+(set the current policy to allow only addresses listed in the database),
+.Dv IEEE80211_MACCMD_POLICY_DENY
+(set the current policy to deny addresses listed in the database),
+.Dv IEEE80211_MACCMD_POLICY_RADUS
+(set the current policy to enable use of a RADIUS backend),
+.Dv IEEE80211_MACCMD_FLUSH
+(flush all addresses from the database),
+and
+.Dv IEEE80211_MACCMD_DETACH
+(detach the ACL subsystem, disabling it).
+The
+.Xr wlan_acl 4
+module must be installed or
+.Er EINVAL
+will be returned.
+.It Dv IEEE80211_IOC_MESH_AP
+Set whether or not Mesh AP support is enabled using
+.Va i_val .
+.It Dv IEEE80211_IOC_MESH_FWRD
+Set whether or not packet forwarding support is enabled using
+.Va i_val .
+.It Dv IEEE80211_IOC_MESH_ID
+Set the Mesh ID using the value pointed to by
+.Va i_data .
+A Mesh ID can be up to
+.Dv IEEE80211_MESHID_LEN
+bytes long.
+.It Dv IEEE80211_IOC_MESH_PP_METRIC
+Set the link metric protocol using the value pointed to by
+.Va i_data .
+.It Dv IEEE80211_IOC_MESH_PP_PATH
+Set the path selection protocol using the value pointed to by
+.Va i_data .
+.It Dv IEEE80211_IOC_MESH_RTCMD
+Manipulate the state of the Mesh routing tables.
+Several requests are supported:
+.Dv IEEE80211_MESH_RTCMD_FLUSH
+(flush the contents of the routing table),
+.Dv IEEE80211_MESH_RTCMD_ADD
+(add an entry for the MAC address specified in
+.Va i_data
+and start the Peer discovery process),
+and
+.Dv IEEE80211_MESH_RTCMD_DELETE
+(delete the entry corresponding to the MAC address specified in
+.Va i_data ).
+.It Dv IEEE80211_IOC_MESH_TTL
+Set the Mesh Time To Live (TTL) setting installed in packets
+transmitted by this mesh node using
+.Va i_val .
+.It Dv IEEE80211_IOC_MLME
+Explicitly control the MLME state machine for a station using the
+MLME request pointed to by
+.Va i_data .
+There are several MLME operations supported:
+.Dv IEEE80211_MLME_ASSOC
+(request association to an access point),
+.Dv IEEE80211_MLME_DIASSOC
+(diassociate the specified station),
+.Dv IEEE80211_MLME_DEAUTH
+(deauthenticate the specified station),
+.Dv IEEE80211_MLME_AUHORIZE
+(mark the specified station authorized to pass data frames),
+.Dv IEEE80211_MLME_UNAUTHORIZE
+(revoke the specified station's ability to pass data frames),
+and
+.Dv IEEE80211_MLME_AUTH
+(request authentication to an access point).
+Note when this facility is used for stations operating in infrastructure mode
+the roaming mode should be set to manual.
+.It Dv IEEE80211_IOC_POWERSAVE
+Set the current powersaving mode to the value in
+.Va i_val .
+See
+.Dv IEEE80211_IOC_POWERSAVE
+above for valid values.
+This request causes a running interface to be reset.
+.It Dv IEEE80211_IOC_POWERSAVESLEEP
+Set the powersave sleep time in TU to the value in
+.Va i_val .
+This request causes a running interface to be reset.
+.It Dv IEEE80211_IOC_PRIVACY
+Set the current MLME setting for PRIVACY using the value in
+.Va i_val .
+See
+.Dv IEEE80211_IOC_PRIVACY
+above for details.
+.It Dv IEEE80211_IOC_PROTMODE
+Set the current 802.11g protection mode to the value in
+.Va i_val .
+This request causes a running interface to be reset.
+See
+.Dv IEEE80211_IOC_PROTMODE
+above for details.
+This request causes a running interface to be reset.
+.It Dv IEEE80211_IOC_PUREG
+Set whether ``pure 11g'' mode is enabled using the value in
+.Va i_val .
+This request causes a running interface to be restarted.
+See
+.Dv IEEE80211_IOC_PUREG
+above for details.
+.It Dv IEEE80211_IOC_PUREN
+Set whether ``pure 11n'' mode is enabled using the value in
+.Va i_val .
+This request causes a running interface to be restarted.
+See
+.Dv IEEE80211_IOC_PUREN
+above for details.
+.It Dv IEEE80211_IOC_REGDOMAIN
+Set the regulatory state using the data referenced by
+.Va i_data .
+This request can only be issued when all interfaces cloned from the
+underlying physical device are marked down; otherwise
+.Er EBUSY
+is returned.
+Note the new regulatory data may invalidate any desired channel.
+.It Dv IEEE80211_IOC_RIFS
+Set whether or not Reduced InterFrame Spacing (RIFS) is enabled
+using the value in
+.Va i_val .
+This setting is meaningful only when operating with 802.11n on an HT channel.
+This request causes a running interface to be reset.
+.It Dv IEEE80211_IOC_ROAM
+Set station roaming parameters using the data pointed to by
+.Va i_data .
+.It Dv IEEE80211_IOC_ROAMING
+Set the current roaming mode to the value in
+.Va i_val .
+See
+.Dv IEEE80211_IOC_ROAMING
+above for details.
+.It Dv IEEE80211_IOC_RTSTHRESHOLD
+Set the threshold (in bytes) for enabling transmission of RTS frames
+to the value in
+.Va i_val .
+This request causes a running interface to be reset.
+See
+.Dv IEEE80211_IOC_RTSTHRESHOLD
+above for details.
+.It Dv IEEE80211_IOC_SCANVALID
+Set the age (in seconds) that results from a scan operation will be
+considered valid.
+When scan results are no longer valid and they are needed (e.g. to roam) the
+system will initiate a scan operation to replenish the scan cache.
+.It Dv IEEE80211_IOC_SCAN_REQ
+Request a scan operation using the parameters pointed to by
+.Va i_val .
+The underlying device must be running or
+.Er ENXIO
+will be returned.
+Values for
+.Va sr_duration ,
+.Va sr_mindwell ,
+and
+.Va sr_maxdwell
+shorter than 1 clock tick are rounded up to a tick.
+If more SSID's are supplied than the system is capable of handling
+the extra ones are silently ignored.
+If a scan operation is already in progress the request will be
+(silently) ignored.
+.It Dv IEEE80211_IOC_SCAN_CANCEL
+Cancel any pending/active scan operation.
+.It Dv IEEE80211_IOC_SHORTGI
+Set whether or not Short Guard Interval (SGI) is enabled using the value in
+.Va i_val .
+Note SGI is only used when operating on an HT (802.11n) channel.
+This request causes a running interface to be reset.
+.It Dv IEEE80211_IOC_SMPS
+Set the Spatial Multiplexing Power Save (SMPS) setting to the value in
+.Va i_val .
+This request causes a running interface to be reset.
+See
+.Dv IEEE80211_IOC_SMPS
+above for details.
+.It Dv IEEE80211_IOC_SSID
+Set the desired SSID using the value pointed to by
+.Va i_data .
+The string may be at most IEEE80211_NWID_LEN bytes.
+This request causes a running interface to be restarted.
+.It Dv IEEE80211_IOC_STA_STATS
+Clear accumulated statistics for the specified station.
+.It Dv IEEE80211_IOC_STA_VLAN
+Set the VLAN tag for the specified station using the information pointed to by
+.Va i_data .
+.It Dv IEEE80211_IOC_TDMA_BINTERVAL
+Set the interval between Beacon frames to the value in
+.Va i_val .
+Values must be positive.
+This request causes a running interface to be reset.
+.It Dv IEEE80211_IOC_TDMA_SLOT
+Set the current TDMA slot to the value in
+.Va i_val .
+Values must be in the range [0-slotcnt].
+Slot 0 identifies the master in the TDMA network; if it running it will
+immediately start sending Beacon frames.
+.It Dv IEEE80211_IOC_TDMA_SLOTCNT
+Set the number of slots in the TDMA network to the value in
+.Va i_val .
+This request causes a running interface to be reset.
+.It Dv IEEE80211_IOC_TDMA_SLOTLEN
+Set the length of the TDMA slot assigned to each station in the network
+to the value in
+.Va i_val .
+Slot lengths must be in the range 200 usecs to 1024 milliseconds
+(though values outside the range 1-200ms are unlikely to work well).
+This request causes a running interface to be reset.
+.It Dv IEEE80211_IOC_TSN
+Set whether or not Transitional Security Network (TSN) is enabled
+using the value in
+.Va i_val .
+.It Dv IEEE80211_IOC_TURBOP
+Set whether Atheros Dynamic Turbo mode is enabled using the value in
+.Va i_val .
+This request causes a running interface to be restarted.
+.It Dv IEEE80211_IOC_TXPARAMS
+Set transmit parameters using the data pointed to be
+.Va i_data .
+This request causes a running interface to be restarted.
+.It Dv IEEE80211_IOC_TXPOWER
+Set the maximum transmit power limit in .5 dBm units to the value in
+.Va i_val .
+This request causes a running interface to be reset.
+.It Dv IEEE80211_IOC_WEP
+Set the current WEP mode to the value in
+.Va i_val .
+See
+.Dv IEEE80211_IOC_WEP
+above for valid values.
+This request causes a running interface to be restarted.
+Note this request is deprecated; use
+.Dv IEEE80211_IOC_PRIVACY
+and
+.Dv IEEE80211_IOC_DROPUNENCRYPTED
+instead.
+.It Dv IEEE80211_IOC_WEPKEY
+Set the WEP key indicated by
+.Va i_val
+using the data pointed to by
+.Va i_data .
+Note this request is deprecated; use
+.Dv IEEE80211_IOC_WPAKEY
+instead.
+.It Dv IEEE80211_IOC_WEPTXKEY
+Set the default transmit key used for transmission to the value in
+.Va i_val .
+.It Dv IEEE80211_IOC_WME
+Set whether or not WME/WMM support is enabled using the value in
+.Va i_val .
+This request causes a running interface to be reset.
+.It Dv IEEE80211_IOC_WME_ACKPOLICY
+Set the WME ACK Policy for the Access Class (AC) specified in
+.Va i_len
+using the value in
+.Va i_val .
+.It Dv IEEE80211_IOC_WME_ACM
+Set the WME Admission Control Mechanism for the Access Class (AC) specified in
+.Va i_len
+using the value in
+.Va i_val .
+.It Dv IEEE80211_IOC_WME_AIFS
+Set the WME AIFS parameter for the Access Class (AC) specified in
+.Va i_len
+using the value in
+.Va i_val .
+.It Dv IEEE80211_IOC_WME_CWMAX
+Set the WME CWmax parameter for the Access Class (AC) specified in
+.Va i_len
+using the value in
+.Va i_val .
+.It Dv IEEE80211_IOC_WME_CWMIN
+Set the WME CWmin parameter for the Access Class (AC) specified in
+.Va i_len
+using the value in
+.Va i_val .
+.It Dv IEEE80211_IOC_WME_TXOPLIMIT
+Set the WME TxOpLimit parameter for the Access Class (AC) specified in
+.Va i_len
+using the value in
+.Va i_val .
+.It Dv IEEE80211_IOC_WPA
+Set the WPA configuration using the value in
+.Va i_val .
+This request causes a running interface to be reset.
+See
+.Dv IEEE80211_IOC_WPA
+above for details.
+.It Dv IEEE80211_IOC_WPAKEY
+Set the requested cryptographic key using data in the buffer pointed to by
+.Va i_data .
+See
+.Dv IEEE80211_IOC_WPAKEY
+for details.
+.It Dv IEEE80211_IOC_WPS
+Set whether or not Wi-FI Protected Setup (WPS) is enabled using the value in
+.Va i_val .
+.El
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr wlan 4 ,
+.Xr wlan_acl 4 ,
+.Xr wlan_xauth 4 ,
+.Xr ifconfig 8 ,
+.Xr hostapd 8 ,
+.Xr wpa_supplicant 8 .
diff --git a/share/man/man4/netfpga10g_nf10bmac.4 b/share/man/man4/netfpga10g_nf10bmac.4
new file mode 100644
index 0000000..a2ee787
--- /dev/null
+++ b/share/man/man4/netfpga10g_nf10bmac.4
@@ -0,0 +1,70 @@
+.\"-
+.\" Copyright (c) 2014 Bjoern A. Zeeb
+.\" All rights reserved.
+.\"
+.\" This software was developed by SRI International and the University of
+.\" Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-11-C-0249
+.\" ("MRC2"), as part of the DARPA MRC research programme.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 17, 2014
+.Dt NETFPGA10G_NF10BMAC 4
+.Os
+.Sh NAME
+.Nm netfpga10g_nf10bmac
+.Nd driver for the NetFPGA-10G Embedded CPU Ethernet Core
+.Sh SYNOPSIS
+.Cd "device netfpga10g_nf10bmac"
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for the NetFPGA-10G Embedded CPU Ethernet
+Core.
+.Sh HARDWARE
+The current version of the
+.Nm
+driver works with one PIO mode interface of the
+NetFPGA-10G Embedded CPU Ethernet Core version 1.00a.
+.Sh SEE ALSO
+.Xr netintro 4 ,
+.Xr ifconfig 8
+.Rs
+.%T NetFPGA-10G Wiki
+.%U https://github.com/NetFPGA/NetFPGA-public/wiki
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 11.0 .
+.Sh AUTHORS
+This software and this manual page were
+developed by SRI International and the University of Cambridge Computer
+Laboratory under DARPA/AFRL contract
+.Pq FA8750-11-C-0249
+.Pq Do MRC2 Dc ,
+as part of the DARPA MRC research programme.
+The device driver was written by
+.An Bjoern A. Zeeb .
diff --git a/share/man/man4/netgraph.4 b/share/man/man4/netgraph.4
new file mode 100644
index 0000000..90fc77e
--- /dev/null
+++ b/share/man/man4/netgraph.4
@@ -0,0 +1,1484 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Authors: Julian Elischer <julian@FreeBSD.org>
+.\" Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $Whistle: netgraph.4,v 1.7 1999/01/28 23:54:52 julian Exp $
+.\" $FreeBSD$
+.\"
+.Dd November 25, 2013
+.Dt NETGRAPH 4
+.Os
+.Sh NAME
+.Nm netgraph
+.Nd "graph based kernel networking subsystem"
+.Sh DESCRIPTION
+The
+.Nm
+system provides a uniform and modular system for the implementation
+of kernel objects which perform various networking functions.
+The objects, known as
+.Em nodes ,
+can be arranged into arbitrarily complicated graphs.
+Nodes have
+.Em hooks
+which are used to connect two nodes together, forming the edges in the graph.
+Nodes communicate along the edges to process data, implement protocols, etc.
+.Pp
+The aim of
+.Nm
+is to supplement rather than replace the existing kernel networking
+infrastructure.
+It provides:
+.Pp
+.Bl -bullet -compact
+.It
+A flexible way of combining protocol and link level drivers.
+.It
+A modular way to implement new protocols.
+.It
+A common framework for kernel entities to inter-communicate.
+.It
+A reasonably fast, kernel-based implementation.
+.El
+.Ss Nodes and Types
+The most fundamental concept in
+.Nm
+is that of a
+.Em node .
+All nodes implement a number of predefined methods which allow them
+to interact with other nodes in a well defined manner.
+.Pp
+Each node has a
+.Em type ,
+which is a static property of the node determined at node creation time.
+A node's type is described by a unique
+.Tn ASCII
+type name.
+The type implies what the node does and how it may be connected
+to other nodes.
+.Pp
+In object-oriented language, types are classes, and nodes are instances
+of their respective class.
+All node types are subclasses of the generic node
+type, and hence inherit certain common functionality and capabilities
+(e.g., the ability to have an
+.Tn ASCII
+name).
+.Pp
+Nodes may be assigned a globally unique
+.Tn ASCII
+name which can be
+used to refer to the node.
+The name must not contain the characters
+.Ql .\&
+or
+.Ql \&: ,
+and is limited to
+.Dv NG_NODESIZ
+characters (including the terminating
+.Dv NUL
+character).
+.Pp
+Each node instance has a unique
+.Em ID number
+which is expressed as a 32-bit hexadecimal value.
+This value may be used to refer to a node when there is no
+.Tn ASCII
+name assigned to it.
+.Ss Hooks
+Nodes are connected to other nodes by connecting a pair of
+.Em hooks ,
+one from each node.
+Data flows bidirectionally between nodes along
+connected pairs of hooks.
+A node may have as many hooks as it
+needs, and may assign whatever meaning it wants to a hook.
+.Pp
+Hooks have these properties:
+.Bl -bullet
+.It
+A hook has an
+.Tn ASCII
+name which is unique among all hooks
+on that node (other hooks on other nodes may have the same name).
+The name must not contain the characters
+.Ql .\&
+or
+.Ql \&: ,
+and is
+limited to
+.Dv NG_HOOKSIZ
+characters (including the terminating
+.Dv NUL
+character).
+.It
+A hook is always connected to another hook.
+That is, hooks are
+created at the time they are connected, and breaking an edge by
+removing either hook destroys both hooks.
+.It
+A hook can be set into a state where incoming packets are always queued
+by the input queueing system, rather than being delivered directly.
+This can be used when the data is sent from an interrupt handler,
+and processing must be quick so as not to block other interrupts.
+.It
+A hook may supply overriding receive data and receive message functions,
+which should be used for data and messages received through that hook
+in preference to the general node-wide methods.
+.El
+.Pp
+A node may decide to assign special meaning to some hooks.
+For example, connecting to the hook named
+.Va debug
+might trigger
+the node to start sending debugging information to that hook.
+.Ss Data Flow
+Two types of information flow between nodes: data messages and
+control messages.
+Data messages are passed in
+.Vt mbuf chains
+along the edges
+in the graph, one edge at a time.
+The first
+.Vt mbuf
+in a chain must have the
+.Dv M_PKTHDR
+flag set.
+Each node decides how to handle data received through one of its hooks.
+.Pp
+Along with data, nodes can also receive control messages.
+There are generic and type-specific control messages.
+Control messages have a common
+header format, followed by type-specific data, and are binary structures
+for efficiency.
+However, node types may also support conversion of the
+type-specific data between binary and
+.Tn ASCII
+formats,
+for debugging and human interface purposes (see the
+.Dv NGM_ASCII2BINARY
+and
+.Dv NGM_BINARY2ASCII
+generic control messages below).
+Nodes are not required to support these conversions.
+.Pp
+There are three ways to address a control message.
+If there is a sequence of edges connecting the two nodes, the message
+may be
+.Dq source routed
+by specifying the corresponding sequence
+of
+.Tn ASCII
+hook names as the destination address for the message (relative
+addressing).
+If the destination is adjacent to the source, then the source
+node may simply specify (as a pointer in the code) the hook across which the
+message should be sent.
+Otherwise, the recipient node's global
+.Tn ASCII
+name
+(or equivalent ID-based name) is used as the destination address
+for the message (absolute addressing).
+The two types of
+.Tn ASCII
+addressing
+may be combined, by specifying an absolute start node and a sequence
+of hooks.
+Only the
+.Tn ASCII
+addressing modes are available to control programs outside the kernel;
+use of direct pointers is limited to kernel modules.
+.Pp
+Messages often represent commands that are followed by a reply message
+in the reverse direction.
+To facilitate this, the recipient of a
+control message is supplied with a
+.Dq return address
+that is suitable for addressing a reply.
+.Pp
+Each control message contains a 32-bit value, called a
+.Dq typecookie ,
+indicating the type of the message, i.e.\& how to interpret it.
+Typically each type defines a unique typecookie for the messages
+that it understands.
+However, a node may choose to recognize and
+implement more than one type of messages.
+.Pp
+If a message is delivered to an address that implies that it arrived
+at that node through a particular hook (as opposed to having been directly
+addressed using its ID or global name) then that hook is identified to the
+receiving node.
+This allows a message to be re-routed or passed on, should
+a node decide that this is required, in much the same way that data packets
+are passed around between nodes.
+A set of standard
+messages for flow control and link management purposes are
+defined by the base system that are usually
+passed around in this manner.
+Flow control message would usually travel
+in the opposite direction to the data to which they pertain.
+.Ss Netgraph is (Usually) Functional
+In order to minimize latency, most
+.Nm
+operations are functional.
+That is, data and control messages are delivered by making function
+calls rather than by using queues and mailboxes.
+For example, if node
+A wishes to send a data
+.Vt mbuf
+to neighboring node B, it calls the
+generic
+.Nm
+data delivery function.
+This function in turn locates
+node B and calls B's
+.Dq receive data
+method.
+There are exceptions to this.
+.Pp
+Each node has an input queue, and some operations can be considered to
+be
+.Em writers
+in that they alter the state of the node.
+Obviously, in an SMP
+world it would be bad if the state of a node were changed while another
+data packet were transiting the node.
+For this purpose, the input queue implements a
+.Em reader/writer
+semantic so that when there is a writer in the node, all other requests
+are queued, and while there are readers, a writer, and any following
+packets are queued.
+In the case where there is no reason to queue the
+data, the input method is called directly, as mentioned above.
+.Pp
+A node may declare that all requests should be considered as writers,
+or that requests coming in over a particular hook should be considered to
+be a writer, or even that packets leaving or entering across a particular
+hook should always be queued, rather than delivered directly (often useful
+for interrupt routines who want to get back to the hardware quickly).
+By default, all control message packets are considered to be writers
+unless specifically declared to be a reader in their definition.
+(See
+.Dv NGM_READONLY
+in
+.In netgraph/ng_message.h . )
+.Pp
+While this mode of operation
+results in good performance, it has a few implications for node
+developers:
+.Bl -bullet
+.It
+Whenever a node delivers a data or control message, the node
+may need to allow for the possibility of receiving a returning
+message before the original delivery function call returns.
+.It
+.Nm Netgraph
+provides internal synchronization between nodes.
+Data always enters a
+.Dq graph
+at an
+.Em edge node .
+An
+.Em edge node
+is a node that interfaces between
+.Nm
+and some other part of the system.
+Examples of
+.Dq edge nodes
+include device drivers, the
+.Vt socket , ether , tty ,
+and
+.Vt ksocket
+node type.
+In these
+.Em edge nodes ,
+the calling thread directly executes code in the node, and from that code
+calls upon the
+.Nm
+framework to deliver data across some edge
+in the graph.
+From an execution point of view, the calling thread will execute the
+.Nm
+framework methods, and if it can acquire a lock to do so,
+the input methods of the next node.
+This continues until either the data is discarded or queued for some
+device or system entity, or the thread is unable to acquire a lock on
+the next node.
+In that case, the data is queued for the node, and execution rewinds
+back to the original calling entity.
+The queued data will be picked up and processed by either the current
+holder of the lock when they have completed their operations, or by
+a special
+.Nm
+thread that is activated when there are such items
+queued.
+.It
+It is possible for an infinite loop to occur if the graph contains cycles.
+.El
+.Pp
+So far, these issues have not proven problematical in practice.
+.Ss Interaction with Other Parts of the Kernel
+A node may have a hidden interaction with other components of the
+kernel outside of the
+.Nm
+subsystem, such as device hardware,
+kernel protocol stacks, etc.
+In fact, one of the benefits of
+.Nm
+is the ability to join disparate kernel networking entities together in a
+consistent communication framework.
+.Pp
+An example is the
+.Vt socket
+node type which is both a
+.Nm
+node and a
+.Xr socket 2
+in the protocol family
+.Dv PF_NETGRAPH .
+Socket nodes allow user processes to participate in
+.Nm .
+Other nodes communicate with socket nodes using the usual methods, and the
+node hides the fact that it is also passing information to and from a
+cooperating user process.
+.Pp
+Another example is a device driver that presents
+a node interface to the hardware.
+.Ss Node Methods
+Nodes are notified of the following actions via function calls
+to the following node methods,
+and may accept or reject that action (by returning the appropriate
+error code):
+.Bl -tag -width 2n
+.It Creation of a new node
+The constructor for the type is called.
+If creation of a new node is allowed, constructor method may allocate any
+special resources it needs.
+For nodes that correspond to hardware, this is typically done during the
+device attach routine.
+Often a global
+.Tn ASCII
+name corresponding to the
+device name is assigned here as well.
+.It Creation of a new hook
+The hook is created and tentatively
+linked to the node, and the node is told about the name that will be
+used to describe this hook.
+The node sets up any special data structures
+it needs, or may reject the connection, based on the name of the hook.
+.It Successful connection of two hooks
+After both ends have accepted their
+hooks, and the links have been made, the nodes get a chance to
+find out who their peer is across the link, and can then decide to reject
+the connection.
+Tear-down is automatic.
+This is also the time at which
+a node may decide whether to set a particular hook (or its peer) into
+the
+.Em queueing
+mode.
+.It Destruction of a hook
+The node is notified of a broken connection.
+The node may consider some hooks
+to be critical to operation and others to be expendable: the disconnection
+of one hook may be an acceptable event while for another it
+may effect a total shutdown for the node.
+.It Preshutdown of a node
+This method is called before real shutdown, which is discussed below.
+While in this method, the node is fully operational and can send a
+.Dq goodbye
+message to its peers, or it can exclude itself from the chain and reconnect
+its peers together, like the
+.Xr ng_tee 4
+node type does.
+.It Shutdown of a node
+This method allows a node to clean up
+and to ensure that any actions that need to be performed
+at this time are taken.
+The method is called by the generic (i.e., superclass)
+node destructor which will get rid of the generic components of the node.
+Some nodes (usually associated with a piece of hardware) may be
+.Em persistent
+in that a shutdown breaks all edges and resets the node,
+but does not remove it.
+In this case, the shutdown method should not
+free its resources, but rather, clean up and then call the
+.Fn NG_NODE_REVIVE
+macro to signal the generic code that the shutdown is aborted.
+In the case where the shutdown is started by the node itself due to hardware
+removal or unloading (via
+.Fn ng_rmnode_self ) ,
+it should set the
+.Dv NGF_REALLY_DIE
+flag to signal to its own shutdown method that it is not to persist.
+.El
+.Ss Sending and Receiving Data
+Two other methods are also supported by all nodes:
+.Bl -tag -width 2n
+.It Receive data message
+A
+.Nm
+.Em queueable request item ,
+usually referred to as an
+.Em item ,
+is received by this function.
+The item contains a pointer to an
+.Vt mbuf .
+.Pp
+The node is notified on which hook the item has arrived,
+and can use this information in its processing decision.
+The receiving node must always
+.Fn NG_FREE_M
+the
+.Vt mbuf chain
+on completion or error, or pass it on to another node
+(or kernel module) which will then be responsible for freeing it.
+Similarly, the
+.Em item
+must be freed if it is not to be passed on to another node, by using the
+.Fn NG_FREE_ITEM
+macro.
+If the item still holds references to
+.Vt mbufs
+at the time of
+freeing then they will also be appropriately freed.
+Therefore, if there is any chance that the
+.Vt mbuf
+will be
+changed or freed separately from the item, it is very important
+that it be retrieved using the
+.Fn NGI_GET_M
+macro that also removes the reference within the item.
+(Or multiple frees of the same object will occur.)
+.Pp
+If it is only required to examine the contents of the
+.Vt mbufs ,
+then it is possible to use the
+.Fn NGI_M
+macro to both read and rewrite
+.Vt mbuf
+pointer inside the item.
+.Pp
+If developer needs to pass any meta information along with the
+.Vt mbuf chain ,
+he should use
+.Xr mbuf_tags 9
+framework.
+.Bf -symbolic
+Note that old
+.Nm
+specific meta-data format is obsoleted now.
+.Ef
+.Pp
+The receiving node may decide to defer the data by queueing it in the
+.Nm
+NETISR system (see below).
+It achieves this by setting the
+.Dv HK_QUEUE
+flag in the flags word of the hook on which that data will arrive.
+The infrastructure will respect that bit and queue the data for delivery at
+a later time, rather than deliver it directly.
+A node may decide to set
+the bit on the
+.Em peer
+node, so that its own output packets are queued.
+.Pp
+The node may elect to nominate a different receive data function
+for data received on a particular hook, to simplify coding.
+It uses the
+.Fn NG_HOOK_SET_RCVDATA hook fn
+macro to do this.
+The function receives the same arguments in every way
+other than it will receive all (and only) packets from that hook.
+.It Receive control message
+This method is called when a control message is addressed to the node.
+As with the received data, an
+.Em item
+is received, with a pointer to the control message.
+The message can be examined using the
+.Fn NGI_MSG
+macro, or completely extracted from the item using the
+.Fn NGI_GET_MSG
+which also removes the reference within the item.
+If the item still holds a reference to the message when it is freed
+(using the
+.Fn NG_FREE_ITEM
+macro), then the message will also be freed appropriately.
+If the
+reference has been removed, the node must free the message itself using the
+.Fn NG_FREE_MSG
+macro.
+A return address is always supplied, giving the address of the node
+that originated the message so a reply message can be sent anytime later.
+The return address is retrieved from the
+.Em item
+using the
+.Fn NGI_RETADDR
+macro and is of type
+.Vt ng_ID_t .
+All control messages and replies are
+allocated with the
+.Xr malloc 9
+type
+.Dv M_NETGRAPH_MSG ,
+however it is more convenient to use the
+.Fn NG_MKMESSAGE
+and
+.Fn NG_MKRESPONSE
+macros to allocate and fill out a message.
+Messages must be freed using the
+.Fn NG_FREE_MSG
+macro.
+.Pp
+If the message was delivered via a specific hook, that hook will
+also be made known, which allows the use of such things as flow-control
+messages, and status change messages, where the node may want to forward
+the message out another hook to that on which it arrived.
+.Pp
+The node may elect to nominate a different receive message function
+for messages received on a particular hook, to simplify coding.
+It uses the
+.Fn NG_HOOK_SET_RCVMSG hook fn
+macro to do this.
+The function receives the same arguments in every way
+other than it will receive all (and only) messages from that hook.
+.El
+.Pp
+Much use has been made of reference counts, so that nodes being
+freed of all references are automatically freed, and this behaviour
+has been tested and debugged to present a consistent and trustworthy
+framework for the
+.Dq type module
+writer to use.
+.Ss Addressing
+The
+.Nm
+framework provides an unambiguous and simple to use method of specifically
+addressing any single node in the graph.
+The naming of a node is
+independent of its type, in that another node, or external component
+need not know anything about the node's type in order to address it so as
+to send it a generic message type.
+Node and hook names should be
+chosen so as to make addresses meaningful.
+.Pp
+Addresses are either absolute or relative.
+An absolute address begins
+with a node name or ID, followed by a colon, followed by a sequence of hook
+names separated by periods.
+This addresses the node reached by starting
+at the named node and following the specified sequence of hooks.
+A relative address includes only the sequence of hook names, implicitly
+starting hook traversal at the local node.
+.Pp
+There are a couple of special possibilities for the node name.
+The name
+.Ql .\&
+(referred to as
+.Ql .: )
+always refers to the local node.
+Also, nodes that have no global name may be addressed by their ID numbers,
+by enclosing the hexadecimal representation of the ID number within
+the square brackets.
+Here are some examples of valid
+.Nm
+addresses:
+.Bd -literal -offset indent
+\&.:
+[3f]:
+foo:
+\&.:hook1
+foo:hook1.hook2
+[d80]:hook1
+.Ed
+.Pp
+The following set of nodes might be created for a site with
+a single physical frame relay line having two active logical DLCI channels,
+with RFC 1490 frames on DLCI 16 and PPP frames over DLCI 20:
+.Bd -literal
+[type SYNC ] [type FRAME] [type RFC1490]
+[ "Frame1" ](uplink)<-->(data)[<un-named>](dlci16)<-->(mux)[<un-named> ]
+[ A ] [ B ](dlci20)<---+ [ C ]
+ |
+ | [ type PPP ]
+ +>(mux)[<un-named>]
+ [ D ]
+.Ed
+.Pp
+One could always send a control message to node C from anywhere
+by using the name
+.Dq Li Frame1:uplink.dlci16 .
+In this case, node C would also be notified that the message
+reached it via its hook
+.Va mux .
+Similarly,
+.Dq Li Frame1:uplink.dlci20
+could reliably be used to reach node D, and node A could refer
+to node B as
+.Dq Li .:uplink ,
+or simply
+.Dq Li uplink .
+Conversely, B can refer to A as
+.Dq Li data .
+The address
+.Dq Li mux.data
+could be used by both nodes C and D to address a message to node A.
+.Pp
+Note that this is only for
+.Em control messages .
+In each of these cases, where a relative addressing mode is
+used, the recipient is notified of the hook on which the
+message arrived, as well as
+the originating node.
+This allows the option of hop-by-hop distribution of messages and
+state information.
+Data messages are
+.Em only
+routed one hop at a time, by specifying the departing
+hook, with each node making
+the next routing decision.
+So when B receives a frame on hook
+.Va data ,
+it decodes the frame relay header to determine the DLCI,
+and then forwards the unwrapped frame to either C or D.
+.Pp
+In a similar way, flow control messages may be routed in the reverse
+direction to outgoing data.
+For example a
+.Dq "buffer nearly full"
+message from
+.Dq Li Frame1:
+would be passed to node B
+which might decide to send similar messages to both nodes
+C and D.
+The nodes would use
+.Em "direct hook pointer"
+addressing to route the messages.
+The message may have travelled from
+.Dq Li Frame1:
+to B
+as a synchronous reply, saving time and cycles.
+.Ss Netgraph Structures
+Structures are defined in
+.In netgraph/netgraph.h
+(for kernel structures only of interest to nodes)
+and
+.In netgraph/ng_message.h
+(for message definitions also of interest to user programs).
+.Pp
+The two basic object types that are of interest to node authors are
+.Em nodes
+and
+.Em hooks .
+These two objects have the following
+properties that are also of interest to the node writers.
+.Bl -tag -width 2n
+.It Vt "struct ng_node"
+Node authors should always use the following
+.Ic typedef
+to declare
+their pointers, and should never actually declare the structure.
+.Pp
+.Fd "typedef struct ng_node *node_p;"
+.Pp
+The following properties are associated with a node, and can be
+accessed in the following manner:
+.Bl -tag -width 2n
+.It Validity
+A driver or interrupt routine may want to check whether
+the node is still valid.
+It is assumed that the caller holds a reference
+on the node so it will not have been freed, however it may have been
+disabled or otherwise shut down.
+Using the
+.Fn NG_NODE_IS_VALID node
+macro will return this state.
+Eventually it should be almost impossible
+for code to run in an invalid node but at this time that work has not been
+completed.
+.It Node ID Pq Vt ng_ID_t
+This property can be retrieved using the macro
+.Fn NG_NODE_ID node .
+.It Node name
+Optional globally unique name,
+.Dv NUL
+terminated string.
+If there
+is a value in here, it is the name of the node.
+.Bd -literal -offset indent
+if (NG_NODE_NAME(node)[0] != '\e0') ...
+
+if (strcmp(NG_NODE_NAME(node), "fred") == 0) ...
+.Ed
+.It A node dependent opaque cookie
+Anything of the pointer type can be placed here.
+The macros
+.Fn NG_NODE_SET_PRIVATE node value
+and
+.Fn NG_NODE_PRIVATE node
+set and retrieve this property, respectively.
+.It Number of hooks
+The
+.Fn NG_NODE_NUMHOOKS node
+macro is used
+to retrieve this value.
+.It Hooks
+The node may have a number of hooks.
+A traversal method is provided to allow all the hooks to be
+tested for some condition.
+.Fn NG_NODE_FOREACH_HOOK node fn arg rethook
+where
+.Fa fn
+is a function that will be called for each hook
+with the form
+.Fn fn hook arg
+and returning 0 to terminate the search.
+If the search is terminated, then
+.Fa rethook
+will be set to the hook at which the search was terminated.
+.El
+.It Vt "struct ng_hook"
+Node authors should always use the following
+.Ic typedef
+to declare
+their hook pointers.
+.Pp
+.Fd "typedef struct ng_hook *hook_p;"
+.Pp
+The following properties are associated with a hook, and can be
+accessed in the following manner:
+.Bl -tag -width 2n
+.It A hook dependent opaque cookie
+Anything of the pointer type can be placed here.
+The macros
+.Fn NG_HOOK_SET_PRIVATE hook value
+and
+.Fn NG_HOOK_PRIVATE hook
+set and retrieve this property, respectively.
+.It \&An associate node
+The macro
+.Fn NG_HOOK_NODE hook
+finds the associated node.
+.It A peer hook Pq Vt hook_p
+The other hook in this connected pair.
+The
+.Fn NG_HOOK_PEER hook
+macro finds the peer.
+.It References
+The
+.Fn NG_HOOK_REF hook
+and
+.Fn NG_HOOK_UNREF hook
+macros
+increment and decrement the hook reference count accordingly.
+After decrement you should always assume the hook has been freed
+unless you have another reference still valid.
+.It Override receive functions
+The
+.Fn NG_HOOK_SET_RCVDATA hook fn
+and
+.Fn NG_HOOK_SET_RCVMSG hook fn
+macros can be used to set override methods that will be used in preference
+to the generic receive data and receive message functions.
+To unset these, use the macros to set them to
+.Dv NULL .
+They will only be used for data and
+messages received on the hook on which they are set.
+.El
+.Pp
+The maintenance of the names, reference counts, and linked list
+of hooks for each node is handled automatically by the
+.Nm
+subsystem.
+Typically a node's private info contains a back-pointer to the node or hook
+structure, which counts as a new reference that must be included
+in the reference count for the node.
+When the node constructor is called,
+there is already a reference for this calculated in, so that
+when the node is destroyed, it should remember to do a
+.Fn NG_NODE_UNREF
+on the node.
+.Pp
+From a hook you can obtain the corresponding node, and from
+a node, it is possible to traverse all the active hooks.
+.Pp
+A current example of how to define a node can always be seen in
+.Pa src/sys/netgraph/ng_sample.c
+and should be used as a starting point for new node writers.
+.El
+.Ss Netgraph Message Structure
+Control messages have the following structure:
+.Bd -literal
+#define NG_CMDSTRSIZ 32 /* Max command string (including null) */
+
+struct ng_mesg {
+ struct ng_msghdr {
+ u_char version; /* Must equal NG_VERSION */
+ u_char spare; /* Pad to 4 bytes */
+ uint16_t spare2;
+ uint32_t arglen; /* Length of cmd/resp data */
+ uint32_t cmd; /* Command identifier */
+ uint32_t flags; /* Message status flags */
+ uint32_t token; /* Reply should have the same token */
+ uint32_t typecookie; /* Node type understanding this message */
+ u_char cmdstr[NG_CMDSTRSIZ]; /* cmd string + \0 */
+ } header;
+ char data[]; /* placeholder for actual data */
+};
+
+#define NG_ABI_VERSION 12 /* Netgraph kernel ABI version */
+#define NG_VERSION 8 /* Netgraph message version */
+#define NGF_ORIG 0x00000000 /* The msg is the original request */
+#define NGF_RESP 0x00000001 /* The message is a response */
+.Ed
+.Pp
+Control messages have the fixed header shown above, followed by a
+variable length data section which depends on the type cookie
+and the command.
+Each field is explained below:
+.Bl -tag -width indent
+.It Va version
+Indicates the version of the
+.Nm
+message protocol itself.
+The current version is
+.Dv NG_VERSION .
+.It Va arglen
+This is the length of any extra arguments, which begin at
+.Va data .
+.It Va flags
+Indicates whether this is a command or a response control message.
+.It Va token
+The
+.Va token
+is a means by which a sender can match a reply message to the
+corresponding command message; the reply always has the same token.
+.It Va typecookie
+The corresponding node type's unique 32-bit value.
+If a node does not recognize the type cookie it must reject the message
+by returning
+.Er EINVAL .
+.Pp
+Each type should have an include file that defines the commands,
+argument format, and cookie for its own messages.
+The typecookie
+ensures that the same header file was included by both sender and
+receiver; when an incompatible change in the header file is made,
+the typecookie
+.Em must
+be changed.
+The de-facto method for generating unique type cookies is to take the
+seconds from the Epoch at the time the header file is written
+(i.e., the output of
+.Dq Nm date Fl u Li +%s ) .
+.Pp
+There is a predefined typecookie
+.Dv NGM_GENERIC_COOKIE
+for the
+.Vt generic
+node type, and
+a corresponding set of generic messages which all nodes understand.
+The handling of these messages is automatic.
+.It Va cmd
+The identifier for the message command.
+This is type specific,
+and is defined in the same header file as the typecookie.
+.It Va cmdstr
+Room for a short human readable version of
+.Va command
+(for debugging purposes only).
+.El
+.Pp
+Some modules may choose to implement messages from more than one
+of the header files and thus recognize more than one type cookie.
+.Ss Control Message ASCII Form
+Control messages are in binary format for efficiency.
+However, for
+debugging and human interface purposes, and if the node type supports
+it, control messages may be converted to and from an equivalent
+.Tn ASCII
+form.
+The
+.Tn ASCII
+form is similar to the binary form, with two exceptions:
+.Bl -enum
+.It
+The
+.Va cmdstr
+header field must contain the
+.Tn ASCII
+name of the command, corresponding to the
+.Va cmd
+header field.
+.It
+The arguments field contains a
+.Dv NUL Ns
+-terminated
+.Tn ASCII
+string version of the message arguments.
+.El
+.Pp
+In general, the arguments field of a control message can be any
+arbitrary C data type.
+.Nm Netgraph
+includes parsing routines to support
+some pre-defined datatypes in
+.Tn ASCII
+with this simple syntax:
+.Bl -bullet
+.It
+Integer types are represented by base 8, 10, or 16 numbers.
+.It
+Strings are enclosed in double quotes and respect the normal
+C language backslash escapes.
+.It
+IP addresses have the obvious form.
+.It
+Arrays are enclosed in square brackets, with the elements listed
+consecutively starting at index zero.
+An element may have an optional index and equals sign
+.Pq Ql =
+preceding it.
+Whenever an element
+does not have an explicit index, the index is implicitly the previous
+element's index plus one.
+.It
+Structures are enclosed in curly braces, and each field is specified
+in the form
+.Ar fieldname Ns = Ns Ar value .
+.It
+Any array element or structure field whose value is equal to its
+.Dq default value
+may be omitted.
+For integer types, the default value
+is usually zero; for string types, the empty string.
+.It
+Array elements and structure fields may be specified in any order.
+.El
+.Pp
+Each node type may define its own arbitrary types by providing
+the necessary routines to parse and unparse.
+.Tn ASCII
+forms defined
+for a specific node type are documented in the corresponding man page.
+.Ss Generic Control Messages
+There are a number of standard predefined messages that will work
+for any node, as they are supported directly by the framework itself.
+These are defined in
+.In netgraph/ng_message.h
+along with the basic layout of messages and other similar information.
+.Bl -tag -width indent
+.It Dv NGM_CONNECT
+Connect to another node, using the supplied hook names on either end.
+.It Dv NGM_MKPEER
+Construct a node of the given type and then connect to it using the
+supplied hook names.
+.It Dv NGM_SHUTDOWN
+The target node should disconnect from all its neighbours and shut down.
+Persistent nodes such as those representing physical hardware
+might not disappear from the node namespace, but only reset themselves.
+The node must disconnect all of its hooks.
+This may result in neighbors shutting themselves down, and possibly a
+cascading shutdown of the entire connected graph.
+.It Dv NGM_NAME
+Assign a name to a node.
+Nodes can exist without having a name, and this
+is the default for nodes created using the
+.Dv NGM_MKPEER
+method.
+Such nodes can only be addressed relatively or by their ID number.
+.It Dv NGM_RMHOOK
+Ask the node to break a hook connection to one of its neighbours.
+Both nodes will have their
+.Dq disconnect
+method invoked.
+Either node may elect to totally shut down as a result.
+.It Dv NGM_NODEINFO
+Asks the target node to describe itself.
+The four returned fields
+are the node name (if named), the node type, the node ID and the
+number of hooks attached.
+The ID is an internal number unique to that node.
+.It Dv NGM_LISTHOOKS
+This returns the information given by
+.Dv NGM_NODEINFO ,
+but in addition
+includes an array of fields describing each link, and the description for
+the node at the far end of that link.
+.It Dv NGM_LISTNAMES
+This returns an array of node descriptions (as for
+.Dv NGM_NODEINFO )
+where each entry of the array describes a named node.
+All named nodes will be described.
+.It Dv NGM_LISTNODES
+This is the same as
+.Dv NGM_LISTNAMES
+except that all nodes are listed regardless of whether they have a name or not.
+.It Dv NGM_LISTTYPES
+This returns a list of all currently installed
+.Nm
+types.
+.It Dv NGM_TEXT_STATUS
+The node may return a text formatted status message.
+The status information is determined entirely by the node type.
+It is the only
+.Dq generic
+message
+that requires any support within the node itself and as such the node may
+elect to not support this message.
+The text response must be less than
+.Dv NG_TEXTRESPONSE
+bytes in length (presently 1024).
+This can be used to return general
+status information in human readable form.
+.It Dv NGM_BINARY2ASCII
+This message converts a binary control message to its
+.Tn ASCII
+form.
+The entire control message to be converted is contained within the
+arguments field of the
+.Dv NGM_BINARY2ASCII
+message itself.
+If successful, the reply will contain the same control
+message in
+.Tn ASCII
+form.
+A node will typically only know how to translate messages that it
+itself understands, so the target node of the
+.Dv NGM_BINARY2ASCII
+is often the same node that would actually receive that message.
+.It Dv NGM_ASCII2BINARY
+The opposite of
+.Dv NGM_BINARY2ASCII .
+The entire control message to be converted, in
+.Tn ASCII
+form, is contained
+in the arguments section of the
+.Dv NGM_ASCII2BINARY
+and need only have the
+.Va flags , cmdstr ,
+and
+.Va arglen
+header fields filled in, plus the
+.Dv NUL Ns
+-terminated string version of
+the arguments in the arguments field.
+If successful, the reply
+contains the binary version of the control message.
+.El
+.Ss Flow Control Messages
+In addition to the control messages that affect nodes with respect to the
+graph, there are also a number of
+.Em flow control
+messages defined.
+At present these are
+.Em not
+handled automatically by the system, so
+nodes need to handle them if they are going to be used in a graph utilising
+flow control, and will be in the likely path of these messages.
+The default action of a node that does not understand these messages should
+be to pass them onto the next node.
+Hopefully some helper functions will assist in this eventually.
+These messages are also defined in
+.In netgraph/ng_message.h
+and have a separate cookie
+.Dv NG_FLOW_COOKIE
+to help identify them.
+They will not be covered in depth here.
+.Sh INITIALIZATION
+The base
+.Nm
+code may either be statically compiled
+into the kernel or else loaded dynamically as a KLD via
+.Xr kldload 8 .
+In the former case, include
+.Pp
+.D1 Cd "options NETGRAPH"
+.Pp
+in your kernel configuration file.
+You may also include selected
+node types in the kernel compilation, for example:
+.Pp
+.D1 Cd "options NETGRAPH"
+.D1 Cd "options NETGRAPH_SOCKET"
+.D1 Cd "options NETGRAPH_ECHO"
+.Pp
+Once the
+.Nm
+subsystem is loaded, individual node types may be loaded at any time
+as KLD modules via
+.Xr kldload 8 .
+Moreover,
+.Nm
+knows how to automatically do this; when a request to create a new
+node of unknown type
+.Ar type
+is made,
+.Nm
+will attempt to load the KLD module
+.Pa ng_ Ns Ao Ar type Ac Ns Pa .ko .
+.Pp
+Types can also be installed at boot time, as certain device drivers
+may want to export each instance of the device as a
+.Nm
+node.
+.Pp
+In general, new types can be installed at any time from within the
+kernel by calling
+.Fn ng_newtype ,
+supplying a pointer to the type's
+.Vt "struct ng_type"
+structure.
+.Pp
+The
+.Fn NETGRAPH_INIT
+macro automates this process by using a linker set.
+.Sh EXISTING NODE TYPES
+Several node types currently exist.
+Each is fully documented in its own man page:
+.Bl -tag -width indent
+.It SOCKET
+The socket type implements two new sockets in the new protocol domain
+.Dv PF_NETGRAPH .
+The new sockets protocols are
+.Dv NG_DATA
+and
+.Dv NG_CONTROL ,
+both of type
+.Dv SOCK_DGRAM .
+Typically one of each is associated with a socket node.
+When both sockets have closed, the node will shut down.
+The
+.Dv NG_DATA
+socket is used for sending and receiving data, while the
+.Dv NG_CONTROL
+socket is used for sending and receiving control messages.
+Data and control messages are passed using the
+.Xr sendto 2
+and
+.Xr recvfrom 2
+system calls, using a
+.Vt "struct sockaddr_ng"
+socket address.
+.It HOLE
+Responds only to generic messages and is a
+.Dq black hole
+for data.
+Useful for testing.
+Always accepts new hooks.
+.It ECHO
+Responds only to generic messages and always echoes data back through the
+hook from which it arrived.
+Returns any non-generic messages as their own response.
+Useful for testing.
+Always accepts new hooks.
+.It TEE
+This node is useful for
+.Dq snooping .
+It has 4 hooks:
+.Va left , right , left2right ,
+and
+.Va right2left .
+Data entering from the
+.Va right
+is passed to the
+.Va left
+and duplicated on
+.Va right2left ,
+and data entering from the
+.Va left
+is passed to the
+.Va right
+and duplicated on
+.Va left2right .
+Data entering from
+.Va left2right
+is sent to the
+.Va right
+and data from
+.Va right2left
+to
+.Va left .
+.It RFC1490 MUX
+Encapsulates/de-encapsulates frames encoded according to RFC 1490.
+Has a hook for the encapsulated packets
+.Pq Va downstream
+and one hook
+for each protocol (i.e., IP, PPP, etc.).
+.It FRAME RELAY MUX
+Encapsulates/de-encapsulates Frame Relay frames.
+Has a hook for the encapsulated packets
+.Pq Va downstream
+and one hook
+for each DLCI.
+.It FRAME RELAY LMI
+Automatically handles frame relay
+.Dq LMI
+(link management interface) operations and packets.
+Automatically probes and detects which of several LMI standards
+is in use at the exchange.
+.It TTY
+This node is also a line discipline.
+It simply converts between
+.Vt mbuf
+frames and sequential serial data, allowing a TTY to appear as a
+.Nm
+node.
+It has a programmable
+.Dq hotkey
+character.
+.It ASYNC
+This node encapsulates and de-encapsulates asynchronous frames
+according to RFC 1662.
+This is used in conjunction with the TTY node
+type for supporting PPP links over asynchronous serial lines.
+.It ETHERNET
+This node is attached to every Ethernet interface in the system.
+It allows capturing raw Ethernet frames from the network, as well as
+sending frames out of the interface.
+.It INTERFACE
+This node is also a system networking interface.
+It has hooks representing each protocol family (IP, IPv6)
+and appears in the output of
+.Xr ifconfig 8 .
+The interfaces are named
+.Dq Li ng0 ,
+.Dq Li ng1 ,
+etc.
+.It ONE2MANY
+This node implements a simple round-robin multiplexer.
+It can be used
+for example to make several LAN ports act together to get a higher speed
+link between two machines.
+.It Various PPP related nodes
+There is a full multilink PPP implementation that runs in
+.Nm .
+The
+.Pa net/mpd5
+port can use these modules to make a very low latency high
+capacity PPP system.
+It also supports
+.Tn PPTP
+VPNs using the PPTP node.
+.It PPPOE
+A server and client side implementation of PPPoE.
+Used in conjunction with
+either
+.Xr ppp 8
+or the
+.Pa net/mpd5
+port.
+.It BRIDGE
+This node, together with the Ethernet nodes, allows a very flexible
+bridging system to be implemented.
+.It KSOCKET
+This intriguing node looks like a socket to the system but diverts
+all data to and from the
+.Nm
+system for further processing.
+This allows
+such things as UDP tunnels to be almost trivially implemented from the
+command line.
+.El
+.Pp
+Refer to the section at the end of this man page for more nodes types.
+.Sh NOTES
+Whether a named node exists can be checked by trying to send a control message
+to it (e.g.,
+.Dv NGM_NODEINFO ) .
+If it does not exist,
+.Er ENOENT
+will be returned.
+.Pp
+All data messages are
+.Vt mbuf chains
+with the
+.Dv M_PKTHDR
+flag set.
+.Pp
+Nodes are responsible for freeing what they allocate.
+There are three exceptions:
+.Bl -enum
+.It
+.Vt Mbufs
+sent across a data link are never to be freed by the sender.
+In the
+case of error, they should be considered freed.
+.It
+Messages sent using one of
+.Fn NG_SEND_MSG_*
+family macros are freed by the recipient.
+As in the case above, the addresses
+associated with the message are freed by whatever allocated them so the
+recipient should copy them if it wants to keep that information.
+.It
+Both control messages and data are delivered and queued with a
+.Nm
+.Em item .
+The item must be freed using
+.Fn NG_FREE_ITEM item
+or passed on to another node.
+.El
+.Sh FILES
+.Bl -tag -width indent
+.It In netgraph/netgraph.h
+Definitions for use solely within the kernel by
+.Nm
+nodes.
+.It In netgraph/ng_message.h
+Definitions needed by any file that needs to deal with
+.Nm
+messages.
+.It In netgraph/ng_socket.h
+Definitions needed to use
+.Nm
+.Vt socket
+type nodes.
+.It In netgraph/ng_ Ns Ao Ar type Ac Ns Pa .h
+Definitions needed to use
+.Nm
+.Ar type
+nodes, including the type cookie definition.
+.It Pa /boot/kernel/netgraph.ko
+The
+.Nm
+subsystem loadable KLD module.
+.It Pa /boot/kernel/ng_ Ns Ao Ar type Ac Ns Pa .ko
+Loadable KLD module for node type
+.Ar type .
+.It Pa src/sys/netgraph/ng_sample.c
+Skeleton
+.Nm
+node.
+Use this as a starting point for new node types.
+.El
+.Sh USER MODE SUPPORT
+There is a library for supporting user-mode programs that wish
+to interact with the
+.Nm
+system.
+See
+.Xr netgraph 3
+for details.
+.Pp
+Two user-mode support programs,
+.Xr ngctl 8
+and
+.Xr nghook 8 ,
+are available to assist manual configuration and debugging.
+.Pp
+There are a few useful techniques for debugging new node types.
+First, implementing new node types in user-mode first
+makes debugging easier.
+The
+.Vt tee
+node type is also useful for debugging, especially in conjunction with
+.Xr ngctl 8
+and
+.Xr nghook 8 .
+.Pp
+Also look in
+.Pa /usr/share/examples/netgraph
+for solutions to several
+common networking problems, solved using
+.Nm .
+.Sh SEE ALSO
+.Xr socket 2 ,
+.Xr netgraph 3 ,
+.Xr ng_async 4 ,
+.Xr ng_atm 4 ,
+.Xr ng_atmllc 4 ,
+.Xr ng_bluetooth 4 ,
+.Xr ng_bpf 4 ,
+.Xr ng_bridge 4 ,
+.Xr ng_bt3c 4 ,
+.Xr ng_btsocket 4 ,
+.Xr ng_car 4 ,
+.Xr ng_cisco 4 ,
+.Xr ng_device 4 ,
+.Xr ng_echo 4 ,
+.Xr ng_eiface 4 ,
+.Xr ng_etf 4 ,
+.Xr ng_ether 4 ,
+.Xr ng_frame_relay 4 ,
+.Xr ng_gif 4 ,
+.Xr ng_gif_demux 4 ,
+.Xr ng_h4 4 ,
+.Xr ng_hci 4 ,
+.Xr ng_hole 4 ,
+.Xr ng_hub 4 ,
+.Xr ng_iface 4 ,
+.Xr ng_ip_input 4 ,
+.Xr ng_ipfw 4 ,
+.Xr ng_ksocket 4 ,
+.Xr ng_l2cap 4 ,
+.Xr ng_l2tp 4 ,
+.Xr ng_lmi 4 ,
+.Xr ng_mppc 4 ,
+.Xr ng_nat 4 ,
+.Xr ng_netflow 4 ,
+.Xr ng_one2many 4 ,
+.Xr ng_patch 4 ,
+.Xr ng_ppp 4 ,
+.Xr ng_pppoe 4 ,
+.Xr ng_pptpgre 4 ,
+.Xr ng_rfc1490 4 ,
+.Xr ng_socket 4 ,
+.Xr ng_split 4 ,
+.Xr ng_sppp 4 ,
+.Xr ng_sscfu 4 ,
+.Xr ng_sscop 4 ,
+.Xr ng_tee 4 ,
+.Xr ng_tty 4 ,
+.Xr ng_ubt 4 ,
+.Xr ng_UI 4 ,
+.Xr ng_uni 4 ,
+.Xr ng_vjc 4 ,
+.Xr ng_vlan 4 ,
+.Xr ngctl 8 ,
+.Xr nghook 8
+.Sh HISTORY
+The
+.Nm
+system was designed and first implemented at Whistle Communications, Inc.\&
+in a version of
+.Fx 2.2
+customized for the Whistle InterJet.
+It first made its debut in the main tree in
+.Fx 3.4 .
+.Sh AUTHORS
+.An -nosplit
+.An Julian Elischer Aq julian@FreeBSD.org ,
+with contributions by
+.An Archie Cobbs Aq archie@FreeBSD.org .
diff --git a/share/man/man4/netintro.4 b/share/man/man4/netintro.4
new file mode 100644
index 0000000..574684d
--- /dev/null
+++ b/share/man/man4/netintro.4
@@ -0,0 +1,438 @@
+.\" Copyright (c) 1983, 1990, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)netintro.4 8.2 (Berkeley) 11/30/93
+.\" $FreeBSD$
+.\"
+.Dd January 26, 2012
+.Dt NETINTRO 4
+.Os
+.Sh NAME
+.Nm networking
+.Nd introduction to networking facilities
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/time.h
+.In sys/socket.h
+.In net/if.h
+.In net/route.h
+.Sh DESCRIPTION
+This section is a general introduction to the networking facilities
+available in the system.
+Documentation in this part of section
+4 is broken up into three areas:
+.Em protocol families
+(domains),
+.Em protocols ,
+and
+.Em network interfaces .
+.Pp
+All network protocols are associated with a specific
+.Em protocol family .
+A protocol family provides basic services to the protocol
+implementation to allow it to function within a specific
+network environment.
+These services may include
+packet fragmentation and reassembly, routing, addressing, and
+basic transport.
+A protocol family may support multiple
+methods of addressing, though the current protocol implementations
+do not.
+A protocol family is normally comprised of a number of protocols, one per
+.Xr socket 2
+type.
+It is not required that a protocol family support all socket types.
+A protocol family may contain multiple
+protocols supporting the same socket abstraction.
+.Pp
+A protocol supports one of the socket abstractions detailed in
+.Xr socket 2 .
+A specific protocol may be accessed either by creating a
+socket of the appropriate type and protocol family, or
+by requesting the protocol explicitly when creating a socket.
+Protocols normally accept only one type of address format,
+usually determined by the addressing structure inherent in
+the design of the protocol family/network architecture.
+Certain semantics of the basic socket abstractions are
+protocol specific.
+All protocols are expected to support
+the basic model for their particular socket type, but may,
+in addition, provide non-standard facilities or extensions
+to a mechanism.
+For example, a protocol supporting the
+.Dv SOCK_STREAM
+abstraction may allow more than one byte of out-of-band
+data to be transmitted per out-of-band message.
+.Pp
+A network interface is similar to a device interface.
+Network interfaces comprise the lowest layer of the
+networking subsystem, interacting with the actual transport
+hardware.
+An interface may support one or more protocol families and/or address formats.
+The SYNOPSIS section of each network interface
+entry gives a sample specification
+of the related drivers for use in providing
+a system description to the
+.Xr config 8
+program.
+The DIAGNOSTICS section lists messages which may appear on the console
+and/or in the system error log,
+.Pa /var/log/messages
+(see
+.Xr syslogd 8 ) ,
+due to errors in device operation.
+.Sh PROTOCOLS
+The system currently supports the
+Internet
+protocols, the Xerox Network Systems(tm) protocols,
+and some of the
+.Tn ISO OSI
+protocols.
+Raw socket interfaces are provided to the
+.Tn IP
+protocol
+layer of the
+Internet, and to the
+.Tn IDP
+protocol of Xerox
+.Tn NS .
+Consult the appropriate manual pages in this section for more
+information regarding the support for each protocol family.
+.Sh ADDRESSING
+Associated with each protocol family is an address
+format.
+All network addresses adhere to a general structure,
+called a sockaddr, described below.
+However, each protocol
+imposes finer and more specific structure, generally renaming
+the variant, which is discussed in the protocol family manual
+page alluded to above.
+.Bd -literal -offset indent
+struct sockaddr {
+ u_char sa_len;
+ u_char sa_family;
+ char sa_data[14];
+};
+.Ed
+.Pp
+The field
+.Va sa_len
+contains the total length of the structure,
+which may exceed 16 bytes.
+The following address values for
+.Va sa_family
+are known to the system
+(and additional formats are defined for possible future implementation):
+.Bd -literal
+#define AF_UNIX 1 /* local to host (pipes, portals) */
+#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
+#define AF_NS 6 /* Xerox NS protocols */
+#define AF_CCITT 10 /* CCITT protocols, X.25 etc */
+#define AF_HYLINK 15 /* NSC Hyperchannel */
+#define AF_ISO 18 /* ISO protocols */
+.Ed
+.Sh ROUTING
+.Fx
+provides some packet routing facilities.
+The kernel maintains a routing information database, which
+is used in selecting the appropriate network interface when
+transmitting packets.
+.Pp
+A user process (or possibly multiple co-operating processes)
+maintains this database by sending messages over a special kind
+of socket.
+This supplants fixed size
+.Xr ioctl 2
+used in earlier releases.
+.Pp
+This facility is described in
+.Xr route 4 .
+.Sh INTERFACES
+Each network interface in a system corresponds to a
+path through which messages may be sent and received.
+A network interface usually has a hardware device associated with it, though
+certain interfaces such as the loopback interface,
+.Xr lo 4 ,
+do not.
+.Pp
+The following
+.Xr ioctl 2
+calls may be used to manipulate network interfaces.
+The
+.Fn ioctl
+is made on a socket (typically of type
+.Dv SOCK_DGRAM )
+in the desired domain.
+Most of the requests supported in earlier releases
+take an
+.Vt ifreq
+structure as its parameter.
+This structure has the form
+.Bd -literal
+struct ifreq {
+#define IFNAMSIZ 16
+ char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
+ union {
+ struct sockaddr ifru_addr;
+ struct sockaddr ifru_dstaddr;
+ struct sockaddr ifru_broadaddr;
+ struct ifreq_buffer ifru_buffer;
+ short ifru_flags[2];
+ short ifru_index;
+ int ifru_metric;
+ int ifru_mtu;
+ int ifru_phys;
+ int ifru_media;
+ caddr_t ifru_data;
+ int ifru_cap[2];
+ } ifr_ifru;
+#define ifr_addr ifr_ifru.ifru_addr /* address */
+#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
+#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
+#define ifr_buffer ifr_ifru.ifru_buffer /* user supplied buffer with its length */
+#define ifr_flags ifr_ifru.ifru_flags[0] /* flags (low 16 bits) */
+#define ifr_flagshigh ifr_ifru.ifru_flags[1] /* flags (high 16 bits) */
+#define ifr_metric ifr_ifru.ifru_metric /* metric */
+#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
+#define ifr_phys ifr_ifru.ifru_phys /* physical wire */
+#define ifr_media ifr_ifru.ifru_media /* physical media */
+#define ifr_data ifr_ifru.ifru_data /* for use by interface */
+#define ifr_reqcap ifr_ifru.ifru_cap[0] /* requested capabilities */
+#define ifr_curcap ifr_ifru.ifru_cap[1] /* current capabilities */
+#define ifr_index ifr_ifru.ifru_index /* interface index */
+};
+.Ed
+.Pp
+.Fn Ioctl
+requests to obtain addresses and requests both to set and
+retrieve other data are still fully supported
+and use the
+.Vt ifreq
+structure:
+.Bl -tag -width SIOCGIFBRDADDR
+.It Dv SIOCGIFADDR
+Get interface address for protocol family.
+.It Dv SIOCGIFDSTADDR
+Get point to point address for protocol family and interface.
+.It Dv SIOCGIFBRDADDR
+Get broadcast address for protocol family and interface.
+.It Dv SIOCSIFCAP
+Attempt to set the enabled capabilities field for the interface
+to the value of the
+.Va ifr_reqcap
+field of the
+.Vt ifreq
+structure.
+Note that, depending on the particular interface features,
+some capabilities may appear hard-coded to enabled, or toggling
+a capability may affect the status of other ones.
+The supported capabilities field is read-only, and the
+.Va ifr_curcap
+field is unused by this call.
+.It Dv SIOCGIFCAP
+Get the interface capabilities fields.
+The values for supported and enabled capabilities will be returned in the
+.Va ifr_reqcap
+and
+.Va ifr_curcap
+fields of the
+.Vt ifreq
+structure, respectively.
+.It Dv SIOCGIFDESCR
+Get the interface description, returned in the
+.Va buffer
+field of
+.Va ifru_buffer
+struct.
+The user supplied buffer length should be defined in the
+.Va length
+field of
+.Va ifru_buffer
+struct passed in as parameter, and the length would include
+the terminating nul character.
+If there is not enough space to hold the interface length,
+no copy would be done and the
+.Va buffer
+field of
+.Va ifru_buffer
+would be set to NULL.
+The kernel will store the buffer length in the
+.Va length
+field upon return, regardless whether the buffer itself is
+sufficient to hold the data.
+.It Dv SIOCSIFDESCR
+Set the interface description to the value of the
+.Va buffer
+field of
+.Va ifru_buffer
+struct, with
+.Va length
+field specifying its length (counting the terminating nul).
+.It Dv SIOCSIFFLAGS
+Set interface flags field.
+If the interface is marked down,
+any processes currently routing packets through the interface
+are notified;
+some interfaces may be reset so that incoming packets are no longer received.
+When marked up again, the interface is reinitialized.
+.It Dv SIOCGIFFLAGS
+Get interface flags.
+.It Dv SIOCSIFMETRIC
+Set interface routing metric.
+The metric is used only by user-level routers.
+.It Dv SIOCGIFMETRIC
+Get interface metric.
+.It Dv SIOCIFCREATE
+Attempt to create the specified interface.
+If the interface name is given without a unit number the system
+will attempt to create a new interface with an arbitrary unit number.
+On successful return the
+.Va ifr_name
+field will contain the new interface name.
+.It Dv SIOCIFDESTROY
+Attempt to destroy the specified interface.
+.El
+.Pp
+There are two requests that make use of a new structure:
+.Bl -tag -width SIOCGIFBRDADDR
+.It Dv SIOCAIFADDR
+An interface may have more than one address associated with it
+in some protocols.
+This request provides a means to
+add additional addresses (or modify characteristics of the
+primary address if the default address for the address family
+is specified).
+Rather than making separate calls to
+set destination or broadcast addresses, or network masks
+(now an integral feature of multiple protocols)
+a separate structure is used to specify all three facets simultaneously
+(see below).
+One would use a slightly tailored version of this struct specific
+to each family (replacing each sockaddr by one
+of the family-specific type).
+Where the sockaddr itself is larger than the
+default size, one needs to modify the
+.Fn ioctl
+identifier itself to include the total size, as described in
+.Fn ioctl .
+.It Dv SIOCDIFADDR
+This requests deletes the specified address from the list
+associated with an interface.
+It also uses the
+.Vt ifaliasreq
+structure to allow for the possibility of protocols allowing
+multiple masks or destination addresses, and also adopts the
+convention that specification of the default address means
+to delete the first address for the interface belonging to
+the address family in which the original socket was opened.
+.It Dv SIOCGIFCONF
+Get interface configuration list.
+This request takes an
+.Vt ifconf
+structure (see below) as a value-result parameter.
+The
+.Va ifc_len
+field should be initially set to the size of the buffer
+pointed to by
+.Va ifc_buf .
+On return it will contain the length, in bytes, of the
+configuration list.
+.It Dv SIOCIFGCLONERS
+Get list of clonable interfaces.
+This request takes an
+.Vt if_clonereq
+structure (see below) as a value-result parameter.
+The
+.Va ifcr_count
+field should be set to the number of
+.Dv IFNAMSIZ
+sized strings that can be fit in the buffer pointed to by
+.Va ifcr_buffer .
+On return,
+.Va ifcr_total
+will be set to the number of clonable interfaces and the buffer pointed
+to by
+.Va ifcr_buffer
+will be filled with the names of clonable interfaces aligned on
+.Dv IFNAMSIZ
+boundaries.
+.El
+.Bd -literal
+/*
+* Structure used in SIOCAIFADDR request.
+*/
+struct ifaliasreq {
+ char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */
+ struct sockaddr ifra_addr;
+ struct sockaddr ifra_broadaddr;
+ struct sockaddr ifra_mask;
+};
+.Ed
+.Bd -literal
+/*
+* Structure used in SIOCGIFCONF request.
+* Used to retrieve interface configuration
+* for machine (useful for programs which
+* must know all networks accessible).
+*/
+struct ifconf {
+ int ifc_len; /* size of associated buffer */
+ union {
+ caddr_t ifcu_buf;
+ struct ifreq *ifcu_req;
+ } ifc_ifcu;
+#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
+#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */
+};
+.Ed
+.Bd -literal
+/* Structure used in SIOCIFGCLONERS request. */
+struct if_clonereq {
+ int ifcr_total; /* total cloners (out) */
+ int ifcr_count; /* room for this many in user buffer */
+ char *ifcr_buffer; /* buffer for cloner names */
+};
+.Ed
+.Bd -literal
+/* Structure used in SIOCGIFDESCR and SIOCSIFDESCR requests */
+struct ifreq_buffer {
+ size_t length; /* length of the buffer */
+ void *buffer; /* pointer to userland space buffer */
+};
+.Ed
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr socket 2 ,
+.Xr intro 4 ,
+.Xr config 8 ,
+.Xr routed 8 ,
+.Xr ifnet 9
+.Sh HISTORY
+The
+.Nm netintro
+manual appeared in
+.Bx 4.3 tahoe .
diff --git a/share/man/man4/netmap.4 b/share/man/man4/netmap.4
new file mode 100644
index 0000000..1943ebc
--- /dev/null
+++ b/share/man/man4/netmap.4
@@ -0,0 +1,1075 @@
+.\" Copyright (c) 2011-2014 Matteo Landi, Luigi Rizzo, Universita` di Pisa
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" This document is derived in part from the enet man page (enet.4)
+.\" distributed with 4.3BSD Unix.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 13, 2014
+.Dt NETMAP 4
+.Os
+.Sh NAME
+.Nm netmap
+.Nd a framework for fast packet I/O
+.br
+.Nm VALE
+.Nd a fast VirtuAl Local Ethernet using the netmap API
+.br
+.Nm netmap pipes
+.Nd a shared memory packet transport channel
+.Sh SYNOPSIS
+.Cd device netmap
+.Sh DESCRIPTION
+.Nm
+is a framework for extremely fast and efficient packet I/O
+for both userspace and kernel clients.
+It runs on FreeBSD and Linux,
+and includes
+.Nm VALE ,
+a very fast and modular in-kernel software switch/dataplane,
+and
+.Nm netmap pipes ,
+a shared memory packet transport channel.
+All these are accessed interchangeably with the same API.
+.Pp
+.Nm , VALE
+and
+.Nm netmap pipes
+are at least one order of magnitude faster than
+standard OS mechanisms
+(sockets, bpf, tun/tap interfaces, native switches, pipes),
+reaching 14.88 million packets per second (Mpps)
+with much less than one core on a 10 Gbit NIC,
+about 20 Mpps per core for VALE ports,
+and over 100 Mpps for netmap pipes.
+.Pp
+Userspace clients can dynamically switch NICs into
+.Nm
+mode and send and receive raw packets through
+memory mapped buffers.
+Similarly,
+.Nm VALE
+switch instances and ports, and
+.Nm netmap pipes
+can be created dynamically,
+providing high speed packet I/O between processes,
+virtual machines, NICs and the host stack.
+.Pp
+.Nm
+suports both non-blocking I/O through
+.Xr ioctls() ,
+synchronization and blocking I/O through a file descriptor
+and standard OS mechanisms such as
+.Xr select 2 ,
+.Xr poll 2 ,
+.Xr epoll 2 ,
+.Xr kqueue 2 .
+.Nm VALE
+and
+.Nm netmap pipes
+are implemented by a single kernel module, which also emulates the
+.Nm
+API over standard drivers for devices without native
+.Nm
+support.
+For best performance,
+.Nm
+requires explicit support in device drivers.
+.Pp
+In the rest of this (long) manual page we document
+various aspects of the
+.Nm
+and
+.Nm VALE
+architecture, features and usage.
+.Pp
+.Sh ARCHITECTURE
+.Nm
+supports raw packet I/O through a
+.Em port ,
+which can be connected to a physical interface
+.Em ( NIC ) ,
+to the host stack,
+or to a
+.Nm VALE
+switch).
+Ports use preallocated circular queues of buffers
+.Em ( rings )
+residing in an mmapped region.
+There is one ring for each transmit/receive queue of a
+NIC or virtual port.
+An additional ring pair connects to the host stack.
+.Pp
+After binding a file descriptor to a port, a
+.Nm
+client can send or receive packets in batches through
+the rings, and possibly implement zero-copy forwarding
+between ports.
+.Pp
+All NICs operating in
+.Nm
+mode use the same memory region,
+accessible to all processes who own
+.Nm /dev/netmap
+file descriptors bound to NICs.
+Independent
+.Nm VALE
+and
+.Nm netmap pipe
+ports
+by default use separate memory regions,
+but can be independently configured to share memory.
+.Pp
+.Sh ENTERING AND EXITING NETMAP MODE
+The following section describes the system calls to create
+and control
+.Nm netmap
+ports (including
+.Nm VALE
+and
+.Nm netmap pipe
+ports).
+Simpler, higher level functions are described in section
+.Xr LIBRARIES .
+.Pp
+Ports and rings are created and controlled through a file descriptor,
+created by opening a special device
+.Dl fd = open("/dev/netmap");
+and then bound to a specific port with an
+.Dl ioctl(fd, NIOCREGIF, (struct nmreq *)arg);
+.Pp
+.Nm
+has multiple modes of operation controlled by the
+.Vt struct nmreq
+argument.
+.Va arg.nr_name
+specifies the port name, as follows:
+.Bl -tag -width XXXX
+.It Dv OS network interface name (e.g. 'em0', 'eth1', ... )
+the data path of the NIC is disconnected from the host stack,
+and the file descriptor is bound to the NIC (one or all queues),
+or to the host stack;
+.It Dv valeXXX:YYY (arbitrary XXX and YYY)
+the file descriptor is bound to port YYY of a VALE switch called XXX,
+both dynamically created if necessary.
+The string cannot exceed IFNAMSIZ characters, and YYY cannot
+be the name of any existing OS network interface.
+.El
+.Pp
+On return,
+.Va arg
+indicates the size of the shared memory region,
+and the number, size and location of all the
+.Nm
+data structures, which can be accessed by mmapping the memory
+.Dl char *mem = mmap(0, arg.nr_memsize, fd);
+.Pp
+Non blocking I/O is done with special
+.Xr ioctl 2
+.Xr select 2
+and
+.Xr poll 2
+on the file descriptor permit blocking I/O.
+.Xr epoll 2
+and
+.Xr kqueue 2
+are not supported on
+.Nm
+file descriptors.
+.Pp
+While a NIC is in
+.Nm
+mode, the OS will still believe the interface is up and running.
+OS-generated packets for that NIC end up into a
+.Nm
+ring, and another ring is used to send packets into the OS network stack.
+A
+.Xr close 2
+on the file descriptor removes the binding,
+and returns the NIC to normal mode (reconnecting the data path
+to the host stack), or destroys the virtual port.
+.Pp
+.Sh DATA STRUCTURES
+The data structures in the mmapped memory region are detailed in
+.Xr sys/net/netmap.h ,
+which is the ultimate reference for the
+.Nm
+API. The main structures and fields are indicated below:
+.Bl -tag -width XXX
+.It Dv struct netmap_if (one per interface)
+.Bd -literal
+struct netmap_if {
+ ...
+ const uint32_t ni_flags; /* properties */
+ ...
+ const uint32_t ni_tx_rings; /* NIC tx rings */
+ const uint32_t ni_rx_rings; /* NIC rx rings */
+ uint32_t ni_bufs_head; /* head of extra bufs list */
+ ...
+};
+.Ed
+.Pp
+Indicates the number of available rings
+.Pa ( struct netmap_rings )
+and their position in the mmapped region.
+The number of tx and rx rings
+.Pa ( ni_tx_rings , ni_rx_rings )
+normally depends on the hardware.
+NICs also have an extra tx/rx ring pair connected to the host stack.
+.Em NIOCREGIF
+can also request additional unbound buffers in the same memory space,
+to be used as temporary storage for packets.
+.Pa ni_bufs_head
+contains the index of the first of these free rings,
+which are connected in a list (the first uint32_t of each
+buffer being the index of the next buffer in the list).
+A 0 indicates the end of the list.
+.Pp
+.It Dv struct netmap_ring (one per ring)
+.Bd -literal
+struct netmap_ring {
+ ...
+ const uint32_t num_slots; /* slots in each ring */
+ const uint32_t nr_buf_size; /* size of each buffer */
+ ...
+ uint32_t head; /* (u) first buf owned by user */
+ uint32_t cur; /* (u) wakeup position */
+ const uint32_t tail; /* (k) first buf owned by kernel */
+ ...
+ uint32_t flags;
+ struct timeval ts; /* (k) time of last rxsync() */
+ ...
+ struct netmap_slot slot[0]; /* array of slots */
+}
+.Ed
+.Pp
+Implements transmit and receive rings, with read/write
+pointers, metadata and and an array of
+.Pa slots
+describing the buffers.
+.Pp
+.It Dv struct netmap_slot (one per buffer)
+.Bd -literal
+struct netmap_slot {
+ uint32_t buf_idx; /* buffer index */
+ uint16_t len; /* packet length */
+ uint16_t flags; /* buf changed, etc. */
+ uint64_t ptr; /* address for indirect buffers */
+};
+.Ed
+.Pp
+Describes a packet buffer, which normally is identified by
+an index and resides in the mmapped region.
+.It Dv packet buffers
+Fixed size (normally 2 KB) packet buffers allocated by the kernel.
+.El
+.Pp
+The offset of the
+.Pa struct netmap_if
+in the mmapped region is indicated by the
+.Pa nr_offset
+field in the structure returned by
+.Pa NIOCREGIF .
+From there, all other objects are reachable through
+relative references (offsets or indexes).
+Macros and functions in <net/netmap_user.h>
+help converting them into actual pointers:
+.Pp
+.Dl struct netmap_if *nifp = NETMAP_IF(mem, arg.nr_offset);
+.Dl struct netmap_ring *txr = NETMAP_TXRING(nifp, ring_index);
+.Dl struct netmap_ring *rxr = NETMAP_RXRING(nifp, ring_index);
+.Pp
+.Dl char *buf = NETMAP_BUF(ring, buffer_index);
+.Sh RINGS, BUFFERS AND DATA I/O
+.Va Rings
+are circular queues of packets with three indexes/pointers
+.Va ( head , cur , tail ) ;
+one slot is always kept empty.
+The ring size
+.Va ( num_slots )
+should not be assumed to be a power of two.
+.br
+(NOTE: older versions of netmap used head/count format to indicate
+the content of a ring).
+.Pp
+.Va head
+is the first slot available to userspace;
+.br
+.Va cur
+is the wakeup point:
+select/poll will unblock when
+.Va tail
+passes
+.Va cur ;
+.br
+.Va tail
+is the first slot reserved to the kernel.
+.Pp
+Slot indexes MUST only move forward;
+for convenience, the function
+.Dl nm_ring_next(ring, index)
+returns the next index modulo the ring size.
+.Pp
+.Va head
+and
+.Va cur
+are only modified by the user program;
+.Va tail
+is only modified by the kernel.
+The kernel only reads/writes the
+.Vt struct netmap_ring
+slots and buffers
+during the execution of a netmap-related system call.
+The only exception are slots (and buffers) in the range
+.Va tail\ . . . head-1 ,
+that are explicitly assigned to the kernel.
+.Pp
+.Ss TRANSMIT RINGS
+On transmit rings, after a
+.Nm
+system call, slots in the range
+.Va head\ . . . tail-1
+are available for transmission.
+User code should fill the slots sequentially
+and advance
+.Va head
+and
+.Va cur
+past slots ready to transmit.
+.Va cur
+may be moved further ahead if the user code needs
+more slots before further transmissions (see
+.Sx SCATTER GATHER I/O ) .
+.Pp
+At the next NIOCTXSYNC/select()/poll(),
+slots up to
+.Va head-1
+are pushed to the port, and
+.Va tail
+may advance if further slots have become available.
+Below is an example of the evolution of a TX ring:
+.Pp
+.Bd -literal
+ after the syscall, slots between cur and tail are (a)vailable
+ head=cur tail
+ | |
+ v v
+ TX [.....aaaaaaaaaaa.............]
+
+ user creates new packets to (T)ransmit
+ head=cur tail
+ | |
+ v v
+ TX [.....TTTTTaaaaaa.............]
+
+ NIOCTXSYNC/poll()/select() sends packets and reports new slots
+ head=cur tail
+ | |
+ v v
+ TX [..........aaaaaaaaaaa........]
+.Ed
+.Pp
+select() and poll() wlll block if there is no space in the ring, i.e.
+.Dl ring->cur == ring->tail
+and return when new slots have become available.
+.Pp
+High speed applications may want to amortize the cost of system calls
+by preparing as many packets as possible before issuing them.
+.Pp
+A transmit ring with pending transmissions has
+.Dl ring->head != ring->tail + 1 (modulo the ring size).
+The function
+.Va int nm_tx_pending(ring)
+implements this test.
+.Pp
+.Ss RECEIVE RINGS
+On receive rings, after a
+.Nm
+system call, the slots in the range
+.Va head\& . . . tail-1
+contain received packets.
+User code should process them and advance
+.Va head
+and
+.Va cur
+past slots it wants to return to the kernel.
+.Va cur
+may be moved further ahead if the user code wants to
+wait for more packets
+without returning all the previous slots to the kernel.
+.Pp
+At the next NIOCRXSYNC/select()/poll(),
+slots up to
+.Va head-1
+are returned to the kernel for further receives, and
+.Va tail
+may advance to report new incoming packets.
+.br
+Below is an example of the evolution of an RX ring:
+.Bd -literal
+ after the syscall, there are some (h)eld and some (R)eceived slots
+ head cur tail
+ | | |
+ v v v
+ RX [..hhhhhhRRRRRRRR..........]
+
+ user advances head and cur, releasing some slots and holding others
+ head cur tail
+ | | |
+ v v v
+ RX [..*****hhhRRRRRR...........]
+
+ NICRXSYNC/poll()/select() recovers slots and reports new packets
+ head cur tail
+ | | |
+ v v v
+ RX [.......hhhRRRRRRRRRRRR....]
+.Ed
+.Pp
+.Sh SLOTS AND PACKET BUFFERS
+Normally, packets should be stored in the netmap-allocated buffers
+assigned to slots when ports are bound to a file descriptor.
+One packet is fully contained in a single buffer.
+.Pp
+The following flags affect slot and buffer processing:
+.Bl -tag -width XXX
+.It NS_BUF_CHANGED
+it MUST be used when the buf_idx in the slot is changed.
+This can be used to implement
+zero-copy forwarding, see
+.Sx ZERO-COPY FORWARDING .
+.Pp
+.It NS_REPORT
+reports when this buffer has been transmitted.
+Normally,
+.Nm
+notifies transmit completions in batches, hence signals
+can be delayed indefinitely. This flag helps detecting
+when packets have been send and a file descriptor can be closed.
+.It NS_FORWARD
+When a ring is in 'transparent' mode (see
+.Sx TRANSPARENT MODE ) ,
+packets marked with this flags are forwarded to the other endpoint
+at the next system call, thus restoring (in a selective way)
+the connection between a NIC and the host stack.
+.It NS_NO_LEARN
+tells the forwarding code that the SRC MAC address for this
+packet must not be used in the learning bridge code.
+.It NS_INDIRECT
+indicates that the packet's payload is in a user-supplied buffer,
+whose user virtual address is in the 'ptr' field of the slot.
+The size can reach 65535 bytes.
+.br
+This is only supported on the transmit ring of
+.Nm VALE
+ports, and it helps reducing data copies in the interconnection
+of virtual machines.
+.It NS_MOREFRAG
+indicates that the packet continues with subsequent buffers;
+the last buffer in a packet must have the flag clear.
+.El
+.Sh SCATTER GATHER I/O
+Packets can span multiple slots if the
+.Va NS_MOREFRAG
+flag is set in all but the last slot.
+The maximum length of a chain is 64 buffers.
+This is normally used with
+.Nm VALE
+ports when connecting virtual machines, as they generate large
+TSO segments that are not split unless they reach a physical device.
+.Pp
+NOTE: The length field always refers to the individual
+fragment; there is no place with the total length of a packet.
+.Pp
+On receive rings the macro
+.Va NS_RFRAGS(slot)
+indicates the remaining number of slots for this packet,
+including the current one.
+Slots with a value greater than 1 also have NS_MOREFRAG set.
+.Sh IOCTLS
+.Nm
+uses two ioctls (NIOCTXSYNC, NIOCRXSYNC)
+for non-blocking I/O. They take no argument.
+Two more ioctls (NIOCGINFO, NIOCREGIF) are used
+to query and configure ports, with the following argument:
+.Bd -literal
+struct nmreq {
+ char nr_name[IFNAMSIZ]; /* (i) port name */
+ uint32_t nr_version; /* (i) API version */
+ uint32_t nr_offset; /* (o) nifp offset in mmap region */
+ uint32_t nr_memsize; /* (o) size of the mmap region */
+ uint32_t nr_tx_slots; /* (i/o) slots in tx rings */
+ uint32_t nr_rx_slots; /* (i/o) slots in rx rings */
+ uint16_t nr_tx_rings; /* (i/o) number of tx rings */
+ uint16_t nr_rx_rings; /* (i/o) number of tx rings */
+ uint16_t nr_ringid; /* (i/o) ring(s) we care about */
+ uint16_t nr_cmd; /* (i) special command */
+ uint16_t nr_arg1; /* (i/o) extra arguments */
+ uint16_t nr_arg2; /* (i/o) extra arguments */
+ uint32_t nr_arg3; /* (i/o) extra arguments */
+ uint32_t nr_flags /* (i/o) open mode */
+ ...
+};
+.Ed
+.Pp
+A file descriptor obtained through
+.Pa /dev/netmap
+also supports the ioctl supported by network devices, see
+.Xr netintro 4 .
+.Pp
+.Bl -tag -width XXXX
+.It Dv NIOCGINFO
+returns EINVAL if the named port does not support netmap.
+Otherwise, it returns 0 and (advisory) information
+about the port.
+Note that all the information below can change before the
+interface is actually put in netmap mode.
+.Pp
+.Bl -tag -width XX
+.It Pa nr_memsize
+indicates the size of the
+.Nm
+memory region. NICs in
+.Nm
+mode all share the same memory region,
+whereas
+.Nm VALE
+ports have independent regions for each port.
+.It Pa nr_tx_slots , nr_rx_slots
+indicate the size of transmit and receive rings.
+.It Pa nr_tx_rings , nr_rx_rings
+indicate the number of transmit
+and receive rings.
+Both ring number and sizes may be configured at runtime
+using interface-specific functions (e.g.
+.Xr ethtool
+).
+.El
+.It Dv NIOCREGIF
+binds the port named in
+.Va nr_name
+to the file descriptor. For a physical device this also switches it into
+.Nm
+mode, disconnecting
+it from the host stack.
+Multiple file descriptors can be bound to the same port,
+with proper synchronization left to the user.
+.Pp
+.Dv NIOCREGIF can also bind a file descriptor to one endpoint of a
+.Em netmap pipe ,
+consisting of two netmap ports with a crossover connection.
+A netmap pipe share the same memory space of the parent port,
+and is meant to enable configuration where a master process acts
+as a dispatcher towards slave processes.
+.Pp
+To enable this function, the
+.Pa nr_arg1
+field of the structure can be used as a hint to the kernel to
+indicate how many pipes we expect to use, and reserve extra space
+in the memory region.
+.Pp
+On return, it gives the same info as NIOCGINFO,
+with
+.Pa nr_ringid
+and
+.Pa nr_flags
+indicating the identity of the rings controlled through the file
+descriptor.
+.Pp
+.Va nr_flags
+.Va nr_ringid
+selects which rings are controlled through this file descriptor.
+Possible values of
+.Pa nr_flags
+are indicated below, together with the naming schemes
+that application libraries (such as the
+.Nm nm_open
+indicated below) can use to indicate the specific set of rings.
+In the example below, "netmap:foo" is any valid netmap port name.
+.Pp
+.Bl -tag -width XXXXX
+.It NR_REG_ALL_NIC "netmap:foo"
+(default) all hardware ring pairs
+.It NR_REG_SW "netmap:foo^"
+the ``host rings'', connecting to the host stack.
+.It NR_REG_NIC_SW "netmap:foo+
+all hardware rings and the host rings
+.It NR_REG_ONE_NIC "netmap:foo-i"
+only the i-th hardware ring pair, where the number is in
+.Pa nr_ringid ;
+.It NR_REG_PIPE_MASTER "netmap:foo{i"
+the master side of the netmap pipe whose identifier (i) is in
+.Pa nr_ringid ;
+.It NR_REG_PIPE_SLAVE "netmap:foo}i"
+the slave side of the netmap pipe whose identifier (i) is in
+.Pa nr_ringid .
+.Pp
+The identifier of a pipe must be thought as part of the pipe name,
+and does not need to be sequential. On return the pipe
+will only have a single ring pair with index 0,
+irrespective of the value of i.
+.El
+.Pp
+By default, a
+.Xr poll 2
+or
+.Xr select 2
+call pushes out any pending packets on the transmit ring, even if
+no write events are specified.
+The feature can be disabled by or-ing
+.Va NETMAP_NO_TX_POLL
+to the value written to
+.Va nr_ringid.
+When this feature is used,
+packets are transmitted only on
+.Va ioctl(NIOCTXSYNC)
+or select()/poll() are called with a write event (POLLOUT/wfdset) or a full ring.
+.Pp
+When registering a virtual interface that is dynamically created to a
+.Xr vale 4
+switch, we can specify the desired number of rings (1 by default,
+and currently up to 16) on it using nr_tx_rings and nr_rx_rings fields.
+.It Dv NIOCTXSYNC
+tells the hardware of new packets to transmit, and updates the
+number of slots available for transmission.
+.It Dv NIOCRXSYNC
+tells the hardware of consumed packets, and asks for newly available
+packets.
+.El
+.Sh SELECT, POLL, EPOLL, KQUEUE.
+.Xr select 2
+and
+.Xr poll 2
+on a
+.Nm
+file descriptor process rings as indicated in
+.Sx TRANSMIT RINGS
+and
+.Sx RECEIVE RINGS ,
+respectively when write (POLLOUT) and read (POLLIN) events are requested.
+Both block if no slots are available in the ring
+.Va ( ring->cur == ring->tail ) .
+Depending on the platform,
+.Xr epoll 2
+and
+.Xr kqueue 2
+are supported too.
+.Pp
+Packets in transmit rings are normally pushed out
+(and buffers reclaimed) even without
+requesting write events. Passing the NETMAP_NO_TX_POLL flag to
+.Em NIOCREGIF
+disables this feature.
+By default, receive rings are processed only if read
+events are requested. Passing the NETMAP_DO_RX_POLL flag to
+.Em NIOCREGIF updates receive rings even without read events.
+Note that on epoll and kqueue, NETMAP_NO_TX_POLL and NETMAP_DO_RX_POLL
+only have an effect when some event is posted for the file descriptor.
+.Sh LIBRARIES
+The
+.Nm
+API is supposed to be used directly, both because of its simplicity and
+for efficient integration with applications.
+.Pp
+For conveniency, the
+.Va <net/netmap_user.h>
+header provides a few macros and functions to ease creating
+a file descriptor and doing I/O with a
+.Nm
+port. These are loosely modeled after the
+.Xr pcap 3
+API, to ease porting of libpcap-based applications to
+.Nm .
+To use these extra functions, programs should
+.Dl #define NETMAP_WITH_LIBS
+before
+.Dl #include <net/netmap_user.h>
+.Pp
+The following functions are available:
+.Bl -tag -width XXXXX
+.It Va struct nm_desc * nm_open(const char *ifname, const struct nmreq *req, uint64_t flags, const struct nm_desc *arg)
+similar to
+.Xr pcap_open ,
+binds a file descriptor to a port.
+.Bl -tag -width XX
+.It Va ifname
+is a port name, in the form "netmap:XXX" for a NIC and "valeXXX:YYY" for a
+.Nm VALE
+port.
+.It Va req
+provides the initial values for the argument to the NIOCREGIF ioctl.
+The nm_flags and nm_ringid values are overwritten by parsing
+ifname and flags, and other fields can be overridden through
+the other two arguments.
+.It Va arg
+points to a struct nm_desc containing arguments (e.g. from a previously
+open file descriptor) that should override the defaults.
+The fields are used as described below
+.It Va flags
+can be set to a combination of the following flags:
+.Va NETMAP_NO_TX_POLL ,
+.Va NETMAP_DO_RX_POLL
+(copied into nr_ringid);
+.Va NM_OPEN_NO_MMAP (if arg points to the same memory region,
+avoids the mmap and uses the values from it);
+.Va NM_OPEN_IFNAME (ignores ifname and uses the values in arg);
+.Va NM_OPEN_ARG1 ,
+.Va NM_OPEN_ARG2 ,
+.Va NM_OPEN_ARG3 (uses the fields from arg);
+.Va NM_OPEN_RING_CFG (uses the ring number and sizes from arg).
+.El
+.It Va int nm_close(struct nm_desc *d)
+closes the file descriptor, unmaps memory, frees resources.
+.It Va int nm_inject(struct nm_desc *d, const void *buf, size_t size)
+similar to pcap_inject(), pushes a packet to a ring, returns the size
+of the packet is successful, or 0 on error;
+.It Va int nm_dispatch(struct nm_desc *d, int cnt, nm_cb_t cb, u_char *arg)
+similar to pcap_dispatch(), applies a callback to incoming packets
+.It Va u_char * nm_nextpkt(struct nm_desc *d, struct nm_pkthdr *hdr)
+similar to pcap_next(), fetches the next packet
+.Pp
+.El
+.Sh SUPPORTED DEVICES
+.Nm
+natively supports the following devices:
+.Pp
+On FreeBSD:
+.Xr em 4 ,
+.Xr igb 4 ,
+.Xr ixgbe 4 ,
+.Xr lem 4 ,
+.Xr re 4 .
+.Pp
+On Linux
+.Xr e1000 4 ,
+.Xr e1000e 4 ,
+.Xr igb 4 ,
+.Xr ixgbe 4 ,
+.Xr mlx4 4 ,
+.Xr forcedeth 4 ,
+.Xr r8169 4 .
+.Pp
+NICs without native support can still be used in
+.Nm
+mode through emulation. Performance is inferior to native netmap
+mode but still significantly higher than sockets, and approaching
+that of in-kernel solutions such as Linux's
+.Xr pktgen .
+.Pp
+Emulation is also available for devices with native netmap support,
+which can be used for testing or performance comparison.
+The sysctl variable
+.Va dev.netmap.admode
+globally controls how netmap mode is implemented.
+.Sh SYSCTL VARIABLES AND MODULE PARAMETERS
+Some aspect of the operation of
+.Nm
+are controlled through sysctl variables on FreeBSD
+.Em ( dev.netmap.* )
+and module parameters on Linux
+.Em ( /sys/module/netmap_lin/parameters/* ) :
+.Pp
+.Bl -tag -width indent
+.It Va dev.netmap.admode: 0
+Controls the use of native or emulated adapter mode.
+0 uses the best available option, 1 forces native and
+fails if not available, 2 forces emulated hence never fails.
+.It Va dev.netmap.generic_ringsize: 1024
+Ring size used for emulated netmap mode
+.It Va dev.netmap.generic_mit: 100000
+Controls interrupt moderation for emulated mode
+.It Va dev.netmap.mmap_unreg: 0
+.It Va dev.netmap.fwd: 0
+Forces NS_FORWARD mode
+.It Va dev.netmap.flags: 0
+.It Va dev.netmap.txsync_retry: 2
+.It Va dev.netmap.no_pendintr: 1
+Forces recovery of transmit buffers on system calls
+.It Va dev.netmap.mitigate: 1
+Propagates interrupt mitigation to user processes
+.It Va dev.netmap.no_timestamp: 0
+Disables the update of the timestamp in the netmap ring
+.It Va dev.netmap.verbose: 0
+Verbose kernel messages
+.It Va dev.netmap.buf_num: 163840
+.It Va dev.netmap.buf_size: 2048
+.It Va dev.netmap.ring_num: 200
+.It Va dev.netmap.ring_size: 36864
+.It Va dev.netmap.if_num: 100
+.It Va dev.netmap.if_size: 1024
+Sizes and number of objects (netmap_if, netmap_ring, buffers)
+for the global memory region. The only parameter worth modifying is
+.Va dev.netmap.buf_num
+as it impacts the total amount of memory used by netmap.
+.It Va dev.netmap.buf_curr_num: 0
+.It Va dev.netmap.buf_curr_size: 0
+.It Va dev.netmap.ring_curr_num: 0
+.It Va dev.netmap.ring_curr_size: 0
+.It Va dev.netmap.if_curr_num: 0
+.It Va dev.netmap.if_curr_size: 0
+Actual values in use.
+.It Va dev.netmap.bridge_batch: 1024
+Batch size used when moving packets across a
+.Nm VALE
+switch. Values above 64 generally guarantee good
+performance.
+.El
+.Sh SYSTEM CALLS
+.Nm
+uses
+.Xr select 2 ,
+.Xr poll 2 ,
+.Xr epoll
+and
+.Xr kqueue
+to wake up processes when significant events occur, and
+.Xr mmap 2
+to map memory.
+.Xr ioctl 2
+is used to configure ports and
+.Nm VALE switches .
+.Pp
+Applications may need to create threads and bind them to
+specific cores to improve performance, using standard
+OS primitives, see
+.Xr pthread 3 .
+In particular,
+.Xr pthread_setaffinity_np 3
+may be of use.
+.Sh CAVEATS
+No matter how fast the CPU and OS are,
+achieving line rate on 10G and faster interfaces
+requires hardware with sufficient performance.
+Several NICs are unable to sustain line rate with
+small packet sizes. Insufficient PCIe or memory bandwidth
+can also cause reduced performance.
+.Pp
+Another frequent reason for low performance is the use
+of flow control on the link: a slow receiver can limit
+the transmit speed.
+Be sure to disable flow control when running high
+speed experiments.
+.Pp
+.Ss SPECIAL NIC FEATURES
+.Nm
+is orthogonal to some NIC features such as
+multiqueue, schedulers, packet filters.
+.Pp
+Multiple transmit and receive rings are supported natively
+and can be configured with ordinary OS tools,
+such as
+.Xr ethtool
+or
+device-specific sysctl variables.
+The same goes for Receive Packet Steering (RPS)
+and filtering of incoming traffic.
+.Pp
+.Nm
+.Em does not use
+features such as
+.Em checksum offloading , TCP segmentation offloading ,
+.Em encryption , VLAN encapsulation/decapsulation ,
+etc. .
+When using netmap to exchange packets with the host stack,
+make sure to disable these features.
+.Sh EXAMPLES
+.Ss TEST PROGRAMS
+.Nm
+comes with a few programs that can be used for testing or
+simple applications.
+See the
+.Va examples/
+directory in
+.Nm
+distributions, or
+.Va tools/tools/netmap/
+directory in FreeBSD distributions.
+.Pp
+.Xr pkt-gen
+is a general purpose traffic source/sink.
+.Pp
+As an example
+.Dl pkt-gen -i ix0 -f tx -l 60
+can generate an infinite stream of minimum size packets, and
+.Dl pkt-gen -i ix0 -f rx
+is a traffic sink.
+Both print traffic statistics, to help monitor
+how the system performs.
+.Pp
+.Xr pkt-gen
+has many options can be uses to set packet sizes, addresses,
+rates, and use multiple send/receive threads and cores.
+.Pp
+.Xr bridge
+is another test program which interconnects two
+.Nm
+ports. It can be used for transparent forwarding between
+interfaces, as in
+.Dl bridge -i ix0 -i ix1
+or even connect the NIC to the host stack using netmap
+.Dl bridge -i ix0 -i ix0
+.Ss USING THE NATIVE API
+The following code implements a traffic generator
+.Pp
+.Bd -literal -compact
+#include <net/netmap_user.h>
+...
+void sender(void)
+{
+ struct netmap_if *nifp;
+ struct netmap_ring *ring;
+ struct nmreq nmr;
+ struct pollfd fds;
+
+ fd = open("/dev/netmap", O_RDWR);
+ bzero(&nmr, sizeof(nmr));
+ strcpy(nmr.nr_name, "ix0");
+ nmr.nm_version = NETMAP_API;
+ ioctl(fd, NIOCREGIF, &nmr);
+ p = mmap(0, nmr.nr_memsize, fd);
+ nifp = NETMAP_IF(p, nmr.nr_offset);
+ ring = NETMAP_TXRING(nifp, 0);
+ fds.fd = fd;
+ fds.events = POLLOUT;
+ for (;;) {
+ poll(&fds, 1, -1);
+ while (!nm_ring_empty(ring)) {
+ i = ring->cur;
+ buf = NETMAP_BUF(ring, ring->slot[i].buf_index);
+ ... prepare packet in buf ...
+ ring->slot[i].len = ... packet length ...
+ ring->head = ring->cur = nm_ring_next(ring, i);
+ }
+ }
+}
+.Ed
+.Ss HELPER FUNCTIONS
+A simple receiver can be implemented using the helper functions
+.Bd -literal -compact
+#define NETMAP_WITH_LIBS
+#include <net/netmap_user.h>
+...
+void receiver(void)
+{
+ struct nm_desc *d;
+ struct pollfd fds;
+ u_char *buf;
+ struct nm_pkthdr h;
+ ...
+ d = nm_open("netmap:ix0", NULL, 0, 0);
+ fds.fd = NETMAP_FD(d);
+ fds.events = POLLIN;
+ for (;;) {
+ poll(&fds, 1, -1);
+ while ( (buf = nm_nextpkt(d, &h)) )
+ consume_pkt(buf, h->len);
+ }
+ nm_close(d);
+}
+.Ed
+.Ss ZERO-COPY FORWARDING
+Since physical interfaces share the same memory region,
+it is possible to do packet forwarding between ports
+swapping buffers. The buffer from the transmit ring is used
+to replenish the receive ring:
+.Bd -literal -compact
+ uint32_t tmp;
+ struct netmap_slot *src, *dst;
+ ...
+ src = &src_ring->slot[rxr->cur];
+ dst = &dst_ring->slot[txr->cur];
+ tmp = dst->buf_idx;
+ dst->buf_idx = src->buf_idx;
+ dst->len = src->len;
+ dst->flags = NS_BUF_CHANGED;
+ src->buf_idx = tmp;
+ src->flags = NS_BUF_CHANGED;
+ rxr->head = rxr->cur = nm_ring_next(rxr, rxr->cur);
+ txr->head = txr->cur = nm_ring_next(txr, txr->cur);
+ ...
+.Ed
+.Ss ACCESSING THE HOST STACK
+The host stack is for all practical purposes just a regular ring pair,
+which you can access with the netmap API (e.g. with
+.Dl nm_open("netmap:eth0^", ... ) ;
+All packets that the host would send to an interface in
+.Nm
+mode end up into the RX ring, whereas all packets queued to the
+TX ring are send up to the host stack.
+.Ss VALE SWITCH
+A simple way to test the performance of a
+.Nm VALE
+switch is to attach a sender and a receiver to it,
+e.g. running the following in two different terminals:
+.Dl pkt-gen -i vale1:a -f rx # receiver
+.Dl pkt-gen -i vale1:b -f tx # sender
+The same example can be used to test netmap pipes, by simply
+changing port names, e.g.
+.Dl pkt-gen -i vale:x{3 -f rx # receiver on the master side
+.Dl pkt-gen -i vale:x}3 -f tx # sender on the slave side
+.Pp
+The following command attaches an interface and the host stack
+to a switch:
+.Dl vale-ctl -h vale2:em0
+Other
+.Nm
+clients attached to the same switch can now communicate
+with the network card or the host.
+.Pp
+.Sh SEE ALSO
+.Pp
+http://info.iet.unipi.it/~luigi/netmap/
+.Pp
+Luigi Rizzo, Revisiting network I/O APIs: the netmap framework,
+Communications of the ACM, 55 (3), pp.45-51, March 2012
+.Pp
+Luigi Rizzo, netmap: a novel framework for fast packet I/O,
+Usenix ATC'12, June 2012, Boston
+.Pp
+Luigi Rizzo, Giuseppe Lettieri,
+VALE, a switched ethernet for virtual machines,
+ACM CoNEXT'12, December 2012, Nice
+.Pp
+Luigi Rizzo, Giuseppe Lettieri, Vincenzo Maffione,
+Speeding up packet I/O in virtual machines,
+ACM/IEEE ANCS'13, October 2013, San Jose
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+framework has been originally designed and implemented at the
+Universita` di Pisa in 2011 by
+.An Luigi Rizzo ,
+and further extended with help from
+.An Matteo Landi ,
+.An Gaetano Catalli ,
+.An Giuseppe Lettieri ,
+.An Vincenzo Maffione .
+.Pp
+.Nm
+and
+.Nm VALE
+have been funded by the European Commission within FP7 Projects
+CHANGE (257422) and OPENLAB (287581).
diff --git a/share/man/man4/nfe.4 b/share/man/man4/nfe.4
new file mode 100644
index 0000000..45dd380
--- /dev/null
+++ b/share/man/man4/nfe.4
@@ -0,0 +1,203 @@
+.\" $OpenBSD: nfe.4,v 1.7 2006/02/28 08:13:47 jsg Exp $
+.\"
+.\" Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 15, 2011
+.Dt NFE 4
+.Os
+.Sh NAME
+.Nm nfe
+.Nd "NVIDIA nForce MCP Ethernet driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device nfe"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_nfe_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports PCI Ethernet adapters based on the NVIDIA
+nForce Media and Communications Processors (MCP), such as
+the nForce, nForce 2, nForce 3, CK804, MCP04, MCP51, MCP55,
+MCP61, MCP65, MCP67, MCP73, MCP77 and MCP79 Ethernet
+controller chips.
+.Pp
+Supported features include (hardware support provided):
+.Pp
+.Bl -bullet -compact
+.It
+Receive/Transmit IP/TCP/UDP checksum offload
+.It
+Hardware VLAN tag insertion/stripping
+.It
+TCP segmentation offload (TSO)
+.It
+MSI/MSI-X
+.It
+Jumbo Frames
+.El
+.Pp
+Support for Jumbo Frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width "10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+.It Cm 1000baseT
+Set 1000Mbps (Gigabit Ethernet) operation (recent models only).
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm half-duplex
+Force half duplex operation.
+.It Cm full-duplex
+Force full duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports the following NVIDIA MCP onboard adapters:
+.Pp
+.Bl -bullet -compact
+.It
+NVIDIA nForce MCP Networking Adapter
+.It
+NVIDIA nForce MCP04 Networking Adapter
+.It
+NVIDIA nForce 430 MCP12 Networking Adapter
+.It
+NVIDIA nForce 430 MCP13 Networking Adapter
+.It
+NVIDIA nForce MCP51 Networking Adapter
+.It
+NVIDIA nForce MCP55 Networking Adapter
+.It
+NVIDIA nForce MCP61 Networking Adapter
+.It
+NVIDIA nForce MCP65 Networking Adapter
+.It
+NVIDIA nForce MCP67 Networking Adapter
+.It
+NVIDIA nForce MCP73 Networking Adapter
+.It
+NVIDIA nForce MCP77 Networking Adapter
+.It
+NVIDIA nForce MCP79 Networking Adapter
+.It
+NVIDIA nForce2 MCP2 Networking Adapter
+.It
+NVIDIA nForce2 400 MCP4 Networking Adapter
+.It
+NVIDIA nForce2 400 MCP5 Networking Adapter
+.It
+NVIDIA nForce3 MCP3 Networking Adapter
+.It
+NVIDIA nForce3 250 MCP6 Networking Adapter
+.It
+NVIDIA nForce3 MCP7 Networking Adapter
+.It
+NVIDIA nForce4 CK804 MCP8 Networking Adapter
+.It
+NVIDIA nForce4 CK804 MCP9 Networking Adapter
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va hw.nfe.msi_disable
+Whether or not MSI support is enabled in the driver.
+The default value is 0.
+.It Va hw.nfe.msix_disable
+Whether or not MSI-X support is enabled in the driver.
+The default value is 0.
+.El
+.Sh SYSCTL VARIABLES
+The following
+.Xr sysctl 8
+variables can be used to modify or monitor
+.Nm
+behavior.
+.Bl -tag -width indent
+.It Va dev.nfe.%d.process_limit
+Maximum number of Rx events to be processed in the event loop
+before rescheduling a taskqueue.
+The accepted range is 50 to 255, the default value is 192.
+The interface does not need to be brought down and up again
+before a change takes effect.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr intro 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr pci 4 ,
+.Xr polling 4 ,
+.Xr rgephy 4 ,
+.Xr sysctl 8 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Ox 3.9 ,
+and then in
+.Fx 7.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Jonathan Gray
+.Aq jsg@openbsd.org
+and
+.An Damien Bergamini
+.Aq damien@openbsd.org .
+The
+.Nm
+driver was ported to
+.Fx
+by
+.An Shigeaki Tagashira
+.Aq shigeaki@se.hiroshima-u.ac.jp .
diff --git a/share/man/man4/nfsmb.4 b/share/man/man4/nfsmb.4
new file mode 100644
index 0000000..d6f39ce
--- /dev/null
+++ b/share/man/man4/nfsmb.4
@@ -0,0 +1,54 @@
+.\" Copyright (c) 2005 Christian Brueffer
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 31, 2005
+.Dt NFSMB 4
+.Os
+.Sh NAME
+.Nm nfsmb
+.Nd "NVIDIA nForce2/3/4 SMBus 2.0 controller driver"
+.Sh SYNOPSIS
+.Cd "device smbus"
+.Cd "device smb"
+.Cd "device nfsmb"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides access to NVIDIA nForce2/3/4 SMBus 2.0 controllers.
+.Sh SEE ALSO
+.Xr smb 4 ,
+.Xr smbus 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.2 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Ruslan Ermilov Aq ru@FreeBSD.org .
diff --git a/share/man/man4/ng_UI.4 b/share/man/man4/ng_UI.4
new file mode 100644
index 0000000..30f7c48
--- /dev/null
+++ b/share/man/man4/ng_UI.4
@@ -0,0 +1,93 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_UI.8,v 1.4 1999/01/25 02:37:56 archie Exp $
+.\"
+.Dd January 19, 1999
+.Dt NG_UI 4
+.Os
+.Sh NAME
+.Nm ng_UI
+.Nd UI netgraph node type
+.Sh SYNOPSIS
+.In netgraph/ng_UI.h
+.Sh DESCRIPTION
+The
+.Nm UI
+node type has two hooks,
+.Dv upstream
+and
+.Dv downstream .
+Packets received on
+.Dv downstream
+must have 0x03 (indicating unnumbered information) as their first byte;
+if not the packet is dropped.
+This byte is then stripped and the
+remainder of the packet sent out on
+.Dv upstream .
+.Pp
+Conversely, packets received on
+.Dv upstream
+will have a 0x03 byte prepended to them before being forwarded out on the
+.Dv downstream
+hook.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va downstream"
+.It Va downstream
+Downstream connection.
+Packets on this side of the node have a 0x03 as
+their first byte.
+.It Va upstream
+Upstream connection.
+Packets on this side of the node have the
+initial 0x03 byte stripped off.
+.El
+.Sh CONTROL MESSAGES
+This node type supports only the generic control messages.
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when both hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org
diff --git a/share/man/man4/ng_async.4 b/share/man/man4/ng_async.4
new file mode 100644
index 0000000..324fa41
--- /dev/null
+++ b/share/man/man4/ng_async.4
@@ -0,0 +1,172 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_async.8,v 1.6 1999/01/25 23:46:25 archie Exp $
+.\"
+.Dd November 13, 2012
+.Dt NG_ASYNC 4
+.Os
+.Sh NAME
+.Nm ng_async
+.Nd asynchronous framing netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_async.h
+.Sh DESCRIPTION
+The
+.Nm async
+node type performs conversion between synchronous frames and
+asynchronous frames, as defined for the PPP protocol in RFC 1662.
+Asynchronous framing uses flag bytes and octet-stuffing
+to simulate a frame oriented connection over an octet-oriented
+asynchronous serial line.
+.Pp
+The node transmits and receives asynchronous data on the
+.Dv async
+hook.
+Mbuf boundaries of incoming data are ignored.
+Once a complete packet has been received, it is decoded and
+stripped of all framing bytes, and transmitted out the
+.Dv sync
+hook as a single frame.
+.Pp
+Synchronous frames are transmitted and received on the
+.Dv sync
+hook.
+Packets received on this hook are encoded as asynchronous frames
+and sent out on
+.Dv async .
+Received packets should start with the address and control fields,
+or the PPP protocol field if address and control field compression
+is employed, and contain no checksum field.
+If the first four bytes are
+.Dv "0xff 0x03 0xc0 0x21"
+(an LCP protocol frame) then complete control character escaping
+is enabled for that frame (in PPP, LCP packets are always sent with
+no address and control field compression and all control characters
+escaped).
+.Pp
+This node supports
+.Dq flag sharing
+for packets transmitted on
+.Dv async .
+This is an optimization where the trailing flag byte
+of one frame is shared with the opening flag byte of the next.
+Flag sharing between frames is disabled after one second of transmit
+idle time.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va async"
+.It Va async
+Asynchronous connection.
+Typically this hook would be connected to a
+.Xr ng_tty 4
+node, which handles transmission of serial data over a tty device.
+.It Va sync
+Synchronous connection.
+This hook sends and receives synchronous frames.
+For PPP, these frames should contain address, control, and protocol fields,
+but no checksum field.
+Typically this hook would be connected to an individual link hook of a
+.Xr ng_ppp 4
+type node.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_ASYNC_CMD_SET_CONFIG Pq Ic setconfig
+Sets the node configuration, which is described by a
+.Dv "struct ng_async_cfg" :
+.Bd -literal -offset 4n
+struct ng_async_cfg {
+ u_char enabled; /* Turn encoding on/off */
+ uint16_t amru; /* Max receive async frame length */
+ uint16_t smru; /* Max receive sync frame length */
+ uint32_t accm; /* ACCM encoding */
+};
+.Ed
+The
+.Dv enabled
+field enables or disables all encoding/decoding functions (default disabled).
+When disabled, the node operates in simple
+.Dq pass through
+mode.
+The
+.Dv amru
+and
+.Dv smru
+fields are the asynchronous and synchronous MRU (maximum receive unit) values,
+respectively.
+These both default to 1600; note that the async MRU
+applies to the incoming frame length after asynchronous decoding.
+The
+.Dv accm
+field is the asynchronous character control map, which controls the escaping
+of characters 0x00 thorough 0x1f (default 0xffffffff).
+.It Dv NGM_ASYNC_CMD_GET_CONFIG Pq Ic getconfig
+This command returns the current configuration structure.
+.It Dv NGM_ASYNC_CMD_GET_STATS Pq Ic getstats
+This command returns a
+.Dv "struct ng_async_stat"
+containing node statistics for packet, octet, and error counts.
+.It Dv NGM_ASYNC_CMD_CLR_STATS Pq Ic clrstats
+Clears the node statistics.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_ppp 4 ,
+.Xr ng_tty 4 ,
+.Xr ngctl 8
+.Rs
+.%A W. Simpson
+.%T "PPP in HDLC-link Framing"
+.%O RFC 1662
+.Re
+.Rs
+.%A W. Simpson
+.%T "The Point-to-Point Protocol (PPP)"
+.%O RFC 1661
+.Re
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@FreeBSD.org
diff --git a/share/man/man4/ng_atm.4 b/share/man/man4/ng_atm.4
new file mode 100644
index 0000000..c11b911
--- /dev/null
+++ b/share/man/man4/ng_atm.4
@@ -0,0 +1,406 @@
+.\"
+.\" Copyright (c) 2001-2003
+.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Author: Hartmut Brandt <harti@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.\" ng_atm(4) man page
+.\"
+.Dd November 2, 2012
+.Dt NG_ATM 4
+.Os
+.Sh NAME
+.Nm ng_atm
+.Nd netgraph ATM node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In net/if_atm.h
+.In netgraph.h
+.In netgraph/atm/ng_atm.h
+.Sh DESCRIPTION
+The
+.Nm atm
+netgraph node type allows
+.Xr natm 4
+ATM drivers to be connected to the
+.Xr netgraph 4
+networking subsystem.
+When the
+.Nm
+module is loaded a node is automatically created for each
+.Xr natm 4
+ATM interface.
+The nodes are named with the same name as the
+interface.
+Nodes are also created if a driver for an ATM
+card is loaded after
+.Nm
+was loaded.
+.Pp
+The
+.Nm atm
+nodes are persistent.
+They are removed when the interface is removed.
+.Dv NGM_SHUTDOWN
+messages are ignored by the node.
+.Sh HOOKS
+Four special hooks with fixed names and an unlimited number of hooks with user
+defined names are supported.
+Three of the fixed hooks are attached to
+strategic points in the information flow in the
+.Xr natm 4
+system and support only reading.
+The fourth fixed hook behaves like the other
+user hooks, but a number of management messages are sent along the hook.
+The other hooks can be attached to VCIs dynamically by means of
+control messages to the
+.Nm atm
+node and can be written and read.
+.Pp
+The four fixed hooks are:
+.Bl -tag -width ".Va orphans"
+.It Va input
+This is a connection to the raw input stream from the network.
+If this hook is connected, all incoming packets are delivered out to
+this hook.
+Note that this redirects ALL input.
+Neither
+.Xr natm 4
+nor the user hooks will see any input if
+.Va input
+is connected.
+An
+.Vt atm_pseudohdr
+(see
+.Xr natm 4 )
+is prepended to the actual data.
+.It Va output
+This is a connection to the raw output stream to the network device.
+If this hook is connected, all outgoing packets are handed over to
+the netgraph system and delivered to the hook instead of being delivered
+to the ATM driver.
+An
+.Vt atm_pseudohdr
+(see
+.Xr natm 4 )
+is prepended to the actual data.
+.It Va orphans
+This hook receives all packets that are unrecognized, i.e., do not belong to
+either a
+.Xr natm 4
+socket, a
+.Nm
+VCI or
+.Xr natm 4
+IP.
+Because ATM is connection oriented and packets are received on a given VCI only
+when someone initiates this VCI, packets should never be orphaned.
+There is
+however one exception: if you use
+.Xr natm 4
+IP with LLC/SNAP encapsulation packets with do not have the IP protocol
+indicated in the packet header are delivered out of this hook.
+An
+.Vt atm_pseudohdr
+(see
+.Xr natm 4 )
+is prepended to the actual data send out to the hook.
+.It Va manage
+This hook behaves exactly like a normal user hook (see below) except that
+the node at the other hand will receive management messages.
+.El
+.Pp
+Hooks for dynamically initiated VCIs can have whatever name is allowed by
+.Xr netgraph 4
+as long as the name does not collide with one of the three predefined names.
+.Pp
+To initiate packet sending and receiving on a dynamic hook, one has to issue
+a
+.Dv NGM_ATM_CPCS_INIT
+control message.
+To terminate sending and receiving one must send a
+.Dv NGM_ATM_CPCS_TERM
+message (see
+.Sx CONTROL MESSAGES ) .
+The data sent and received on these hooks has no additional
+headers.
+.Sh CONTROL MESSAGES
+This node type supports the generic messages plus the following:
+.Bl -tag -width 4n
+.It Dv NGM_ATM_GET_IFNAME Pq Ic getifname
+Return the name of the interface as a
+.Dv NUL Ns
+-terminated string.
+This is normally the same name as that of the node.
+.It Dv NGM_ATM_GET_CONFIG Pq Ic getconfig
+Returns a structure defining the configuration of the interface:
+.Bd -literal
+struct ngm_atm_config {
+ uint32_t pcr; /* peak cell rate */
+ uint32_t vpi_bits; /* number of active VPI bits */
+ uint32_t vci_bits; /* number of active VCI bits */
+ uint32_t max_vpcs; /* maximum number of VPCs */
+ uint32_t max_vccs; /* maximum number of VCCs */
+};
+.Ed
+.It Dv NGM_ATM_GET_VCCS Pq Ic getvccs
+Returns the table of open VCCs from the driver.
+This table consists of
+a header and a variable sized array of entries, one for each open VCC:
+.Bd -literal
+struct atmio_vcctable {
+ uint32_t count; /* number of vccs */
+ struct atmio_vcc vccs[0]; /* array of VCCs */
+};
+struct atmio_vcc {
+ uint16_t flags; /* flags */
+ uint16_t vpi; /* VPI */
+ uint16_t vci; /* VCI */
+ uint16_t rmtu; /* Receive maximum CPCS size */
+ uint16_t tmtu; /* Transmit maximum CPCS size */
+ uint8_t aal; /* aal type */
+ uint8_t traffic; /* traffic type */
+ struct atmio_tparam tparam; /* traffic parameters */
+};
+struct atmio_tparam {
+ uint32_t pcr; /* 24bit: Peak Cell Rate */
+ uint32_t scr; /* 24bit: VBR Sustainable Cell Rate */
+ uint32_t mbs; /* 24bit: VBR Maximum burst size */
+ uint32_t mcr; /* 24bit: ABR/VBR/UBR+MCR MCR */
+ uint32_t icr; /* 24bit: ABR ICR */
+ uint32_t tbe; /* 24bit: ABR TBE (1...2^24-1) */
+ uint8_t nrm; /* 3bit: ABR Nrm */
+ uint8_t trm; /* 3bit: ABR Trm */
+ uint16_t adtf; /* 10bit: ABR ADTF */
+ uint8_t rif; /* 4bit: ABR RIF */
+ uint8_t rdf; /* 4bit: ABR RDF */
+ uint8_t cdf; /* 3bit: ABR CDF */
+};
+.Ed
+.Pp
+Note that this is the driver's table, so all VCCs opened via
+.Xr natm 4
+sockets and IP are also shown.
+They can, however, be distinguished by
+their flags.
+The
+.Va flags
+field contains the following flags:
+.Pp
+.Bl -tag -width ".Dv ATM_PH_LLCSNAP" -offset indent -compact
+.It Dv ATM_PH_AAL5
+use AAL5 instead of AAL0
+.It Dv ATM_PH_LLCSNAP
+if AAL5 use LLC SNAP encapsulation
+.It Dv ATM_FLAG_NG
+this is a netgraph VCC
+.It Dv ATM_FLAG_HARP
+this is a HARP VCC
+.It Dv ATM_FLAG_NORX
+transmit only VCC
+.It Dv ATM_FLAG_NOTX
+receive only VCC
+.It Dv ATMIO_FLAG_PVC
+treat channel as a PVC
+.El
+.Pp
+If the
+.Dv ATM_FLAG_NG
+flag is set, then
+.Va traffic
+and
+.Va tparam
+contain meaningful information.
+.Pp
+The
+.Va aal
+field
+contains one of the following values:
+.Pp
+.Bl -tag -width ".Dv ATM_PH_LLCSNAP" -offset indent -compact
+.It Dv ATMIO_AAL_0
+AAL 0 (raw cells)
+.It Dv ATMIO_AAL_34
+AAL 3 or AAL 4
+.It Dv ATMIO_AAL_5
+AAL 5
+.It Dv ATMIO_AAL_RAW
+device specific raw cells
+.El
+.Pp
+The
+.Va traffic
+field
+can have one of the following values (not all drivers support
+all traffic types however):
+.Pp
+.Bl -tag -width ".Dv ATM_PH_LLCSNAP" -offset indent -compact
+.It Dv ATMIO_TRAFFIC_UBR
+.It Dv ATMIO_TRAFFIC_CBR
+.It Dv ATMIO_TRAFFIC_ABR
+.It Dv ATMIO_TRAFFIC_VBR
+.El
+.It Dv NGM_ATM_CPCS_INIT Pq Ic cpcsinit
+Initialize a VCC for sending and receiving.
+The argument is a structure:
+.Bd -literal
+struct ngm_atm_cpcs_init {
+ char name[NG_HOOKSIZ];
+ uint32_t flags; /* flags. (if_atm.h) */
+ uint16_t vci; /* VCI to open */
+ uint16_t vpi; /* VPI to open */
+ uint16_t rmtu; /* receive maximum PDU */
+ uint16_t tmtu; /* transmit maximum PDU */
+ uint8_t aal; /* AAL type (if_atm.h) */
+ uint8_t traffic; /* traffic type (if_atm.h) */
+ uint32_t pcr; /* Peak cell rate */
+ uint32_t scr; /* VBR: Sustainable cell rate */
+ uint32_t mbs; /* VBR: Maximum burst rate */
+ uint32_t mcr; /* UBR+: Minimum cell rate */
+ uint32_t icr; /* ABR: Initial cell rate */
+ uint32_t tbe; /* ABR: Transmit buffer exposure */
+ uint8_t nrm; /* ABR: Nrm */
+ uint8_t trm; /* ABR: Trm */
+ uint16_t adtf; /* ABR: ADTF */
+ uint8_t rif; /* ABR: RIF */
+ uint8_t rdf; /* ABR: RDF */
+ uint8_t cdf; /* ABR: CDF */
+};
+.Ed
+.Pp
+The
+.Va name
+field
+is the name of the hook for which sending and receiving should be enabled.
+This hook must already be connected.
+The
+.Va vpi
+and
+.Va vci
+fields
+are the respective VPI and VCI values to use for the ATM cells.
+They must be
+within the range, given by the
+.Va maxvpi
+and
+.Va maxvci
+fields of the
+.Vt ng_atm_config
+structure.
+The
+.Va flags
+field
+contains the flags (see above) and the other fields describe the
+type of traffic.
+.It Dv NGM_ATM_CPCS_TERM Pq Ic cpcsterm
+Stop sending and receiving on the indicated hook.
+The argument is a
+.Bd -literal
+struct ngm_atm_cpcs_term {
+ char name[NG_HOOKSIZ];
+};
+.Ed
+.It Dv NGM_ATM_GET_STATS Pq Ic getstats
+This command returns a message, containing node statistics. The
+structure of the message is:
+.Bd -literal
+struct ngm_atm_stats {
+ uint64_t in_packets;
+ uint64_t in_errors;
+ uint64_t out_packets;
+ uint64_t out_errors;
+};
+.Ed
+.El
+.Sh MANAGEMENT MESSAGES
+If the
+.Va manage
+hook is connected, certain messages are sent along the hook.
+They are
+received by the peer node with a cookie of
+.Dv NG_ATM_COOKIE .
+.Bl -tag -width 4n
+.It Dv NGM_ATM_VCC_CHANGE Pq Ic vcc_change
+A permanent VCC has been added, deleted or changed.
+This is used by
+.Xr ilmid 8
+to generate the appropriate ILMI traps.
+The structure of the message is:
+.Bd -literal
+struct ngm_atm_vcc_change {
+ uint32_t node;
+ uint16_t vci;
+ uint8_t vpi;
+ uint8_t state;
+};
+.Ed
+Where
+.Va state
+is 0 if the PVC was deleted, and 1 if it was added or modified.
+.El
+.Sh FLOW CONTROL
+If the hardware driver supports it, the node can emit flow control messages
+along a user hook.
+The format of these messages is described in
+.In netgraph/ng_message.h .
+The
+.Nm atm
+node may generate
+.Dv NGM_HIGH_WATER_PASSED
+and
+.Dv NGM_LOW_WATER_PASSED
+messages.
+The first one indicates that the hardware driver has stopped output
+on the channel and drops new packets, the second one reports that
+output was reenabled.
+Currently, the structures are not filled with
+information.
+.Sh SHUTDOWN
+The nodes are persistent as long as the corresponding interface exists.
+Upon receipt of a
+.Dv NGM_SHUTDOWN
+messages, all hooks are disconnected and the node is reinitialized.
+All
+VCCs opened via
+.Xr netgraph 4
+are closed.
+When the ATM interface is unloaded,
+the node disappears.
+If the node is compiled with
+.Dv NGATM_DEBUG
+there is a sysctl
+.Va net.graph.atm.allow_shutdown
+which, when set to a non-zero value, allows the nodes to shut down.
+Note that this is intended for development only and may lead to kernel
+panics if set.
+.Sh SEE ALSO
+.Xr natm 4 ,
+.Xr netgraph 4 ,
+.Xr ng_ether 4 ,
+.Xr ngctl 8
+.Sh AUTHORS
+.An Harti Brandt Aq harti@FreeBSD.org
diff --git a/share/man/man4/ng_atmllc.4 b/share/man/man4/ng_atmllc.4
new file mode 100644
index 0000000..50131a2
--- /dev/null
+++ b/share/man/man4/ng_atmllc.4
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2004 Benno Rice <benno@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 8, 2004
+.Dt NG_ATMLLC 4
+.Os
+.Sh NAME
+.Nm ng_atmllc
+.Nd ATM LLC netgraph node type
+.Sh SYNOPSIS
+.In netgraph/ng_atmllc.h
+.Sh DESCRIPTION
+The
+.Nm atmllc
+node type translates frames in to and out of ATM LLC encapsulation,
+as specified by RFC 1483.
+In LLC encapsulation the protocol of a given protocol data unit (PDU) is
+specified by an IEEE 802.2 LLC header, possibly followed by an IEEE 802.1a
+SubNetwork Attachment Point (SNAP) header.
+This node currently handles the Ethernet and FDDI protocols.
+.Pp
+The node transmits and receives ATM PDUs on the
+.Va atm
+hook.
+Received PDUs are decoded and forwarded to the
+.Va ether
+or
+.Va fddi
+hooks as appropriate.
+Data received on the
+.Va ether
+or
+.Va fddi
+hooks are assumed to be full Ethernet or FDDI packets as appropriate and are
+encapsulated into a PDU and transmitted via the
+.Va atm
+hook.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va ether"
+.It Va atm
+ATM connection.
+Typically, this hook would be connected to a
+.Xr ng_atm 4
+node, which handles transmission of ATM PDUs over an ATM device.
+.It Va ether
+Ethernet connection.
+This hook sends and receives Ethernet frames.
+This would normally be connected to an
+.Xr ng_eiface 4
+node if in use.
+.It Va fddi
+FDDI connection.
+This hook sends and receives FDDI frames.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages.
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_atm 4 ,
+.Xr ng_eiface 4 ,
+.Xr ngctl 8
+.Rs
+.%A J. Heinanen
+.%T "Multiprotocol Encapsulation over ATM Adaptation Layer 5"
+.%O RFC 1483
+.Re
+.Sh AUTHORS
+.An Benno Rice Aq benno@FreeBSD.org
diff --git a/share/man/man4/ng_bluetooth.4 b/share/man/man4/ng_bluetooth.4
new file mode 100644
index 0000000..c956dd0
--- /dev/null
+++ b/share/man/man4/ng_bluetooth.4
@@ -0,0 +1,112 @@
+.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $Id: ng_bluetooth.4,v 1.3 2003/05/21 19:37:35 max Exp $
+.\" $FreeBSD$
+.\"
+.Dd November 9, 2002
+.Dt NG_BLUETOOTH 4
+.Os
+.Sh NAME
+.Nm ng_bluetooth
+.Nd placeholder for global Bluetooth variables
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/bluetooth/include/ng_bluetooth.h
+.Sh DESCRIPTION
+The
+.Nm
+module is a placeholder for global Bluetooth variables.
+All Bluetooth variables can be examined and changed via
+.Xr sysctl 8 .
+.Ss Bluetooth Variables
+Below is the description of default variables.
+Each Bluetooth module might add its own variables to the tree.
+.Bl -tag -width foo
+.It Va net.bluetooth.version
+A read-only integer variable that shows the current version of the
+Bluetooth stack.
+.It Va net.bluetooth.hci.command_timeout
+A read-write integer variable that controls the Host Controller Interface
+(HCI) command timeout (in seconds), i.e., how long the HCI layer will wait
+for the
+.Dv Command_Complete
+or
+.Dv Command_Status
+event from a Bluetooth device.
+.It Va net.bluetooth.hci.connection_timeout
+A read-write integer variable that controls the HCI connection timeout, i.e.\&
+how long the HCI layer will wait for the
+.Dv Connection_Complete
+event.
+Normally this should not be required as Bluetooth devices have
+connection timeout of their own and will send event back.
+This timeout
+is required to ensure that no connection will stall in case when the HCI
+transport layer is broken.
+Be careful when changing this variable.
+Make sure you understand what you are doing.
+.It Va net.bluetooth.hci.max_neighbor_age
+A read-write integer variable that controls time-to-live (in seconds) for
+entries in the HCI neighbor cache.
+Every time a Bluetooth device performs an
+.Dv Inquiry
+operation, the results will be put in cache.
+Later when a Bluetooth device
+establishes a baseband connection, it will try to find the matching entry in
+the cache and use it.
+This might speed up establishment of the baseband
+connection.
+.It Va net.bluetooth.l2cap.rtx_timeout
+A read-write integer variable that controls the Link Layer Control and
+Adaptation Protocol (L2CAP) Retransmission Timeout (RTX) (in seconds).
+Every time the L2CAP layer submits a control command, the RTX timeout is set.
+The value of the RTX timeout should be greater or equal to the value of
+the HCI connection timeout.
+Be careful when changing this variable.
+Make sure you understand what you are doing.
+.It Va net.bluetooth.l2cap.ertx_timeout
+A read-write integer variable that controls the L2CAP Extended Retransmission
+Timeout (ERTX) (in seconds).
+In some cases remote peer may respond with
+.Dv PENDING
+status to the L2CAP control command.
+In this case the L2CAP command timeout is reset to the ERTX timeout value.
+The value of the ERTX timeout should be
+greater or equal to the value of the RTX timeout.
+Be careful when changing this variable.
+Make sure you understand what you are doing.
+.El
+.Sh SEE ALSO
+.Xr ng_btsocket 4 ,
+.Xr ng_hci 4 ,
+.Xr ng_l2cap 4 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+module was implemented in
+.Fx 5.0 .
+.Sh AUTHORS
+.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
diff --git a/share/man/man4/ng_bpf.4 b/share/man/man4/ng_bpf.4
new file mode 100644
index 0000000..44a51e3
--- /dev/null
+++ b/share/man/man4/ng_bpf.4
@@ -0,0 +1,191 @@
+.\" Copyright (c) 1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_bpf.8,v 1.2 1999/12/03 01:57:12 archie Exp $
+.\"
+.Dd November 13, 2012
+.Dt NG_BPF 4
+.Os
+.Sh NAME
+.Nm ng_bpf
+.Nd Berkeley packet filter netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In net/bpf.h
+.In netgraph.h
+.In netgraph/ng_bpf.h
+.Sh DESCRIPTION
+The
+.Nm bpf
+node type allows Berkeley Packet Filter (see
+.Xr bpf 4 )
+filters to be applied to data travelling through a Netgraph network.
+Each node allows an arbitrary number of connections to arbitrarily
+named hooks.
+With each hook is associated a
+.Xr bpf 4
+filter program which is applied to incoming data only, a destination hook
+for matching packets, a destination hook for non-matching packets,
+and various statistics counters.
+.Pp
+A
+.Xr bpf 4
+program returns an unsigned integer, which is normally interpreted as
+the length of the prefix of the packet to return.
+In the context of this
+node type, returning zero is considered a non-match, in which case the
+entire packet is delivered out the non-match destination hook.
+Returning a value greater than zero causes the packet to be truncated
+to that length and delivered out the match destination hook.
+Either or both destination hooks may be the empty string, or may
+not exist, in which case the packet is dropped.
+.Pp
+New hooks are initially configured to drop all packets.
+A new filter program may be installed using the
+.Dv NGM_BPF_SET_PROGRAM
+control message.
+.Sh HOOKS
+This node type supports any number of hooks having arbitrary names.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_BPF_SET_PROGRAM Pq Ic setprogram
+This command sets the filter program that will be applied to incoming
+data on a hook.
+The following structure must be supplied as an argument:
+.Bd -literal -offset 4n
+struct ng_bpf_hookprog {
+ char thisHook[NG_HOOKSIZ]; /* name of hook */
+ char ifMatch[NG_HOOKSIZ]; /* match dest hook */
+ char ifNotMatch[NG_HOOKSIZ]; /* !match dest hook */
+ int32_t bpf_prog_len; /* #insns in program */
+ struct bpf_insn bpf_prog[]; /* bpf program */
+};
+.Ed
+.Pp
+The hook to be updated is specified in
+.Dv thisHook .
+The BPF program is the sequence of instructions in the
+.Dv bpf_prog
+array; there must be
+.Dv bpf_prog_len
+of them.
+Matching and non-matching incoming packets are delivered out the hooks named
+.Dv ifMatch
+and
+.Dv ifNotMatch ,
+respectively.
+The program must be a valid
+.Xr bpf 4
+program or else
+.Er EINVAL
+is returned.
+.It Dv NGM_BPF_GET_PROGRAM Pq Ic getprogram
+This command takes an
+.Tn ASCII
+string argument, the hook name, and returns the
+corresponding
+.Dv "struct ng_bpf_hookprog"
+as shown above.
+.It Dv NGM_BPF_GET_STATS Pq Ic getstats
+This command takes an
+.Tn ASCII
+string argument, the hook name, and returns the
+statistics associated with the hook as a
+.Dv "struct ng_bpf_hookstat" .
+.It Dv NGM_BPF_CLR_STATS Pq Ic clrstats
+This command takes an
+.Tn ASCII
+string argument, the hook name, and clears the
+statistics associated with the hook.
+.It Dv NGM_BPF_GETCLR_STATS Pq Ic getclrstats
+This command is identical to
+.Dv NGM_BPF_GET_STATS ,
+except that the statistics are also atomically cleared.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh EXAMPLES
+It is possible to configure a node from the command line, using
+.Xr tcpdump 1
+to generate raw BPF instructions which are then fed into an
+.Xr awk 1
+script to create the ASCII form of a
+.Dv NGM_BPF_SET_PROGRAM
+control message, as demonstrated here:
+.Bd -literal -offset 4n
+#!/bin/sh
+
+PATTERN="tcp dst port 80"
+NODEPATH="my_node:"
+INHOOK="hook1"
+MATCHHOOK="hook2"
+NOTMATCHHOOK="hook3"
+
+BPFPROG=$( tcpdump -s 8192 -ddd ${PATTERN} | \\
+ ( read len ; \\
+ echo -n "bpf_prog_len=$len" ; \\
+ echo -n "bpf_prog=[" ; \\
+ while read code jt jf k ; do \\
+ echo -n " { code=$code jt=$jt jf=$jf k=$k }" ; \\
+ done ; \\
+ echo " ]" ) )
+
+ngctl msg ${NODEPATH} setprogram { thisHook=\\"${INHOOK}\\" \\
+ ifMatch=\\"${MATCHHOOK}\\" \\
+ ifNotMatch=\\"${NOTMATCHHOOK}\\" \\
+ ${BPFPROG} }
+.Ed
+.Sh SEE ALSO
+.Xr bpf 4 ,
+.Xr netgraph 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@FreeBSD.org
+.Sh BUGS
+When built as a loadable kernel module, this module includes the file
+.Pa net/bpf_filter.c .
+Although loading the module should fail if
+.Pa net/bpf_filter.c
+already exists in the kernel, currently it does not, and the duplicate
+copies of the file do not interfere.
+However, this may change in the future.
diff --git a/share/man/man4/ng_bridge.4 b/share/man/man4/ng_bridge.4
new file mode 100644
index 0000000..6ec8708
--- /dev/null
+++ b/share/man/man4/ng_bridge.4
@@ -0,0 +1,212 @@
+.\" Copyright (c) 2000 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 5, 2010
+.Dt NG_BRIDGE 4
+.Os
+.Sh NAME
+.Nm ng_bridge
+.Nd Ethernet bridging netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_bridge.h
+.Sh DESCRIPTION
+The
+.Nm bridge
+node type performs Ethernet bridging over one or more links.
+Each link (represented by a connected hook) is used to transmit
+and receive raw Ethernet frames.
+As packets are received, the node learns which link each
+host resides on.
+Packets unicast to a known host are directed out the appropriate
+link only, and other links are spared the traffic.
+This behavior is in contrast to a hub, which always forwards
+every received packet to every other link.
+.Sh LOOP DETECTION
+The
+.Nm bridge
+node incorporates a simple loop detection algorithm.
+A loop is when two ports are connected to the same physical medium.
+Loops are important to avoid because of packet storms, which severely
+degrade performance.
+A packet storm results when the same packet is sent and received
+over and over again.
+If a host is detected on link A, and is then detected on link B
+within a certain time period after first being detected on link A,
+then link B is considered to be a looped back link.
+The time period is called the minimum stable time.
+.Pp
+A looped back link will be temporarily muted, i.e., all traffic
+received on that link is ignored.
+.Sh IPFW PROCESSING
+Processing of IP packets via the
+.Xr ipfirewall 4
+mechanism on a per-link basis is not yet implemented.
+.Sh HOOKS
+This node type supports up to
+.Dv NG_BRIDGE_MAX_LINKS
+hooks.
+Each connected hook represents a bridged link.
+The hooks are named
+.Dv link0 ,
+.Dv link1 ,
+etc.
+Typically these hooks are connected to the
+.Dv lower
+hooks of one or more
+.Xr ng_ether 4
+nodes.
+To connect the host machine to a bridged network, simply connect the
+.Dv upper
+hook of an
+.Xr ng_ether 4
+node to the bridge node.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the
+following:
+.Bl -tag -width foo
+.It Dv NGM_BRIDGE_SET_CONFIG Pq Ic setconfig
+Set the node configuration.
+This command takes a
+.Dv "struct ng_bridge_config"
+as an argument:
+.Bd -literal -offset 0n
+/* Node configuration structure */
+struct ng_bridge_config {
+ u_char ipfw[NG_BRIDGE_MAX_LINKS]; /* enable ipfw */
+ u_char debugLevel; /* debug level */
+ uint32_t loopTimeout; /* link loopback mute time */
+ uint32_t maxStaleness; /* max host age before nuking */
+ uint32_t minStableAge; /* min time for a stable host */
+};
+.Ed
+.Pp
+The
+.Dv ipfw
+array enables
+.Xr ipfirewall 4
+processing of IP packets received on the corresponding links.
+The
+.Dv debugLevel
+field sets the debug level on the node.
+At level of 2 or greater, detected loops are logged.
+The default level is 1.
+.Pp
+The
+.Dv loopTimeout
+determines how long (in seconds) a looped link is muted.
+The default is 60 seconds.
+The
+.Dv maxStaleness
+parameter determines how long a period of inactivity before
+a host's entry is forgotten.
+The default is 15 minutes.
+The
+.Dv minStableAge
+determines how quickly a host must jump from one link to another
+before we declare a loopback condition.
+The default is one second.
+.It Dv NGM_BRIDGE_GET_CONFIG Pq Ic getconfig
+Returns the current configuration as a
+.Dv "struct ng_bridge_config" .
+.It Dv NGM_BRIDGE_RESET Pq Ic reset
+Causes the node to forget all hosts and unmute all links.
+The node configuration is not changed.
+.It Dv NGM_BRIDGE_GET_STATS Pq Ic getstats
+This command takes a four byte link number as an argument and
+returns a
+.Dv "struct ng_bridge_link_stats"
+containing statistics for the corresponding link, which must be
+currently connected:
+.Bd -literal -offset 0n
+/* Statistics structure (one for each link) */
+struct ng_bridge_link_stats {
+ uint64_t recvOctets; /* total octets rec'd on link */
+ uint64_t recvPackets; /* total pkts rec'd on link */
+ uint64_t recvMulticasts; /* multicast pkts rec'd on link */
+ uint64_t recvBroadcasts; /* broadcast pkts rec'd on link */
+ uint64_t recvUnknown; /* pkts rec'd with unknown dest addr */
+ uint64_t recvRunts; /* pkts rec'd less than 14 bytes */
+ uint64_t recvInvalid; /* pkts rec'd with bogus source addr */
+ uint64_t xmitOctets; /* total octets xmit'd on link */
+ uint64_t xmitPackets; /* total pkts xmit'd on link */
+ uint64_t xmitMulticasts; /* multicast pkts xmit'd on link */
+ uint64_t xmitBroadcasts; /* broadcast pkts xmit'd on link */
+ uint64_t loopDrops; /* pkts dropped due to loopback */
+ uint64_t loopDetects; /* number of loop detections */
+ uint64_t memoryFailures; /* times couldn't get mem or mbuf */
+};
+.Ed
+.It Dv NGM_BRIDGE_CLR_STATS Pq Ic clrstats
+This command takes a four byte link number as an argument and
+clears the statistics for that link.
+.It Dv NGM_BRIDGE_GETCLR_STATS Pq Ic getclrstats
+Same as
+.Dv NGM_BRIDGE_GET_STATS ,
+but also atomically clears the statistics as well.
+.It Dv NGM_BRIDGE_GET_TABLE Pq Ic gettable
+Returns the current host mapping table used to direct packets, in a
+.Dv "struct ng_bridge_host_ary" .
+.It Dv NGM_BRIDGE_SET_PERSISTENT Pq Ic setpersistent
+This command sets the persistent flag on the node, and takes no arguments.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected. Setting the
+persistent flag via a
+.Dv NGM_BRIDGE_SET_PERSISTENT
+control message disables automatic node shutdown when the last hook gets
+disconnected.
+.Sh FILES
+.Bl -tag -width XXXXXXXX -compact
+.It Pa /usr/share/examples/netgraph/ether.bridge
+Example script showing how to set up a bridging network
+.El
+.Sh SEE ALSO
+.Xr if_bridge 4 ,
+.Xr netgraph 4 ,
+.Xr ng_ether 4 ,
+.Xr ng_hub 4 ,
+.Xr ng_one2many 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.2 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@FreeBSD.org
diff --git a/share/man/man4/ng_bt3c.4 b/share/man/man4/ng_bt3c.4
new file mode 100644
index 0000000..b6c3ba7
--- /dev/null
+++ b/share/man/man4/ng_bt3c.4
@@ -0,0 +1,129 @@
+.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $Id: ng_bt3c.4,v 1.3 2003/09/14 23:28:51 max Exp $
+.\" $FreeBSD$
+.\"
+.Dd December 17, 2004
+.Dt NG_BT3C 4
+.Os
+.Sh NAME
+.Nm ng_bt3c
+.Nd Netgraph node type that is also a 3Com Bluetooth PC card driver
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/bluetooth/include/ng_bt3c.h
+.Sh DESCRIPTION
+The
+.Nm btccc
+node type is both a persistent Netgraph node type and a driver for the
+3Com Bluetooth PC card (3CRWB6096-HP).
+It implements a Bluetooth HCI
+UART transport layer as per chapter H4 of the Bluetooth Specification
+Book v1.1.
+A new node is created when the card is plugged.
+.Pp
+In order to use the card one
+.Em MUST
+download the firmware first.
+Due to copyright issues the firmware cannot be provided with this driver.
+The firmware can be obtained
+from the Windows driver package that can be downloaded from the 3Com web
+site at no charge.
+The firmware name is
+.Pa BT3CPCC.BIN .
+To load the firmware into the card, use
+.Xr bt3cfw 8 .
+I am using the original firmware that came with the card on CD-ROM.
+.Pp
+.Dl "MD5 (BT3CPCC.BIN) = 36170fda56ea9fdbf1702c966f8a97f1"
+.Pp
+The node has a single hook called
+.Dv hook .
+Incoming bytes received on the device are re-assembled into HCI frames
+(according to the length).
+Full HCI frames are sent out on the hook.
+HCI frames received on
+.Dv hook
+are transmitted out.
+No modification to the data is performed in either direction.
+.Sh HARDWARE
+The
+.Nm
+driver provides support for the 3Com/HP 3CRWB6096-A PCCARD bluetooth adapter.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va hook"
+.It Va hook
+single HCI frame contained in single
+.Vt mbuf
+structure.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_BT3C_NODE_GET_STATE Pq Ic get_state
+Returns the current receiving state for the node.
+.It Dv NGM_BT3C_NODE_SET_DEBUG Pq Ic set_debug
+This command takes an integer argument and sets the current debug level
+for the node.
+.It Dv NGM_BT3C_NODE_GET_DEBUG Pq Ic get_debug
+Returns an integer containing the current debug level for the node.
+.It Dv NGM_BT3C_NODE_GET_QLEN Pq Ic get_qlen
+This command takes a parameter that specifies queue number and returns
+the current length of the queue for the node.
+.It Dv NGM_BT3C_NODE_SET_QLEN Pq Ic set_qlen
+This command takes two parameters that specify the queue number and
+the maximum length of the queue and sets the maximum length of the queue for
+the node.
+.It Dv NGM_BT3C_NODE_GET_STAT Pq Ic get_stat
+Returns various statistic information for the node, such as: number of
+bytes (frames) sent, number of bytes (frames) received and number of
+input (output) errors.
+.It Dv NGM_BT3C_NODE_RESET_STAT Pq Ic reset_stat
+Reset all statistic counters to zero.
+.It Dv NGM_BT3C_NODE_DOWNLOAD_FIRMWARE
+Download card firmware.
+.El
+.Sh SHUTDOWN
+This node shuts down when the corresponding card is un-plugged.
+.Sh SEE ALSO
+.Xr cardbus 4 ,
+.Xr netgraph 4 ,
+.Xr pccbb 4 ,
+.Xr pcic 4 ,
+.Xr pccard.conf 5 ,
+.Xr bt3cfw 8 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm btccc
+node type was implemented in
+.Fx 5.0 .
+.Sh AUTHORS
+.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
+.Sh BUGS
+The driver is based on information obtained from
+.An Jose Orlando Pereira Aq jop@di.uminho.pt
+and disassembled the W2K driver.
diff --git a/share/man/man4/ng_btsocket.4 b/share/man/man4/ng_btsocket.4
new file mode 100644
index 0000000..12f2844
--- /dev/null
+++ b/share/man/man4/ng_btsocket.4
@@ -0,0 +1,354 @@
+.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $Id: ng_btsocket.4,v 1.7 2003/05/21 19:37:35 max Exp $
+.\" $FreeBSD$
+.\"
+.Dd November 13, 2012
+.Dt NG_BTSOCKET 4
+.Os
+.Sh NAME
+.Nm ng_btsocket
+.Nd Bluetooth sockets layer
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In sys/bitstring.h
+.In netgraph/bluetooth/include/ng_hci.h
+.In netgraph/bluetooth/include/ng_l2cap.h
+.In netgraph/bluetooth/include/ng_btsocket.h
+.Sh DESCRIPTION
+The
+.Nm
+module implements three Netgraph node types.
+Each type in its turn implements one protocol within
+.Dv PF_BLUETOOTH
+domain.
+.Sh Dv BLUETOOTH_PROTO_HCI Sh protocol
+.Ss Dv SOCK_RAW Ss HCI sockets
+Implemented by
+.Nm btsock_hci_raw
+Netgraph type.
+Raw HCI sockets allow sending of raw HCI command datagrams
+only to correspondents named in
+.Xr send 2
+calls.
+Raw HCI datagrams (HCI commands, events and data) are generally received with
+.Xr recvfrom 2 ,
+which returns the next datagram with its return address.
+Raw HCI sockets can also be used to control HCI nodes.
+.Pp
+The Bluetooth raw HCI socket address is defined as follows:
+.Bd -literal -offset indent
+/* Bluetooth version of struct sockaddr for raw HCI sockets */
+struct sockaddr_hci {
+ u_char hci_len; /* total length */
+ u_char hci_family; /* address family */
+ char hci_node[32]; /* address (size == NG_NODESIZ ) */
+};
+.Ed
+.Pp
+Raw HCI sockets support a number of
+.Xr ioctl 2
+requests such as:
+.Bl -tag -width foo
+.It Dv SIOC_HCI_RAW_NODE_GET_STATE
+Returns current state for the HCI node.
+.It Dv SIOC_HCI_RAW_NODE_INIT
+Turn on
+.Dq inited
+bit for the HCI node.
+.It Dv SIOC_HCI_RAW_NODE_GET_DEBUG
+Returns current debug level for the HCI node.
+.It Dv SIOC_HCI_RAW_NODE_SET_DEBUG
+Sets current debug level for the HCI node.
+.It Dv SIOC_HCI_RAW_NODE_GET_BUFFER
+Returns current state of data buffers for the HCI node.
+.It Dv SIOC_HCI_RAW_NODE_GET_BDADDR
+Returns BD_ADDR for the HCI node.
+.It Dv SIOC_HCI_RAW_NODE_GET_FEATURES
+Returns the list of features supported by hardware for the HCI node.
+.It Dv SIOC_HCI_RAW_NODE_GET_STAT
+Returns various statistic counters for the HCI node.
+.It Dv SIOC_HCI_RAW_NODE_RESET_STAT
+Resets all statistic counters for the HCI node to zero.
+.It Dv SIOC_HCI_RAW_NODE_FLUSH_NEIGHBOR_CACHE
+Remove all neighbor cache entries for the HCI node.
+.It Dv SIOC_HCI_RAW_NODE_GET_NEIGHBOR_CACHE
+Returns content of the neighbor cache for the HCI node.
+.It Dv SIOC_HCI_RAW_NODE_GET_CON_LIST
+Returns list of active baseband connections (i.e., ACL and SCO links) for
+the HCI node.
+.It SIOC_HCI_RAW_NODE_GET_LINK_POLICY_MASK
+Returns current link policy settings mask for the HCI node.
+.It SIOC_HCI_RAW_NODE_SET_LINK_POLICY_MASK
+Sets current link policy settings mask for the HCI node.
+.It SIOC_HCI_RAW_NODE_GET_PACKET_MASK
+Returns current packet mask for the HCI node.
+.It SIOC_HCI_RAW_NODE_SET_PACKET_MASK
+Sets current packet mask for the HCI node.
+.It SIOC_HCI_RAW_NODE_GET_ROLE_SWITCH
+Returns current value of the role switch parameter for the HCI node.
+.It SIOC_HCI_RAW_NODE_SET_ROLE_SWITCH
+Sets new value of the role switch parameter for the HCI node.
+.El
+.Pp
+The
+.Va net.bluetooth.hci.sockets.raw.ioctl_timeout
+variable, that can be examined and set via
+.Xr sysctl 8 ,
+controls the control request timeout (in seconds) for raw HCI sockets.
+.Pp
+Raw HCI sockets support filters.
+The application can filter certain HCI datagram types.
+For HCI event datagrams the application can set additional filter.
+The raw HCI socket filter defined as follows:
+.Bd -literal -offset indent
+/*
+ * Raw HCI socket filter.
+ *
+ * For packet mask use (1 << (HCI packet indicator - 1))
+ * For event mask use (1 << (Event - 1))
+ */
+
+struct ng_btsocket_hci_raw_filter {
+ bitstr_t bit_decl(packet_mask, 32);
+ bitstr_t bit_decl(event_mask, (NG_HCI_EVENT_MASK_SIZE * 8));
+};
+.Ed
+.Pp
+The
+.Dv SO_HCI_RAW_FILTER
+option defined at
+.Dv SOL_HCI_RAW
+level can be used to obtain via
+.Xr getsockopt 2
+or change via
+.Xr setsockopt 2
+raw HCI socket's filter.
+.Sh Dv BLUETOOTH_PROTO_L2CAP Sh protocol
+The Bluetooth L2CAP socket address is defined as follows:
+.Bd -literal -offset indent
+/* Bluetooth version of struct sockaddr for L2CAP sockets */
+struct sockaddr_l2cap {
+ u_char l2cap_len; /* total length */
+ u_char l2cap_family; /* address family */
+ uint16_t l2cap_psm; /* Protocol/Service Multiplexor */
+ bdaddr_t l2cap_bdaddr; /* address */
+};
+.Ed
+.Ss Dv SOCK_RAW Ss L2CAP sockets
+Implemented by
+.Nm btsock_l2c_raw
+Netgraph type.
+Raw L2CAP sockets do not provide access to raw L2CAP datagrams.
+These
+sockets used to control L2CAP nodes and to issue special L2CAP requests
+such as
+.Dv ECHO_REQUEST
+and
+.Dv GET_INFO
+request.
+.Pp
+Raw L2CAP sockets support number of
+.Xr ioctl 2
+requests such as:
+.Bl -tag -width foo
+.It Dv SIOC_L2CAP_NODE_GET_FLAGS
+Returns current state for the L2CAP node.
+.It Dv SIOC_L2CAP_NODE_GET_DEBUG
+Returns current debug level for the L2CAP node.
+.It Dv SIOC_L2CAP_NODE_SET_DEBUG
+Sets current debug level for the L2CAP node.
+.It Dv SIOC_L2CAP_NODE_GET_CON_LIST
+Returns list of active baseband connections (i.e., ACL links) for the L2CAP
+node.
+.It Dv SIOC_L2CAP_NODE_GET_CHAN_LIST
+Returns list of active channels for the L2CAP node.
+.It Dv SIOC_L2CAP_NODE_GET_AUTO_DISCON_TIMO
+Returns current value of the auto disconnect timeout for the L2CAP node.
+.It Dv SIOC_L2CAP_NODE_SET_AUTO_DISCON_TIMO
+Sets current value of the auto disconnect timeout for the L2CAP node.
+.It Dv SIOC_L2CAP_L2CA_PING
+Issues L2CAP
+.Dv ECHO_REQUEST .
+.It Dv SIOC_L2CAP_L2CA_GET_INFO
+Issues L2CAP
+.Dv GET_INFO
+request.
+.El
+.Pp
+The
+.Va net.bluetooth.l2cap.sockets.raw.ioctl_timeout
+variable, that can be examined and set via
+.Xr sysctl 8 ,
+controls the control request timeout (in seconds) for raw L2CAP sockets.
+.Ss Dv SOCK_SEQPACKET Ss L2CAP sockets
+Implemented by
+.Nm btsock_l2c
+Netgraph type.
+L2CAP sockets are either
+.Dq active
+or
+.Dq passive .
+Active sockets initiate connections to passive sockets.
+By default, L2CAP sockets are created active; to create a passive socket, the
+.Xr listen 2
+system call must be used after binding the socket with the
+.Xr bind 2
+system call.
+Only passive sockets may use the
+.Xr accept 2
+call to accept incoming connections.
+Only active sockets may use the
+.Xr connect 2
+call to initiate connections.
+.Pp
+L2CAP sockets support
+.Dq "wildcard addressing" .
+In this case, socket must be bound to
+.Dv NG_HCI_BDADDR_ANY
+address.
+Note that PSM (Protocol/Service Multiplexor) field is always required.
+Once a connection has been established, the socket's address is
+fixed by the peer entity's location.
+The address assigned to the socket is
+the address associated with the Bluetooth device through which packets are
+being transmitted and received, and PSM (Protocol/Service Multiplexor).
+.Pp
+L2CAP sockets support number of options defined at
+.Dv SOL_L2CAP
+level which can be set with
+.Xr setsockopt 2
+and tested with
+.Xr getsockopt 2 :
+.Bl -tag -width foo
+.It Dv SO_L2CAP_IMTU
+Get (set) maximum payload size the local socket is capable of accepting.
+.It Dv SO_L2CAP_OMTU
+Get maximum payload size the remote socket is capable of accepting.
+.It Dv SO_L2CAP_IFLOW
+Get incoming flow specification for the socket.
+.Bf -emphasis
+Not implemented.
+.Ef
+.It Dv SO_L2CAP_OFLOW
+Get (set) outgoing flow specification for the socket.
+.Bf -emphasis
+Not implemented.
+.Ef
+.It Dv SO_L2CAP_FLUSH
+Get (set) value of the flush timeout.
+.Bf -emphasis
+Not implemented.
+.Ef
+.El
+.Sh Dv BLUETOOTH_PROTO_RFCOMM Sh protocol
+The Bluetooth RFCOMM socket address is defined as follows:
+.Bd -literal -offset indent
+/* Bluetooth version of struct sockaddr for RFCOMM sockets */
+struct sockaddr_rfcomm {
+ u_char rfcomm_len; /* total length */
+ u_char rfcomm_family; /* address family */
+ bdaddr_t rfcomm_bdaddr; /* address */
+ uint8_t rfcomm_channel; /* channel */
+};
+.Ed
+.Ss Dv SOCK_STREAM Ss RFCOMM sockets
+Note that RFCOMM sockets do not have associated Netgraph node type.
+RFCOMM sockets are implemented as additional layer on top of L2CAP sockets.
+RFCOMM sockets are either
+.Dq active
+or
+.Dq passive .
+Active sockets initiate connections to passive sockets.
+By default, RFCOMM sockets are created active; to create a passive socket, the
+.Xr listen 2
+system call must be used after binding the socket with the
+.Xr bind 2
+system call.
+Only passive sockets may use the
+.Xr accept 2
+call to accept incoming connections.
+Only active sockets may use the
+.Xr connect 2
+call to initiate connections.
+.Pp
+RFCOMM sockets support
+.Dq "wildcard addressing" .
+In this case, socket must be bound to
+.Dv NG_HCI_BDADDR_ANY
+address.
+Note that RFCOMM channel field is always required.
+Once a connection has been established, the socket's address is fixed by the
+peer entity's location.
+The address assigned to the socket is the address associated with the
+Bluetooth device through which packets are being transmitted and received,
+and RFCOMM channel.
+.Pp
+The following options, which can be tested with
+.Xr getsockopt 2
+call, are defined at
+.Dv SOL_RFCOMM
+level for RFCOMM sockets:
+.Bl -tag -width foo
+.It Dv SO_RFCOMM_MTU
+Returns the maximum transfer unit size (in bytes) for the underlying RFCOMM
+channel.
+Note that application still can write/read bigger chunks to/from the socket.
+.It Dv SO_RFCOMM_FC_INFO
+Return the flow control information for the underlying RFCOMM channel.
+.El
+.Pp
+The
+.Va net.bluetooth.rfcomm.sockets.stream.timeout
+variable, that can be examined and set via
+.Xr sysctl 8 ,
+controls the connection timeout (in seconds) for RFCOMM sockets.
+.Sh HOOKS
+These node types support hooks with arbitrary names (as long as they are
+unique) and always accept hook connection requests.
+.Sh NETGRAPH CONTROL MESSAGES
+These node types support the generic control messages.
+.Sh SHUTDOWN
+These nodes are persistent and cannot be shut down.
+.Sh SEE ALSO
+.Xr btsockstat 1 ,
+.Xr socket 2 ,
+.Xr netgraph 4 ,
+.Xr ng_bluetooth 4 ,
+.Xr ng_hci 4 ,
+.Xr ng_l2cap 4 ,
+.Xr ngctl 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+module was implemented in
+.Fx 5.0 .
+.Sh AUTHORS
+.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
+.Sh BUGS
+Most likely.
+Please report if found.
diff --git a/share/man/man4/ng_car.4 b/share/man/man4/ng_car.4
new file mode 100644
index 0000000..348b03d
--- /dev/null
+++ b/share/man/man4/ng_car.4
@@ -0,0 +1,214 @@
+.\" Copyright (c) 2005 Nuno Antunes <nuno.antunes@gmail.com>
+.\" Copyright (c) 2007 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 13, 2012
+.Dt NG_CAR 4
+.Os
+.Sh NAME
+.Nm ng_car
+.Nd Committed Access Rate netgraph node type
+.Sh SYNOPSIS
+.In netgraph/ng_car.h
+.Sh DESCRIPTION
+The
+.Nm car
+node type limits traffic flowing through it using:
+.Pp
+.Bl -bullet -compact
+.It
+Single rate three color marker as described in RFC 2697,
+.It
+Two rate three color marker as described in RFC 2698,
+.It
+RED-like rate limit algorithm used by Cisco,
+.It
+Traffic shaping with RED.
+.El
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va upper"
+.It Va upper
+Hook leading to upper layer protocols.
+.It Va lower
+Hook leading to lower layer protocols.
+.El
+.Pp
+Traffic flowing from
+.Va upper
+to
+.Va lower
+is considered
+.Sy downstream
+traffic.
+Traffic flowing from
+.Va lower
+to
+.Va upper
+is considered
+.Sy upstream
+traffic.
+.Sh MODES OF OPERATION
+Each hook can operate in one of the following modes:
+.Bl -tag -width foo
+.It Dv NG_CAR_SINGLE_RATE
+Single rate three color marker as described in RFC 2697.
+Committed burst packets are counted as green, extended burst packets are
+counted as yellow and exceeding packets are counted as red.
+Committed burst getting refilled with CIR (Committed Information Rate) speed.
+When it is full, exceeded burst getting refilled.
+.It Dv NG_CAR_DOUBLE_RATE
+Two rate three color marker as described in RFC 2698.
+Committed burst packets are counted as green, peak burst packets are counted
+as yellow and exceeding packets are counted as red.
+Committed burst getting refilled with CIR speed.
+Peak burst getting refilled with PIR (Peak Information Rate) speed at the
+same time.
+.It Dv NG_CAR_RED
+Similar to
+.Dv NG_CAR_SINGLE_RATE ,
+but with different understanding of extended burst.
+When normal burst exceeded and extended burst is used, packets are counted
+red with probability equal to part of extended burst consumed.
+Extended burst getting refilled first.
+When it is full, committed burst getting refilled.
+This behavior is similar to RED active queue management algorithm.
+.Pp
+This algorithm is more polite to the TCP traffic than NG_CAR_SINGLE_RATE.
+.It Dv NG_CAR_SHAPE
+Committed burst packets are counted as green, exceeding packets are delayed
+by queue with RED management and counted as yellow.
+Packets dropped by queue counted as red.
+Queue parameters are hardcoded: length 99 packets, min_th 8 packets, max_p 100%.
+.Pp
+Traffic shaping is much more polite to the TCP traffic than rate limit on
+links with bandwidth * delay product less than 6-8 TCP segments, but it
+consumes additional system resources for queue processing.
+.El
+By default, all information rates are measured in bits per second and bursts
+are measured in bytes. But when NG_CAR_COUNT_PACKETS option is enabled,
+rates are measured in packets per second and bursts are in packets.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages and the following
+specific messages.
+.Bl -tag -width foo
+.It Dv NGM_CAR_SET_CONF Pq Ic setconf
+Set node configuration to the specified at
+.Vt "struct ng_car_bulkconf"
+.It Dv NGM_CAR_GET_CONF Pq Ic getconf
+Return current node configuration as
+.Vt "struct ng_car_bulkconf"
+.Bd -literal
+struct ng_car_hookconf {
+ uint64_t cbs; /* Commited burst size (bytes) */
+ uint64_t ebs; /* Exceeded/Peak burst size (bytes) */
+ uint64_t cir; /* Commited information rate (bits/s) */
+ uint64_t pir; /* Peak information rate (bits/s) */
+ uint8_t green_action; /* Action for green packets */
+ uint8_t yellow_action; /* Action for yellow packets */
+ uint8_t red_action; /* Action for red packets */
+ uint8_t mode; /* single/double rate, ... */
+ uint8_t opt; /* color-aware or color-blind */
+};
+
+/* possible actions (..._action) */
+enum {
+ NG_CAR_ACTION_FORWARD = 1,
+ NG_CAR_ACTION_DROP
+};
+
+/* operation modes (mode) */
+enum {
+ NG_CAR_SINGLE_RATE = 0,
+ NG_CAR_DOUBLE_RATE,
+ NG_CAR_RED,
+ NG_CAR_SHAPE
+};
+
+/* mode options (opt) */
+#define NG_CAR_COUNT_PACKETS 2
+
+struct ng_car_bulkconf {
+ struct ng_car_hookconf upstream;
+ struct ng_car_hookconf downstream;
+};
+.Ed
+.It Dv NGM_CAR_GET_STATS Pq Ic getstats
+Return node statistics as
+.Vt "struct ng_car_bulkstats"
+.Bd -literal
+struct ng_car_hookstats {
+ uint64_t passed_pkts; /* Counter for passed packets */
+ uint64_t droped_pkts; /* Counter for droped packets */
+ uint64_t green_pkts; /* Counter for green packets */
+ uint64_t yellow_pkts; /* Counter for yellow packets */
+ uint64_t red_pkts; /* Counter for red packets */
+ uint64_t errors; /* Counter for operation errors */
+};
+
+struct ng_car_bulkstats {
+ struct ng_car_hookstats upstream;
+ struct ng_car_hookstats downstream;
+};
+.Ed
+.It Dv NGM_CAR_CLR_STATS Pq Ic clrstats
+Clear node statistics.
+.It Dv NGM_CAR_GETCLR_STATS Pq Ic getclrstats
+Atomically return and clear node statistics.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh EXAMPLES
+Limit outgoing data rate over fxp0 Ethernet interface to 20Mbit/s
+and incoming packet rate to 5000pps.
+.Bd -literal -offset indent
+/usr/sbin/ngctl -f- <<-SEQ
+ mkpeer fxp0: car lower lower
+ name fxp0:lower fxp0_car
+ connect fxp0: fxp0_car: upper upper
+ msg fxp0_car: setconf { downstream={ cir=20000000 cbs=2500000 ebs=2500000 greenAction=1 yellowAction=1 redAction=2 mode=2 } upstream={ cir=5000 cbs=100 ebs=100 greenAction=1 yellowAction=1 redAction=2 mode=2 opt=2 } }
+SEQ
+.Ed
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ngctl 8
+.Rs
+.%A J. Heinanen
+.%T "A Single Rate Three Color Marker"
+.%O RFC 2697
+.Re
+.Rs
+.%A J. Heinanen
+.%T "A Two Rate Three Color Marker"
+.%O RFC 2698
+.Re
+.Sh AUTHORS
+.An Nuno Antunes Aq nuno.antunes@gmail.com
+.An Alexander Motin Aq mav@FreeBSD.org
+.Sh BUGS
+At this moment only DROP and FORWARD actions are implemented.
diff --git a/share/man/man4/ng_ccatm.4 b/share/man/man4/ng_ccatm.4
new file mode 100644
index 0000000..c3a0df4
--- /dev/null
+++ b/share/man/man4/ng_ccatm.4
@@ -0,0 +1,323 @@
+.\"
+.\" Copyright (c) 2001-2004
+.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
+.\" All rights reserved.
+.\" Copyright (c) 2005
+.\" Hartmut Brandt.
+.\" All rights reserved.
+.\"
+.\" Author: Harti Brandt <harti@FreeBSD.org>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 10, 2005
+.Dt NG_CCATM 4
+.Os
+.Sh NAME
+.Nm ng_ccatm
+.Nd "ATM Call Control netgraph node type"
+.Sh SYNOPSIS
+.In netnatm/unimsg.h
+.In netnatm/msg/unistruct.h
+.In netnatm/sig/unidef.h
+.In netnatm/api/unisap.h
+.In netnatm/api/atmapi.h
+.In netnatm/api/ccatm.h
+.In netgraph.h
+.In netgraph/ng_uni.h
+.In netgraph/ng_ccatm.h
+.Sh DESCRIPTION
+The
+.Nm
+node implements the API specified by the ATM Forum for access to ATM services
+(see ATM-Forum document
+.Pa af-saa-0108 ) .
+This document specifies the semantics
+of the API, not the exact language binding.
+For this reason, it is expected that
+this implementation is neither compile-time nor binary compatible with
+other implementations of this API.
+It should, however, be fairly straightforward
+to convert between different API implementations.
+.Pp
+This node is usually stacked on top of one or more UNI nodes (see
+.Xr ng_uni 4 ) .
+Each of these hooks appears as a
+.Dq port
+to the user of the node.
+It also has one hook connected to the ILMI daemon for management purposes.
+.Pp
+The node is removed when it receives a
+.Dv NGM_SHUTDOWN
+messages or when all hooks are disconnected.
+.Sh HOOKS
+The node understands a number of hooks with predefined names and an
+unlimited number of hooks for user connections.
+The predefined names are:
+.Bl -tag -width ".Va orphans"
+.It Va uni Ns Ar NNN
+These hooks stack the
+.Nm
+node on top of a UNI stack.
+The node expects the interface on these hooks
+to conform to the upper interface specified in
+.Xr ng_uni 4 .
+These hooks are forced into queuing mode, so that there are no circular
+calls from call control to UNI and UNI back to call control.
+The
+.Ar NNN
+in the hook name is the decimal port number and should not be zero.
+The port number is a 32-bit unsigned integer.
+.It Va manage
+This hook should be connected to the ILMI daemon.
+No data is ever sent on this hook and all received data is discarded.
+The hook is used to send control messages along.
+.It Va dump
+On receipt of a
+.Dv NGM_CCATM_DUMP
+command a textual description of the current state of the node is sent
+out of this hook.
+This text is sent as one large message consisting of more
+than one
+.Vt mbuf .
+.El
+.Pp
+All other hook names are taken to be user hooks and correspond to an
+ATM endpoint as specified in the ATM Forum document.
+The interface on these hooks is defined in
+.In atmapi.h
+and uses a structure
+.Bd -literal
+struct ccatm_op {
+ uint32_t op; /* request code */
+ u_char data[]; /* optional data */
+};
+.Ed
+.Pp
+This structure is followed directly by the data for the operation.
+The opcode is one of the following:
+.Bd -literal
+enum atmop {
+ ATMOP_RESP,
+ ATMOP_ABORT_CONNECTION,
+ ATMOP_ACCEPT_INCOMING_CALL,
+ ATMOP_ADD_PARTY,
+ ATMOP_ADD_PARTY_REJECT,
+ ATMOP_ADD_PARTY_SUCCESS,
+ ATMOP_ARRIVAL_OF_INCOMING_CALL,
+ ATMOP_CALL_RELEASE,
+ ATMOP_CONNECT_OUTGOING_CALL,
+ ATMOP_DROP_PARTY,
+ ATMOP_GET_LOCAL_PORT_INFO,
+ ATMOP_P2MP_CALL_ACTIVE,
+ ATMOP_P2P_CALL_ACTIVE,
+ ATMOP_PREPARE_INCOMING_CALL,
+ ATMOP_PREPARE_OUTGOING_CALL,
+ ATMOP_QUERY_CONNECTION_ATTRIBUTES,
+ ATMOP_REJECT_INCOMING_CALL,
+ ATMOP_SET_CONNECTION_ATTRIBUTES,
+ ATMOP_WAIT_ON_INCOMING_CALL,
+ ATMOP_SET_CONNECTION_ATTRIBUTES_X,
+ ATMOP_QUERY_CONNECTION_ATTRIBUTES_X,
+ ATMOP_QUERY_STATE
+};
+.Ed
+.Pp
+These codes correspond directly to the operations specified in the ATM
+Forum document with the following exceptions:
+.Bl -tag -width foo
+.It Dv ATMOP_RESP
+As discussed in
+.Xr ng_uni 4 ,
+this is used to
+.Dq synchronify
+the interface.
+The argument is a
+.Bd -literal
+struct atm_resp {
+ int32_t resp;
+ uint32_t data; /* type of attached data */
+};
+.Ed
+.Pp
+If the response code
+.Va resp
+is zero, the node has accepted the user request.
+If something goes wrong,
+.Va resp
+contains an error code.
+For requests that return data,
+.Va data
+contains a code describing the type of data and the data itself
+starts immediately after the structure.
+.It Dv ATMOP_QUERY_CONNECTION_ATTRIBUTES_X
+This is the same as
+.Dv ATMOP_QUERY_CONNECTION_ATTRIBUTES
+except that it allows to query several attributes
+within one request.
+.It Dv ATMOP_SET_CONNECTION_ATTRIBUTES_X
+This is the same as
+.Dv ATMOP_SET_CONNECTION_ATTRIBUTES
+except that it allows to set several attributes
+within one request.
+The list of attributes is followed directly by the attributes in the same
+order as they appear in the list.
+.El
+.Pp
+If a user hook is disconnected, an active connection on that hook is released.
+Incoming connections waiting to be accepted are reoffered to other
+listening hooks or rejected.
+.Sh CONTROL MESSAGES
+Besides the generic messages the node understands the following special
+messages:
+.Bl -tag -width foo
+.It Dv NGM_CCATM_DUMP Pq Ic dump
+This causes the internal state of the node to be dumped in ASCII to the
+.Va dump
+hook.
+.It Dv NGM_CCATM_STOP Pq Ic stop
+This message causes all connections on that port to be aborted (not released!\&)
+and all ATM endpoints which are bound to that port to be closed.
+It stops processing of all messages from the UNI stack on that port UNI stack.
+The argument is a
+.Bd -literal
+struct ngm_ccatm_port {
+ uint32_t port;
+};
+.Ed
+.It Dv NGM_CCATM_START Pq Ic start
+Start processing on the port.
+The argument is a
+.Vt ngm_ccatm_port
+structure.
+.It Dv NGM_CCATM_CLEAR Pq Ic clear
+This message takes a
+.Vt ngm_ccatm_port
+structure and clears all prefixes and addresses on that port.
+If the port number is zero, all ports are cleared.
+.It Dv NGM_CCATM_GET_ADDRESSES Pq Ic get_addresses
+Get the list of all registered addresses on the given port.
+The argument is a
+.Vt ngm_ccatm_port
+structure and the result is a
+.Vt ngm_ccatm_get_addresses
+structure:
+.Bd -literal
+struct ngm_ccatm_get_addresses {
+ uint32_t count;
+ struct ngm_ccatm_address_req addr[0];
+};
+struct ngm_ccatm_address_req {
+ uint32_t port;
+ struct uni_addr addr;
+};
+.Ed
+.Pp
+If the
+.Va port
+field is zero in the request, all addresses on all ports
+are returned.
+If it is not zero, only the addresses on that port are reported.
+The number of addresses is returned in the
+.Va count
+field.
+.It Dv NGM_CCATM_ADDRESS_REGISTERED Pq Ic address_reg
+This message is used by ILMI to inform the
+.Nm
+node that a previous address registration request was successful.
+This causes the node to activate that address.
+The argument to the message is a
+.Vt ngm_ccatm_address_req
+structure.
+.It Dv NGM_CCATM_ADDRESS_UNREGISTERED Pq Ic address_unreg
+This message is used by ILMI to inform the
+.Nm
+node that an address has been unregistered.
+The node clears that address from its tables.
+The argument is a
+.Vt ngm_ccatm_address_req
+structure.
+.It Dv NGM_CCATM_SET_PORT_PARAM Pq Ic set_port_param
+This request sets the parameters on the given port.
+The argument is a
+.Bd -literal
+struct ngm_ccatm_atm_port {
+ uint32_t port; /* port for which to set parameters */
+ uint32_t pcr; /* port peak cell rate */
+ uint32_t max_vpi_bits;
+ uint32_t max_vci_bits;
+ uint32_t max_svpc_vpi;
+ uint32_t max_svcc_vpi;
+ uint32_t min_svcc_vci;
+ uint8_t esi[6];
+ uint32_t num_addr;
+};
+.Ed
+.Pp
+This should be used only by ILMI and when that port is stopped and the
+address and prefix tables of that port are empty.
+The
+.Va num_addr
+field is ignored.
+.It Dv NGM_CCATM_GET_PORT_PARAM Pq Ic get_port_param
+Retrieve the parameters of the given port.
+The argument is a
+.Vt ngm_ccatm_port
+and the result a
+.Vt ngm_ccatm_atm_port .
+.It Dv NGM_CCATM_GET_PORTLIST Pq Ic get_portlist
+Get a list of all available ports on that node.
+This is returned as a
+.Bd -literal
+struct ngm_ccatm_portlist {
+ uint32_t nports;
+ uint32_t ports[];
+};
+.Ed
+.It Dv NGM_CCATM_GETSTATE Pq Ic getstate
+Return the state of a port.
+The argument is a
+.Vt "struct ngm_ccatm_port"
+and the return values as a
+.Vt uint32_t .
+.It Dv NGM_CCATM_SETLOG Pq Ic setlog
+This requests sets a new logging level and returns the previous one.
+The argument is either a
+.Vt uint32_t
+in which case it specifies the new logging level, or may be empty
+in which case just the old level is returned as a
+.Vt uint32_t .
+.It Dv NGM_CCATM_RESET Pq Ic reset
+Reset the node.
+This is allowed only if the number of user hooks and connected UNI stacks is
+zero.
+.It Dv NGM_CCATM_GET_EXSTAT
+Return extended status information from the node.
+.El
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_uni 4 ,
+.Xr ngctl 8
+.Sh AUTHORS
+.An Harti Brandt Aq harti@FreeBSD.org
diff --git a/share/man/man4/ng_cisco.4 b/share/man/man4/ng_cisco.4
new file mode 100644
index 0000000..143ecdb
--- /dev/null
+++ b/share/man/man4/ng_cisco.4
@@ -0,0 +1,184 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_cisco.8,v 1.5 1999/01/25 23:46:26 archie Exp $
+.\"
+.Dd January 19, 1999
+.Dt NG_CISCO 4
+.Os
+.Sh NAME
+.Nm ng_cisco
+.Nd Cisco HDLC protocol netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netinet/in.h
+.In netgraph/ng_cisco.h
+.Sh DESCRIPTION
+The
+.Nm cisco
+node type performs encapsulation and de-encapsulation of packets
+using the Cisco HDLC protocol.
+This is a fairly simple
+protocol for the transmission of packets across
+high speed synchronous lines.
+Each packet is prepended with
+an Ethertype, indicating the protocol.
+There is also a
+.Dq keep alive
+and an
+.Dq inquire
+capability.
+.Pp
+The
+.Dv downstream
+hook should connect to the synchronous line.
+On the other side
+of the node are the
+.Dv inet ,
+.Dv inet6 ,
+.Dv atalk ,
+and
+.Dv ipx
+hooks, which transmit and receive raw IP, IPv6, AppleTalk, and IPX packets,
+respectively.
+Typically these hooks would connect to the corresponding
+hooks on an
+.Xr ng_iface 4
+type node.
+.Sh IP Configuration
+In order to function properly for IP traffic, the node must be informed
+of the local IP address and netmask setting.
+This is because the protocol
+includes an
+.Dq inquire
+packet which we must be prepared to answer.
+There are two ways to accomplish this, manually and automatically.
+.Pp
+Whenever such an inquire packet is received, the node sends a
+.Dv NGM_CISCO_GET_IPADDR
+control message to the peer node connected to the
+.Dv inet
+hook (if any).
+If the peer responds, then that response is used.
+This is the automatic method.
+.Pp
+If the peer does not respond, the node falls back on its cached value
+for the IP address and netmask.
+This cached value can be set at any time
+with a
+.Dv NGM_CISCO_SET_IPADDR
+message, and this is the manual method.
+.Pp
+If the
+.Dv inet
+hook is connected to the
+.Dv inet
+hook of an
+.Xr ng_iface 4
+node, as is usually the case, then configuration is automatic as the
+.Xr ng_iface 4
+understands the
+.Dv NGM_CISCO_GET_IPADDR
+message.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va downstream"
+.It Va downstream
+The connection to the synchronous line.
+.It Va inet
+IP hook.
+.It Va inet6
+IPv6 hook.
+.It Va atalk
+AppleTalk hook.
+.It Va ipx
+IPX hook.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_CISCO_SET_IPADDR Pq Ic setipaddr
+This command takes an array of two
+.Dv "struct in_addr"
+arguments.
+The first is the IP address of the corresponding interface
+and the second is the netmask.
+.It Dv NGM_CISCO_GET_IPADDR Pq Ic getipaddr
+This command returns the IP configuration in the same format used by
+.Dv NGM_CISCO_SET_IPADDR .
+This command is also
+.Em sent
+by this node type to the
+.Dv inet
+peer whenever an IP address inquiry packet is received.
+.It Dv NGM_CISCO_GET_STATUS Pq Ic getstats
+Returns a
+.Dv "struct ngciscostat" :
+.Bd -literal -offset 4n
+struct ngciscostat {
+ uint32_t seqRetries; /* # unack'd retries */
+ uint32_t keepAlivePeriod; /* in seconds */
+};
+.Ed
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_iface 4 ,
+.Xr ngctl 8
+.Rs
+.%A D. Perkins
+.%T "Requirements for an Internet Standard Point-to-Point Protocol"
+.%O RFC 1547
+.Re
+.Sh LEGAL
+.Tn Cisco
+is a trademark of Cisco Systems, Inc.
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org ,
+.An Archie Cobbs Aq archie@FreeBSD.org
+.Sh BUGS
+Not all of the functionality has been implemented.
+For example,
+the node does not support querying the remote end for its IP address
+and netmask.
diff --git a/share/man/man4/ng_deflate.4 b/share/man/man4/ng_deflate.4
new file mode 100644
index 0000000..dbf3c56
--- /dev/null
+++ b/share/man/man4/ng_deflate.4
@@ -0,0 +1,158 @@
+.\"
+.\" Author: Alexander Motin <mav@alkar.net>
+.\"
+.\" Copyright (c) 2006, Alexander Motin <mav@alkar.net>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice unmodified, this list of conditions, and the following
+.\" disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 23, 2006
+.Dt NG_DEFLATE 4
+.Os
+.Sh NAME
+.Nm ng_deflate
+.Nd Deflate PPP compression (RFC 1979) netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_deflate.h
+.Sh DESCRIPTION
+The
+.Nm deflate
+node type implements the Deflate sub-protocols of the Compression Control
+Protocol (CCP).
+.Pp
+The node has two hooks,
+.Va comp
+for compression and
+.Va decomp
+for decompression.
+Only one of them can be connected at the same time, specifying node's
+operation mode.
+Typically that hooks would be connected to the
+.Xr ng_ppp 4
+node type hook of the same name.
+Corresponding
+.Xr ng_ppp 4
+node hook must be switched to
+.Dv NG_PPP_DECOMPRESS_FULL
+mode to permit sending uncompressed frames.
+.Sh HOOKS
+This node type supports the following hooks:
+.Pp
+.Bl -tag -compact -width ".Va decomp"
+.It Va comp
+Connection to
+.Xr ng_ppp 4
+.Va comp
+hook.
+Incoming frames are compressed (if possible) and sent back out the same hook.
+.It Va decomp
+Connection to
+.Xr ng_ppp 4
+.Va decomp
+hook.
+Incoming frames are decompressed (if they are compressed), and sent
+back out the same hook.
+.El
+.Pp
+Only one hook can be connected at the same time, specifying node's
+operation mode.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_DEFLATE_CONFIG Pq Ic config
+This command resets and configures the node for a session
+(i.e., for compression or decompression).
+This command takes a
+.Vt "struct ng_deflate_config"
+as an argument:
+.Bd -literal -offset 0n
+struct ng_deflate_config {
+ u_char enable; /* node enabled */
+ u_char windowBits; /* log2(Window size) */
+};
+.Ed
+The
+.Fa enabled
+field enables traffic flow through the node.
+The
+.Fa windowBits
+specify compression windows size as negotiated by the
+Compression Control Protocol (CCP) in PPP.
+.It Dv NGM_DEFLATE_RESETREQ Pq Ic resetreq
+This message contains no arguments, and is bi-directional.
+If an error is detected during decompression, this message is sent by the
+node to the originator of the
+.Dv NGM_DEFLATE_CONFIG
+message that initiated the session.
+The receiver should respond by sending a PPP CCP Reset-Request to the peer.
+.Pp
+This message may also be received by this node type when a CCP Reset-Request
+or Reset-Ack is received by the local PPP entity.
+The node will respond by flushing its compression state so the sides
+can resynchronize.
+.It Dv NGM_DEFLATE_GET_STATS Pq Ic getstats
+This control message obtains statistics for a given hook.
+The statistics are returned in
+.Vt "struct ng_deflate_stats" :
+.Bd -literal
+struct ng_deflate_stats {
+ uint64_t FramesPlain;
+ uint64_t FramesComp;
+ uint64_t FramesUncomp;
+ uint64_t InOctets;
+ uint64_t OutOctets;
+ uint64_t Errors;
+};
+.Ed
+.It Dv NGM_DEFLATE_CLR_STATS Pq Ic clrstats
+This control message clears statistics for a given hook.
+.It Dv NGM_DEFLATE_GETCLR_STATS Pq Ic getclrstats
+This control message obtains and clears statistics for a given hook.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when hook have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_ppp 4 ,
+.Xr ngctl 8
+.Rs
+.%A J. Woods
+.%T "PPP Deflate Protocol"
+.%O RFC 1979
+.Re
+.Rs
+.%A W. Simpson
+.%T "The Point-to-Point Protocol (PPP)"
+.%O RFC 1661
+.Re
+.Sh AUTHORS
+.An Alexander Motin Aq mav@alkar.net
+.Sh BUGS
+Due to nature of netgraph PPP implementation there are possible race conditions
+between data packet and ResetAck CCP packet in case of packet loss. As result,
+packet loss can produce bigger performance degradation than supposed by protocol.
diff --git a/share/man/man4/ng_device.4 b/share/man/man4/ng_device.4
new file mode 100644
index 0000000..a03a03b
--- /dev/null
+++ b/share/man/man4/ng_device.4
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2002 Mark Santcroos <marks@ripe.net>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 19, 2004
+.Dt NG_DEVICE 4
+.Os
+.Sh NAME
+.Nm ng_device
+.Nd device netgraph node type
+.Sh SYNOPSIS
+.In netgraph/ng_device.h
+.Sh DESCRIPTION
+A
+.Nm device
+node is both a netgraph node and a system device interface.
+When a
+.Nm device
+node is created, a new device entry appears which is accessible via the
+regular file operators such as
+.Xr open 2 ,
+.Xr close 2 ,
+.Xr read 2 ,
+.Xr write 2 ,
+etc.
+.Pp
+The first node is created as
+.Pa /dev/ngd0 ,
+all subsequent nodes
+.Pa /dev/ngd1 , /dev/ngd2 ,
+etc.
+.Sh HOOKS
+A
+.Nm device
+node has a single hook with an arbitrary name.
+All data coming in over the hook will be presented to the device
+for
+.Xr read 2 .
+All data coming in from the device entry by
+.Xr write 2
+will be forwarded to the hook.
+.Sh CONTROL MESSAGES
+The
+.Nm device
+node supports one non-generic control message:
+.Bl -tag -width 3n
+.It Dv NGM_DEVICE_GET_DEVNAME
+Returns device name corresponding to a node.
+.El
+.\" Additionally, the node accepts
+.\" .Xr ioctl 2 Ns s
+.\" from the device entry.
+.\" These will be encapsulated into
+.\" .Xr netgraph 4
+.\" messages and send out to the hook.
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or upon hook disconnection.
+The associated device entry is removed and becomes available
+for use by future
+.Nm device
+nodes.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm device
+node type was first implemented in
+.Fx 5.0 .
+.Sh AUTHORS
+.An Mark Santcroos Aq marks@ripe.net
+.An Gleb Smirnoff Aq glebius@FreeBSD.org
diff --git a/share/man/man4/ng_echo.4 b/share/man/man4/ng_echo.4
new file mode 100644
index 0000000..f502c62
--- /dev/null
+++ b/share/man/man4/ng_echo.4
@@ -0,0 +1,73 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_echo.8,v 1.4 1999/01/25 23:46:26 archie Exp $
+.\"
+.Dd January 19, 1999
+.Dt NG_ECHO 4
+.Os
+.Sh NAME
+.Nm ng_echo
+.Nd netgraph echo node type
+.Sh SYNOPSIS
+.In netgraph/ng_echo.h
+.Sh DESCRIPTION
+The
+.Nm echo
+node type reflects all data and control messages back to the sender.
+This node type is used for testing and debugging.
+.Sh HOOKS
+A
+.Nm echo
+node accepts any request to connect, regardless of the hook name,
+as long as the name is unique.
+.Sh CONTROL MESSAGES
+This node type supports only the generic control messages.
+Any other control messages are reflected back to the sender.
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_hole 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org
diff --git a/share/man/man4/ng_eiface.4 b/share/man/man4/ng_eiface.4
new file mode 100644
index 0000000..d0d6f96
--- /dev/null
+++ b/share/man/man4/ng_eiface.4
@@ -0,0 +1,122 @@
+.\" Copyright (c) 2004 Gleb Smirnoff
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 3, 2005
+.Dt NG_EIFACE 4
+.Os
+.Sh NAME
+.Nm ng_eiface
+.Nd "generic Ethernet interface netgraph node type"
+.Sh SYNOPSIS
+.In netgraph/ng_eiface.h
+.Sh DESCRIPTION
+The
+.Vt eiface
+netgraph node implements the generic Ethernet interface.
+When
+.Vt eiface
+node is created, a new interface appears which is accessible via
+.Xr ifconfig 8 .
+These interfaces are named
+.Dq Li ngeth0 ,
+.Dq Li ngeth1 ,
+etc.
+When a node is shut down, the corresponding interface is removed,
+and the interface name becomes available for reuse by future
+.Vt eiface
+nodes.
+New nodes always take the first unused interface.
+.Sh HOOKS
+An
+.Vt eiface
+node has a single hook named
+.Va ether ,
+which should be connected to the
+Ethernet downstream, for example, to the
+.Xr ng_vlan 4
+node.
+Packets transmitted via the interface flow out this hook.
+Similarly, packets received on the hook go to the protocol stack as
+packets received by any real Ethernet interface.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_EIFACE_SET Pq Ic set
+Set link-level address of the interface.
+Requires
+.Vt "struct ether_addr"
+as an argument.
+This message also has an
+.Tn ASCII
+version, called
+.Dq Li set ,
+which requires as an argument an
+.Tn ASCII
+string consisting of 6 colon-separated hex digits.
+.It Dv NGM_EIFACE_GET_IFNAME Pq Ic getifname
+Return the name of the associated interface as a
+.Dv NUL Ns -terminated
+.Tn ASCII
+string.
+.It Dv NGM_EIFACE_GET_IFADDRS
+Return the list of link-level addresses associated with the node.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message.
+The associated interface is removed and its name becomes
+available for reuse by future
+.Vt eiface
+nodes.
+.Pp
+Unlike most other node types, an
+.Vt eiface
+node does
+.Em not
+go away when all hooks have been disconnected; rather, and explicit
+.Dv NGM_SHUTDOWN
+control message is required.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_ether 4 ,
+.Xr ng_iface 4 ,
+.Xr ng_vlan 4 ,
+.Xr ifconfig 8 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Vt eiface
+node type was implemented in
+.Fx 4.6 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Vt eiface
+node type was written by
+.An Vitaly V Belekhov .
+This manual page was written by
+.An Gleb Smirnoff .
diff --git a/share/man/man4/ng_etf.4 b/share/man/man4/ng_etf.4
new file mode 100644
index 0000000..a35f4fa
--- /dev/null
+++ b/share/man/man4/ng_etf.4
@@ -0,0 +1,154 @@
+.\"
+.\" Copyright (c) 2001, FreeBSD Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice unmodified, this list of conditions, and the following
+.\" disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 13, 2012
+.Dt NG_ETF 4
+.Os
+.Sh NAME
+.Nm ng_etf
+.Nd Ethertype filtering netgraph node type
+.Sh SYNOPSIS
+.In netgraph.h
+.In netgraph/ng_etf.h
+.Sh DESCRIPTION
+The
+.Nm etf
+node type multiplexes and filters data between hooks on the basis
+of the ethertype found in an Ethernet header, presumed to be in the
+first 14 bytes of the data.
+Incoming Ethernet frames are accepted on the
+.Em downstream
+hook and if the ethertype matches a value which the node has been configured
+to filter, the packet is forwarded out the hook which was identified
+at the time that value was configured.
+If it does not match a configured
+value, it is passed to the
+.Em nomatch
+hook.
+If the
+.Em nomatch
+hook is not connected, the packet is dropped.
+.Pp
+Packets travelling in the other direction (towards the
+.Em downstream
+hook) are also examined and filtered.
+If a packet has an ethertype that matches one of the values configured
+into the node, it must have arrived in on the hook for which that value
+was configured, otherwise it will be discarded.
+Ethertypes of values other
+than those configured by the control messages must have arrived via the
+.Em nomatch
+hook.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Aq Em any legal name"
+.It Em downstream
+Typically this hook would be connected to a
+.Xr ng_ether 4
+node, using the
+.Em lower
+hook.
+.It Em nomatch
+Typically this hook would also be connected to an
+.Xr ng_ether 4
+type node using the
+.Em upper
+hook.
+.It Aq Em "any legal name"
+Any other hook name will be accepted and can be used as the match target
+of an ethertype.
+Typically this hook would be attached to
+a protocol handling node that requires and generates packets
+with a particular set of ethertypes.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width 4n
+.It Dv NGM_ETF_GET_STATUS Pq Ic getstatus
+This command returns a
+.Vt "struct ng_etfstat"
+containing node statistics for packet counts.
+.It Dv NGM_ETF_SET_FILTER Pq Ic setfilter
+Sets the a new ethertype filter into the node and specifies the hook to and
+from which packets of that type should use.
+The hook and ethertype
+are specified in a structure of type
+.Vt "struct ng_etffilter" :
+.Bd -literal -offset 4n
+struct ng_etffilter {
+ char matchhook[NG_HOOKSIZ]; /* hook name */
+ uint16_t ethertype; /* this ethertype to this hook */
+};
+.Ed
+.El
+.Sh EXAMPLES
+Using
+.Xr ngctl 8
+it is possible to set a filter in place from the command line
+as follows:
+.Bd -literal -offset 4n
+#!/bin/sh
+ETHER_IF=fxp0
+MATCH1=0x834
+MATCH2=0x835
+cat <<DONE >/tmp/xwert
+# Make a new ethertype filter and attach to the Ethernet lower hook.
+# first remove left over bits from last time.
+shutdown ${ETHER_IF}:lower
+mkpeer ${ETHER_IF}: etf lower downstream
+# Give it a name to easily refer to it.
+name ${ETHER_IF}:lower etf
+# Connect the nomatch hook to the upper part of the same interface.
+# All unmatched packets will act as if the filter is not present.
+connect ${ETHER_IF}: etf: upper nomatch
+DONE
+ngctl -f /tmp/xwert
+
+# something to set a hook to catch packets and show them.
+echo "Unrecognised packets:"
+nghook -a etf: newproto &
+# Filter two random ethertypes to that hook.
+ngctl 'msg etf: setfilter { matchhook="newproto" ethertype=${MATCH1} }
+ngctl 'msg etf: setfilter { matchhook="newproto" ethertype=${MATCH2} }
+.Ed
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_ether 4 ,
+.Xr ngctl 8 ,
+.Xr nghook 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 5.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org
diff --git a/share/man/man4/ng_ether.4 b/share/man/man4/ng_ether.4
new file mode 100644
index 0000000..610a8af
--- /dev/null
+++ b/share/man/man4/ng_ether.4
@@ -0,0 +1,241 @@
+.\" Copyright (c) 2000 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 23, 2011
+.Dt NG_ETHER 4
+.Os
+.Sh NAME
+.Nm ng_ether
+.Nd Ethernet netgraph node type
+.Sh SYNOPSIS
+.In netgraph/ng_ether.h
+.Sh DESCRIPTION
+The
+.Nm ether
+netgraph node type allows Ethernet interfaces to interact with
+the
+.Xr netgraph 4
+networking subsystem.
+Once the
+.Nm
+module is loaded into the kernel, a node is automatically created
+for each Ethernet interface in the system.
+Each node will attempt to name itself with the same name
+as the associated interface.
+.Pp
+Three hooks are supported:
+.Va lower , upper ,
+and
+.Va orphans .
+The hook name
+.Va divert
+may be used as an alias for
+.Va lower ,
+and is provided for backward compatibility.
+In reality, the two names represent the same hook.
+.Pp
+The
+.Va lower
+hook is a connection to the raw Ethernet device.
+When connected, all incoming packets are forwarded to this hook,
+instead of being passed to the kernel for upper layer processing.
+Writing to this hook results in a raw Ethernet frame being transmitted
+by the device.
+Normal outgoing packets are not affected by
+.Va lower
+being connected.
+.Pp
+The
+.Va upper
+hook is a connection to the upper protocol layers.
+When connected, all outgoing packets are forwarded to this hook,
+instead of being transmitted by the device.
+Writing to this hook results in a raw Ethernet frame being received by
+the kernel just as if it had come in over the wire.
+Normal incoming packets are not affected by
+.Va upper
+being connected.
+.Pp
+The
+.Va orphans
+hook is equivalent to
+.Va lower ,
+except that only unrecognized packets (that would otherwise be discarded)
+are written to the hook, while other normal incoming traffic is unaffected.
+Unrecognized packets written to
+.Va upper
+will be forwarded back out to
+.Va orphans
+if connected.
+.Pp
+In all cases, frames are raw Ethernet frames with the standard
+14 byte Ethernet header (but no checksum).
+.Pp
+When no hooks are connected,
+.Va upper
+and
+.Va lower
+are in effect connected together,
+so that packets flow normally upwards and downwards.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va orphans"
+.It Va lower
+Connection to the lower device link layer.
+.It Va upper
+Connection to the upper protocol layers.
+.It Va orphans
+Like
+.Va lower ,
+but only receives unrecognized packets.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_ETHER_GET_IFNAME Pq Ic getifname
+Returns the name of the associated interface as a
+.Dv NUL Ns -terminated
+.Tn ASCII
+string.
+Normally this is the same as the name of the node.
+.It Dv NGM_ETHER_GET_IFINDEX Pq Ic getifindex
+Returns the global index of the associated interface as a 32 bit integer.
+.It Dv NGM_ETHER_GET_ENADDR Pq Ic getenaddr
+Returns the device's unique six byte Ethernet address.
+.It Dv NGM_ETHER_SET_ENADDR Pq Ic setenaddr
+Sets the device's unique six byte Ethernet address.
+This control message is equivalent to using the
+.Dv SIOCSIFLLADDR
+.Xr ioctl 2
+system call.
+.It Dv NGM_ETHER_SET_PROMISC Pq Ic setpromisc
+Enable or disable promiscuous mode.
+This message includes a single 32 bit integer flag that enables or
+disables promiscuous mode on the interface.
+Any non-zero value enables promiscuous mode.
+.It Dv NGM_ETHER_GET_PROMISC Pq Ic getpromisc
+Get the current value of the node's promiscuous flag.
+The returned value is always either one or zero.
+Note that this flag reflects the node's own promiscuous setting
+and does not necessarily reflect the promiscuous state of the actual
+interface, which can be affected by other means (e.g.,
+.Xr bpf 4 ) .
+.It Dv NGM_ETHER_SET_AUTOSRC Pq Ic setautosrc
+Sets the automatic source address override flag.
+This message includes a single 32 bit integer flag that causes
+all outgoing packets to have their source Ethernet
+address field overwritten with the device's unique Ethernet address.
+If this flag is set to zero, the source address in outgoing packets
+is not modified.
+The default setting for this flag is disabled.
+.It Dv NGM_ETHER_GET_AUTOSRC Pq Ic getautosrc
+Get the current value of the node's source address override flag.
+The returned value is always either one or zero.
+.It Dv NGM_ETHER_ADD_MULTI Pq Ic addmulti
+Join Ethernet multicast group.
+This control message is equivalent to using the
+.Dv SIOCADDMULTI
+.Xr ioctl 2
+system call.
+.It Dv NGM_ETHER_DEL_MULTI Pq Ic delmulti
+Leave Ethernet multicast group.
+This control message is equivalent to using the
+.Dv SIOCDELMULTI
+.Xr ioctl 2
+system call.
+.It Dv NGM_ETHER_DETACH Pq Ic detach
+Detach from underlying Ethernet interface and shut down node.
+.El
+.Sh SHUTDOWN
+Upon receipt of the
+.Dv NGM_SHUTDOWN
+control message, all hooks are disconnected, promiscuous mode is disabled,
+but the node is not removed.
+Node can be shut down only using
+.Dv NGM_ETHER_DETACH
+control message.
+If the interface itself is detached (e.g., because of PC Card removal), the
+node disappears as well.
+.Sh EXAMPLES
+This command dumps all unrecognized packets received by the
+.Dq Li fxp0
+interface to standard output decoded in hex and
+.Tn ASCII :
+.Pp
+.Dl "nghook -a fxp0: orphans"
+.Pp
+This command sends the contents of
+.Pa sample.pkt
+out the interface
+.Dq Li fxp0 :
+.Pp
+.Dl "cat sample.pkt | nghook fxp0: orphans"
+.Pp
+These commands insert an
+.Xr ng_tee 4
+node between the
+.Va lower
+and
+.Va upper
+protocol layers, which can be used for
+tracing packet flow, statistics, etc.:
+.Bd -literal -offset indent
+ngctl mkpeer fxp0: tee lower right
+ngctl connect fxp0: lower upper left
+.Ed
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netgraph 4 ,
+.Xr netintro 4 ,
+.Xr ifconfig 8 ,
+.Xr ngctl 8 ,
+.Xr nghook 8
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org
+.An Archie Cobbs Aq archie@FreeBSD.org
+.Sh BUGS
+The automatic KLD module loading mechanism that works for most
+other Netgraph node types does not work for the
+.Nm ether
+node type,
+because
+.Nm ether
+nodes are not created on demand; instead, they are created when
+Ethernet interfaces are attached or when the KLD is first loaded.
+Therefore, if the KLD is not statically compiled into the kernel,
+it is necessary to load the KLD manually in order to bring the
+.Nm ether
+nodes into existence.
diff --git a/share/man/man4/ng_ether_echo.4 b/share/man/man4/ng_ether_echo.4
new file mode 100644
index 0000000..2f9dd38
--- /dev/null
+++ b/share/man/man4/ng_ether_echo.4
@@ -0,0 +1,77 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_echo.8,v 1.4 1999/01/25 23:46:26 archie Exp $
+.\"
+.Dd December 24, 2008
+.Dt NG_ETHER_ECHO 4
+.Os
+.Sh NAME
+.Nm ng_ether_echo
+.Nd netgraph ether_echo node type
+.Sh SYNOPSIS
+.In netgraph/ng_ether_echo.h
+.Sh DESCRIPTION
+The
+.Nm ether_echo
+node type reflects all data and control messages back to the sender.
+It assumes (and does not check) that the packet is an ethernet frame,
+and swaps the source and destination addresses before echoing it.
+This node type is used for testing and debugging.
+.Sh HOOKS
+A
+.Nm ether_echo
+node accepts any request to connect, regardless of the hook name,
+as long as the name is unique.
+.Sh CONTROL MESSAGES
+This node type supports only the generic control messages.
+Any other control messages are reflected back to the sender.
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_hole 4 ,
+.Xr ng_echo 4 ,
+.Xr ng_ether 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 8.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org
diff --git a/share/man/man4/ng_frame_relay.4 b/share/man/man4/ng_frame_relay.4
new file mode 100644
index 0000000..576fdfe
--- /dev/null
+++ b/share/man/man4/ng_frame_relay.4
@@ -0,0 +1,99 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_frame_relay.8,v 1.4 1999/01/25 23:46:26 archie Exp $
+.\"
+.Dd January 19, 1999
+.Dt NG_FRAME_RELAY 4
+.Os
+.Sh NAME
+.Nm ng_frame_relay
+.Nd frame relay netgraph node type
+.Sh SYNOPSIS
+.In netgraph/ng_frame_relay.h
+.Sh DESCRIPTION
+The
+.Nm frame_relay
+node type performs encapsulation, de-encapsulation, and multiplexing
+of packets using the frame relay protocol.
+It supports up to 1024 DLCI's.
+The LMI protocol is handled by a separate node type (see
+.Xr ng_lmi 4 ) .
+.Pp
+The
+.Dv downstream
+hook should be connected to the synchronous line, i.e., the switch.
+Then hooks
+.Dv dlci0 ,
+.Dv dlci1 ,
+through
+.Dv dlci1023
+are available to connect to each of the DLCI channels.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va downstream"
+.It Va downstream
+The connection to the synchronous line.
+.It Va dlciX
+Here X is a decimal number from 0 to 1023.
+This hook corresponds
+to the DLCI X frame relay virtual channel.
+.El
+.Sh CONTROL MESSAGES
+This node type supports only the generic control messages.
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_lmi 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org
+.Sh BUGS
+Technically, frames on DLCI X should not be transmitted to the switch
+until the LMI protocol entity on both ends has configured DLCI X as active.
+The
+.Nm
+node type ignores this restriction, and will always pass data received
+on a DLCI hook to
+.Dv downstream .
+Instead, it should query the LMI node first.
diff --git a/share/man/man4/ng_gif.4 b/share/man/man4/ng_gif.4
new file mode 100644
index 0000000..2f360c0
--- /dev/null
+++ b/share/man/man4/ng_gif.4
@@ -0,0 +1,126 @@
+.\" Copyright 2000 The Aerospace Corporation. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions, and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions, and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of The Aerospace Corporation may not be used to endorse or
+.\" promote products derived from this software.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION "AS IS" AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AEROSPACE CORPORATION BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Author: Brooks Davis <brooks@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 18, 2001
+.Dt NG_GIF 4
+.Os
+.Sh NAME
+.Nm ng_gif
+.Nd generic tunnel interface netgraph node type
+.Sh SYNOPSIS
+.In netgraph/ng_gif.h
+.Sh DESCRIPTION
+The
+.Nm
+netgraph node type allows
+.Xr gif 4
+interfaces to interact with
+the
+.Xr netgraph 4
+networking subsystem.
+Once the
+.Nm
+module is loaded in the kernel, a node is automatically created
+for each
+.Xr gif 4
+interface in the system.
+Each node will attempt to name itself with the same name
+as the associated interface.
+All
+.Nm
+nodes are persistent for as long as the interface itself exists.
+.Pp
+Two hooks are supported:
+.Dv lower
+and
+.Dv orphans .
+The hook name
+.Dv divert
+may be used as an alias for
+.Dv lower ,
+and is provided for compatibility with
+.Xr ng_ether 4 .
+In reality the two names represent the same hook.
+.Pp
+The
+.Dv lower
+hook is a connection to the raw
+.Xr gif 4
+device.
+When connected, all incoming packets are diverted out this hook.
+Writing to this hook results in a raw encapsulated packet being transmitted
+by the device.
+Normal outgoing packets are not affected by
+.Dv lower
+being connected.
+.Pp
+The
+.Dv orphans
+hook is equivalent to
+.Dv lower ,
+except that only unrecognized packets (that would otherwise be discarded)
+are written to the hook, and normal incoming traffic is unaffected.
+At most one of
+.Dv orphans
+and
+.Dv lower
+may be connected at any time.
+.Pp
+In all cases, frames are raw packets with the address family of the
+packet attached to the front.
+.Pp
+When no hooks are connected, packets flow normally upwards and downwards.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va orphans"
+.It Va lower
+Connection to the lower device link layer.
+.It Va orphans
+Like
+.Dv lower ,
+but only receives unrecognized packets.
+.El
+.Sh CONTROL MESSAGES
+This node type supports only the generic control messages.
+.Sh EXAMPLES
+This command dumps all unrecognized packets received by the
+.Li gif0
+interface to standard output decoded in hex and ASCII:
+.Pp
+.Dl "nghook -a gif0: orphans"
+.Sh SEE ALSO
+.Xr gif 4 ,
+.Xr netgraph 4 ,
+.Xr netintro 4 ,
+.Xr ifconfig 8 ,
+.Xr ngctl 8 ,
+.Xr nghook 8
+.Sh AUTHORS
+.An Brooks Davis Aq brooks@FreeBSD.org
diff --git a/share/man/man4/ng_gif_demux.4 b/share/man/man4/ng_gif_demux.4
new file mode 100644
index 0000000..b245e09
--- /dev/null
+++ b/share/man/man4/ng_gif_demux.4
@@ -0,0 +1,107 @@
+.\" Copyright 2000 The Aerospace Corporation. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions, and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions, and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of The Aerospace Corporation may not be used to endorse or
+.\" promote products derived from this software.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION "AS IS" AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AEROSPACE CORPORATION BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Author: Brooks Davis <brooks@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 18, 2001
+.Dt NG_GIF_DEMUX 4
+.Os
+.Sh NAME
+.Nm ng_gif_demux
+.Nd demultiplexer for packets from
+.Xr ng_gif 4
+nodes
+.Sh SYNOPSIS
+.In netgraph/ng_gif_demux.h
+.Sh DESCRIPTION
+The
+.Nm
+netgraph node type demultiplexes the output from
+.Xr ng_gif 4
+nodes in the
+.Xr netgraph 4
+networking subsystem.
+.Pp
+The
+.Dv gif
+hook is meant to be connected to the
+.Dv lower
+or
+.Dv orphans
+hook of an
+.Xr ng_gif 4
+node.
+The
+.Dv inet , inet6 , atalk , ipx , atm , natm ,
+and
+.Dv ns
+hooks output frames of the given type when they are received on the
+.Dv gif
+hook.
+When a frame is received on one of these hooks, it is encapsulated and
+sent out the
+.Dv gif
+hook.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Dv inet6"
+.It Va gif
+Connection to the
+.Dv lower
+or
+.Dv orphans
+hook of an
+.Xr ng_gif 4
+node.
+.It Va inet
+Hook for input and output of IP frames.
+.It Va inet6
+Hook for input and output of IPv6 frames.
+.It Va atalk
+Hook for input and output of AppleTalk frames.
+.It Va ipx
+Hook for input and output of IPX frames.
+.It Va atm
+Hook for input and output of ATM frames.
+.It Va natm
+Hook for input and output of NATM frames.
+.It Va ns
+Hook for input and output of NS frames.
+.El
+.Sh CONTROL MESSAGES
+This node type supports only the generic control messages.
+.Sh SEE ALSO
+.Xr gif 4 ,
+.Xr netgraph 4 ,
+.Xr netintro 4 ,
+.Xr ng_gif 4 ,
+.Xr ifconfig 8 ,
+.Xr ngctl 8 ,
+.Xr nghook 8
+.Sh AUTHORS
+.An Brooks Davis Aq brooks@FreeBSD.org
diff --git a/share/man/man4/ng_h4.4 b/share/man/man4/ng_h4.4
new file mode 100644
index 0000000..a3b99ed
--- /dev/null
+++ b/share/man/man4/ng_h4.4
@@ -0,0 +1,123 @@
+.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $Id: ng_h4.4,v 1.2 2003/05/21 19:37:35 max Exp $
+.\" $FreeBSD$
+.\"
+.Dd June 14, 2002
+.Dt NG_H4 4
+.Os
+.Sh NAME
+.Nm ng_h4
+.Nd Netgraph node type that is also an H4 line discipline
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/bluetooth/include/ng_h4.h
+.Sh DESCRIPTION
+The
+.Nm h4
+node type is both a persistent Netgraph node type and a H4 line
+discipline.
+It implements a Bluetooth HCI UART transport layer as
+per chapter H4 of the Bluetooth Specification Book v1.1.
+A new node is created when the corresponding line discipline,
+.Dv H4DISC ,
+is registered on a tty device (see
+.Xr tty 4 ) .
+.Pp
+The node has a single hook called
+.Dv hook .
+Incoming bytes received on the tty device are re-assembled into
+HCI frames (according to the length).
+Full HCI frames are sent out on the hook.
+HCI frames received on
+.Dv hook
+are transmitted out on the tty device.
+No modification to the data is performed in either direction.
+While the line discipline is installed on a tty, the normal
+read and write operations are unavailable, returning
+.Er EIO .
+.Pp
+Information about the node is available via the netgraph
+.Xr ioctl 2
+command
+.Dv NGIOCGINFO .
+This command returns a
+.Vt "struct nodeinfo"
+similar to the
+.Dv NGM_NODEINFO
+.Xr netgraph 4
+control message.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va hook"
+.It Va hook
+single HCI frame contained in single
+.Vt mbuf
+structure.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_H4_NODE_RESET
+Reset the node.
+.It Dv NGM_H4_NODE_GET_STATE
+Returns current receiving state for the node.
+.It Dv NGM_H4_NODE_GET_DEBUG
+Returns an integer containing the current debug level for the node.
+.It Dv NGM_H4_NODE_SET_DEBUG
+This command takes an integer argument and sets current debug level
+for the node.
+.It Dv NGM_H4_NODE_GET_QLEN
+Returns current length of outgoing queue for the node.
+.It Dv NGM_H4_NODE_SET_QLEN
+This command takes an integer argument and sets maximum length of
+outgoing queue for the node.
+.It Dv NGM_H4_NODE_GET_STAT
+Returns various statistic information for the node, such as: number of
+bytes (frames) sent, number of bytes (frames) received and number of
+input (output) errors.
+.It Dv NGM_H4_NODE_RESET_STAT
+Reset all statistic counters to zero.
+.El
+.Sh SHUTDOWN
+This node shuts down when the corresponding device is closed
+(or the line discipline is uninstalled on the device).
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr netgraph 4 ,
+.Xr tty 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm h4
+node type was implemented in
+.Fx 5.0 .
+.Sh AUTHORS
+.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
+.Sh BUGS
+This node still uses
+.Xr spltty 9
+to lock tty layer.
+This is wrong.
diff --git a/share/man/man4/ng_hci.4 b/share/man/man4/ng_hci.4
new file mode 100644
index 0000000..7ef7fcb
--- /dev/null
+++ b/share/man/man4/ng_hci.4
@@ -0,0 +1,387 @@
+.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $Id: ng_hci.4,v 1.3 2003/05/21 19:37:35 max Exp $
+.\" $FreeBSD$
+.\"
+.Dd June 25, 2002
+.Dt NG_HCI 4
+.Os
+.Sh NAME
+.Nm ng_hci
+.Nd Netgraph node type that is also a Bluetooth Host Controller Interface
+(HCI) layer
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/bluetooth/include/ng_hci.h
+.Sh DESCRIPTION
+The
+.Nm hci
+node type is a Netgraph node type that implements Bluetooth Host Controller
+Interface (HCI) layer as per chapter H1 of the Bluetooth Specification Book
+v1.1.
+.Sh INTRODUCTION TO BLUETOOTH
+Bluetooth is a short-range radio link intended to replace the cable(s)
+connecting portable and/or fixed electronic devices.
+Bluetooth operates in the unlicensed ISM band at 2.4 GHz.
+The Bluetooth protocol uses a
+combination of circuit and packet switching.
+Bluetooth can support an
+asynchronous data channel, up to three simultaneous synchronous voice
+channels, or a channel which simultaneously supports asynchronous data
+and synchronous voice.
+Each voice channel supports a 64 kb/s synchronous
+(voice) channel in each direction.
+The asynchronous channel can support
+maximal 723.2 kb/s asymmetric (and still up to 57.6 kb/s in the return
+direction), or 433.9 kb/s symmetric.
+.Pp
+The Bluetooth system provides a point-to-point connection (only two
+Bluetooth units involved), or a point-to-multipoint connection.
+In the point-to-multipoint connection,
+the channel is shared among several Bluetooth units.
+Two or more units sharing the same channel form a
+.Dq piconet .
+One Bluetooth unit acts as the master of the piconet, whereas the other
+unit(s) acts as slave(s).
+Up to seven slaves can be active in the piconet.
+In addition, many more slaves can remain locked to the master in a so-called
+parked state.
+These parked slaves cannot be active on the channel, but remain
+synchronized to the master.
+Both for active and parked slaves, the channel
+access is controlled by the master.
+.Pp
+Multiple piconets with overlapping coverage areas form a
+.Dq scatternet .
+Each piconet can only have a single master.
+However, slaves can participate
+in different piconets on a time-division multiplex basis.
+In addition, a master in one piconet can be a slave in another piconet.
+The piconets shall not be frequency-synchronized.
+Each piconet has its own hopping channel.
+.Ss Time Slots
+The channel is divided into time slots, each 625 usec in length.
+The time
+slots are numbered according to the Bluetooth clock of the piconet master.
+The slot numbering ranges from 0 to 2^27 -1 and is cyclic with a cycle length
+of 2^27.
+In the time slots, master and slave can transmit packets.
+.Ss SCO Link
+The SCO link is a symmetric, point-to-point link between the master and a
+specific slave.
+The SCO link reserves slots and can therefore be considered
+as a circuit-switched connection between the master and the slave.
+The SCO link typically supports time-bounded information like voice.
+The master can
+support up to three SCO links to the same slave or to different slaves.
+A slave can support up to three SCO links from the same master, or two SCO
+links if the links originate from different masters.
+SCO packets are never retransmitted.
+.Ss ACL Link
+In the slots not reserved for SCO links, the master can exchange packets
+with any slave on a per-slot basis.
+The ACL link provides a packet-switched
+connection between the master and all active slaves participating in the
+piconet.
+Both asynchronous and isochronous services are supported.
+Between a master and a slave only a single ACL link can exist.
+For most ACL packets,
+packet retransmission is applied to assure data integrity.
+.Sh HOST CONTROLLER INTERFACE (HCI)
+The HCI provides a command interface to the baseband controller and link
+manager, and access to hardware status and control registers.
+This interface
+provides a uniform method of accessing the Bluetooth baseband capabilities.
+.Pp
+The HCI layer on the Host exchanges data and commands with the HCI firmware
+on the Bluetooth hardware.
+The Host Controller Transport Layer (i.e., physical
+bus) driver provides both HCI layers with the ability to exchange information
+with each other.
+.Pp
+The Host will receive asynchronous notifications of HCI events independent
+of which Host Controller Transport Layer is used.
+HCI events are used for
+notifying the Host when something occurs.
+When the Host discovers that an
+event has occurred it will then parse the received event packet to determine
+which event occurred.
+The next sections specify the HCI packet formats.
+.Ss HCI Command Packet
+.Bd -literal -offset indent
+#define NG_HCI_CMD_PKT 0x01
+typedef struct {
+ uint8_t type; /* MUST be 0x1 */
+ uint16_t opcode; /* OpCode */
+ uint8_t length; /* parameter(s) length in bytes */
+} __attribute__ ((packed)) ng_hci_cmd_pkt_t;
+.Ed
+.Pp
+The HCI command packet is used to send commands to the Host Controller
+from the Host.
+When the Host Controller completes most of the commands,
+a Command Complete event is sent to the Host.
+Some commands do not receive
+a Command Complete event when they have been completed.
+Instead, when the
+Host Controller receives one of these commands the Host Controller sends
+a Command Status event back to the Host when it has begun to execute the
+command.
+Later on, when the actions associated with the command have finished,
+an event that is associated with the sent command will be sent by the Host
+Controller to the Host.
+.Ss HCI Event Packet
+.Bd -literal -offset indent
+#define NG_HCI_EVENT_PKT 0x04
+typedef struct {
+ uint8_t type; /* MUST be 0x4 */
+ uint8_t event; /* event */
+ uint8_t length; /* parameter(s) length in bytes */
+} __attribute__ ((packed)) ng_hci_event_pkt_t;
+.Ed
+.Pp
+The HCI event packet is used by the Host Controller to notify the Host
+when events occur.
+.Ss HCI ACL Data Packet
+.Bd -literal -offset indent
+#define NG_HCI_ACL_DATA_PKT 0x02
+typedef struct {
+ uint8_t type; /* MUST be 0x2 */
+ uint16_t con_handle; /* connection handle + PB + BC flags */
+ uint16_t length; /* payload length in bytes */
+} __attribute__ ((packed)) ng_hci_acldata_pkt_t;
+.Ed
+.Pp
+HCI ACL data packets are used to exchange ACL data between the Host and
+Host Controller.
+.Ss HCI SCO Data Packet
+.Bd -literal -offset indent
+#define NG_HCI_SCO_DATA_PKT 0x03
+typedef struct {
+ uint8_t type; /* MUST be 0x3 */
+ uint16_t con_handle; /* connection handle + reserved bits */
+ uint8_t length; /* payload length in bytes */
+} __attribute__ ((packed)) ng_hci_scodata_pkt_t;
+.Ed
+.Pp
+HCI SCO data packets are used to exchange SCO data between the Host and
+Host Controller.
+.Sh HCI INITIALIZATION
+On initialization, HCI control application must issue the following HCI
+commands (in any order).
+.Bl -tag -width foo
+.It Dv Read_BD_ADDR
+To obtain BD_ADDR of the Bluetooth unit.
+.It Dv Read_Local_Supported_Features
+To obtain the list of features supported by Bluetooth unit.
+.It Dv Read_Buffer_Size
+To determine the maximum size of HCI ACL and SCO HCI data packets (excluding
+header) that can be sent from the Host to the Host Controller.
+There are also
+two additional return parameters that specify the total number of HCI ACL and
+SCO data packets that the Host Controller can have waiting for transmission in
+its buffers.
+.El
+.Pp
+As soon as HCI initialization has been successfully performed, HCI control
+application must turn on
+.Dq inited
+bit for the node.
+Once HCI node has been initialized all upstream hooks
+will receive a
+.Dv NGM_HCI_NODE_UP
+Netgraph message defined as follows.
+.Bd -literal -offset indent
+#define NGM_HCI_NODE_UP 112 /* HCI -> Upper */
+typedef struct {
+ uint16_t pkt_size; /* max. ACL/SCO packet size (w/o hdr) */
+ uint16_t num_pkts; /* ACL/SCO packet queue size */
+ uint16_t reserved; /* place holder */
+ bdaddr_t bdaddr; /* bdaddr */
+} ng_hci_node_up_ep;
+.Ed
+.Sh HCI FLOW CONTROL
+HCI layer performs flow control on baseband connection basis (i.e., ACL and
+SCO link).
+Each baseband connection has
+.Dq "connection handle"
+and queue of outgoing data packets.
+Upper layers protocols are allowed to
+send up to
+.Dv ( num_pkts
+\-
+.Dv pending )
+packets at one time.
+HCI layer will send
+.Dv NGM_HCI_SYNC_CON_QUEUE
+Netgraph messages to inform upper layers about current queue state for each
+connection handle.
+The
+.Dv NGM_HCI_SYNC_CON_QUEUE
+Netgraph message is defined as follows.
+.Bd -literal -offset indent
+#define NGM_HCI_SYNC_CON_QUEUE 113 /* HCI -> Upper */
+typedef struct {
+ uint16_t con_handle; /* connection handle */
+ uint16_t completed; /* number of completed packets */
+} ng_hci_sync_con_queue_ep;
+.Ed
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va drv"
+.It Va drv
+Bluetooth Host Controller Transport Layer hook.
+Single HCI packet contained in single
+.Vt mbuf
+structure.
+.It Va acl
+Upper layer protocol/node is connected to the hook.
+Single HCI ACL data packet contained in single
+.Vt mbuf
+structure.
+.It Va sco
+Upper layer protocol/node is connected to the hook.
+Single HCI SCO data packet contained in single
+.Vt mbuf
+structure.
+.It Va raw
+Raw hook.
+Every HCI frame (including HCI command frame) that goes in
+or out will be delivered to the hook.
+Usually the Bluetooth raw HCI socket layer is connected to the hook.
+Single HCI frame contained in single
+.Vt mbuf
+structure.
+.El
+.Sh BLUETOOTH UPPER LAYER PROTOCOLS INTERFACE (LP CONTROL MESSAGES)
+.Bl -tag -width foo
+.It Dv NGM_HCI_LP_CON_REQ
+Requests the lower protocol to create a connection.
+If a physical link
+to the remote device does not exist, this message must be sent to the lower
+protocol (baseband) to establish the physical connection.
+.It Dv NGM_HCI_LP_DISCON_REQ
+Requests the lower protocol (baseband) to terminate a connection.
+.It Dv NGM_HCI_LP_CON_CFM
+Confirms success or failure of the
+.Dv NGM_HCI_LP_CON_REQ
+request to establish a lower layer (baseband) connection.
+This includes passing the authentication challenge if authentication is
+required to establish the physical link.
+.It Dv NGM_HCI_LP_CON_IND
+Indicates the lower protocol (baseband) has successfully established
+incoming connection.
+.It Dv NGM_HCI_LP_CON_RSP
+A response accepting or rejecting the previous connection indication request.
+.It Dv NGM_HCI_LP_DISCON_IND
+Indicates the lower protocol (baseband) has terminated connection.
+This could be a response to
+.Dv NGM_HCI_LP_DISCON_REQ
+or a timeout event.
+.It Dv NGM_HCI_LP_QOS_REQ
+Requests the lower protocol (baseband) to accommodate a particular QoS
+parameter set.
+.It Dv NGM_HCI_LP_QOS_CFM
+Confirms success or failure of the request for a given quality of service.
+.It Dv NGM_HCI_LP_QOS_IND
+Indicates the lower protocol (baseband) has detected a violation of the QoS
+agreement.
+.El
+.Sh NETGRAPH CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_HCI_NODE_GET_STATE
+Returns current state for the node.
+.It Dv NGM_HCI_NODE_INIT
+Turn on
+.Dq inited
+bit for the node.
+.It Dv NGM_HCI_NODE_GET_DEBUG
+Returns an integer containing the current debug level for the node.
+.It Dv NGM_HCI_NODE_SET_DEBUG
+This command takes an integer argument and sets current debug level
+for the node.
+.It Dv NGM_HCI_NODE_GET_BUFFER
+Returns current state of data buffers.
+.It Dv NGM_HCI_NODE_GET_BDADDR
+Returns BD_ADDR as cached in the node.
+.It Dv NGM_HCI_NODE_GET_FEATURES
+Returns the list of features supported by hardware (as cached by the node).
+.It Dv NGM_HCI_NODE_GET_NEIGHBOR_CACHE
+Returns content of the neighbor cache.
+.It Dv NGM_HCI_NODE_FLUSH_NEIGHBOR_CACHE
+Remove all neighbor cache entries.
+.It Dv NGM_HCI_NODE_GET_CON_LIST
+Returns list of active baseband connections (i.e., ACL and SCO links).
+.It Dv NGM_HCI_NODE_GET_STAT
+Returns various statistic counters.
+.It Dv NGM_HCI_NODE_RESET_STAT
+Resets all statistic counters to zero.
+.It NGM_HCI_NODE_SET_LINK_POLICY_SETTINGS_MASK
+Sets current link policy settings mask.
+After the new ACL connection is
+created the HCI node will try set link policy for the ACL connection.
+By default, every supported Link Manager (LM) mode will be enabled.
+User can
+override this by setting link policy settings mask which specifies LM
+modes to be enabled.
+.It NGM_HCI_NODE_GET_LINK_POLICY_SETTINGS_MASK
+Returns current link policy settings mask.
+.It NGM_HCI_NODE_SET_PACKET_MASK
+Sets current packet mask.
+When new baseband (ACL or SCO) connection is
+created the HCI node will specify every packet type supported by the device.
+User can override this by setting packet mask which specifies packet types
+to be used for new baseband connections.
+.It NGM_HCI_NODE_GET_PACKET_MASK
+Returns current packet mask.
+.It NGM_HCI_NODE_SET_ROLE_SWITCH
+Sets the value of the role switch.
+Role switch is enabled when this value is not zero.
+This is the default state.
+Note that actual role switch at Bluetooth link level will only be performed if
+hardware supports role switch and it was enabled.
+.It NGM_HCI_NODE_GET_ROLE_SWITCH
+Returns the value of the role switch for the node.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or
+when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr hccontrol 8 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm hci
+node type was implemented in
+.Fx 5.0 .
+.Sh AUTHORS
+.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
+.Sh BUGS
+Most likely.
+Please report if found.
diff --git a/share/man/man4/ng_hole.4 b/share/man/man4/ng_hole.4
new file mode 100644
index 0000000..4d0c077
--- /dev/null
+++ b/share/man/man4/ng_hole.4
@@ -0,0 +1,91 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_hole.8,v 1.4 1999/01/25 23:46:26 archie Exp $
+.\"
+.Dd May 19, 2004
+.Dt NG_HOLE 4
+.Os
+.Sh NAME
+.Nm ng_hole
+.Nd netgraph discard node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_hole.h
+.Sh DESCRIPTION
+The
+.Nm hole
+node type silently discards all data and control messages it receives.
+This type is used for testing and debugging.
+.Sh HOOKS
+A
+.Nm
+node accepts any request to connect, regardless of the hook name,
+as long as the name is unique.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the
+following:
+.Bl -tag -width foo
+.It Dv NGM_HOLE_GET_STATS Pq Ic getstats
+This command takes an
+.Tn ASCII
+string argument, the hook name, and returns the statistics
+associated with the hook as a
+.Vt "struct ng_hole_hookstat" .
+.It Dv NGM_HOLE_CLR_STATS Pq Ic clrstats
+This command takes an
+.Tn ASCII
+string argument, the hook name, and clears the statistics
+associated with the hook.
+.It Dv NGM_HOLE_GETCLR_STATS Pq Ic getclrstats
+This command is identical to
+.Dv NGM_HOLE_GET_STATS ,
+except that the statistics are also atomically cleared.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_echo 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org
diff --git a/share/man/man4/ng_hub.4 b/share/man/man4/ng_hub.4
new file mode 100644
index 0000000..da68723
--- /dev/null
+++ b/share/man/man4/ng_hub.4
@@ -0,0 +1,75 @@
+.\" Copyright (c) 2004 Ruslan Ermilov
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 5, 2010
+.Dt NG_HUB 4
+.Os
+.Sh NAME
+.Nm ng_hub
+.Nd packet distribution netgraph node type
+.Sh SYNOPSIS
+.In netgraph/ng_hub.h
+.Sh DESCRIPTION
+The
+.Nm hub
+node type provides a simple mechanism for distributing packets over
+several links.
+Packets received on any of the hooks are forwarded out the other hooks.
+Packets are not altered in any way.
+.Sh HOOKS
+A
+.Nm hub
+node accepts any request to connect, regardless of the hook name,
+as long as the name is unique.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the
+following:
+.Bl -tag -width foo
+.It Dv NGM_HUB_SET_PERSISTENT Pq Ic setpersistent
+This command sets the persistent flag on the node, and takes no arguments.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected. Setting the
+persistent flag via a
+.Dv NGM_HUB_SET_PERSISTENT
+control message disables automatic node shutdown when the last hook gets
+disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_bridge 4 ,
+.Xr ng_ether 4 ,
+.Xr ng_one2many 4 ,
+.Xr ngctl 8 ,
+.Xr nghook 8
+.Sh HISTORY
+The
+.Nm
+node type appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+.An Ruslan Ermilov Aq ru@FreeBSD.org
diff --git a/share/man/man4/ng_iface.4 b/share/man/man4/ng_iface.4
new file mode 100644
index 0000000..270aa4f
--- /dev/null
+++ b/share/man/man4/ng_iface.4
@@ -0,0 +1,166 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_iface.8,v 1.5 1999/01/25 23:46:26 archie Exp $
+.\"
+.Dd October 28, 2005
+.Dt NG_IFACE 4
+.Os
+.Sh NAME
+.Nm ng_iface
+.Nd interface netgraph node type
+.Sh SYNOPSIS
+.In netgraph/ng_iface.h
+.Sh DESCRIPTION
+An
+.Nm iface
+node is both a netgraph node and a system networking interface.
+When an
+.Nm iface
+node is created, a new interface appears which is accessible via
+.Xr ifconfig 8 .
+.Nm Iface
+node interfaces are named
+.Dv ng0 ,
+.Dv ng1 ,
+etc.
+When a node is shutdown, the corresponding interface is removed
+and the interface name becomes available for reuse by future
+.Nm iface
+nodes; new nodes always take the first unused interface.
+The node itself is assigned the same name as its interface, unless the name
+already exists, in which case the node remains unnamed.
+.Pp
+An
+.Nm iface
+node has a single hook corresponding to each supported protocol.
+Packets transmitted via the interface flow out the corresponding
+protocol-specific hook.
+Similarly, packets received on a hook appear on the interface as
+packets received into the corresponding protocol stack.
+The currently supported protocols are IP, IPv6, ATM, NATM, and NS.
+.Pp
+An
+.Nm iface
+node can be configured as a point-to-point interface or a broadcast interface.
+The configuration can only be changed when the interface is down.
+The default mode is point-to-point.
+.Pp
+.Nm Iface
+nodes support the Berkeley Packet Filter (BPF).
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va inet6"
+.It Va inet
+Transmission and reception of IP packets.
+.It Va inet6
+Transmission and reception of IPv6 packets.
+.It Va atm
+Transmission and reception of ATM packets.
+.It Va natm
+Transmission and reception of NATM packets.
+.It Va ns
+Transmission and reception of NS packets.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_IFACE_GET_IFNAME Pq Ic getifname
+Returns the name of the associated interface as a
+.Dv NUL Ns -terminated
+.Tn ASCII
+string.
+Normally this is the same as the name of the node.
+.It Dv NGM_IFACE_GET_IFINDEX Pq Ic getifindex
+Returns the global index of the associated interface as a 32 bit integer.
+.It Dv NGM_IFACE_POINT2POINT Pq Ic point2point
+Set the interface to point-to-point mode.
+The interface must not currently be up.
+.It Dv NGM_IFACE_BROADCAST Pq Ic broadcast
+Set the interface to broadcast mode.
+The interface must not currently be up.
+.It Dv NGM_CISCO_GET_IPADDR Pq Ic getipaddr
+This message is defined by the
+.Xr ng_cisco 4
+node type; see
+.Xr ng_cisco 4
+for a description.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message.
+The associated interface is removed and becomes available
+for use by future
+.Nm iface
+nodes.
+.Pp
+Unlike most other node types, an
+.Nm iface
+node does
+.Em not
+go away when all hooks have been disconnected; rather, and explicit
+.Dv NGM_SHUTDOWN
+control message is required.
+.Sh ALTQ Support
+The
+.Nm
+interface supports ALTQ bandwidth management feature.
+However,
+.Nm
+is a special case, since it is not a physical interface with limited bandwidth.
+One should not turn ALTQ on
+.Nm
+if the latter corresponds to some tunneled connection, e.g.\& PPPoE or PPTP.
+In this case, ALTQ should be configured on the interface that is used to
+transmit the encapsulated packets.
+In case when your graph ends up with some kind of serial line, either
+synchronous or modem, the
+.Nm
+is the right place to turn ALTQ on.
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr bpf 4 ,
+.Xr netgraph 4 ,
+.Xr ng_cisco 4 ,
+.Xr ifconfig 8 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm iface
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@FreeBSD.org
diff --git a/share/man/man4/ng_ip_input.4 b/share/man/man4/ng_ip_input.4
new file mode 100644
index 0000000..430f43c
--- /dev/null
+++ b/share/man/man4/ng_ip_input.4
@@ -0,0 +1,102 @@
+.\" Copyright 2001 The Aerospace Corporation. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions, and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions, and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of The Aerospace Corporation may not be used to endorse or
+.\" promote products derived from this software.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION "AS IS" AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AEROSPACE CORPORATION BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Brooks Davis <brooks@FreeBSD.org>
+.\" Derived from: ng_hole.4
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 27, 2001
+.Dt NG_IP_INPUT 4
+.Os
+.Sh NAME
+.Nm ng_ip_input
+.Nd netgraph IP input node type
+.Sh SYNOPSIS
+.In netgraph/ng_ip_input.h
+.Sh DESCRIPTION
+The
+.Nm ip_input
+node type takes all received packets and queues them into the IP in
+input processing subsystem.
+.Sh HOOKS
+An
+.Nm
+node accepts any request to connect, regardless of the hook name,
+as long as the name is unique.
+.Sh CONTROL MESSAGES
+This node type supports only the generic control messages.
+Other control messages are silently discarded.
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 5.0 .
+.Sh AUTHORS
+.An Brooks Davis Aq brooks@FreeBSD.org
+.Sh BUGS
+The
+.Nm
+node type should probably keep some sort of statistics.
diff --git a/share/man/man4/ng_ipfw.4 b/share/man/man4/ng_ipfw.4
new file mode 100644
index 0000000..9a9099e
--- /dev/null
+++ b/share/man/man4/ng_ipfw.4
@@ -0,0 +1,117 @@
+.\" Copyright (c) 2005 Gleb Smirnoff
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 2, 2010
+.Dt NG_IPFW 4
+.Os
+.Sh NAME
+.Nm ng_ipfw
+.Nd interface between netgraph and IP firewall
+.Sh SYNOPSIS
+.In netinet/ip_var.h
+.In netgraph/ng_ipfw.h
+.Sh DESCRIPTION
+The
+.Nm ipfw
+node implements interface between
+.Xr ipfw 4
+and
+.Xr netgraph 4
+subsystems.
+.Sh HOOKS
+The
+.Nm ipfw
+node supports an arbitrary number of hooks,
+which must be named using only numeric characters.
+.Sh OPERATION
+Once the
+.Nm
+module is loaded into the kernel, a single node named
+.Va ipfw
+is automatically created.
+No more
+.Nm ipfw
+nodes can be created.
+Once destroyed, the only way to recreate the node is to reload the
+.Nm
+module.
+.Pp
+Packets can be injected into
+.Xr netgraph 4
+using either the
+.Cm netgraph
+or
+.Cm ngtee
+commands of the
+.Xr ipfw 8
+utility.
+These commands require a numeric cookie to be supplied as an argument.
+Packets are sent out of the hook whose name equals the cookie value.
+If no hook matches, packets are discarded.
+Packets injected via the
+.Cm netgraph
+command are tagged with
+.Vt "struct ipfw_rule_ref" .
+This tag contains information that helps the packet to re-enter
+.Xr ipfw 4
+processing, should the packet come back from
+.Xr netgraph 4
+to
+.Xr ipfw 4 .
+.Pp
+Packets received by a node from
+.Xr netgraph 4
+subsystem must be tagged with
+.Vt "struct ipfw_rule_ref"
+tag.
+Packets re-enter IP firewall processing at the next rule.
+If no tag is supplied, packets are discarded.
+.Sh CONTROL MESSAGES
+This node type supports only the generic control messages.
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message.
+Do not do this, since the new
+.Nm ipfw
+node can only be created by reloading the
+.Nm
+module.
+.Sh SEE ALSO
+.Xr ipfw 4 ,
+.Xr netgraph 4 ,
+.Xr ipfw 8 ,
+.Xr mbuf_tags 9
+.Sh HISTORY
+The
+.Nm ipfw
+node type was implemented in
+.Fx 6.0 .
+.Sh AUTHORS
+The
+.Nm ipfw
+node was written by
+.An "Gleb Smirnoff" Aq glebius@FreeBSD.org .
diff --git a/share/man/man4/ng_ksocket.4 b/share/man/man4/ng_ksocket.4
new file mode 100644
index 0000000..ff67028
--- /dev/null
+++ b/share/man/man4/ng_ksocket.4
@@ -0,0 +1,242 @@
+.\" Copyright (c) 1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 9, 2012
+.Dt NG_KSOCKET 4
+.Os
+.Sh NAME
+.Nm ng_ksocket
+.Nd kernel socket netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_ksocket.h
+.Sh DESCRIPTION
+A
+.Nm ksocket
+node is both a netgraph node and a
+.Bx
+socket.
+The
+.Nm
+node type allows one to open a socket inside the kernel and have
+it appear as a Netgraph node.
+The
+.Nm
+node type is the reverse of the socket node type (see
+.Xr ng_socket 4 ) :
+whereas the socket node type enables the user-level manipulation (via
+a socket) of what is normally a kernel-level entity (the associated
+Netgraph node), the
+.Nm
+node type enables the kernel-level manipulation (via a Netgraph node) of
+what is normally a user-level entity (the associated socket).
+.Pp
+A
+.Nm
+node allows at most one hook connection.
+Connecting to the node is
+equivalent to opening the associated socket.
+The name given to the hook
+determines what kind of socket the node will open (see below).
+When the hook is disconnected and/or the node is shutdown, the
+associated socket is closed.
+.Sh HOOKS
+This node type supports a single hook connection at a time.
+The name of the hook must be of the form
+.Em <family>/<type>/<proto> ,
+where the
+.Em family ,
+.Em type ,
+and
+.Em proto
+are the decimal equivalent of the same arguments to
+.Xr socket 2 .
+Alternately, aliases for the commonly used values are accepted as
+well.
+For example
+.Dv inet/dgram/udp
+is a more readable but equivalent version of
+.Dv 2/2/17 .
+.Pp
+Data received into socket is sent out via hook.
+Data received on hook is sent out from socket, if the latter is
+connected (an
+.Dv NGM_KSOCKET_CONNECT
+was sent to node before).
+If socket is not connected, destination
+.Vt "struct sockaddr"
+must be supplied in an mbuf tag with cookie
+.Dv NGM_KSOCKET_COOKIE
+and type
+.Dv NG_KSOCKET_TAG_SOCKADDR
+attached to data.
+Otherwise
+.Nm
+will return
+.Er ENOTCONN
+to sender.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_KSOCKET_BIND Pq Ic bind
+This functions exactly like the
+.Xr bind 2
+system call.
+The
+.Vt "struct sockaddr"
+socket address parameter should be supplied as an argument.
+.It Dv NGM_KSOCKET_LISTEN Pq Ic listen
+This functions exactly like the
+.Xr listen 2
+system call.
+The backlog parameter (a single 32 bit
+.Dv int )
+should be supplied as an argument.
+.It Dv NGM_KSOCKET_CONNECT Pq Ic connect
+This functions exactly like the
+.Xr connect 2
+system call.
+The
+.Vt "struct sockaddr"
+destination address parameter should be supplied as an argument.
+.It Dv NGM_KSOCKET_ACCEPT Pq Ic accept
+Equivalent to the
+.Xr accept 2
+system call on a non-blocking socket.
+If there is a pending connection on the queue,
+a new socket and a corresponding cloned node are created.
+Returned are the cloned node's ID and a peer name (as
+.Vt "struct sockaddr" ) .
+If there are no pending connections,
+this control message returns nothing,
+and a connected node will receive the above message asynchronously,
+when a connection is established.
+.Pp
+A cloned node supports a single hook with an arbitrary name.
+If not connected, a node disappears when its parent node is destroyed.
+Once connected, it becomes an independent node.
+.It Dv NGM_KSOCKET_GETNAME Pq Ic getname
+Equivalent to the
+.Xr getsockname 2
+system call.
+The name is returned as a
+.Vt "struct sockaddr"
+in the arguments field of the reply.
+.It Dv NGM_KSOCKET_GETPEERNAME Pq Ic getpeername
+Equivalent to the
+.Xr getpeername 2
+system call.
+The name is returned as a
+.Vt "struct sockaddr"
+in the arguments field of the reply.
+.It Dv NGM_KSOCKET_SETOPT Pq Ic setopt
+Equivalent to the
+.Xr setsockopt 2
+system call, except that the option name, level, and value are passed in a
+.Vt "struct ng_ksocket_sockopt" .
+.It Dv NGM_KSOCKET_GETOPT Pq Ic getopt
+Equivalent to the
+.Xr getsockopt 2
+system call, except that the option is passed in a
+.Vt "struct ng_ksocket_sockopt" .
+When sending this command, the
+.Dv value
+field should be empty; upon return, it will contain the
+retrieved value.
+.El
+.Sh ASCII FORM CONTROL MESSAGES
+For control messages that pass a
+.Vt "struct sockaddr"
+in the argument field, the normal
+.Tn ASCII
+equivalent of the C structure
+is an acceptable form.
+For the
+.Dv PF_INET
+and
+.Dv PF_LOCAL
+address families, a more convenient form is also used, which is
+the protocol family name, followed by a slash, followed by the actual
+address.
+For
+.Dv PF_INET ,
+the address is an IP address followed by an optional colon and port number.
+For
+.Dv PF_LOCAL ,
+the address is the pathname as a doubly quoted string.
+.Pp
+Examples:
+.Bl -tag -width "PF_LOCAL"
+.It Dv PF_LOCAL
+local/"/tmp/foo.socket"
+.It Dv PF_INET
+inet/192.168.1.1:1234
+.It Other
+.Dv "\&{ family=16 len=16 data=[0x70 0x00 0x01 0x23] \&}"
+.El
+.Pp
+For control messages that pass a
+.Vt "struct ng_ksocket_sockopt" ,
+the normal
+.Tn ASCII
+form for that structure is used.
+In the future, more
+convenient encoding of the more common socket options may be supported.
+.Pp
+Setting socket options example:
+.Bl -tag -width "PF_LOCAL"
+.It Set FIB 2 for a socket (SOL_SOCKET, SO_SETFIB):
+.Dv "setopt \&{ level=0xffff name=0x1014 data=[ 2 ] \&}"
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when the hook is disconnected.
+Shutdown of the node closes the associated socket.
+.Sh SEE ALSO
+.Xr socket 2 ,
+.Xr netgraph 4 ,
+.Xr ng_socket 4 ,
+.Xr ngctl 8 ,
+.Xr mbuf_tags 9 ,
+.Xr socket 9
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@FreeBSD.org
diff --git a/share/man/man4/ng_l2cap.4 b/share/man/man4/ng_l2cap.4
new file mode 100644
index 0000000..ba5df7d
--- /dev/null
+++ b/share/man/man4/ng_l2cap.4
@@ -0,0 +1,422 @@
+.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $Id: ng_l2cap.4,v 1.4 2003/09/14 23:37:52 max Exp $
+.\" $FreeBSD$
+.\"
+.Dd July 4, 2002
+.Dt NG_L2CAP 4
+.Os
+.Sh NAME
+.Nm ng_l2cap
+.Nd Netgraph node type that implements Bluetooth Logical Link Control and
+Adaptation Protocol (L2CAP)
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/bluetooth/include/ng_hci.h
+.In netgraph/bluetooth/include/ng_l2cap.h
+.Sh DESCRIPTION
+The
+.Nm l2cap
+node type is a Netgraph node type that implements Bluetooth Logical Link
+Control and Adaptation Protocol as per chapter D of the Bluetooth Specification
+Book v1.1.
+.Pp
+L2CAP provides connection-oriented and connectionless data services to upper
+layer protocols with protocol multiplexing capability, segmentation and
+reassembly operation, and group abstractions.
+L2CAP permits higher level
+protocols and applications to transmit and receive L2CAP data packets up to
+64 kilobytes in length.
+.Ss L2CAP Assumptions
+.Bl -enum -offset indent
+.It
+The ACL link between two units is set up.
+The Baseband provides orderly
+delivery of data packets, although there might be individual packet corruption
+and duplicates.
+No more than one ACL link exists between any two devices.
+.It
+The Baseband always provides the impression of full-duplex communication
+channels.
+This does not imply that all L2CAP communications are bi-directional.
+Multicasts and unidirectional traffic (e.g., video) do not require duplex
+channels.
+.It
+L2CAP provides a reliable channel using the mechanisms available at the
+Baseband layer.
+The Baseband always performs data integrity checks when
+requested and resends data until it has been successfully acknowledged or
+a timeout occurs.
+As acknowledgements may be lost, timeouts may
+occur even after the data has been successfully sent.
+.El
+.Sh L2CAP GENERAL OPERATION
+The Logical Link Control and Adaptation Protocol (L2CAP) is based around the
+concept of
+.Dq channels .
+Each channel is bound to a single protocol in a many-to-one fashion.
+Multiple
+channels can be bound to the same protocol, but a channel cannot be bound to
+multiple protocols.
+Each L2CAP packet received on a channel is directed to
+the appropriate higher level protocol.
+.Pp
+Each one of the end-points of an L2CAP channel is referred to by a channel
+identifier.
+Channel identifiers (CIDs) are local names representing a logical
+channel end-point on the device.
+Identifiers from 0x0001 to 0x003F are reserved
+for specific L2CAP functions.
+The null identifier (0x0000) is defined as an
+illegal identifier and must never be used as a destination end-point.
+All L2CAP signalling commands are sent to CID 0x0001.
+CID 0x0002 is reserved for group-oriented channel.
+The same CID must not be reused as a local L2CAP
+channel endpoint for multiple simultaneous L2CAP channels between a local
+device and some remote device.
+.Pp
+CID assignment is relative to a particular device and a device can assign CIDs
+independently from other devices.
+Thus, even if the same CID value has been
+assigned to (remote) channel endpoints by several remote devices connected
+to a single local device, the local device can still uniquely associate each
+remote CID with a different device.
+.Ss Channel Operational States
+.Bl -tag -width foo
+.It Dv NG_L2CAP_CLOSED
+In this state, there is no channel associated with this CID.
+This is the only
+state when a link level connection (Baseband) may not exist.
+Link disconnection
+forces all other states into the
+.Dv NG_L2CAP_CLOSED
+state.
+.It Dv NG_L2CAP_W4_L2CAP_CON_RSP
+In this state, the CID represents a local end-point and an L2CAP Connect
+Request message has been sent referencing this endpoint and it is now waiting
+for the corresponding L2CAP Connect Response message.
+.It Dv NG_L2CAP_W4_L2CA_CON_RSP
+In this state, the remote end-point exists and an L2CAP Connect Request has
+been received by the local L2CAP entity.
+An L2CA Connect Indication has been
+sent to the upper layer and the part of the local L2CAP entity processing the
+received L2CAP Connect Request waits for the corresponding response.
+The response may require a security check to be performed.
+.It Dv NG_L2CAP_CONFIG
+In this state, the connection has been established but both sides are still
+negotiating the channel parameters.
+The Configuration state may also be
+entered when the channel parameters are being renegotiated.
+Prior to entering the
+.Dv NG_L2CAP_CONFIG
+state, all outgoing data traffic is suspended since
+the traffic parameters of the data traffic are to be renegotiated.
+Incoming
+data traffic is accepted until the remote channel endpoint has entered
+the
+.Dv NG_L2CAP_CONFIG
+state.
+In the
+.Dv NG_L2CAP_CONFIG
+state, both sides will issue
+L2CAP Configuration Request messages if only defaults are being used, a null
+message will be sent.
+If a large amount of parameters need to be negotiated,
+multiple messages will be sent to avoid any MTU limitations and negotiate
+incrementally.
+Moving from the
+.Dv NG_L2CAP_CONFIG
+state to the
+.Dv NG_L2CAP_OPEN
+state requires both sides to be ready.
+An L2CAP entity is ready when it has received
+a positive response to its final request and it has positively responded to
+the final request from the remote device.
+.It Dv NG_L2CAP_OPEN
+In this state, the connection has been established and configured, and data
+flow may proceed.
+.It Dv NG_L2CAP_W4_L2CAP_DISCON_RSP
+In this state, the connection is shutting down and an L2CAP Disconnect Request
+message has been sent.
+This state is now waiting for the corresponding response.
+.It Dv NG_L2CAP_W4_L2CA_DISCON_RSP
+In this state, the connection on the remote endpoint is shutting down and an
+L2CAP Disconnect Request message has been received.
+An L2CA Disconnect
+Indication has been sent to the upper layer to notify the owner of the CID
+that the remote endpoint is being closed.
+This state is now waiting for the
+corresponding response from the upper layer before responding to the remote
+endpoint.
+.El
+.Ss Protocol Multiplexing
+L2CAP supports protocol multiplexing because the Baseband Protocol does not
+support any
+.Dq type
+field identifying the higher layer protocol being multiplexed above it.
+L2CAP is able to distinguish between upper layer protocols such as the Service
+Discovery Protocol, RFCOMM and Telephony Control.
+.Ss Segmentation and Reassembly
+The data packets defined by the Baseband Protocol are limited in size.
+Large
+L2CAP packets must be segmented into multiple smaller Baseband packets prior
+to their transmission over the air.
+Similarly, multiple received Baseband
+packets may be reassembled into a single larger L2CAP packet.
+.Ss Quality of Service
+The L2CAP connection establishment process allows the exchange of information
+regarding the quality of service (QoS) expected between two Bluetooth units.
+.Ss Groups
+The Baseband Protocol supports the concept of a piconet, a group of devices
+synchronously hopping together using the same clock.
+The L2CAP group
+abstraction permits implementations to efficiently map protocol groups on to
+piconets.
+.Pp
+The following features are outside the scope of L2CAP responsibilities:
+.Bl -dash -offset indent
+.It
+L2CAP does not transport audio designated for SCO links.
+.It
+L2CAP does not enforce a reliable channel or ensure data integrity,
+that is, L2CAP performs no retransmissions or checksum calculations.
+.It
+L2CAP does not support a reliable multicast channel.
+.It
+L2CAP does not support the concept of a global group name.
+.El
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va hci"
+.It Va hci
+Bluetooth Host Controller Interface downstream hook.
+.It Va l2c
+Upper layer protocol upstream hook.
+Usually the Bluetooth L2CAP socket layer is connected to the hook.
+.It Va ctl
+Control hook.
+Usually the Bluetooth raw L2CAP sockets layer is connected to the hook.
+.El
+.Sh INTERFACE TO THE UPPER LAYER PROTOCOLS (L2CA CONTROL MESSAGES)
+Bluetooth specification says that L2CA request must block until response
+is ready.
+L2CAP node uses
+.Va token
+field from Netgraph message header to match L2CA request and response.
+The upper layer protocol must populate
+.Va token .
+L2CAP node will queue request and start processing.
+Later, when response is
+ready or timeout has occurred, L2CAP node will create new Netgraph message, set
+.Va token
+and
+.Dv NFG_RESP
+flag and send message to the upper layer.
+Note that L2CA indication messages
+will not populate
+.Va token
+and will not set
+.Dv NGF_RESP
+flag.
+There is no reason for this, because they are just notifications and do
+not require acknowledgment.
+.Bl -tag -width foo
+.It Dv NGM_L2CAP_L2CA_CON
+Requests the creation of a channel representing a logical connection to a
+physical address.
+Input parameters are the target protocol (PSM) and remote
+device's 48-bit address (BD_ADDR).
+Output parameters are the local CID (LCID)
+allocated by the local L2CAP entity, and Result of the request.
+If Result
+indicates a pending notification, the Status value may contain more information
+of what processing is delaying the establishment of the connection.
+.It Dv NGM_L2CAP_L2CA_CON_IND
+This message includes the parameters for the address of the remote device that
+issued the connection request, the local CID representing the channel being
+requested, the Identifier contained in the request, and the PSM value the
+request is targeting.
+.It Dv NGM_L2CAP_L2CA_CON_RSP
+Issues a response to a connection request event indication.
+Input parameters
+are the remote device's 48-bit address, Identifier sent in the request, local
+CID, the Response code, and the Status attached to the Response code.
+The output parameter is the Result of the service request.
+This primitive must be
+called no more than once after receiving the indication.
+.It Dv NGM_L2CAP_L2CA_CFG
+Requests the initial configuration (or reconfiguration) of a channel to a new
+set of channel parameters.
+Input parameters are the local CID endpoint, new
+incoming receivable MTU (InMTU), new outgoing flow spec-ification, and flush
+and link timeouts.
+Output parameters are the Result, accepted incoming MTU
+(InMTU), the remote side's flow requests, and flush and link timeouts.
+.It Dv NGM_L2CAP_L2CA_CFG_IND
+This message includes the parameters indicating the local CID of the channel
+the request has been sent to, the outgoing MTU size (maximum packet that can
+be sent across the channel) and the flowspec describing the characteristics of
+the incoming data.
+All other channel parameters are set to their default values
+if not provided by the remote device.
+.It Dv NGM_L2CAP_L2CA_CFG_RSP
+Issues a response to a configuration request event indication.
+Input parameters
+include the local CID of the endpoint being configured, outgoing transmit MTU
+(which may be equal or less to the OutMTU parameter in the configuration
+indication event) and the accepted flowspec for incoming traffic.
+The output parameter is the Result value.
+.It Dv NGM_L2CAP_L2CA_QOS_IND
+This message includes the parameter indicating the address of the remote
+Bluetooth device where the QoS contract has been violated.
+.It Dv NGM_L2CAP_L2CA_DISCON
+Requests the disconnection of the channel.
+Input parameter is the CID representing the local channel endpoint.
+Output parameter is Result.
+Result
+is zero if an L2CAP Disconnect Response is received, otherwise a non-zero value
+is returned.
+Once disconnection has been requested, no process will be able to
+successfully read or write from the CID.
+.It Dv NGM_L2CAP_L2CA_DISCON_IND
+This message includes the parameter indicating the local CID the request has
+been sent to.
+.It Dv NGM_L2CAP_L2CA_WRITE
+Response to transfer of data request.
+Actual data must be received from
+appropriate upstream hook and must be prepended with header defined as follows.
+.Bd -literal -offset indent
+/* L2CA data packet header */
+typedef struct {
+ uint32_t token; /* token to use in L2CAP_L2CA_WRITE */
+ uint16_t length; /* length of the data */
+ uint16_t lcid; /* local channel ID */
+} __attribute__ ((packed)) ng_l2cap_l2ca_hdr_t;
+.Ed
+.Pp
+The output parameters are Result and Length of data written.
+.It Dv NGM_L2CAP_L2CA_GRP_CREATE
+Requests the creation of a CID to represent a logical connection to multiple
+devices.
+Input parameter is the PSM value that the outgoing connectionless
+traffic is labelled with, and the filter used for incoming traffic.
+Output parameter is the CID representing the local endpoint.
+On creation, the group
+is empty but incoming traffic destined for the PSM value is readable.
+.Bf -emphasis
+This request has not been implemented.
+.Ef
+.It Dv NGM_L2CAP_L2CA_GRP_CLOSE
+The use of this message closes down a Group.
+.Bf -emphasis
+This request has not been implemented.
+.Ef
+.It Dv NGM_L2CAP_L2CA_GRP_ADD_MEMBER
+Requests the addition of a member to a group.
+The input parameter includes the
+CID representing the group and the BD_ADDR of the group member to be added.
+The output parameter Result confirms the success or failure of the request.
+.Bf -emphasis
+This request has not been implemented.
+.Ef
+.It Dv NGM_L2CAP_L2CA_GRP_REM_MEMBER
+Requests the removal of a member from a group.
+The input parameters include
+the CID representing the group and BD_ADDR of the group member to be removed.
+The output parameter Result confirms the success or failure of the request.
+.Bf -emphasis
+This request has not been implemented.
+.Ef
+.It Dv NGM_L2CAP_L2CA_GRP_MEMBERSHIP
+Requests a report of the members of a group.
+The input parameter CID represents the group being queried.
+The output parameter Result confirms the success or
+failure of the operation.
+If the Result is successful, BD_ADDR_Lst is a list
+of the Bluetooth addresses of the N members of the group.
+.Bf -emphasis
+This request has not been implemented.
+.Ef
+.It Dv NGM_L2CAP_L2CA_PING
+Initiates an L2CA Echo Request message and the reception of the corresponding
+L2CAP Echo Response message.
+The input parameters are remote Bluetooth device
+BD_ADDR, Echo Data and Length of the echo data.
+The output parameters are
+Result, Echo Data and Length of the echo data.
+.It Dv NGM_L2CAP_L2CA_GET_INFO
+Initiates an L2CA Information Request message and the reception of the
+corresponding L2CAP Info Response message.
+The input parameters are remote Bluetooth device BD_ADDR and Information Type.
+The output parameters are
+Result, Information Data and Size of the information data.
+.It Dv NGM_L2CAP_L2CA_ENABLE_CLT
+Request to disable (enable) the reception of connectionless packets.
+The input
+parameter is the PSM value indicating service that should be blocked
+(unblocked) and Enable flag.
+.El
+.Sh NETGRAPH CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_L2CAP_NODE_GET_FLAGS
+Returns current state for the node.
+.It Dv NGM_L2CAP_NODE_GET_DEBUG
+Returns an integer containing the current debug level for the node.
+.It Dv NGM_L2CAP_NODE_SET_DEBUG
+This command takes an integer argument and sets current debug level
+for the node.
+.It Dv NGM_L2CAP_NODE_GET_CON_LIST
+Returns list of active baseband connections (i.e., ACL links).
+.It Dv NGM_L2CAP_NODE_GET_CHAN_LIST
+Returns list of active L2CAP channels.
+.It Dv NGM_L2CAP_NODE_GET_AUTO_DISCON_TIMO
+Returns an integer containing the current value of the auto disconnect
+timeout (in sec).
+.It Dv NGM_L2CAP_NODE_SET_AUTO_DISCON_TIMO
+This command accepts an integer and sets the value of the auto disconnect
+timeout (in sec).
+The special value of 0 (zero) disables auto disconnect timeout.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of an
+.Dv NGM_SHUTDOWN
+control message, or
+when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr l2control 8 ,
+.Xr l2ping 8 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm l2cap
+node type was implemented in
+.Fx 5.0 .
+.Sh AUTHORS
+.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
+.Sh BUGS
+Most likely.
+Please report if found.
diff --git a/share/man/man4/ng_l2tp.4 b/share/man/man4/ng_l2tp.4
new file mode 100644
index 0000000..fc5ed07
--- /dev/null
+++ b/share/man/man4/ng_l2tp.4
@@ -0,0 +1,329 @@
+.\" Copyright (c) 2001-2002 Packet Design, LLC.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty,
+.\" use and redistribution of this software, in source or object code
+.\" forms, with or without modifications are expressly permitted by
+.\" Packet Design; provided, however, that:
+.\"
+.\" (i) Any and all reproductions of the source or object code
+.\" must include the copyright notice above and the following
+.\" disclaimer of warranties; and
+.\" (ii) No rights are granted, in any manner or form, to use
+.\" Packet Design trademarks, including the mark "PACKET DESIGN"
+.\" on advertising, endorsements, or otherwise except as such
+.\" appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY PACKET DESIGN "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, PACKET DESIGN MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING
+.\" THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
+.\" OR NON-INFRINGEMENT. PACKET DESIGN DOES NOT WARRANT, GUARANTEE,
+.\" OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS
+.\" OF THE USE OF THIS SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY,
+.\" RELIABILITY OR OTHERWISE. IN NO EVENT SHALL PACKET DESIGN BE
+.\" LIABLE FOR ANY DAMAGES RESULTING FROM OR ARISING OUT OF ANY USE
+.\" OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE, OR CONSEQUENTIAL
+.\" DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF
+.\" USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF
+.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+.\" THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 13, 2012
+.Dt NG_L2TP 4
+.Os
+.Sh NAME
+.Nm ng_l2tp
+.Nd L2TP protocol netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_l2tp.h
+.Sh DESCRIPTION
+The
+.Nm l2tp
+node type implements the encapsulation layer of the L2TP protocol
+as described in RFC 2661.
+This includes adding the L2TP packet header for outgoing packets
+and verifying and removing it for incoming packets.
+The node maintains the L2TP sequence number state and handles
+control session packet acknowledgment and retransmission.
+.Sh HOOKS
+The
+.Nm l2tp
+node type supports the following hooks:
+.Bl -tag -width ".Va session_hhhh"
+.It Va lower
+L2TP frames.
+.It Va ctrl
+Control packets.
+.It Va session_hhhh
+Session 0xhhhh data packets.
+.El
+.Pp
+L2TP control and data packets are transmitted to, and received from,
+the L2TP peer via the
+.Dv lower
+hook.
+Typically this hook would be connected to the
+.Dv "inet/dgram/udp"
+hook of an
+.Xr ng_ksocket 4
+node for L2TP over UDP.
+.Pp
+The
+.Dv ctrl
+hook connects to the local L2TP management entity.
+L2TP control messages (without any L2TP headers) are transmitted
+and received on this hook.
+Messages written to this hook are guaranteed to be delivered to the
+peer reliably, in order, and without duplicates.
+.Pp
+Packets written to the
+.Dv ctrl
+hook must contain a two byte session ID prepended to the frame
+(in network order).
+This session ID is copied to the outgoing L2TP header.
+Similarly, packets read from the
+.Dv ctrl
+hook will have the received session ID prepended.
+.Pp
+Once an L2TP session has been created, the corresponding session
+hook may be used to transmit and receive the session's data frames:
+for the session with session ID
+.Dv 0xabcd ,
+the hook is named
+.Dv session_abcd .
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_L2TP_SET_CONFIG Pq Ic setconfig
+This command updates the configuration of the node.
+It takes a
+.Vt "struct ng_l2tp_config"
+as an argument:
+.Bd -literal
+/* Configuration for a node */
+struct ng_l2tp_config {
+ u_char enabled; /* enables traffic flow */
+ u_char match_id; /* tunnel id must match 'tunnel_id' */
+ uint16_t tunnel_id; /* local tunnel id */
+ uint16_t peer_id; /* peer's tunnel id */
+ uint16_t peer_win; /* peer's max recv window size */
+ uint16_t rexmit_max; /* max retransmits before failure */
+ uint16_t rexmit_max_to; /* max delay between retransmits */
+};
+.Ed
+.Pp
+The
+.Va enabled
+field enables packet processing.
+Each time this field is changed back to zero the sequence
+number state is reset.
+In this way, reuse of a node is possible.
+.Pp
+The
+.Va tunnel_id
+field configures the local tunnel ID for the control connection.
+The
+.Va match_id
+field determines how incoming L2TP packets with a tunnel ID
+field different from
+.Va tunnel_id
+are handled.
+If
+.Va match_id
+is non-zero, they will be dropped; otherwise, they will be dropped
+only if the tunnel ID is non-zero.
+Typically
+.Va tunnel_id
+is set to the local tunnel ID as soon as it is known and
+.Va match_id
+is set to non-zero after receipt of the SCCRP or SCCCN control message.
+.Pp
+The peer's tunnel ID should be set in
+.Va peer_id
+as soon as it is learned, typically after receipt of a SCCRQ or SCCRP
+control message.
+This value is copied into the L2TP header for outgoing packets.
+.Pp
+The
+.Va peer_win
+field should be set from the
+.Dq "Receive Window Size"
+AVP received from the peer.
+The default value for this field is one; zero is an invalid value.
+As long as
+.Va enabled
+is non-zero, this value may not be decreased.
+.Pp
+The
+.Va rexmit_max
+and
+.Va rexmit_max_to
+fields configure packet retransmission.
+.Va rexmit_max_to
+is the maximum retransmission delay between packets, in seconds.
+The retransmit delay will start at a small value and increase
+exponentially up to this limit.
+The
+.Va rexmit_max
+sets the maximum number of times a packet will be retransmitted
+without being acknowledged before a failure condition is declared.
+Once a failure condition is declared, each additional retransmission
+will cause the
+.Nm l2tp
+node to send a
+.Dv NGM_L2TP_ACK_FAILURE Pq Ic ackfailure
+control message back to the node that sent the last
+.Dv NGM_L2TP_SET_CONFIG .
+Appropriate action should then be taken to shutdown the control connection.
+.It Dv NGM_L2TP_GET_CONFIG Pq Ic getconfig
+Returns the current configuration as a
+.Vt "struct ng_l2tp_config" .
+.It Dv NGM_L2TP_SET_SESS_CONFIG Pq Ic setsessconfig
+This control message configures a single data session.
+The corresponding hook must already be connected before sending this command.
+The argument is a
+.Vt "struct ng_l2tp_sess_config" :
+.Bd -literal
+/* Configuration for a session hook */
+struct ng_l2tp_sess_config {
+ uint16_t session_id; /* local session id */
+ uint16_t peer_id; /* peer's session id */
+ u_char control_dseq; /* whether we control data sequencing */
+ u_char enable_dseq; /* whether to enable data sequencing */
+ u_char include_length; /* whether to include length field */
+};
+.Ed
+.Pp
+The
+.Va session_id
+and
+.Va peer_id
+fields configure the local and remote session IDs, respectively.
+.Pp
+The
+.Va control_dseq
+and
+.Va enable_dseq
+fields determine whether sequence numbers are used with L2TP data packets.
+If
+.Va enable_dseq
+is zero, then no sequence numbers are sent and incoming sequence numbers
+are ignored.
+Otherwise, sequence numbers are included on outgoing packets and checked
+on incoming packets.
+.Pp
+If
+.Va control_dseq
+is non-zero, then the setting of
+.Va enable_dseq
+will never change except by another
+.Dv NGM_L2TP_SET_SESS_CONFIG
+control message.
+If
+.Va control_dseq
+is zero, then the peer controls whether sequence numbers are used:
+if an incoming L2TP data packet contains sequence numbers,
+.Va enable_dseq
+is set to one, and conversely if an incoming L2TP data packet does not
+contain sequence numbers,
+.Va enable_dseq
+is set to zero.
+The current value of
+.Va enable_dseq
+is always accessible via the
+.Dv NGM_L2TP_GET_SESS_CONFIG
+control message (see below).
+Typically an LNS would set
+.Va control_dseq
+to one while a LAC would set
+.Va control_dseq
+to zero (if the Sequencing Required AVP were not sent), thus giving
+control of data packet sequencing to the LNS.
+.Pp
+The
+.Va include_length
+field determines whether the L2TP header length field is included
+in outgoing L2TP data packets.
+For incoming packets, the L2TP length field is always checked when present.
+.It Dv NGM_L2TP_GET_SESS_CONFIG Pq Ic getsessconfig
+This command takes a two byte session ID as an argument and returns
+the current configuration for the corresponding data session as a
+.Vt "struct ng_l2tp_sess_config" .
+The corresponding session hook must be connected.
+.It Dv NGM_L2TP_GET_STATS Pq Ic getstats
+This command returns a
+.Vt "struct ng_l2tp_stats"
+containing statistics of the L2TP tunnel.
+.It Dv NGM_L2TP_CLR_STATS Pq Ic clrstats
+This command clears the statistics for the L2TP tunnel.
+.It Dv NGM_L2TP_GETCLR_STATS Pq Ic getclrstats
+Same as
+.Dv NGM_L2TP_GET_STATS ,
+but also atomically clears the statistics as well.
+.It Dv NGM_L2TP_GET_SESSION_STATS Pq Ic getsessstats
+This command takes a two byte session ID as an argument and returns a
+.Vt "struct ng_l2tp_session_stats"
+containing statistics for the corresponding data session.
+The corresponding session hook must be connected.
+.It Dv NGM_L2TP_CLR_SESSION_STATS Pq Ic clrsessstats
+This command takes a two byte session ID as an argument and
+clears the statistics for that data session.
+The corresponding session hook must be connected.
+.It Dv NGM_L2TP_GETCLR_SESSION_STATS Pq Ic getclrsessstats
+Same as
+.Dv NGM_L2TP_GET_SESSION_STATS ,
+but also atomically clears the statistics as well.
+.It Dv NGM_L2TP_SET_SEQ Pq Ic setsequence
+This command sets the sequence numbers of a not yet enabled node.
+It takes a
+.Vt "struct ng_l2tp_seq_config"
+as argument, where
+.Va xack
+and
+.Va nr
+respectively
+.Va ns
+and
+.Va rack
+must be the same.
+This option is particularly useful if one receives and processes
+the first packet entirely in userspace and wants to hand over further
+processing to the node.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_ksocket 4 ,
+.Xr ng_ppp 4 ,
+.Xr ng_pptpgre 4 ,
+.Xr ngctl 8
+.Rs
+.%A W. Townsley
+.%A A. Valencia
+.%A A. Rubens
+.%A G. Pall
+.%A G. Zorn
+.%A B. Palter
+.%T "Layer Two Tunneling Protocol L2TP"
+.%O RFC 2661
+.Re
+.Sh HISTORY
+The
+.Nm l2tp
+node type was developed at Packet Design, LLC,
+.Pa http://www.packetdesign.com/ .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@packetdesign.com
diff --git a/share/man/man4/ng_lmi.4 b/share/man/man4/ng_lmi.4
new file mode 100644
index 0000000..5378717
--- /dev/null
+++ b/share/man/man4/ng_lmi.4
@@ -0,0 +1,138 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_lmi.8,v 1.4 1999/01/25 23:46:27 archie Exp $
+.\"
+.Dd November 13, 2012
+.Dt NG_LMI 4
+.Os
+.Sh NAME
+.Nm ng_lmi
+.Nd frame relay LMI protocol netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_lmi.h
+.Sh DESCRIPTION
+The
+.Nm lmi
+node type performs the frame relay LMI protocol.
+It supports
+the ITU Annex A, ANSI Annex D, and Group-of-four LMI types.
+It also supports auto-detection of the LMI type.
+.Pp
+To enable a specific LMI type, connect the corresponding hook
+.Dv ( annexA ,
+.Dv annexD ,
+or
+.Dv group4 ")"
+to DLCI 0 or 1023 of a
+.Xr ng_frame_relay 4
+node.
+Typically, Annex A and Annex D live on DLCI 0 while Group-of-four
+lives on DLCI 1023.
+.Pp
+To enable LMI type auto-detection, connect the
+.Dv auto0
+hook to DLCI 0 and the
+.Dv auto1023
+hook to DLCI 1023.
+The node will attempt to automatically determine
+which LMI type is running at the switch, and go into that mode.
+.Pp
+Only one fixed LMI type, or auto-detection, can be active at any given time.
+.Pp
+The
+.Dv NGM_LMI_GET_STATUS
+control message can be used at any time to query the current status
+of the LMI protocol and each DLCI channel.
+This node also supports the
+.Dv NGM_TEXT_STATUS
+control message.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va auto1023"
+.It Va annexA
+ITU Annex A LMI hook.
+.It Va annexD
+ANSI Annex D LMI hook.
+.It Va group4
+Group-of-four LMI hook.
+.It Va auto0
+Auto-detection hook for DLCI 0.
+.It Va auto1023
+Auto-detection hook for DLCI 1023.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_LMI_GET_STATUS
+This command returns status information in a
+.Dv "struct nglmistat" :
+.Bd -literal -offset 4n
+#define NGM_LMI_STAT_ARYSIZE (1024/8)
+
+struct nglmistat {
+ u_char proto[12]; /* Active proto (same as hook name) */
+ u_char hook[12]; /* Active hook */
+ u_char fixed; /* If set to fixed LMI mode */
+ u_char autod; /* If currently auto-detecting */
+ u_char seen[NGM_LMI_STAT_ARYSIZE]; /* DLCIs ever seen */
+ u_char up[NGM_LMI_STAT_ARYSIZE]; /* DLCIs currently up */
+};
+.Ed
+.It Dv NGM_TEXT_STATUS
+This generic message returns is a human-readable version of the node status.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_frame_relay 4 ,
+.Xr ngctl 8
+.Rs
+.%T "ANSI T1.617-1991 Annex D"
+.Re
+.Rs
+.%T "ITU-T Q.933 Digital Subscriber Signaling System No. 1 - Signaling Specification for Frame Mode Basic Call Control, Annex A"
+.Re
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org
diff --git a/share/man/man4/ng_mppc.4 b/share/man/man4/ng_mppc.4
new file mode 100644
index 0000000..e7eeedf
--- /dev/null
+++ b/share/man/man4/ng_mppc.4
@@ -0,0 +1,193 @@
+.\" Copyright (c) 1996-2000 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $Whistle: ng_mppc.8,v 1.1 1999/12/08 20:20:39 archie Exp $
+.\" $FreeBSD$
+.\"
+.Dd December 8, 1999
+.Dt NG_MPPC 4
+.Os
+.Sh NAME
+.Nm ng_mppc
+.Nd Microsoft MPPC/MPPE compression and encryption netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_mppc.h
+.Sh DESCRIPTION
+The
+.Nm mppc
+node type implements the Microsoft Point-to-Point Compression (MPPC)
+and Microsoft Point-to-Point Encryption (MPPE) sub-protocols of
+the PPP protocol.
+These protocols are often used in conjunction with the Point-to-Point
+Tunneling Protocol (PPTP).
+.Pp
+The node has two hooks,
+.Dv "comp"
+for compression and
+.Dv "decomp"
+for decompression.
+Typically one or both of these hooks would be connected to the
+.Xr ng_ppp 4
+node type hook of the same name.
+Each direction of traffic flow is independent of the other.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va decomp"
+.It Va comp
+Connection to
+.Xr ng_ppp 4
+.Dv "comp"
+hook.
+Incoming frames are compressed and/or encrypted, and sent
+back out the same hook.
+.It Va decomp
+Connection to
+.Xr ng_ppp 4
+.Dv "decomp"
+hook.
+Incoming frames are decompressed and/or decrypted, and sent
+back out the same hook.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_MPPC_CONFIG_COMP
+This command resets and configures the node for a session in the
+outgoing traffic direction (i.e., for compression and/or encryption).
+This command takes a
+.Dv "struct ng_mppc_config"
+as an argument:
+.Bd -literal -offset 0n
+/* Length of MPPE key */
+#define MPPE_KEY_LEN 16
+
+/* MPPC/MPPE PPP negotiation bits */
+#define MPPC_BIT 0x00000001 /* mppc compression bits */
+#define MPPE_40 0x00000020 /* use 40 bit key */
+#define MPPE_56 0x00000080 /* use 56 bit key */
+#define MPPE_128 0x00000040 /* use 128 bit key */
+#define MPPE_BITS 0x000000e0 /* mppe encryption bits */
+#define MPPE_STATELESS 0x01000000 /* use stateless mode */
+#define MPPC_VALID_BITS 0x010000e1 /* possibly valid bits */
+
+/* Configuration for a session */
+struct ng_mppc_config {
+ u_char enable; /* enable */
+ uint32_t bits; /* config bits */
+ u_char startkey[MPPE_KEY_LEN]; /* start key */
+};
+
+.Ed
+The
+.Dv enabled
+field enables traffic flow through the node.
+The
+.Dv bits
+field contains the bits as negotiated by the Compression Control Protocol
+(CCP) in PPP.
+The
+.Dv startkey
+is only necessary if MPPE was negotiated, and must be equal to the
+session start key as defined for MPPE.
+This key is based on the MS-CHAP credentials used at link authentication time.
+.It Dv NGM_MPPC_CONFIG_DECOMP
+This command resets and configures the node for a session in the
+incoming traffic direction (i.e., for decompression and/or decryption).
+This command takes a
+.Dv "struct ng_mppc_config"
+as an argument.
+.It Dv NGM_MPPC_RESETREQ
+This message contains no arguments, and is bi-directional.
+If an error is detected during decompression, this message is sent by the
+node to the originator of the
+.Dv NGM_MPPC_CONFIG_DECOMP
+message that initiated the session.
+The receiver should respond by sending a PPP CCP Reset-Request to the peer.
+.Pp
+This message may also be received by this node type when a CCP Reset-Request
+is received by the local PPP entity.
+The node will respond by flushing its outgoing compression and encryption
+state so the remote side can resynchronize.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when both hooks have been disconnected.
+.Sh COMPILATION
+The kernel options
+.Dv NETGRAPH_MPPC_COMPRESSION
+and
+.Dv NETGRAPH_MPPC_ENCRYPTION
+are supplied to selectively compile in either or both capabilities.
+At least one of these must be defined, or else this node type is useless.
+.Pp
+The MPPC protocol requires proprietary compression code available
+from Hi/Fn (formerly STAC).
+These files must be obtained elsewhere and added to the kernel
+sources before this node type will compile with the
+.Dv NETGRAPH_MPPC_COMPRESSION
+option.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_ppp 4 ,
+.Xr ngctl 8
+.Rs
+.%A G. Pall
+.%T "Microsoft Point-To-Point Compression (MPPC) Protocol"
+.%O RFC 2118
+.Re
+.Rs
+.%A G. S. Pall
+.%A G. Zorn
+.%T "Microsoft Point-To-Point Encryption (MPPE) Protocol"
+.%O draft-ietf-pppext-mppe-04.txt
+.Re
+.Rs
+.%A K. Hamzeh
+.%A G. Pall
+.%A W. Verthein
+.%A J. Taarud
+.%A W. Little
+.%A G. Zorn
+.%T "Point-to-Point Tunneling Protocol (PPTP)"
+.%O RFC 2637
+.Re
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@FreeBSD.org
+.Sh BUGS
+In PPP, encryption should be handled by the Encryption Control Protocol (ECP)
+rather than CCP.
+However, Microsoft combined both compression and encryption into their
+``compression'' algorithm, which is confusing.
diff --git a/share/man/man4/ng_nat.4 b/share/man/man4/ng_nat.4
new file mode 100644
index 0000000..9b3b3fc
--- /dev/null
+++ b/share/man/man4/ng_nat.4
@@ -0,0 +1,350 @@
+.\" Copyright (c) 2005 Gleb Smirnoff <glebius@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 21, 2013
+.Dt NG_NAT 4
+.Os
+.Sh NAME
+.Nm ng_nat
+.Nd "NAT netgraph node type"
+.Sh SYNOPSIS
+.In netgraph/ng_nat.h
+.Sh DESCRIPTION
+An
+.Nm
+node performs network address translation (NAT) of packets
+passing through it.
+A
+.Nm nat
+node uses
+.Xr libalias 3
+engine for packet aliasing.
+.Sh HOOKS
+This node type has two hooks:
+.Bl -tag -width ".Va out"
+.It Va out
+Packets received on this hook are considered outgoing and will be
+masqueraded to a configured address.
+.It Va in
+Packets coming on this hook are considered incoming and will be
+dealiased.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_NAT_SET_IPADDR Pq Ic setaliasaddr
+Configure aliasing address for a node.
+After both hooks have been connected and aliasing address was configured,
+a node is ready for aliasing operation.
+.It Dv NGM_NAT_SET_MODE Pq Ic setmode
+Set node's operation mode using supplied
+.Vt "struct ng_nat_mode" .
+.Bd -literal
+struct ng_nat_mode {
+ uint32_t flags;
+ uint32_t mask;
+};
+/* Supported flags: */
+#define NG_NAT_LOG 0x01
+#define NG_NAT_DENY_INCOMING 0x02
+#define NG_NAT_SAME_PORTS 0x04
+#define NG_NAT_UNREGISTERED_ONLY 0x10
+#define NG_NAT_RESET_ON_ADDR_CHANGE 0x20
+#define NG_NAT_PROXY_ONLY 0x40
+#define NG_NAT_REVERSE 0x80
+.Ed
+.It Dv NGM_NAT_SET_TARGET Pq Ic settarget
+Configure target address for a node.
+When an incoming packet not associated with any pre-existing aliasing
+link arrives at the host machine, it will be sent to the specified address.
+.It Dv NGM_NAT_REDIRECT_PORT Pq Ic redirectport
+Redirect incoming connections arriving to given port(s) to
+another host and port(s).
+The following
+.Vt "struct ng_nat_redirect_port"
+must be supplied as argument.
+.Bd -literal
+#define NG_NAT_DESC_LENGTH 64
+struct ng_nat_redirect_port {
+ struct in_addr local_addr;
+ struct in_addr alias_addr;
+ struct in_addr remote_addr;
+ uint16_t local_port;
+ uint16_t alias_port;
+ uint16_t remote_port;
+ uint8_t proto;
+ char description[NG_NAT_DESC_LENGTH];
+};
+.Ed
+.Pp
+Redirection is assigned an unique ID which is returned as
+response to this message, and
+information about redirection added to
+list of static redirects which later can be retrieved by
+.Dv NGM_NAT_LIST_REDIRECTS
+message.
+.It Dv NGM_NAT_REDIRECT_ADDR Pq Ic redirectaddr
+Redirect traffic for public IP address to a machine on the
+local network.
+This function is known as
+.Em static NAT .
+The following
+.Vt "struct ng_nat_redirect_addr"
+must be supplied as argument.
+.Bd -literal
+struct ng_nat_redirect_addr {
+ struct in_addr local_addr;
+ struct in_addr alias_addr;
+ char description[NG_NAT_DESC_LENGTH];
+};
+.Ed
+.Pp
+Unique ID for this redirection is returned as response to this message.
+.It Dv NGM_NAT_REDIRECT_PROTO Pq Ic redirectproto
+Redirect incoming IP packets of protocol
+.Va proto
+(see
+.Xr protocols 5 )
+to a machine on the local network.
+The following
+.Vt "struct ng_nat_redirect_proto"
+must be supplied as argument.
+.Bd -literal
+struct ng_nat_redirect_proto {
+ struct in_addr local_addr;
+ struct in_addr alias_addr;
+ struct in_addr remote_addr;
+ uint8_t proto;
+ char description[NG_NAT_DESC_LENGTH];
+};
+.Ed
+.Pp
+Unique ID for this redirection is returned as response to this message.
+.It Dv NGM_NAT_REDIRECT_DYNAMIC Pq Ic redirectdynamic
+Mark redirection with specified ID as dynamic, i.e., it will serve
+for exactly one next connection and then will be automatically
+deleted from internal links table.
+Only fully specified links can be made dynamic.
+The redirection with this ID is also immediately deleted from
+user-visible list of static redirects (available through
+.Dv NGM_NAT_LIST_REDIRECTS
+message).
+.It Dv NGM_NAT_REDIRECT_DELETE Pq Ic redirectdelete
+Delete redirection with specified ID (currently active
+connections are not affected).
+.It Dv NGM_NAT_ADD_SERVER Pq Ic addserver
+Add another server to a pool.
+This is used to transparently offload network load on a single server
+and distribute the load across a pool of servers, also known as
+.Em LSNAT
+(RFC 2391).
+The following
+.Vt "struct ng_nat_add_server"
+must be supplied as argument.
+.Bd -literal
+struct ng_nat_add_server {
+ uint32_t id;
+ struct in_addr addr;
+ uint16_t port;
+};
+.Ed
+.Pp
+First, the redirection is set up by
+.Dv NGM_NAT_REDIRECT_PORT
+or
+.Dv NGM_NAT_REDIRECT_ADDR .
+Then, ID of that redirection is used in multiple
+.Dv NGM_NAT_ADD_SERVER
+messages to add necessary number of servers.
+For redirections created by
+.Dv NGM_NAT_REDIRECT_ADDR ,
+the
+.Va port
+is ignored and could have any value.
+Original redirection's parameters
+.Va local_addr
+and
+.Va local_port
+are also ignored after
+.Dv NGM_NAT_ADD_SERVER
+was used (they are effectively replaced by server pool).
+.It Dv NGM_NAT_LIST_REDIRECTS Pq Ic listredirects
+Return list of configured static redirects as
+.Vt "struct ng_nat_list_redirects" .
+.Bd -literal
+struct ng_nat_listrdrs_entry {
+ uint32_t id; /* Anything except zero */
+ struct in_addr local_addr;
+ struct in_addr alias_addr;
+ struct in_addr remote_addr;
+ uint16_t local_port;
+ uint16_t alias_port;
+ uint16_t remote_port;
+ uint16_t proto; /* Valid proto or NG_NAT_REDIRPROTO_ADDR */
+ uint16_t lsnat; /* LSNAT servers count */
+ char description[NG_NAT_DESC_LENGTH];
+};
+struct ng_nat_list_redirects {
+ uint32_t total_count;
+ struct ng_nat_listrdrs_entry redirects[];
+};
+#define NG_NAT_REDIRPROTO_ADDR (IPPROTO_MAX + 3)
+.Ed
+.Pp
+Entries of the
+.Va redirects
+array returned in the unified format for all redirect types.
+Ports are meaningful only if protocol is either TCP or UDP
+and
+.Em static NAT
+redirection (created by
+.Dv NGM_NAT_REDIRECT_ADDR )
+is indicated by
+.Va proto
+set to
+.Dv NG_NAT_REDIRPROTO_ADDR .
+If
+.Va lsnat
+servers counter is greater than zero, then
+.Va local_addr
+and
+.Va local_port
+are also meaningless.
+.It Dv NGM_NAT_PROXY_RULE Pq Ic proxyrule
+Specify a transparent proxying rule (string must be
+supplied as argument).
+See
+.Xr libalias 3
+for details.
+.It Dv NGM_NAT_LIBALIAS_INFO Pq Ic libaliasinfo
+Return internal statistics of
+.Xr libalias 3
+instance as
+.Vt "struct ng_nat_libalias_info" .
+.Bd -literal
+struct ng_nat_libalias_info {
+ uint32_t icmpLinkCount;
+ uint32_t udpLinkCount;
+ uint32_t tcpLinkCount;
+ uint32_t sctpLinkCount;
+ uint32_t pptpLinkCount;
+ uint32_t protoLinkCount;
+ uint32_t fragmentIdLinkCount;
+ uint32_t fragmentPtrLinkCount;
+ uint32_t sockCount;
+};
+.Ed
+In case of
+.Nm
+failed to retreive a certain counter
+from its
+.Xr libalias
+instance, the corresponding field is returned as
+.Va UINT32_MAX .
+.El
+.Pp
+In all redirection messages
+.Va local_addr
+and
+.Va local_port
+mean address and port of target machine in the internal network,
+respectively.
+If
+.Va alias_addr
+is zero, then default aliasing address (set by
+.Dv NGM_NAT_SET_IPADDR )
+is used.
+Connections can also be restricted to be accepted only
+from specific external machines by using non-zero
+.Va remote_addr
+and/or
+.Va remote_port .
+Each redirection assigned an ID which can be later used for
+redirection manipulation on individual basis (e.g., removal).
+This ID guaranteed to be unique until the node shuts down
+(it will not be reused after deletion), and is returned to
+user after making each new redirection or can be found in
+the stored list of all redirections.
+The
+.Va description
+passed to and from node unchanged, together with ID providing
+a way for several entities to concurrently manipulate
+redirections in automated way.
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when both hooks are disconnected.
+.Sh EXAMPLES
+In the following example, the packets are injected into a
+.Nm nat
+node using the
+.Xr ng_ipfw 4
+node.
+.Bd -literal -offset indent
+# Create NAT node
+ngctl mkpeer ipfw: nat 60 out
+ngctl name ipfw:60 nat
+ngctl connect ipfw: nat: 61 in
+ngctl msg nat: setaliasaddr x.y.35.8
+
+# Divert traffic into NAT node
+ipfw add 300 netgraph 61 all from any to any in via fxp0
+ipfw add 400 netgraph 60 all from any to any out via fxp0
+
+# Let packets continue with after being (de)aliased
+sysctl net.inet.ip.fw.one_pass=0
+.Ed
+.Pp
+The
+.Nm
+node can be inserted right after the
+.Xr ng_iface 4
+node in the graph.
+In the following example, we perform masquerading on a
+serial line with HDLC encapsulation.
+.Bd -literal -offset indent
+/usr/sbin/ngctl -f- <<-SEQ
+ mkpeer cp0: cisco rawdata downstream
+ name cp0:rawdata hdlc
+ mkpeer hdlc: nat inet in
+ name hdlc:inet nat
+ mkpeer nat: iface out inet
+ msg nat: setaliasaddr x.y.8.35
+SEQ
+ifconfig ng0 x.y.8.35 x.y.8.1
+.Ed
+.Sh SEE ALSO
+.Xr libalias 3 ,
+.Xr ng_ipfw 4 ,
+.Xr natd 8 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 6.0 .
+.Sh AUTHORS
+.An Gleb Smirnoff Aq glebius@FreeBSD.org
diff --git a/share/man/man4/ng_netflow.4 b/share/man/man4/ng_netflow.4
new file mode 100644
index 0000000..3c710dc
--- /dev/null
+++ b/share/man/man4/ng_netflow.4
@@ -0,0 +1,356 @@
+.\" Copyright (c) 2004-2005 Gleb Smirnoff <glebius@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 10, 2012
+.Dt NG_NETFLOW 4
+.Os
+.Sh NAME
+.Nm ng_netflow
+.Nd Cisco's NetFlow implementation
+.Sh SYNOPSIS
+.In sys/types.h
+.In netinet/in.h
+.In netgraph/netflow/ng_netflow.h
+.Sh DESCRIPTION
+The
+.Nm
+node implements Cisco's NetFlow export protocol on a router running
+.Fx .
+The
+.Nm
+node listens for incoming traffic and identifies unique flows in it.
+Flows are distinguished by endpoint IP addresses, TCP/UDP port numbers,
+ToS and input interface.
+Expired flows are exported out of the node in NetFlow version 5/9 UDP datagrams.
+Expiration reason can be one of the following:
+.Bl -dash
+.It
+RST or FIN TCP segment.
+.It
+Active timeout.
+Flows cannot live more than the specified period of time.
+The default is 1800 seconds (30 minutes).
+.It
+Inactive timeout.
+A flow was inactive for the specified period of time.
+The default is 15 seconds.
+.El
+.Pp
+Node supports IPv6 accounting (NetFlow v9 only) and is aware of multiple fibs.
+Different fibs are mapped to different domain_id in NetFlow V9 and different engine_id in NetFlow V5.
+.Sh HOOKS
+This node type supports up to
+.Dv NG_NETFLOW_MAXIFACES
+(default 65536) hooks named
+.Va iface0 , iface1 ,
+etc.,
+and the same number of hooks named
+.Va out0 , out1 ,
+etc.,
+plus two export hooks:
+.Va export
+(for NetFlow version 5) and
+.Va export9
+(for NetFlow version 9). Export can be done simultaneously for all supported
+export hooks. By default (ingress NetFlow enabled) node does NetFlow accounting of data
+received on
+.Va iface*
+hooks.
+If corresponding
+.Va out
+hook is connected, unmodified data is bypassed to it, otherwise data is freed.
+If data is received on
+.Va out
+hook, it is bypassed to corresponding
+.Va iface
+hook without any processing (egress NetFlow disabled by default).
+When full export datagram for an export protocol is built it is sent to the
+.Va export
+or
+.Va export9
+hook.
+In normal operation, one (or more) export hook is connected to the
+.Va inet/dgram/udp
+hook of the
+.Xr ng_ksocket 4
+node.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_NETFLOW_INFO Pq Ic info
+Returns some node statistics and the current timeout values in a
+.Vt "struct ng_netflow_info" .
+.It Dv NGM_NETFLOW_IFINFO Pq Ic ifinfo
+Returns information about the
+.Va iface Ns Ar N
+hook.
+The hook number is passed as an argument.
+.It Dv NGM_NETFLOW_SETDLT Pq Ic setdlt
+Sets data link type on the
+.Va iface Ns Ar N
+hook.
+Currently, supported types are
+.Cm DLT_RAW
+(raw IP datagrams) and
+.Cm DLT_EN10MB
+(Ethernet).
+DLT_ definitions can be found in
+.In net/bpf.h
+header.
+Currently used values are 1 for
+.Cm DLT_EN10MB
+and 12 for
+.Cm DLT_RAW .
+This message type uses
+.Vt "struct ng_netflow_setdlt"
+as an argument:
+.Bd -literal -offset 4n
+struct ng_netflow_setdlt {
+ uint16_t iface; /* which iface dlt change */
+ uint8_t dlt; /* DLT_XXX from bpf.h */
+};
+.Ed
+.Pp
+The requested
+.Va iface Ns Ar N
+hook must already be connected, otherwise message send operation will
+return an error.
+.It Dv NGM_NETFLOW_SETIFINDEX Pq Ic setifindex
+In some cases,
+.Nm
+may be unable to determine the input interface index of a packet.
+This can happen if traffic enters the
+.Nm
+node before it comes to the system interface's input queue.
+An example of such a setup is capturing a traffic
+.Em between
+synchronous data line and
+.Xr ng_iface 4 .
+In this case, the input index should be associated with a given hook.
+The interface's index can be determined via
+.Xr if_nametoindex 3
+from userland.
+This message requires
+.Vt "struct ng_netflow_setifindex"
+as an argument:
+.Bd -literal -offset 4n
+struct ng_netflow_setifindex {
+ uint16_t iface; /* which iface index change */
+ uint16_t index; /* new index */
+};
+.Ed
+.Pp
+The requested
+.Va iface Ns Ar N
+hook must already be connected, otherwise the message
+send operation will return an error.
+.It Dv NGM_NETFLOW_SETTIMEOUTS Pq Ic settimeouts
+Sets values in seconds for NetFlow active/inactive timeouts.
+This message requires
+.Vt "struct ng_netflow_settimeouts"
+as an argument:
+.Bd -literal -offset 4n
+struct ng_netflow_settimeouts {
+ uint32_t inactive_timeout; /* flow inactive timeout */
+ uint32_t active_timeout; /* flow active timeout */
+};
+.Ed
+.It Dv NGM_NETFLOW_SETCONFIG Pq Ic setconfig
+Sets configuration for the specified interface.
+This message requires
+.Vt "struct ng_netflow_setconfig"
+as an argument:
+.Bd -literal -offset 4n
+struct ng_netflow_setconfig {
+ uint16_t iface; /* which iface config change */
+ uint32_t conf; /* new config */
+#define NG_NETFLOW_CONF_INGRESS 1
+#define NG_NETFLOW_CONF_EGRESS 2
+#define NG_NETFLOW_CONF_ONCE 4
+#define NG_NETFLOW_CONF_THISONCE 8
+#define NG_NETFLOW_CONF_NOSRCLOOKUP 16
+#define NG_NETFLOW_CONF_NODSTLOOKUP 32
+};
+.Ed
+.Pp
+Configuration is a bitmask of several options. Option NG_NETFLOW_CONF_INGRESS
+enabled by default enables ingress NetFlow generation (for data coming from
+ifaceX hook).
+Option
+.Va NG_NETFLOW_CONF_EGRESS
+enables egress NetFlow (for data coming from outX hook).
+Option
+.Va NG_NETFLOW_CONF_ONCE
+defines that packet should be accounted only once if it several times passes
+via netflow node.
+Option
+.Va NG_NETFLOW_CONF_THISONCE
+defines that packet should be accounted only once if it several times passes
+via exactly this netflow node.
+These two options are important to avoid duplicate accounting when both ingress
+and egress NetFlow are enabled.
+Option
+.Va NG_NETFLOW_CONF_NOSRCLOOKUP
+skips radix lookup on flow source address used to fill in network mask.
+Option
+.Va NG_NETFLOW_CONF_NODSTLOOKUP
+skips radix lookup on destination (which fills egress interface id, destination
+mask and gateway).
+If one doesn't need data provided by lookups, he/she can disable them, to reduce
+load on routers.
+.It Dv NGM_NETFLOW_SETTEMPLATE Pq Ic settemplate
+Sets various timeouts to announce data flow templates
+(NetFlow v9-specific). This message requires
+.Vt "struct ng_netflow_settemplate"
+as an argument:
+.Bd -literal -offset 4n
+struct ng_netflow_settemplate {
+ uint16_t time; /* max time between announce */
+ uint16_t packets; /* max packets between announce */
+};
+.Ed
+.Pp
+Value of time field represents time in seconds to re-announce data templates.
+Value of packets field represents maximum packets count between
+re-announcing data templates.
+.It Dv NGM_NETFLOW_SETMTU Pq Ic setmtu
+Sets export interface MTU to build packets of specified size (NetFlow v9-specific).
+This message requires
+.Vt "struct ng_netflow_setmtu"
+as an argument:
+.Bd -literal -offset 4n
+struct ng_netflow_setemtu {
+ uint16_t mtu; /* MTU for packet */
+};
+.Ed
+.Pp
+Default is 1500 bytes.
+.It Dv NGM_NETFLOW_SHOW
+This control message asks a node to dump the entire contents of the flow cache.
+It is called from
+.Xr flowctl 8 ,
+not directly from
+.Xr ngctl 8 .
+.It Dv NGM_NETFLOW_V9INFO Pq Ic v9info
+Returns some NetFlow v9 related values in a
+.Bd -literal -offset 4n
+struct ng_netflow_v9info {
+ uint16_t templ_packets; /* v9 template packets */
+ uint16_t templ_time; /* v9 template time */
+ uint16_t mtu; /* v9 MTU */
+};
+.Ed
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh EXAMPLES
+The simplest possible configuration is one Ethernet interface, where
+flow collecting is enabled.
+.Bd -literal -offset indent
+/usr/sbin/ngctl -f- <<-SEQ
+ mkpeer fxp0: netflow lower iface0
+ name fxp0:lower netflow
+ connect fxp0: netflow: upper out0
+ mkpeer netflow: ksocket export inet/dgram/udp
+ msg netflow:export connect inet/10.0.0.1:4444
+SEQ
+.Ed
+.Pp
+This is a more complicated example of a router with 2 NetFlow-enabled
+interfaces
+.Li fxp0
+and
+.Li ng0 .
+Note that the
+.Va ng0:
+node in this example is connected to
+.Xr ng_tee 4 .
+The latter sends us a copy of IP packets, which we analyze and free.
+On
+.Va fxp0:
+we do not use tee, but send packets back to either node.
+.Bd -literal -offset indent
+/usr/sbin/ngctl -f- <<-SEQ
+ # connect ng0's tee to iface0 hook
+ mkpeer ng0:inet netflow right2left iface0
+ name ng0:inet.right2left netflow
+ # set DLT to raw mode
+ msg netflow: setdlt { iface=0 dlt=12 }
+ # set interface index (5 in this example)
+ msg netflow: setifindex { iface=0 index=5 }
+
+ # Connect fxp0: to iface1 and out1 hook
+ connect fxp0: netflow: lower iface1
+ connect fxp0: netflow: upper out1
+
+ # Create ksocket node on export hook, and configure it
+ # to send exports to proper destination
+ mkpeer netflow: ksocket export inet/dgram/udp
+ msg netflow:export connect inet/10.0.0.1:4444
+SEQ
+.Ed
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr setfib 2 ,
+.Xr ng_ether 4 ,
+.Xr ng_iface 4 ,
+.Xr ng_ksocket 4 ,
+.Xr ng_tee 4 ,
+.Xr flowctl 8 ,
+.Xr ngctl 8
+.Rs
+.%A B. Claise, Ed
+.%T "Cisco Systems NetFlow Services Export Version 9"
+.%O RFC 3954
+.Re
+.Pp
+.Pa http://www.cisco.com/en/US/docs/ios/solutions_docs/netflow/nfwhite.html
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+node type was written by
+.An Gleb Smirnoff Aq glebius@FreeBSD.org ,
+.An Alexander Motin Aq mav@FreeBSD.org ,
+.An Alexander Chernikov Aq melifaro@ipfw.ru .
+The initial code was based on
+.Nm ng_ipacct
+written by
+.An Roman V. Palagin Aq romanp@unshadow.net .
+.Sh BUGS
+Cache snapshot obtained via
+.Dv NGM_NETFLOW_SHOW
+command may lack some percentage of entries under severe load.
+.Pp
+The
+.Nm
+node type does not fill in AS numbers.
+This is due to the lack of necessary information in the kernel routing table.
+However, this information can be injected into the kernel from a routing daemon
+such as GNU Zebra.
+This functionality may become available in future releases.
diff --git a/share/man/man4/ng_one2many.4 b/share/man/man4/ng_one2many.4
new file mode 100644
index 0000000..288ea18
--- /dev/null
+++ b/share/man/man4/ng_one2many.4
@@ -0,0 +1,278 @@
+.\" Copyright (c) 2000 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 13, 2012
+.Dt NG_ONE2MANY 4
+.Os
+.Sh NAME
+.Nm ng_one2many
+.Nd packet multiplexing netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_one2many.h
+.Sh DESCRIPTION
+The
+.Nm one2many
+provides a simple mechanism for routing packets over several links
+in a one-to-many (and in the reverse direction, many-to-one) fashion.
+There is a single hook named
+.Dv one ,
+and multiple hooks named
+.Dv many0 ,
+.Dv many1 ,
+etc.
+Packets received on any of the
+.Dv many
+hooks are forwarded out the
+.Dv one
+hook.
+Packets received on the
+.Dv one
+hook are forwarded out one or more of the
+.Dv many
+hooks; which hook(s) is determined by the node's configured
+transmit algorithm.
+Packets are not altered in any way.
+.Pp
+Each of the connected many links may be considered to be up or down.
+Packets are never delivered out a many hook that is down.
+How a link is determined to be up or down depends on the node's
+configured link failure detection algorithm.
+.Pp
+Before an interface or link can be plumbed into a group, its status
+must be marked as being
+.Dq up .
+This is normally setup during the initial boot stages by
+.Xr rc.conf 5 .
+It is also possible to change an interface's status to
+.Dq up
+by using the
+.Xr ifconfig 8
+utility.
+.Sh TRANSMIT ALGORITHMS
+.Bl -tag -width foo
+.It Dv NG_ONE2MANY_XMIT_ROUNDROBIN
+Packets are delivered out the many hooks in sequential order.
+Each packet goes out on a different
+.Dv many
+hook.
+.It Dv NG_ONE2MANY_XMIT_ALL
+Packets are delivered out all the
+.Dv many
+hooks.
+Each packet goes out each
+.Dv many
+hook.
+.It Dv NG_ONE2MANY_XMIT_FAILOVER
+Packets are delivered out the first active
+.Dv many
+hook.
+.El
+.Pp
+In the future other algorithms may be added as well.
+.Sh LINK FAILURE DETECTION
+The node distinguishes between active and failed links.
+Data is sent only to active links.
+The following link failure detection algorithms are available:
+.Bl -tag -width foo
+.It Dv NG_ONE2MANY_FAIL_MANUAL
+The node is explicitly told which of the links are up via the
+.Dv NGM_ONE2MANY_SET_CONFIG
+control message (see below).
+Newly connected links are down until configured otherwise.
+.It Dv NG_ONE2MANY_FAIL_NOTIFY
+The node listens to flow control message from
+.Va many
+hooks, and considers link failed if
+.Dv NGM_LINK_IS_DOWN
+is received.
+If the
+.Dv NGM_LINK_IS_UP
+message is received, node considers link active.
+.El
+.Pp
+In the future other algorithms may be added as well.
+.Pp
+When all links are considered failed, node sends the
+.Dv NGM_LINK_IS_DOWN
+message towards the
+.Va one
+hook.
+When at least one link comes up, node sends the
+.Dv NGM_LINK_IS_UP
+message towards the
+.Va one
+hook.
+.Sh HOOKS
+This node type supports up to
+.Dv NG_ONE2MANY_MAX_LINKS
+hooks named
+.Dv many0 ,
+.Dv many1 ,
+etc.,
+plus a single hook named
+.Dv one .
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the
+following:
+.Bl -tag -width foo
+.It Dv NGM_ONE2MANY_SET_CONFIG Pq Ic setconfig
+Sets the node configuration using a
+.Dv "struct ng_one2many_link_config"
+as the control message argument:
+.Bd -literal
+/* Node configuration structure */
+struct ng_one2many_config {
+ uint32_t xmitAlg; /* how to distribute packets */
+ uint32_t failAlg; /* how to detect link failure */
+ u_char enabledLinks[NG_ONE2MANY_MAX_LINKS];
+};
+.Ed
+.Pp
+Currently, the valid settings for the
+.Dv xmitAlg
+field are
+.Dv NG_ONE2MANY_XMIT_ROUNDROBIN
+(default) or
+.Dv NG_ONE2MANY_XMIT_ALL .
+The valid settings for
+.Dv failAlg
+are
+.Dv NG_ONE2MANY_FAIL_MANUAL
+(default) or
+.Dv NG_ONE2MANY_FAIL_NOTIFY .
+.It Dv NGM_ONE2MANY_GET_CONFIG Pq Ic getconfig
+Returns the current node configuration in a
+.Dv "struct ng_one2many_link_config" .
+.It Dv NGM_ONE2MANY_GET_STATS Pq Ic getstats
+This command takes a 32 bit link number as an argument and
+returns a
+.Dv "struct ng_one2many_link_stats"
+containing statistics for the corresponding
+.Dv many
+link, which may or may not be currently connected:
+.Bd -literal
+/* Statistics structure (one for each link) */
+struct ng_one2many_link_stats {
+ uint64_t recvOctets; /* total octets rec'd on link */
+ uint64_t recvPackets; /* total pkts rec'd on link */
+ uint64_t xmitOctets; /* total octets xmit'd on link */
+ uint64_t xmitPackets; /* total pkts xmit'd on link */
+ uint64_t memoryFailures; /* times couldn't get mem or mbuf */
+};
+.Ed
+.Pp
+To access statistics for the
+.Dv one
+link, use the link number
+.Dv -1 .
+.It Dv NGM_ONE2MANY_CLR_STATS Pq Ic clrstats
+This command takes a 32 bit link number as an argument and
+clears the statistics for that link.
+.It Dv NGM_ONE2MANY_GETCLR_STATS Pq Ic getclrstats
+Same as
+.Dv NGM_ONE2MANY_GET_STATS ,
+but also atomically clears the statistics for the link as well.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh EXAMPLES
+The following commands will set up Ethernet interfaces
+.Dv fxp0
+to deliver packets alternating over the physical interfaces
+corresponding to networking interfaces
+.Dv fxp0
+through
+.Dv fxp3 :
+.Bd -literal
+ # Plumb nodes together
+
+ ngctl mkpeer fxp0: one2many upper one
+ ngctl connect fxp0: fxp0:upper lower many0
+ ngctl connect fxp1: fxp0:upper lower many1
+ ngctl connect fxp2: fxp0:upper lower many2
+ ngctl connect fxp3: fxp0:upper lower many3
+
+ # Allow fxp1 through fxp3 to xmit/recv fxp0 frames
+
+ ngctl msg fxp1: setpromisc 1
+ ngctl msg fxp2: setpromisc 1
+ ngctl msg fxp3: setpromisc 1
+ ngctl msg fxp1: setautosrc 0
+ ngctl msg fxp2: setautosrc 0
+ ngctl msg fxp3: setautosrc 0
+
+ # Configure all four links as up
+
+ ngctl msg fxp0:upper \\
+ setconfig "{ xmitAlg=1 failAlg=1 enabledLinks=[ 1 1 1 1 ] }"
+
+ # Bring up interface
+
+ ifconfig fxp0 192.168.1.1 netmask 0xfffffffc
+.Ed
+.Pp
+With a similar setup on a peer machine (using the address
+192.168.1.2), a point-to-point
+Ethernet connection with four times normal bandwidth is
+achieved.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_bridge 4 ,
+.Xr ng_ether 4 ,
+.Xr ng_hub 4 ,
+.Xr ifconfig 8 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.2 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm one2many
+netgraph node (with round-robin algorithm) was written by
+.An Archie Cobbs
+.Aq archie@FreeBSD.org .
+The all algorithm was added by
+.An Rogier R. Mulhuijzen
+.Aq drwilco@drwilco.net .
+.Sh BUGS
+More transmit and link failure algorithms should be supported.
+A good candidate is Cisco's Etherchannel.
diff --git a/share/man/man4/ng_patch.4 b/share/man/man4/ng_patch.4
new file mode 100644
index 0000000..db7ede54
--- /dev/null
+++ b/share/man/man4/ng_patch.4
@@ -0,0 +1,235 @@
+.\" Copyright (c) 2010 Maxim Ignatenko <gelraen.ua@gmail.com>
+.\" Copyright (c) 2010 Vadim Goncharov <vadimnuclight@tpu.ru>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 5, 2012
+.Dt NG_PATCH 4
+.Os
+.Sh NAME
+.Nm ng_patch
+.Nd "trivial mbuf data modifying netgraph node type"
+.Sh SYNOPSIS
+.In netgraph/ng_patch.h
+.Sh DESCRIPTION
+The
+.Nm patch
+node performs data modification of packets passing through it.
+Modifications are restricted to a subset of C language operations
+on unsigned integers of 8, 16, 32 or 64 bit size.
+These are: set to new value (=), addition (+=), subtraction (-=),
+multiplication (*=), division (/=), negation (= -),
+bitwise AND (&=), bitwise OR (|=), bitwise eXclusive OR (^=),
+shift left (<<=), shift right (>>=).
+A negation operation is the one exception: integer is treated as signed
+and second operand (the
+.Va value )
+is not used.
+There may be several modification operations, they are all applied
+to a packet sequentially in order they were specified by user.
+Data payload of packet is viewed as array of bytes, with zero offset
+corresponding to the very first byte of packet headers, and
+.Va length
+bytes beginning from
+.Va offset
+are taken as a single integer in network byte order.
+.Sh HOOKS
+This node type has two hooks:
+.Bl -tag -width ".Va out"
+.It Va in
+Packets received on this hook are modified according to rules specified
+in config and then forwarded to
+.Ar out
+hook, if it exists and connected.
+Otherwise they are reflected back to the
+.Ar in
+hook.
+.It Va out
+Packets received on this hook are forwarded to
+.Ar in
+hook without any changes.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_PATCH_SETCONFIG Pq Ic setconfig
+This command sets the sequence of modify operations
+that will be applied to incoming data on a hook.
+The following
+.Vt "struct ng_patch_config"
+must be supplied as an argument:
+.Bd -literal -offset 4n
+struct ng_patch_op {
+ uint64_t value;
+ uint32_t offset;
+ uint16_t length; /* 1,2,4 or 8 bytes */
+ uint16_t mode;
+};
+/* Patching modes */
+#define NG_PATCH_MODE_SET 1
+#define NG_PATCH_MODE_ADD 2
+#define NG_PATCH_MODE_SUB 3
+#define NG_PATCH_MODE_MUL 4
+#define NG_PATCH_MODE_DIV 5
+#define NG_PATCH_MODE_NEG 6
+#define NG_PATCH_MODE_AND 7
+#define NG_PATCH_MODE_OR 8
+#define NG_PATCH_MODE_XOR 9
+#define NG_PATCH_MODE_SHL 10
+#define NG_PATCH_MODE_SHR 11
+
+struct ng_patch_config {
+ uint32_t count;
+ uint32_t csum_flags;
+ struct ng_patch_op ops[];
+};
+.Ed
+.Pp
+The
+.Va csum_flags
+can be set to any combination of CSUM_IP, CSUM_TCP, CSUM_SCTP and CSUM_UDP
+(other values are ignored) for instructing the IP stack to recalculate the
+corresponding checksum before transmitting packet on output interface.
+The
+.Nm
+node does not do any checksum correction by itself.
+.It Dv NGM_PATCH_GETCONFIG Pq Ic getconfig
+This control message obtains current set of modify operations,
+returned as
+.Vt "struct ng_patch_config" .
+.It Dv NGM_PATCH_GET_STATS Pq Ic getstats
+Returns node statistics as a
+.Vt "struct ng_patch_stats" .
+.It Dv NGM_PATCH_CLR_STATS Pq Ic clrstats
+Clear node statistics.
+.It Dv NGM_PATCH_GETCLR_STATS Pq Ic getclrstats
+This command is identical to
+.Dv NGM_PATCH_GET_STATS ,
+except that the statistics are also atomically cleared.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh EXAMPLES
+The
+.Nm
+node allows to modify TTL and TOS/DSCP fields in IP packets.
+Suppose you have two adjacent simplex links to remote network
+(e.g.\& satellite), so that the packets expiring in between
+will generate unwanted ICMP-replies which have to go forth, not back.
+Thus you need to raise TTL of every packet entering link by 2
+to ensure the TTL will not reach zero there.
+So you setup
+.Xr ipfw 8
+rule with
+.Cm netgraph
+action to inject packets going to other end of simplex link by the
+following
+.Xr ngctl 8
+script:
+.Bd -literal -offset 4n
+/usr/sbin/ngctl -f- <<-SEQ
+ mkpeer ipfw: patch 200 in
+ name ipfw:200 ttl_add
+ msg ttl_add: setconfig { count=1 csum_flags=1 ops=[ \e
+ { mode=2 value=3 length=1 offset=8 } ] }
+SEQ
+/sbin/ipfw add 150 netgraph 200 ip from any to simplex.remote.net
+.Ed
+.Pp
+Here
+.Dq Li ttl_add
+node of type
+.Nm
+configured to add (mode
+.Dv NG_PATCH_MODE_ADD )
+a
+.Va value
+of 3 to a one-byte TTL field, which is 9th byte of IP packet header.
+.Pp
+Another example would be two consecutive modifications of packet TOS
+field: say, you need to clear the
+.Dv IPTOS_THROUGHPUT
+bit and set the
+.Dv IPTOS_MINCOST
+bit.
+So you do:
+.Bd -literal -offset 4n
+/usr/sbin/ngctl -f- <<-SEQ
+ mkpeer ipfw: patch 300 in
+ name ipfw:300 tos_chg
+ msg tos_chg: setconfig { count=2 csum_flags=1 ops=[ \e
+ { mode=7 value=0xf7 length=1 offset=1 } \e
+ { mode=8 value=0x02 length=1 offset=1 } ] }
+SEQ
+/sbin/ipfw add 160 netgraph 300 ip from any to any not dst-port 80
+.Ed
+.Pp
+This first does
+.Dv NG_PATCH_MODE_AND
+clearing the fourth bit and then
+.Dv NG_PATCH_MODE_OR
+setting the third bit.
+.Pp
+In both examples the
+.Va csum_flags
+field indicates that IP checksum (but not TCP or UDP checksum) should be
+recalculated before transmit.
+.Pp
+Note: one should ensure that packets are returned to ipfw after processing
+inside
+.Xr netgraph 4 ,
+by setting appropriate
+.Xr sysctl 8
+variable:
+.Bd -literal -offset 4n
+sysctl net.inet.ip.fw.one_pass=0
+.Ed
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_ipfw 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 8.1 .
+.Sh AUTHORS
+.An "Maxim Ignatenko" Aq gelraen.ua@gmail.com .
+This manual page was written by
+.An "Vadim Goncharov" Aq vadimnuclight@tpu.ru .
+.Sh BUGS
+Node blindly tries to apply every patching operation to each packet
+(except those which offset if greater than length of the packet),
+so be sure that you supply only the right packets to it (e.g. changing
+bytes in the ARP packets meant to be in IP header could corrupt
+them and make your machine unreachable from the network).
+.Pp
+.Em !!! WARNING !!!
+.Pp
+Output path of the IP stack assumes correct fields and lengths in the
+packets - changing them by mistake to incorrect values can cause
+unpredictable results including kernel panics.
diff --git a/share/man/man4/ng_ppp.4 b/share/man/man4/ng_ppp.4
new file mode 100644
index 0000000..26c2853
--- /dev/null
+++ b/share/man/man4/ng_ppp.4
@@ -0,0 +1,460 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_ppp.8,v 1.3 1999/01/25 23:46:27 archie Exp $
+.\"
+.Dd November 13, 2012
+.Dt NG_PPP 4
+.Os
+.Sh NAME
+.Nm ng_ppp
+.Nd PPP protocol netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_ppp.h
+.Sh DESCRIPTION
+The
+.Nm ppp
+node type performs multiplexing for the PPP protocol.
+It handles only packets that contain data, and forwards protocol negotiation
+and control packets to a separate controlling entity (e.g., a
+user-land daemon).
+This approach combines the fast dispatch of
+kernel implementations with the configuration flexibility of a
+user-land implementations.
+The PPP node type directly supports
+multi-link PPP, Van Jacobson compression, PPP compression, PPP
+encryption, and the IP, IPX, and AppleTalk protocols.
+A single PPP node corresponds to one PPP multi-link bundle.
+.Pp
+There is a separate hook for each PPP link in the bundle, plus
+several hooks corresponding to the directly supported protocols.
+For compression and encryption, separate attached nodes are required
+to do the actual work.
+The node type used will of course depend on the algorithm negotiated.
+There is also a
+.Dv bypass
+hook which is used to handle any protocol not directly supported
+by the node.
+This includes all of the control protocols: LCP, IPCP,
+CCP, etc.
+Typically this node is connected to a user-land daemon via a
+.Xr ng_socket 4
+type node.
+.Sh ENABLING FUNCTIONALITY
+In general, the PPP node enables a specific link or functionality when
+(a) a
+.Dv NGM_PPP_SET_CONFIG
+message has been received which enables it, and
+(b) the corresponding hook(s) are connected.
+This allows the controlling entity to use either method (a) or (b)
+(or both) to control the node's behavior.
+When a link is connected but disabled, traffic can still flow on
+the link via the
+.Dv bypass
+hook (see below).
+.Sh LINK HOOKS
+During normal operation, the individual PPP links are connected to hooks
+.Dv link0 ,
+.Dv link1 ,
+etc.
+Up to
+.Dv NG_PPP_MAX_LINKS
+links are supported.
+These device-independent hooks transmit and receive full PPP
+frames, which include the PPP protocol, address, control, and
+information fields, but no checksum or other link-specific fields.
+.Pp
+On outgoing frames, when protocol compression
+has been enabled and the protocol number is suitable for compression,
+the protocol field will be compressed (i.e., sent as one byte
+instead of two).
+Either compressed or uncompressed protocol fields
+are accepted on incoming frames.
+Similarly, if address and control
+field compression has been enabled for the link, the address and
+control fields will be omitted (except for LCP frames as required
+by the standards).
+Incoming frames have the address and control fields
+stripped automatically if present.
+.Pp
+Since all negotiation is handled outside the PPP node, the links
+should not be connected and enabled until the corresponding link
+has reached the network phase (i.e., LCP negotiation and authentication
+have completed successfully) and the PPP node has been informed of
+the link parameters via the
+.Dv NGM_PPP_LINK_CONFIG
+message.
+.Pp
+When a link is connected but disabled, all received frames are forwarded
+directly out the
+.Dv bypass
+hook, and conversely, frames may be transmitted via the
+.Dv bypass
+hook as well.
+This mode is appropriate for the link authentication phase.
+As soon as the link is enabled, the PPP node will
+begin processing frames received on the link.
+.Sh COMPRESSION AND ENCRYPTION
+Compression is supported via two hooks,
+.Dv compress
+and
+.Dv decompress .
+Compression and decompression can be enabled by toggling the
+.Vt enableCompression
+and
+.Vt enableDecompression
+fields of the node configuration structure.
+(See below.)
+If
+.Vt enableCompression
+is set to
+.Dv NG_PPP_COMPRESS_SIMPLE ,
+then all outgoing frames are sent to the
+.Dv compress
+hook and all packets received on this hook are expected to be
+compressed, so the COMPD tag is put on them unconditionally.
+If
+.Vt enableCompression
+is set to
+.Dv NG_PPP_COMPRESS_FULL ,
+then packets received on the
+.Dv compress
+hook are resent as is.
+The compressor node should put the tag, if the packet was compressed.
+If
+.Vt enableDecompression
+is set to
+.Dv NG_PPP_DECOMPRESS_SIMPLE ,
+then the node will sent to the
+.Dv decompress
+hook only those frames, that are marked with the COMPD tag.
+If
+.Vt enableDecompression
+is set to
+.Dv NG_PPP_DECOMPRESS_FULL ,
+then the node will sent all incoming packets to the
+.Dv decompress
+hook.
+Compression and decompression can be completely disabled by setting the
+.Vt enableCompression
+and
+.Vt enableDecompression
+fields to the
+.Dv NG_PPP_COMPRESS_NONE
+and
+.Dv NG_PPP_DECOMPRESS_NONE ,
+respectively.
+.Pp
+Encryption works exactly analogously via the
+.Dv encrypt
+and
+.Dv decrypt
+nodes.
+Data is always compressed before being encrypted,
+and decrypted before being decompressed.
+.Pp
+Only bundle-level compression and encryption is directly supported;
+link-level compression and encryption can be handled transparently
+by downstream nodes.
+.Sh VAN JACOBSON COMPRESSION
+When all of the
+.Dv vjc_ip ,
+.Dv vjc_vjcomp ,
+.Dv vjc_vjuncomp ,
+and
+.Dv vjc_vjip
+hooks are connected, and the corresponding configuration flag is
+enabled, Van Jacobson compression and/or decompression will become active.
+Normally these hooks connect to the corresponding hooks of a single
+.Xr ng_vjc 4
+node.
+The PPP node is compatible with the
+.Dq pass through
+modes of the
+.Xr ng_vjc 4
+node type.
+.Sh BYPASS HOOK
+When a frame is received on a link with an unsupported protocol,
+or a protocol which is disabled or for which the corresponding hook
+is unconnected, the PPP node forwards the frame out the
+.Dv bypass
+hook, prepended with a four byte prefix.
+This first two bytes of
+the prefix indicate the link number on which the frame was received
+(in network order).
+For such frames received over the bundle (i.e., encapsulated in the
+multi-link protocol), the special link number
+.Dv NG_PPP_BUNDLE_LINKNUM
+is used.
+After the two byte link number is the two byte PPP protocol number
+(also in network order).
+The PPP protocol number is two bytes long even if the original frame
+was protocol compressed.
+.Pp
+Conversely, any data written to the
+.Dv bypass
+hook is assumed to be in this same format.
+The four byte header is
+stripped off, the PPP protocol number is prepended (possibly compressed),
+and the frame is delivered over the desired link.
+If the link number is
+.Dv NG_PPP_BUNDLE_LINKNUM
+the frame will be delivered over the multi-link bundle; or, if multi-link
+is disabled, over the (single) PPP link.
+.Pp
+Typically when the controlling entity receives an unexpected packet on the
+.Dv bypass
+hook it responds either by dropping the frame (if it is not ready for
+the protocol) or with an LCP protocol reject (if it does not recognize
+or expect the protocol).
+.Sh MULTILINK OPERATION
+To enable multi-link PPP, the corresponding configuration flag must be set
+and at least one link connected.
+The PPP node will not allow more than
+one link to be connected if multi-link is not enabled, nor will it allow
+certain multi-link settings to be changed while multi-link operation is
+active (e.g., short sequence number header format).
+.Pp
+Since packets are sent as fragments across multiple individual links,
+it is important that when a link goes down the PPP node is notified
+immediately, either by disconnecting the corresponding hook or disabling
+the link via the
+.Dv NGM_PPP_SET_CONFIG
+control message.
+.Pp
+Each link has configuration parameters for latency (specified in
+milliseconds) and bandwidth (specified in tens of bytes per second).
+The PPP node can be configured for
+.Em round-robin
+or
+.Em optimized
+packet delivery.
+.Pp
+When configured for round-robin delivery, the latency and bandwidth
+values are ignored and the PPP node simply sends each frame as a
+single fragment, alternating frames across all the links in the
+bundle.
+This scheme has the advantage that even if one link fails
+silently, some packets will still get through.
+It has the disadvantage
+of sub-optimal overall bundle latency, which is important for
+interactive response time, and sub-optimal overall bundle bandwidth
+when links with different bandwidths exist in the same bundle.
+.Pp
+When configured for optimal delivery, the PPP node distributes the
+packet across the links in a way that minimizes the time it takes
+for the completed packet to be received by the far end.
+This involves taking into account each link's latency, bandwidth, and
+current queue length.
+Therefore these numbers should be configured as accurately as possible.
+The algorithm does require
+some computation, so may not be appropriate for very slow machines
+and/or very fast links.
+.Pp
+As a special case, if all links have identical latency and bandwidth,
+then the above algorithm is disabled (because it is unnecessary)
+and the PPP node simply fragments frames into equal sized portions
+across all of the links.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va vjc_vjuncomp"
+.It Va link<N>
+Individual PPP link number
+.Dv <N>
+.It Va compress
+Connection to compression engine
+.It Va decompress
+Connection to decompression engine
+.It Va encrypt
+Connection to encryption engine
+.It Va decrypt
+Connection to decryption engine
+.It Va vjc_ip
+Connection to
+.Xr ng_vjc 4
+.Dv ip
+hook
+.It Va vjc_vjcomp
+Connection to
+.Xr ng_vjc 4
+.Dv vjcomp
+hook
+.It Va vjc_vjuncomp
+Connection to
+.Xr ng_vjc 4
+.Dv vjuncomp
+hook
+.It Va vjc_vjip
+Connection to
+.Xr ng_vjc 4
+.Dv vjip
+hook
+.It Va inet
+IP packet data
+.It Va ipv6
+IPv6 packet data
+.It Va atalk
+AppleTalk packet data
+.It Va ipx
+IPX packet data
+.It Va bypass
+Bypass hook; frames have a four byte header consisting of
+a link number and a PPP protocol number.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_PPP_SET_CONFIG Pq Ic setconfig
+This command configures all aspects of the node.
+This includes enabling
+multi-link PPP, encryption, compression, Van Jacobson compression, and IP,
+IPv6, AppleTalk, and IPX packet delivery.
+It includes per-link configuration,
+including enabling the link, setting latency and bandwidth parameters,
+and enabling protocol field compression.
+Note that no link or functionality
+is active until the corresponding hook is also connected.
+This command takes a
+.Dv "struct ng_ppp_node_conf"
+as an argument:
+.Bd -literal -offset 0n
+/* Per-link config structure */
+struct ng_ppp_link_conf {
+ u_char enableLink; /* enable this link */
+ u_char enableProtoComp;/* enable protocol field compression */
+ u_char enableACFComp; /* enable addr/ctrl field compression */
+ uint16_t mru; /* peer MRU */
+ uint32_t latency; /* link latency (in milliseconds) */
+ uint32_t bandwidth; /* link bandwidth (in bytes/sec/10) */
+};
+
+/* Bundle config structure */
+struct ng_ppp_bund_conf {
+ uint16_t mrru; /* multilink peer MRRU */
+ u_char enableMultilink; /* enable multilink */
+ u_char recvShortSeq; /* recv multilink short seq # */
+ u_char xmitShortSeq; /* xmit multilink short seq # */
+ u_char enableRoundRobin; /* xmit whole packets */
+ u_char enableIP; /* enable IP data flow */
+ u_char enableIPv6; /* enable IPv6 data flow */
+ u_char enableAtalk; /* enable AppleTalk data flow */
+ u_char enableIPX; /* enable IPX data flow */
+ u_char enableCompression; /* enable PPP compression */
+ u_char enableDecompression; /* enable PPP decompression */
+ u_char enableEncryption; /* enable PPP encryption */
+ u_char enableDecryption; /* enable PPP decryption */
+ u_char enableVJCompression; /* enable VJ compression */
+ u_char enableVJDecompression; /* enable VJ decompression */
+};
+
+struct ng_ppp_node_conf {
+ struct ng_ppp_bund_conf bund;
+ struct ng_ppp_link_conf links[NG_PPP_MAX_LINKS];
+};
+.Ed
+.It Dv NGM_PPP_GET_CONFIG Pq Ic getconfig
+Returns the current configuration as a
+.Dv "struct ng_ppp_node_conf" .
+.It Dv NGM_PPP_GET_LINK_STATS Pq Ic getstats
+This command takes a two byte link number as an argument and returns a
+.Dv "struct ng_ppp_link_stat"
+containing statistics for the corresponding link.
+Here
+.Dv NG_PPP_BUNDLE_LINKNUM
+is a valid link number corresponding to the multi-link bundle.
+.It Dv NGM_PPP_GET_LINK_STATS64 Pq Ic getstats64
+Same as NGM_PPP_GET_LINK_STATS but returns
+.Dv "struct ng_ppp_link_stat64"
+containing 64bit counters.
+.It Dv NGM_PPP_CLR_LINK_STATS Pq Ic clrstats
+This command takes a two byte link number as an argument and
+clears the statistics for that link.
+.It Dv NGM_PPP_GETCLR_LINK_STATS Pq Ic getclrstats
+Same as
+.Dv NGM_PPP_GET_LINK_STATS ,
+but also atomically clears the statistics as well.
+.It Dv NGM_PPP_GETCLR_LINK_STATS64 Pq Ic getclrstats64
+Same as NGM_PPP_GETCLR_LINK_STATS but returns
+.Dv "struct ng_ppp_link_stat64"
+containing 64bit counters.
+.El
+.Pp
+This node type also accepts the control messages accepted by the
+.Xr ng_vjc 4
+node type.
+When received, these messages are simply forwarded to
+the adjacent
+.Xr ng_vjc 4
+node, if any.
+This is particularly useful when the individual
+PPP links are able to generate
+.Dv NGM_VJC_RECV_ERROR
+messages (see
+.Xr ng_vjc 4
+for a description).
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_async 4 ,
+.Xr ng_iface 4 ,
+.Xr ng_mppc 4 ,
+.Xr ng_pppoe 4 ,
+.Xr ng_vjc 4 ,
+.Xr ngctl 8
+.Rs
+.%A W. Simpson
+.%T "The Point-to-Point Protocol (PPP)"
+.%O RFC 1661
+.Re
+.Rs
+.%A K. Sklower
+.%A B. Lloyd
+.%A G. McGregor
+.%A D. Carr
+.%A T. Coradetti
+.%T "The PPP Multilink Protocol (MP)"
+.%O RFC 1990
+.Re
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@FreeBSD.org
diff --git a/share/man/man4/ng_pppoe.4 b/share/man/man4/ng_pppoe.4
new file mode 100644
index 0000000..a124d67
--- /dev/null
+++ b/share/man/man4/ng_pppoe.4
@@ -0,0 +1,507 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $
+.\"
+.Dd November 13, 2012
+.Dt NG_PPPOE 4
+.Os
+.Sh NAME
+.Nm ng_pppoe
+.Nd RFC 2516 PPPoE protocol netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In net/ethernet.h
+.In netgraph.h
+.In netgraph/ng_pppoe.h
+.Sh DESCRIPTION
+The
+.Nm pppoe
+node type performs the PPPoE protocol.
+It is used in conjunction with the
+.Xr netgraph 4
+extensions to the Ethernet framework to divert and inject Ethernet packets
+to and from a PPP agent (which is not specified).
+.Pp
+The
+.Dv NGM_PPPOE_GET_STATUS
+control message can be used at any time to query the current status
+of the PPPoE module.
+The only statistics presently available are the
+total packet counts for input and output.
+This node does not yet support
+the
+.Dv NGM_TEXT_STATUS
+control message.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va [unspecified]"
+.It Va ethernet
+The hook that should normally be connected to an
+.Xr ng_ether 4
+node.
+Once connected,
+.Nm
+will send a message down this hook to determine Ethernet address of
+the underlying node.
+Obtained address will be stored and then used for outgoing datagrams.
+.It Va debug
+Presently no use.
+.It Va [unspecified]
+Any other name is assumed to be a session hook that will be connected to
+a PPP client agent, or a PPP server agent.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width 3n
+.It Dv NGM_PPPOE_GET_STATUS
+This command returns status information in a
+.Dv "struct ngpppoestat" :
+.Bd -literal -offset 4n
+struct ngpppoestat {
+ u_int packets_in; /* packets in from Ethernet */
+ u_int packets_out; /* packets out towards Ethernet */
+};
+.Ed
+.It Dv NGM_TEXT_STATUS
+This generic message returns a human-readable version of the node status.
+(not yet)
+.It Dv NGM_PPPOE_CONNECT Pq Ic pppoe_connect
+Tell a nominated newly created hook that its session should enter
+the state machine as a client.
+It must be newly created and a service name can be given as an argument.
+It is legal to specify a zero-length service name, this is common
+on some DSL setups.
+It is possible to request a connection to a specific
+access concentrator by its name using the "AC-Name\\Service-Name" syntax.
+A session request packet will be broadcasted on the Ethernet.
+This command uses the
+.Dv ngpppoe_init_data
+structure shown below.
+.It Dv NGM_PPPOE_LISTEN Pq Ic pppoe_listen
+Tell a nominated newly created hook that its session should enter
+the state machine as a server listener.
+The argument
+given is the name of the service to listen for.
+A zero-length service name will match all requests for service.
+A matching service request
+packet will be passed unmodified back to the process responsible
+for starting the service.
+It can then examine it and pass it on to
+the session that is started to answer the request.
+This command uses the
+.Dv ngpppoe_init_data
+structure shown below.
+.It Dv NGM_PPPOE_OFFER Pq Ic pppoe_offer
+Tell a nominated newly created hook that its session should enter
+the state machine as a server.
+The argument given is the name of the service to offer.
+A zero-length service
+is legal.
+The State machine will progress to a state where it will await
+a request packet to be forwarded to it from the startup server,
+which in turn probably received it from a LISTEN mode hook (see above).
+This is so
+that information that is required for the session that is embedded in
+the original session request packet, is made available to the state machine
+that eventually answers the request.
+When the Session request packet is
+received, the session negotiation will proceed.
+This command uses the
+.Dv ngpppoe_init_data
+structure shown below.
+.El
+.Pp
+The three commands above use a common data structure:
+.Bd -literal -offset 4n
+struct ngpppoe_init_data {
+ char hook[NG_HOOKSIZ]; /* hook to monitor on */
+ uint16_t data_len; /* length of the service name */
+ char data[0]; /* init data goes here */
+};
+.Ed
+.Bl -tag -width 3n
+.It Dv NGM_PPPOE_SUCCESS Pq Ic pppoe_success
+This command is sent to the node that started this session with one of the
+above messages, and reports a state change.
+This message reports successful Session negotiation.
+It uses the structure shown below, and
+reports back the hook name corresponding to the successful session.
+.It Dv NGM_PPPOE_FAIL Pq Ic pppoe_fail
+This command is sent to the node that started this session with one of the
+above messages, and reports a state change.
+This message reports failed Session negotiation.
+It uses the structure shown below, and
+reports back the hook name corresponding to the failed session.
+The hook will probably have been removed immediately after sending this
+message.
+.It Dv NGM_PPPOE_CLOSE Pq Ic pppoe_close
+This command is sent to the node that started this session with one of the
+above messages, and reports a state change.
+This message reports a request to close a session.
+It uses the structure shown below, and
+reports back the hook name corresponding to the closed session.
+The hook will probably have been removed immediately after sending this
+message.
+At present this message is not yet used and a
+.Dv NGM_PPPOE_FAIL
+message
+will be received at closure instead.
+.It Dv NGM_PPPOE_ACNAME
+This command is sent to the node that started this session with one of the
+above messages, and reports the Access Concentrator Name.
+.El
+.Pp
+The four commands above use a common data structure:
+.Bd -literal -offset 4n
+struct ngpppoe_sts {
+ char hook[NG_HOOKSIZ]; /* hook associated with event session */
+};
+.Ed
+.Bl -tag -width 3n
+.It Dv NGM_PPPOE_GETMODE Pq Ic pppoe_getmode
+This command returns the current compatibility mode of the node
+as a string.
+.Tn ASCII
+form of this message is
+.Qq Li pppoe_getmode .
+The following keywords can be returned:
+.Bl -tag -width 3n
+.It Qq standard
+The node operates according to RFC 2516.
+.It Qq 3Com
+When
+.Nm
+is a PPPoE client, it initiates a session encapsulating packets into
+incorrect 3Com ethertypes.
+This compatibility option does not affect server mode.
+In server mode
+.Nm
+supports both modes simultaneously, depending on the ethertype, the
+client used when connecting.
+.It Qq D-Link
+When
+.Nm
+is a PPPoE server serving only specific Service-Name(s), it will respond
+to a PADI requests with empty Service-Name tag, returning all available
+Service-Name(s) on node.
+This option is necessary for compatibility with D-Link DI-614+ and DI-624+
+SOHO routers as clients, when serving only specific Service-Name.
+This compatibility option does not affect client mode.
+.El
+.It Dv NGM_PPPOE_SETMODE Pq Ic pppoe_setmode
+Configure node to the specified mode.
+The string argument is required.
+This command understands the same keywords that are returned by the
+.Dv NGM_PPPOE_GETMODE
+command.
+.Tn ASCII
+form of this message is
+.Qq Li pppoe_setmode .
+For example, the following command will configure the node to initiate
+the next session in the proprietary 3Com mode:
+.Bd -literal -offset indent
+ngctl msg fxp0:orphans pppoe_setmode '"3Com"'
+.Ed
+.It Dv NGM_PPPOE_SETENADDR Pq Ic setenaddr
+Set the node Ethernet address for outgoing datagrams.
+This message is important when a node has failed to obtain an Ethernet
+address from its peer on the
+.Dv ethernet
+hook, or when user wants to override this address with another one.
+.Tn ASCII
+form of this message is
+.Qq Li setenaddr .
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, when all session have been disconnected or when the
+.Dv ethernet
+hook is disconnected.
+.Sh EXAMPLES
+The following code uses
+.Dv libnetgraph
+to set up a
+.Nm
+node and connect it to both a socket node and an Ethernet node.
+It can handle the case of when a
+.Nm
+node is already attached to the Ethernet.
+It then starts a client session.
+.Bd -literal
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <sysexits.h>
+#include <errno.h>
+#include <err.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/select.h>
+#include <net/ethernet.h>
+
+#include <netgraph.h>
+#include <netgraph/ng_ether.h>
+#include <netgraph/ng_pppoe.h>
+#include <netgraph/ng_socket.h>
+static int setup(char *ethername, char *service, char *sessname,
+ int *dfd, int *cfd);
+
+int
+main()
+{
+ int fd1, fd2;
+ setup("xl0", NULL, "fred", &fd1, &fd2);
+ sleep (30);
+}
+
+static int
+setup(char *ethername, char *service, char *sessname,
+ int *dfd, int *cfd)
+{
+ struct ngm_connect ngc; /* connect */
+ struct ngm_mkpeer mkp; /* mkpeer */
+ /******** nodeinfo stuff **********/
+ u_char rbuf[2 * 1024];
+ struct ng_mesg *const resp = (struct ng_mesg *) rbuf;
+ struct hooklist *const hlist
+ = (struct hooklist *) resp->data;
+ struct nodeinfo *const ninfo = &hlist->nodeinfo;
+ int ch, no_hooks = 0;
+ struct linkinfo *link;
+ struct nodeinfo *peer;
+ /****message to connect PPPoE session*****/
+ struct {
+ struct ngpppoe_init_data idata;
+ char service[100];
+ } message;
+ /********tracking our little graph ********/
+ char path[100];
+ char source_ID[NG_NODESIZ];
+ char pppoe_node_name[100];
+ int k;
+
+ /*
+ * Create the data and control sockets
+ */
+ if (NgMkSockNode(NULL, cfd, dfd) < 0) {
+ return (errno);
+ }
+ /*
+ * find the ether node of the name requested by asking it for
+ * it's inquiry information.
+ */
+ if (strlen(ethername) > 16)
+ return (EINVAL);
+ sprintf(path, "%s:", ethername);
+ if (NgSendMsg(*cfd, path, NGM_GENERIC_COOKIE,
+ NGM_LISTHOOKS, NULL, 0) < 0) {
+ return (errno);
+ }
+ /*
+ * the command was accepted so it exists. Await the reply (It's
+ * almost certainly already waiting).
+ */
+ if (NgRecvMsg(*cfd, resp, sizeof(rbuf), NULL) < 0) {
+ return (errno);
+ }
+ /**
+ * The following is available about the node:
+ * ninfo->name (string)
+ * ninfo->type (string)
+ * ninfo->id (uint32_t)
+ * ninfo->hooks (uint32_t) (count of hooks)
+ * check it is the correct type. and get it's ID for use
+ * with mkpeer later.
+ */
+ if (strncmp(ninfo->type, NG_ETHER_NODE_TYPE,
+ strlen(NG_ETHER_NODE_TYPE)) != 0) {
+ return (EPROTOTYPE);
+ }
+ sprintf(source_ID, "[%08x]:", ninfo->id);
+
+ /*
+ * look for a hook already attached.
+ */
+ for (k = 0; k < ninfo->hooks; k++) {
+ /**
+ * The following are available about each hook.
+ * link->ourhook (string)
+ * link->peerhook (string)
+ * peer->name (string)
+ * peer->type (string)
+ * peer->id (uint32_t)
+ * peer->hooks (uint32_t)
+ */
+ link = &hlist->link[k];
+ peer = &hlist->link[k].nodeinfo;
+
+ /* Ignore debug hooks */
+ if (strcmp("debug", link->ourhook) == 0)
+ continue;
+
+ /* If the orphans hook is attached, use that */
+ if (strcmp(NG_ETHER_HOOK_ORPHAN,
+ link->ourhook) == 0) {
+ break;
+ }
+ /* the other option is the 'divert' hook */
+ if (strcmp("NG_ETHER_HOOK_DIVERT",
+ link->ourhook) == 0) {
+ break;
+ }
+ }
+
+ /*
+ * See if we found a hook there.
+ */
+ if (k < ninfo->hooks) {
+ if (strcmp(peer->type, NG_PPPOE_NODE_TYPE) == 0) {
+ /*
+ * If it's a type PPPoE, we skip making one
+ * ourself, but we continue, using
+ * the existing one.
+ */
+ sprintf(pppoe_node_name, "[%08x]:", peer->id);
+ } else {
+ /*
+ * There is already someone hogging the data,
+ * return an error. Some day we'll try
+ * daisy-chaining..
+ */
+ return (EBUSY);
+ }
+ } else {
+
+ /*
+ * Try make a node of type PPPoE against node "ID"
+ * On hook NG_ETHER_HOOK_ORPHAN.
+ */
+ snprintf(mkp.type, sizeof(mkp.type),
+ "%s", NG_PPPOE_NODE_TYPE);
+ snprintf(mkp.ourhook, sizeof(mkp.ourhook),
+ "%s", NG_ETHER_HOOK_ORPHAN);
+ snprintf(mkp.peerhook, sizeof(mkp.peerhook),
+ "%s", NG_PPPOE_HOOK_ETHERNET);
+ /* Send message */
+ if (NgSendMsg(*cfd, source_ID, NGM_GENERIC_COOKIE,
+ NGM_MKPEER, &mkp, sizeof(mkp)) < 0) {
+ return (errno);
+ }
+ /*
+ * Work out a name for the new node.
+ */
+ sprintf(pppoe_node_name, "%s:%s",
+ source_ID, NG_ETHER_HOOK_ORPHAN);
+ }
+ /*
+ * We now have a PPPoE node attached to the Ethernet
+ * card. The Ethernet is addressed as ethername: The PPPoE
+ * node is addressed as pppoe_node_name: attach to it.
+ * Connect socket node to specified node Use the same hook
+ * name on both ends of the link.
+ */
+ snprintf(ngc.path, sizeof(ngc.path), "%s", pppoe_node_name);
+ snprintf(ngc.ourhook, sizeof(ngc.ourhook), "%s", sessname);
+ snprintf(ngc.peerhook, sizeof(ngc.peerhook), "%s", sessname);
+
+ if (NgSendMsg(*cfd, ".:", NGM_GENERIC_COOKIE,
+ NGM_CONNECT, &ngc, sizeof(ngc)) < 0) {
+ return (errno);
+ }
+
+#ifdef NONSTANDARD
+ /*
+ * In some cases we are speaking to 3Com hardware, so
+ * configure node to non-standard mode.
+ */
+ if (NgSendMsg(*cfd, ngc.path, NGM_PPPOE_COOKIE,
+ NGM_PPPOE_SETMODE, NG_PPPOE_NONSTANDARD,
+ strlen(NG_PPPOE_NONSTANDARD) + 1) == -1) {
+ return (errno);
+ }
+#endif
+
+ /*
+ * Send it a message telling it to start up.
+ */
+ bzero(&message, sizeof(message));
+ snprintf(message.idata.hook, sizeof(message.idata.hook),
+ "%s", sessname);
+ if (service == NULL) {
+ message.idata.data_len = 0;
+ } else {
+ snprintf(message.idata.data,
+ sizeof(message.idata.data), "%s", service);
+ message.idata.data_len = strlen(service);
+ }
+ /* Tell session/hook to start up as a client */
+ if (NgSendMsg(*cfd, ngc.path,
+ NGM_PPPOE_COOKIE, NGM_PPPOE_CONNECT, &message.idata,
+ sizeof(message.idata) + message.idata.data_len) < 0) {
+ return (errno);
+ }
+ return (0);
+}
+.Ed
+.Sh SEE ALSO
+.Xr netgraph 3 ,
+.Xr netgraph 4 ,
+.Xr ng_ether 4 ,
+.Xr ng_ppp 4 ,
+.Xr ng_socket 4 ,
+.Xr ngctl 8 ,
+.Xr ppp 8
+.Rs
+.%A L. Mamakos
+.%A K. Lidl
+.%A J. Evarts
+.%A D. Carrel
+.%A D. Simone
+.%A R. Wheeler
+.%T "A Method for transmitting PPP over Ethernet (PPPoE)"
+.%O RFC 2516
+.Re
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org
diff --git a/share/man/man4/ng_pptpgre.4 b/share/man/man4/ng_pptpgre.4
new file mode 100644
index 0000000..3e26f9c
--- /dev/null
+++ b/share/man/man4/ng_pptpgre.4
@@ -0,0 +1,177 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_pptpgre.8,v 1.2 1999/12/08 00:20:53 archie Exp $
+.\"
+.Dd November 13, 2012
+.Dt NG_PPTPGRE 4
+.Os
+.Sh NAME
+.Nm ng_pptpgre
+.Nd PPTP GRE protocol netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_pptpgre.h
+.Sh DESCRIPTION
+The
+.Nm pptpgre
+node type performs Generic Routing Encapsulation (GRE) over IP
+for the PPTP protocol as specified by RFC 2637.
+This involves packet
+encapsulation, sequencing, acknowledgement, and an adaptive timeout
+sliding window mechanism.
+This node type does not handle any of
+the TCP control protocol or call negotiation defined by PPTP.
+.Pp
+This node type expects to receive complete IP packets,
+including the IP header, on the
+.Dq Li lower
+hook, but it transmits outgoing frames without any IP header.
+The typical use for this node type would be to connect the
+.Dq Li upper
+hook to one of the link hooks of a
+.Xr ng_ppp 4
+node, and the
+.Dq Li lower
+hook to the
+.Dq Li "inet/raw/gre"
+hook of a
+.Xr ng_ksocket 4
+node.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va session_hhhh"
+.It Va session_hhhh
+Session 0xhhhh data packets to the upper protocol layers
+.It Va upper
+Same as session_hhhh, but for single session with configurable cid (legacy)
+.It Va lower
+Connection to the lower protocol layers
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_PPTPGRE_SET_CONFIG Pq Ic setconfig
+This command resets and configures hook for a session. If corresponding
+session_hhhh hook is not connected, upper hook will be configured.
+This command takes a
+.Vt "struct ng_pptpgre_conf"
+as an argument:
+.Bd -literal
+/* Configuration for a session */
+struct ng_pptpgre_conf {
+ u_char enabled; /* enables traffic flow */
+ u_char enableDelayedAck; /* enables delayed acks */
+ u_char enableAlwaysAck; /* always include ack with data */
+ u_char enableWindowing; /* enable windowing algorithm */
+ uint16_t cid; /* my call id */
+ uint16_t peerCid; /* peer call id */
+ uint16_t recvWin; /* peer recv window size */
+ uint16_t peerPpd; /* peer packet processing delay
+ (in 1/10 of a second) */
+};
+.Ed
+.Pp
+The
+.Va enabled
+field enables traffic flow through the node.
+The
+.Va enableDelayedAck
+field enables delayed acknowledgement (maximum 250 milliseconds), which
+is a useful optimization and should generally be turned on.
+.Va enableAlwaysAck
+field enables sending acknowledgements with every data packet, which
+is probably helpful as well.
+.Pp
+.Va enableWindowing
+enables the PPTP packet windowing mechanism specified by the protocol.
+Disabling this will cause the node to violate the protocol, possibly
+confusing other PPTP peers, but often results in better performance.
+The windowing mechanism is a design error in the PPTP protocol;
+L2TP, the successor to PPTP, removes it.
+.Pp
+The remaining fields are as supplied by the PPTP virtual call setup process.
+.It Dv NGM_PPTPGRE_GET_CONFIG Pq Ic getconfig
+Takes two byte argument as cid and returns the current configuration as a
+.Vt "struct ng_pptpgre_conf" .
+.It Dv NGM_PPTPGRE_GET_STATS Pq Ic getstats
+This command returns a
+.Vt "struct ng_pptpgre_stats"
+containing various node statistics.
+.It Dv NGM_PPTPGRE_CLR_STATS Pq Ic clrstats
+This command resets the node statistics.
+.It Dv NGM_PPTPGRE_GETCLR_STATS Pq Ic getclrstats
+This command atomically gets and resets the node statistics, returning a
+.Vt "struct ng_pptpgre_stats" .
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when both hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_ksocket 4 ,
+.Xr ng_ppp 4 ,
+.Xr ngctl 8
+.Rs
+.%A K. Hamzeh
+.%A G. Pall
+.%A W. Verthein
+.%A J. Taarud
+.%A W. Little
+.%A G. Zorn
+.%T "Point-to-Point Tunneling Protocol (PPTP)"
+.%O RFC 2637
+.Re
+.Rs
+.%A S. Hanks
+.%A T. \&Li
+.%A D. Farinacci
+.%A P. Traina
+.%T "Generic Routing Encapsulation over IPv4 networks"
+.%O RFC 1702
+.Re
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@FreeBSD.org
+.Sh BUGS
+The node should not expect incoming GRE packets to have an IP header.
+This behavior is inherited from the (converse) behavior of raw IP sockets.
+An intermediate node that strips IP headers in one direction
+should be used instead.
diff --git a/share/man/man4/ng_pred1.4 b/share/man/man4/ng_pred1.4
new file mode 100644
index 0000000..fed3fdc
--- /dev/null
+++ b/share/man/man4/ng_pred1.4
@@ -0,0 +1,145 @@
+.\"
+.\" Copyright (c) 2006, Alexander Motin <mav@alkar.net>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice unmodified, this list of conditions, and the following
+.\" disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 24, 2006
+.Dt NG_PRED1 4
+.Os
+.Sh NAME
+.Nm ng_pred1
+.Nd Predictor-1 PPP compression (RFC 1978) netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_pred1.h
+.Sh DESCRIPTION
+The
+.Nm pred1
+node type implements the Predictor-1 sub-protocols of the Compression Control
+Protocol (CCP).
+.Pp
+The node has two hooks,
+.Va comp
+for compression and
+.Va decomp
+for decompression.
+Only one of them can be connected at the same time, specifying node's
+operation mode.
+Typically that hooks would be connected to the
+.Xr ng_ppp 4
+node type hook of the same name.
+.Sh HOOKS
+This node type supports the following hooks:
+.Pp
+.Bl -tag -compact -width ".Va decomp"
+.It Va comp
+Connection to
+.Xr ng_ppp 4
+.Va compress
+hook.
+Incoming frames are compressed and sent back out the same hook.
+.It Va decomp
+Connection to
+.Xr ng_ppp 4
+.Va decompress
+hook.
+Incoming frames are decompressed and sent back out the same hook.
+.El
+.Pp
+Only one hook can be connected at the same time,
+specifying node's operation mode.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_PRED1_CONFIG Pq Ic config
+This command resets and configures the node for a session
+(i.e., for compression or decompression).
+This command takes a
+.Vt "struct ng_pred1_config"
+as an argument:
+.Bd -literal -offset 0n
+struct ng_pred1_config {
+ u_char enable; /* node enabled */
+};
+.Ed
+The
+.Ft enable
+field enables traffic flow through the node.
+.It Dv NGM_PRED1_RESETREQ Pq Ic resetreq
+This message contains no arguments, and is bi-directional.
+If an error is detected during decompression, this message is sent by the
+node to the originator of the
+.Dv NGM_PRED1_CONFIG
+message that initiated the session.
+The receiver should respond by sending a PPP CCP Reset-Request to the peer.
+.Pp
+This message may also be received by this node type when a CCP Reset-Request
+or Reset-Ack is received by the local PPP entity.
+The node will respond by flushing its compression state so the sides
+can resynchronize.
+.It Dv NGM_PRED1_GET_STATS Pq Ic getstats
+This control message obtains statistics for a given hook.
+The statistics are returned in
+.Vt "struct ng_pred1_stats" :
+.Bd -literal
+struct ng_pred1_stats {
+ uint64_t FramesPlain;
+ uint64_t FramesComp;
+ uint64_t FramesUncomp;
+ uint64_t InOctets;
+ uint64_t OutOctets;
+ uint64_t Errors;
+};
+.Ed
+.It Dv NGM_PRED1_CLR_STATS Pq Ic clrstats
+This control message clears statistics for a given hook.
+.It Dv NGM_PRED1_GETCLR_STATS Pq Ic getclrstats
+This control message obtains and clears statistics for a given hook.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when hook have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_ppp 4 ,
+.Xr ngctl 8
+.Rs
+.%A D. Rand
+.%T "PPP Predictor Compression Protocol"
+.%O RFC 1978
+.Re
+.Rs
+.%A W. Simpson
+.%T "The Point-to-Point Protocol (PPP)"
+.%O RFC 1661
+.Re
+.Sh AUTHORS
+.An Alexander Motin Aq mav@alkar.net
+.Sh BUGS
+Due to nature of netgraph PPP implementation there are possible race conditions
+between data packet and ResetAck CCP packet in case of packet loss. As result,
+packet loss can produce bigger performance degradation than supposed by protocol.
diff --git a/share/man/man4/ng_rfc1490.4 b/share/man/man4/ng_rfc1490.4
new file mode 100644
index 0000000..de45fb7
--- /dev/null
+++ b/share/man/man4/ng_rfc1490.4
@@ -0,0 +1,141 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_rfc1490.8,v 1.4 1999/01/25 23:46:27 archie Exp $
+.\"
+.Dd January 19, 1999
+.Dt NG_RFC1490 4
+.Os
+.Sh NAME
+.Nm ng_rfc1490
+.Nd RFC 1490 netgraph node type
+.Sh SYNOPSIS
+.In netgraph/ng_rfc1490.h
+.Sh DESCRIPTION
+The
+.Nm rfc1490
+node type performs protocol encapsulation, de-encapsulation, and
+multiplexing according to RFC 1490 (which has since been updated by RFC 2427).
+This particular type of encapsulation is often used on top of frame relay
+DLCI channels.
+.Pp
+The
+.Dv downstream
+hook is used to transmit and receive encapsulated frames.
+On the other side of the node, the
+.Dv inet
+and
+.Dv ppp
+hooks are used to transmit and receive raw IP frames and PPP frames,
+respectively.
+PPP frames are transmitted and received according to
+RFC 1973; in particular, frames appearing on the
+.Dv ppp
+hook begin with the PPP protocol number.
+The
+.Dv ethernet
+hook can be used to transmit and receive Ethernet frames (without a
+checksum) in RFC 1490's bridging format.
+.Pp
+Typically the
+.Dv inet
+hook is connected to the
+.Dv inet
+hook of an
+.Xr ng_iface 4
+node.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va downstream"
+.It Va downstream
+Connects to the RFC 1490 peer entity.
+.It Va ethernet
+Transmits and receives bridged raw Ethernet frames, without a checksum.
+.It Va inet
+Transmits and receives raw IP frames.
+.It Va ppp
+Transmits and receives PPP frames.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_RFC1490_SET_ENCAP Pq Ic setencap
+This command sets encapsulation method for the node.
+The desired method must be passed as a string message argument,
+and must be one of the following supported encapsulation modes:
+.Bl -tag -width ".Qq Li ietf-snap"
+.It Qq Li ietf-ip
+IP packets are sent using simple RFC1490/2427 encapsulation.
+.It Qq Li ietf-snap
+IP packets are sent inside SNAP frames.
+Also conforms to RFC1490/2427.
+.It Qq Li cisco
+IP packets are sent and received using proprietary Cisco encapsulation
+method.
+.El
+.It Dv NGM_RFC1490_GET_ENCAP Pq Ic getencap
+This command returns current encapsulation method on the node.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_frame_relay 4 ,
+.Xr ng_iface 4 ,
+.Xr ngctl 8
+.Rs
+.%A C. Brown
+.%A A. Malis
+.%T "Multiprotocol Interconnect over Frame Relay"
+.%O RFC 2427
+.Re
+.Rs
+.%A W. Simpson
+.%T "PPP in Frame Relay"
+.%O RFC 1973
+.Re
+.Pp
+.Pa http://www.cisco.com/warp/public/121/frf8modes.pdf
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org
+.Sh BUGS
+Not all of RFC 1490 is implemented.
diff --git a/share/man/man4/ng_socket.4 b/share/man/man4/ng_socket.4
new file mode 100644
index 0000000..84ddd15
--- /dev/null
+++ b/share/man/man4/ng_socket.4
@@ -0,0 +1,190 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_socket.8,v 1.5 1999/01/25 23:46:27 archie Exp $
+.\"
+.Dd January 19, 1999
+.Dt NG_SOCKET 4
+.Os
+.Sh NAME
+.Nm ng_socket
+.Nd netgraph socket node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_socket.h
+.Sh DESCRIPTION
+A
+.Nm socket
+node is both a
+.Bx
+socket and a netgraph node.
+The
+.Nm
+node type allows user-mode processes to participate in the kernel
+.Xr netgraph 4
+networking subsystem using the
+.Bx
+socket interface.
+The process must have
+root privileges to be able to create netgraph sockets however once created,
+any process that has one may use it.
+.Pp
+A new
+.Nm
+node is created by creating a new socket of type
+.Dv NG_CONTROL
+in the protocol family
+.Dv PF_NETGRAPH ,
+using the
+.Xr socket 2
+system call.
+Any control messages received by the node
+and not having a cookie value of
+.Dv NGM_SOCKET_COOKIE
+are received by the process, using
+.Xr recvfrom 2 ;
+the socket address argument is a
+.Dv "struct sockaddr_ng"
+containing the sender's netgraph address.
+Conversely, control messages can be sent to any node by calling
+.Xr sendto 2 ,
+supplying the recipient's address in a
+.Dv "struct sockaddr_ng" .
+The
+.Xr bind 2
+system call may be used to assign a global netgraph name to the node.
+.Pp
+To transmit and receive netgraph data packets, a
+.Dv NG_DATA
+socket must also be created using
+.Xr socket 2
+and associated with a
+.Nm
+node.
+.Dv NG_DATA
+sockets do not automatically
+have nodes associated with them; they are bound to a specific node via the
+.Xr connect 2
+system call.
+The address argument is the netgraph address of the
+.Nm
+node already created.
+Once a data socket is associated with a node,
+any data packets received by the node are read using
+.Xr recvfrom 2
+and any packets to be sent out from the node are written using
+.Xr sendto 2 .
+In the case of data sockets, the
+.Dv "struct sockaddr_ng"
+contains the name of the
+.Em hook
+on which the data was received or should be sent.
+.Pp
+As a special case, to allow netgraph data sockets to be used as stdin or stdout
+on naive programs, a
+.Xr sendto 2
+with a NULL sockaddr pointer, a
+.Xr send 2
+or a
+.Xr write 2
+will succeed in the case where there is exactly ONE hook attached to
+the socket node, (and thus the path is unambiguous).
+.Pp
+There is a user library that simplifies using netgraph sockets; see
+.Xr netgraph 3 .
+.Sh HOOKS
+This node type supports hooks with arbitrary names (as long as
+they are unique) and always accepts hook connection requests.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_SOCK_CMD_NOLINGER
+When the last hook is removed from this node, it will shut down as
+if it had received a
+.Dv NGM_SHUTDOWN
+message.
+Attempts to access the sockets associated will return
+.Er ENOTCONN .
+.It Dv NGM_SOCK_CMD_LINGER
+This is the default mode.
+When the last hook is removed, the node will
+continue to exist, ready to accept new hooks until it
+is explicitly shut down.
+.El
+.Pp
+All other messages
+with neither the
+.Dv NGM_SOCKET_COOKIE
+or
+.Dv NGM_GENERIC_COOKIE
+will be passed unaltered up the
+.Dv NG_CONTROL
+socket.
+.Sh SHUTDOWN
+This node type shuts down and disappears when both the associated
+.Dv NG_CONTROL
+and
+.Dv NG_DATA
+sockets have been closed, or a
+.Dv NGM_SHUTDOWN
+control message is received.
+In the latter case, attempts to write
+to the still-open sockets will return
+.Er ENOTCONN .
+If the
+.Dv NGM_SOCK_CMD_NOLINGER
+message has been received, closure of the last hook will also initiate
+a shutdown of the node.
+.Sh SEE ALSO
+.Xr socket 2 ,
+.Xr netgraph 3 ,
+.Xr netgraph 4 ,
+.Xr ng_ksocket 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org
+.Sh BUGS
+It is not possible to reject the connection of a hook, though any
+data received on that hook can certainly be ignored.
+.Pp
+The controlling process is not notified of all events that an in-kernel node
+would be notified of, e.g.\& a new hook, or hook removal.
+Some node-initiated messages should be defined for this purpose (to be
+sent up the control socket).
diff --git a/share/man/man4/ng_source.4 b/share/man/man4/ng_source.4
new file mode 100644
index 0000000..5205bc4
--- /dev/null
+++ b/share/man/man4/ng_source.4
@@ -0,0 +1,349 @@
+.\" Copyright 2002-2007 Sandvine Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Sandvine Inc.; provided,
+.\" however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Sandvine Inc.
+.\" trademarks, including the mark "SANDVINE" on advertising, endorsements,
+.\" or otherwise except as such appears in the above copyright notice or in
+.\" the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY SANDVINE "AS IS", AND TO THE MAXIMUM
+.\" EXTENT PERMITTED BY LAW, SANDVINE MAKES NO REPRESENTATIONS OR WARRANTIES,
+.\" EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, INCLUDING WITHOUT LIMITATION,
+.\" ANY AND ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+.\" PURPOSE, OR NON-INFRINGEMENT. SANDVINE DOES NOT WARRANT, GUARANTEE, OR
+.\" MAKE ANY REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE
+.\" USE OF THIS SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY
+.\" OR OTHERWISE. IN NO EVENT SHALL SANDVINE BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF SANDVINE IS ADVISED OF THE POSSIBILITY OF SUCH
+.\" DAMAGE.
+.\"
+.\" Author: Dave Chapeskie
+.\" $FreeBSD$
+.\"
+.Dd March 1, 2007
+.Dt NG_SOURCE 4
+.Os
+.Sh NAME
+.Nm ng_source
+.Nd netgraph node for traffic generation
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_source.h
+.Sh DESCRIPTION
+The
+.Nm source
+node acts as a source of packets according to the parameters set up
+using control messages and input packets.
+The
+.Nm
+node type is used primarily for testing and benchmarking.
+.Sh HOOKS
+The
+.Nm source
+node has two hooks:
+.Va input
+and
+.Va output .
+The
+.Va output
+hook must remain connected, its disconnection will shutdown the node.
+.Sh OPERATION
+The operation of the node is as follows.
+Packets received on the
+.Va input
+hook are queued internally.
+When
+.Va output
+hook is connected,
+.Nm
+node assumes that its neighbour node is of
+.Xr ng_ether 4
+node type.
+The neighbour is queried for its interface name.
+The
+.Nm
+node then uses queue of the interface for its evil purposes.
+The
+.Nm
+node also disables
+.Va autosrc
+option on neighbour
+.Xr ng_ether 4
+node.
+If interface name cannot be obtained automatically, it should
+be configured explicitly with the
+.Dv NGM_SOURCE_SETIFACE
+control message, and
+.Va autosrc
+should be turned off on
+.Xr ng_ether 4
+node manually.
+.Pp
+Once interface is configured, upon receipt of a
+.Dv NGM_SOURCE_START
+control message the node starts sending
+the previously queued packets out the
+.Va output
+hook on every clock tick as fast
+as the connected interface will take them.
+While active, on every clock tick the node checks the available space
+in the interface queue and sends that many packets out its
+.Va output
+hook.
+Once the number of packets indicated in the start message has been
+sent, or upon receipt of a
+.Dv NGM_SOURCE_STOP
+message, the node stops sending data.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages as well as the following,
+which must be sent with the
+.Dv NGM_SOURCE_COOKIE
+attached.
+.Bl -tag -width foo
+.It Dv NGM_SOURCE_GET_STATS Pq Ic getstats
+Returns a structure containing the following fields:
+.Bl -tag -width ".Va elapsedTime"
+.It Va outOctets
+The number of octets/bytes sent out the
+.Va output
+hook.
+.It Va outFrames
+The number of frames/packets sent out the
+.Va output
+hook.
+.It Va queueOctets
+The number of octets queued from the
+.Va input
+hook.
+.It Va queueFrames
+The number of frames queued from the
+.Va input
+hook.
+.It Va startTime
+The time the last start message was received.
+.It Va endTime
+The time the last end message was received or
+the output packet count was reached.
+.It Va elapsedTime
+Either
+.Va endTime Li \- Va startTime
+or current time
+\-
+.Va startTime .
+.El
+.It Dv NGM_SOURCE_CLR_STATS Pq Ic clrstats
+Clears and resets the statistics returned by
+.Ic getstats
+(except
+.Va queueOctets
+and
+.Va queueFrames ) .
+.It Dv NGM_SOURCE_GETCLR_STATS Pq Ic getclrstats
+As
+.Ic getstats
+but clears the statistics at the same time.
+.It Dv NGM_SOURCE_START Pq Ic start
+This message requires a single
+.Vt uint64_t
+parameter which is the number of packets to
+send before stopping.
+Node starts sending the queued packets out the
+.Va output
+hook.
+The
+.Va output
+hook must be connected and node must have
+interface configured.
+.It Dv NGM_SOURCE_STOP Pq Ic stop
+Stops the node if it is active.
+.It Dv NGM_SOURCE_CLR_DATA Pq Ic clrdata
+Clears the packets queued from the
+.Va input
+hook.
+.It Dv NGM_SOURCE_SETIFACE Pq Ic setiface
+This message requires the name of the interface
+to be configured as an argument.
+.It Dv NGM_SOURCE_SETPPS Pq Ic setpps
+This message requires a single
+.Vt uint32_t
+parameter which puts upper limit on the amount of packets
+sent per second.
+.It Dv NGM_SOURCE_SET_TIMESTAMP Pq Ic settimestamp
+This message specifies that a timestamp (in the format of a
+.Vt "struct timeval" )
+should be inserted in the transmitted packets.
+This message requires a structure containing the following fields:
+.Bl -tag -width ".Va offset"
+.It Va offset
+The offset from the beginning of the packet at which the timestamp is to be
+inserted.
+.It Va flags
+Set to 1 to enable the timestamp.
+.El
+.It Dv NGM_SOURCE_GET_TIMESTAMP Pq Ic gettimestamp
+Returns the current timestamp settings in the form of the structure described
+above.
+.It Dv NGM_SOURCE_SET_COUNTER Pq Ic setcounter
+This message specifies that a counter should be embedded in transmitted
+packets.
+Up to four counters may be independently configured.
+This message requires a structure containing the following fields:
+.Bl -tag -width ".Va increment"
+.It Va offset
+The offset from the beginning of the packet at which the counter is to be
+inserted.
+.It Va flags
+Set to 1 to enable the counter.
+.It Va width
+The byte width of the counter.
+It may be 1, 2, or 4.
+.It Va next_val
+The value for the next insertion of the counter.
+.It Va min_val
+The minimum value to be used by the counter.
+.It Va max_val
+The maximum value to be used by the counter.
+.It Va increment
+The value to be added to the counter after each insertion.
+It may be negative.
+.It Va index
+The counter to be configured, from 0 to 3.
+.El
+.It Dv NGM_SOURCE_GET_COUNTER Pq Ic getcounter
+This message requires a single
+.Vt uint8_t
+parameter which specifies the counter to query.
+Returns the current counter settings in the form of the structure described
+above.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, when all hooks have been disconnected, or when the
+.Va output
+hook has been disconnected.
+.Sh EXAMPLES
+Attach the node to an
+.Xr ng_ether 4
+node for an interface.
+If
+.Nm ng_ether
+is
+not already loaded you will need to do so.
+For example, these commands
+load the
+.Nm ng_ether
+module and attach the
+.Va output
+hook of a new
+.Nm source
+node to
+.Va orphans
+hook of the
+.Li bge0:
+.Nm ng_ether
+node.
+.Bd -literal -offset indent
+kldload ng_ether
+ngctl mkpeer bge0: source orphans output
+.Ed
+.Pp
+At this point the new node can be referred to as
+.Dq Li bge0:orphans .
+The
+node can be given its own name like this:
+.Pp
+.Dl "ngctl name bge0:orphans src0"
+.Pp
+After which it can be referred to as
+.Dq Li src0: .
+.Pp
+Once created, packets can be sent to the node as raw binary data.
+Each packet must be delivered in a separate netgraph message.
+.Pp
+The following example uses a short Perl script to convert the hex
+representation of an ICMP packet to binary and deliver it to the
+.Nm source
+node's
+.Va input
+hook via
+.Xr nghook 8 :
+.Bd -literal -offset indent
+perl -pe 's/(..)[ \et\en]*/chr(hex($1))/ge' <<EOF | nghook src0: input
+ff ff ff ff ff ff 00 00 00 00 00 00 08 00 45 00
+00 54 cb 13 00 00 40 01 b9 87 c0 a8 2b 65 0a 00
+00 01 08 00 f8 d0 c9 76 00 00 45 37 01 73 00 01
+04 0a 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15
+16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25
+26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35
+36 37
+EOF
+.Ed
+.Pp
+To check that the node has queued these packets you can get the node
+statistics:
+.Bd -literal -offset indent
+ngctl msg bge0:orphans getstats
+Args: { queueOctets=64 queueFrames=1 }
+.Ed
+.Pp
+Send as many packets as required out the
+.Va output
+hook:
+.Pp
+.Dl "ngctl msg bge0:orphans start 16"
+.Pp
+Either wait for them to be sent (periodically fetching stats if desired)
+or send the stop message:
+.Pp
+.Dl "ngctl msg bge0:orphans stop"
+.Pp
+Check the statistics (here we use
+.Ic getclrstats
+to also clear the statistics):
+.Bd -literal -offset indent
+ngctl msg bge0:orphans getclrstats
+Args: { outOctets=1024 outFrames=16 queueOctets=64 queueFrames=1
+startTime={ tv_sec=1035305880 tv_usec=758036 } endTime={ tv_sec=1035305880
+tv_usec=759041 } elapsedTime={ tv_usec=1005 } }
+.Ed
+.Pp
+The times are from
+.Vt "struct timeval" Ns s ,
+the
+.Va tv_sec
+field is seconds since
+the Epoch and can be converted into a date string via TCL's [clock
+format] or via the
+.Xr date 1
+command:
+.Bd -literal -offset indent
+date -r 1035305880
+Tue Oct 22 12:58:00 EDT 2002
+.Ed
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_echo 4 ,
+.Xr ng_hole 4 ,
+.Xr ng_tee 4 ,
+.Xr ngctl 8 ,
+.Xr nghook 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.8 .
+.Sh AUTHORS
+.An Dave Chapeskie
diff --git a/share/man/man4/ng_split.4 b/share/man/man4/ng_split.4
new file mode 100644
index 0000000..4062ca2
--- /dev/null
+++ b/share/man/man4/ng_split.4
@@ -0,0 +1,88 @@
+.\" Copyright (c) 2001 FreeBSD inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by FreeBSD Inc.;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use FreeBSD
+.\" Inc., Inc. trademarks, including the mark "FREEBSD
+.\" INC." on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY FREEBSD INC. "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, FreeBSD Inc. MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" FreeBSD Inc. DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL FreeBSD Inc. BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF FreeBSD Inc. IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Julian Elischer <julian@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 19, 2001
+.Dt NG_SPLIT 4
+.Os
+.Sh NAME
+.Nm ng_split
+.Nd netgraph node to separate incoming and outgoing flows
+.Sh SYNOPSIS
+.In netgraph/ng_split.h
+.Sh DESCRIPTION
+The
+.Nm split
+node type is used to split a bidirectional stream of packets into
+two separate unidirectional streams of packets.
+.Sh HOOKS
+This node type supports the following three hooks:
+.Bl -tag -width ".Va mixed"
+.It Va in
+Packets received on
+.Em in
+are forwarded to
+.Em mixed .
+.It Va out
+Packets received on
+.Em out
+will be discarded as illegal.
+.It Va mixed
+Packets received on
+.Em mixed
+are forwarded to
+.Em out .
+.El
+.Sh CONTROL MESSAGES
+This node type supports only the generic control messages.
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 3.5
+but incorporated into
+.Fx
+in
+.Fx 5.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org
+.An Vitaly V. Belekhov Aq vitaly@riss-telecom.ru
diff --git a/share/man/man4/ng_sppp.4 b/share/man/man4/ng_sppp.4
new file mode 100644
index 0000000..d23268f
--- /dev/null
+++ b/share/man/man4/ng_sppp.4
@@ -0,0 +1,172 @@
+.\" Copyright (C) 2003-2004 Cronyx Engineering.
+.\" Copyright (C) 2003-2004 Roman Kurakin <rik@cronyx.ru>
+.\"
+.\" This software is distributed with NO WARRANTIES, not even the implied
+.\" warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+.\"
+.\" Authors grant any other persons or organisations a permission to use,
+.\" modify and redistribute this software in source and binary forms,
+.\" as long as this message is kept with the software, all derivative
+.\" works or modified versions.
+.\"
+.\" Cronyx Id: ng_sppp.4,v 1.1.2.3 2004/03/30 14:28:34 rik Exp $
+.\" $FreeBSD$
+.\"
+.Dd February 3, 2005
+.Dt NG_SPPP 4
+.Os
+.Sh NAME
+.Nm ng_sppp
+.Nd sppp netgraph node type
+.Sh SYNOPSIS
+.In netgraph/ng_sppp.h
+.Sh DESCRIPTION
+An
+.Nm sppp
+node is a
+.Xr netgraph 4
+interface to the original
+.Xr sppp 4
+network module for synchronous lines.
+Currently,
+.Xr sppp 4
+supports PPP and Cisco HDLC protocols.
+An
+.Nm sppp
+node could be considered as an alternative kernel mode PPP
+implementation to
+.Pa net/mpd
+port +
+.Xr ng_ppp 4 ,
+and as an alternative to
+.Xr ng_cisco 4
+node.
+While having less features than
+.Pa net/mpd
++
+.Xr ng_ppp 4 ,
+it is significantly easier to use in the majority of simple configurations,
+and allows the administrator to not install the
+.Pa net/mpd
+port.
+With
+.Nm sppp
+you do not need any other nodes, not even an
+.Xr ng_iface 4
+node.
+When an
+.Nm sppp
+node is created, a new interface appears which is accessible via
+.Xr ifconfig 8 .
+Network interfaces corresponding to
+.Nm sppp
+nodes are named
+.Li sppp0 , sppp1 ,
+etc.
+When a node is shut down, the corresponding interface is removed,
+and the interface name becomes available for reuse by future
+.Nm sppp
+nodes.
+New nodes always take the first unused interface.
+The node itself is assigned the same name as its interface, unless the name
+already exists, in which case the node remains unnamed.
+The
+.Nm sppp
+node allows drivers written to the old
+.Xr sppp 4
+interface to be rewritten using the
+newer more powerful
+.Xr netgraph 4
+interface, and still behave in a compatible manner without supporting both
+network modules.
+.Pp
+An
+.Nm sppp
+node has a single hook named
+.Va downstream .
+Usually it is connected directly to
+a device driver hook.
+.Pp
+The
+.Nm sppp
+nodes support the Berkeley Packet Filter,
+.Xr bpf 4 .
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va downstream"
+.It Va downstream
+The connection to the synchronous line.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_SPPP_GET_IFNAME Pq Ic getifname
+Returns the name of the associated interface as a
+.Dv NUL Ns -terminated
+.Tn ASCII
+string.
+Normally this is the same as the name of the node.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message.
+The associated interface is removed and becomes available
+for use by future
+.Nm sppp
+nodes.
+.Pp
+Unlike most other node types and like
+.Xr ng_iface 4
+does, an
+.Nm sppp
+node does
+.Em not
+go away when all hooks have been disconnected; rather, an explicit
+.Dv NGM_SHUTDOWN
+control message is required.
+.Sh EXAMPLES
+For example, if you have the
+.Xr cx 4
+device, you could run PPP over it with just one command:
+.Pp
+.Dl "ngctl mkpeer cx0: sppp rawdata downstream"
+.Pp
+Now you have the
+.Li sppp0
+interface (if this was the first
+.Nm sppp
+node) which can be
+accessed via
+.Xr ifconfig 8
+as a normal network interface,
+or via
+.Xr spppcontrol 8
+as an
+.Xr sppp 4
+interface.
+.Sh SEE ALSO
+.Xr bpf 4 ,
+.Xr cx 4 ,
+.Xr netgraph 4 ,
+.Xr ng_cisco 4 ,
+.Xr ng_iface 4 ,
+.Xr ng_ppp 4 ,
+.Xr sppp 4 ,
+.Xr ifconfig 8 ,
+.Xr ngctl 8 ,
+.Xr spppcontrol 8
+.Pp
+For complex networking topologies you may want to look at
+.Pa net/mpd
+port.
+.Sh HISTORY
+The
+.Nm sppp
+node type was implemented for
+.Fx 5.0 .
+It was included to the system since
+.Fx 5.3 .
+.Sh AUTHORS
+Copyright (C) 2003-2004
+.An Roman Kurakin Aq rik@cronyx.ru .
diff --git a/share/man/man4/ng_sscfu.4 b/share/man/man4/ng_sscfu.4
new file mode 100644
index 0000000..c44c1f4
--- /dev/null
+++ b/share/man/man4/ng_sscfu.4
@@ -0,0 +1,161 @@
+.\"
+.\" Copyright (c) 2001-2003
+.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Author: Hartmut Brandt <harti@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.\" ng_sscfu(4) man page
+.\"
+.Dd October 24, 2003
+.Dt NG_SSCFU 4
+.Os
+.Sh NAME
+.Nm ng_sscfu
+.Nd netgraph SSCF at the UNI node type
+.Sh SYNOPSIS
+.In netnatm/saal/sscopdef.h
+.In netnatm/saal/sscfudef.h
+.In netgraph/atm/ng_sscfu.h
+.Sh DESCRIPTION
+The
+.Nm sscfu
+netgraph node type implements ITU-T recommendation Q.2130.
+This recommendation specifies the Service Specific Coordination
+Function at the UNI.
+This is a thin sub-layer between the SSCOP (see
+.Xr ng_sscop 4 )
+and the UNI signalling.
+This node does not really implement a protocol but
+provides a mapping between the signals at the upper layer of the SSCOP and
+the signals the UNI expects at its lower layer.
+It also provides default values for the parameters of the SSCOP.
+.Pp
+After creation of the node, the SSCF instance must be created by sending
+an
+.Dq enable
+message to the node.
+If the node is enabled, default SSCOP parameters
+can be retrieved and set in the corresponding SSCOP instance.
+.Pp
+The node is shut down either by a
+.Dv NGM_SHUTDOWN
+message, or when all hooks are disconnected.
+.Sh HOOKS
+Each
+.Nm sscfu
+node has two hooks with fixed names:
+.Bl -tag -width ".Va upper"
+.It Va lower
+This hook is the interface to the SSCOP.
+The interface expected here is exactly
+that which is exported by the
+.Xr ng_sscop 4
+node type.
+.It Va upper
+This is the interface to the UNI.
+It uses the following message format:
+.Bd -literal
+struct sscfu_arg {
+ uint32_t sig;
+ u_char data[];
+};
+.Ed
+.Pp
+The
+.Va sig
+field
+is one of the following signals:
+.Bd -literal
+enum saal_sig {
+ SAAL_ESTABLISH_request, /* U -> SAAL: (UU) */
+ SAAL_ESTABLISH_indication, /* SAAL -> U: (UU) */
+ SAAL_ESTABLISH_confirm, /* SAAL -> U: (UU) */
+ SAAL_RELEASE_request, /* U -> SAAL: (UU) */
+ SAAL_RELEASE_confirm, /* SAAL -> U: */
+ SAAL_RELEASE_indication, /* SAAL -> U: (UU) */
+ SAAL_DATA_request, /* U -> SAAL: (DATA) */
+ SAAL_DATA_indication, /* SAAL -> U: (DATA) */
+ SAAL_UDATA_request, /* U -> SAAL: (UDATA) */
+ SAAL_UDATA_indication, /* SAAL -> U: (UDATA) */
+};
+.Ed
+.Pp
+The arrows in the comment show the direction of the signal, whether it
+is a signal that comes out of the node
+.Pq Ql -> ,
+or is sent by the node user to the node
+.Pq Ql <- .
+The type of the data expected for the signal is specified in parentheses.
+This data starts at the
+.Va data
+field of the message structure.
+.El
+.Pp
+If the
+.Va lower
+hook is disconnected and the node is enabled, the protocol state is
+reset.
+.Sh CONTROL MESSAGES
+The
+.Nm sscfu
+node understands the generic messages plus the following:
+.Bl -tag -width foo
+.It Dv NGM_SSCFU_GETDEFPARAM Pq Ic getdefparam
+This message returns a
+.Vt sscop_param
+structure, which contains the default parameters for the SSCOP at the
+UNI.
+This structure should be used for a
+.Dv NGM_SSCOP_SETPARAM
+message to the SSCOP node below the SSCF.
+.It Dv NGM_SSCFU_ENABLE Pq Ic enable
+This message creates the actual SSCF instance and initializes it.
+Until this is done, parameters may neither be retrieved nor set,
+and all messages
+received on any hook are discarded.
+.It Dv NGM_SSCFU_DISABLE Pq Ic disable
+Destroy the SSCF instance.
+After this, all messages on any hooks are discarded.
+.It Dv NGM_SSCFU_GETDEBUG Pq Ic getdebug
+Retrieve the debugging flags in a
+.Vt uint32_t .
+.It Dv NGM_SSCFU_SETDEBUG Pq Ic setdebug
+Set debugging flags.
+The argument must be a
+.Vt uint32_t .
+.It Dv NGM_SSCFU_GETSTATE Pq Ic getstate
+Retrieve the current state of the SSCFU instance in a
+.Vt uint32_t .
+If the node has not been enabled, 0 is returned.
+.El
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_atm 4 ,
+.Xr ng_sscop 4 ,
+.Xr ngctl 8
+.Sh AUTHORS
+.An Harti Brandt Aq harti@FreeBSD.org
diff --git a/share/man/man4/ng_sscop.4 b/share/man/man4/ng_sscop.4
new file mode 100644
index 0000000..5496a37
--- /dev/null
+++ b/share/man/man4/ng_sscop.4
@@ -0,0 +1,403 @@
+.\"
+.\" Copyright (c) 2001-2003
+.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Author: Hartmut Brandt <harti@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.\" ng_sscop(4) man page
+.\"
+.Dd October 24, 2003
+.Dt NG_SSCOP 4
+.Os
+.Sh NAME
+.Nm ng_sscop
+.Nd netgraph SSCOP node type
+.Sh SYNOPSIS
+.In netnatm/saal/sscopdef.h
+.In netgraph/atm/ng_sscop.h
+.Sh DESCRIPTION
+The
+.Nm sscop
+netgraph node type implements the ITU-T standard Q.2110.
+This standard describes
+the so called Service Specific Connection Oriented Protocol (SSCOP) that
+is used to carry signalling messages over the private and public UNIs and
+the public NNI.
+This protocol is a transport protocol with selective
+acknowledgements, and can be tailored to the environment.
+This implementation is a full implementation of that standard.
+.Pp
+After creation of the node, the SSCOP instance must be created by sending
+an
+.Dq enable
+message to the node.
+If the node is enabled, the SSCOP parameters
+can be retrieved and modified and the protocol can be started.
+.Pp
+The node is shut down either by a
+.Dv NGM_SHUTDOWN
+message, or when all hooks are disconnected.
+.Sh HOOKS
+Each
+.Nm sscop
+node has three hooks with fixed names:
+.Bl -tag -width ".Va manage"
+.It Va lower
+This hook must be connected to a node that ensures
+transport of packets to and from the remote peer node.
+Normally this is a
+.Xr ng_atm 4
+node with an AAL5 hook, but the
+.Nm sscop
+node is able to work on any packet-transporting layer, like, for example,
+IP or UDP.
+The node handles flow control messages received on
+this hook: if it receives a
+.Dv NGM_HIGH_WATER_PASSED
+message, it declares the
+.Dq "lower layer busy"
+state.
+If a
+.Dv NGM_LOW_WATER_PASSED
+message is received, the busy state is cleared.
+Note that the node does not
+look at the message contents of these flow control messages.
+.It Va upper
+This is the interface to the SSCOP user.
+This interface uses the following message format:
+.Bd -literal
+struct sscop_arg {
+ uint32_t sig;
+ uint32_t arg; /* opt. sequence number or clear-buff */
+ u_char data[];
+};
+.Ed
+.Pp
+The
+.Va sig
+field
+is one of the signals defined in the standard:
+.Bd -literal
+enum sscop_aasig {
+ SSCOP_ESTABLISH_request, /* <- UU, BR */
+ SSCOP_ESTABLISH_indication, /* -> UU */
+ SSCOP_ESTABLISH_response, /* <- UU, BR */
+ SSCOP_ESTABLISH_confirm, /* -> UU */
+
+ SSCOP_RELEASE_request, /* <- UU */
+ SSCOP_RELEASE_indication, /* -> UU, SRC */
+ SSCOP_RELEASE_confirm, /* -> */
+
+ SSCOP_DATA_request, /* <- MU */
+ SSCOP_DATA_indication, /* -> MU, SN */
+
+ SSCOP_UDATA_request, /* <- MU */
+ SSCOP_UDATA_indication, /* -> MU */
+
+ SSCOP_RECOVER_indication, /* -> */
+ SSCOP_RECOVER_response, /* <- */
+
+ SSCOP_RESYNC_request, /* <- UU */
+ SSCOP_RESYNC_indication, /* -> UU */
+ SSCOP_RESYNC_response, /* <- */
+ SSCOP_RESYNC_confirm, /* -> */
+
+ SSCOP_RETRIEVE_request, /* <- RN */
+ SSCOP_RETRIEVE_indication, /* -> MU */
+ SSCOP_RETRIEVE_COMPL_indication,/* -> */
+};
+.Ed
+.Pp
+The arrows in the comment show the direction of the signal, whether it
+is a signal that comes out of the node
+.Pq Ql -> ,
+or is sent by the node user to the node
+.Pq Ql <- .
+The
+.Va arg
+field contains the argument to some of the signals: it is either a PDU
+sequence number, or the
+.Dv CLEAR-BUFFER
+flag.
+There are a number of special sequence numbers for some operations:
+.Pp
+.Bl -tag -width ".Dv SSCOP_RETRIEVE_UNKNOWN" -offset indent -compact
+.It Dv SSCOP_MAXSEQNO
+maximum legal sequence number
+.It Dv SSCOP_RETRIEVE_UNKNOWN
+retrieve transmission queue
+.It Dv SSCOP_RETRIEVE_TOTAL
+retrieve transmission buffer and queue
+.El
+.Pp
+For signals that carry user data (as, for example,
+.Dv SSCOP_DATA_request )
+these two fields are followed by the variable sized user data.
+.Pp
+If the
+.Va upper
+hook is disconnected and the SSCOP instance is not in the idle
+state, and the
+.Va lower
+hook is still connected, an
+.Dv SSCOP_RELEASE_request
+is executed to release the SSCOP connection.
+.It Va manage
+This is the management interface defined in the standard.
+The data structure used here is:
+.Bd -literal
+struct sscop_marg {
+ uint32_t sig;
+ u_char data[];
+};
+.Ed
+.Pp
+Here
+.Va sig
+is one of
+.Bd -literal
+enum sscop_maasig {
+ SSCOP_MDATA_request, /* <- MU */
+ SSCOP_MDATA_indication, /* -> MU */
+ SSCOP_MERROR_indication, /* -> CODE, CNT */
+};
+.Ed
+.Pp
+The
+.Dv SSCOP_MDATA
+signals are followed by the actual management data, where the
+.Dv SSCOP_MERROR
+signal has the form:
+.Bd -literal
+struct sscop_merr {
+ uint32_t sig;
+ uint32_t err; /* error code */
+ uint32_t cnt; /* error count */
+};
+.Ed
+.El
+.Sh CONTROL MESSAGES
+The
+.Nm sscop
+node understands the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_SSCOP_SETPARAM Pq Ic setparam
+Sets operational parameters of the SSCOP instance and takes the
+following structure:
+.Bd -literal
+struct ng_sscop_setparam {
+ uint32_t mask;
+ struct sscop_param param;
+};
+.Ed
+.Pp
+The sub-structure
+.Va param
+contains the parameters to set, and the
+.Va mask
+field contains a bit mask, telling which of the parameters to set, and which
+to ignore.
+If a bit is set, the corresponding parameter is set.
+The parameters are:
+.Bd -literal
+struct sscop_param {
+ uint32_t timer_cc; /* timer_cc in msec */
+ uint32_t timer_poll; /* timer_poll im msec */
+ uint32_t timer_keep_alive;/* timer_keep_alive in msec */
+ uint32_t timer_no_response;/*timer_no_response in msec */
+ uint32_t timer_idle; /* timer_idle in msec */
+ uint32_t maxk; /* maximum user data in bytes */
+ uint32_t maxj; /* maximum u-u info in bytes */
+ uint32_t maxcc; /* max. retransmissions for control packets */
+ uint32_t maxpd; /* max. vt(pd) before sending poll */
+ uint32_t maxstat; /* max. number of elements in stat list */
+ uint32_t mr; /* initial window */
+ uint32_t flags; /* flags */
+};
+.Ed
+.Pp
+The
+.Va flags
+field contains the following flags influencing SSCOP operation:
+.Pp
+.Bl -tag -width ".Dv SSCOP_POLLREX" -offset indent -compact
+.It Dv SSCOP_ROBUST
+enable atmf/97-0216 robustness enhancement
+.It Dv SSCOP_POLLREX
+send POLL after each retransmission
+.El
+.Pp
+The bitmap has the following bits:
+.Pp
+.Bl -tag -width ".Dv SSCOP_SET_POLLREX" -offset indent -compact
+.It Dv SSCOP_SET_TCC
+set
+.Va timer_cc
+.It Dv SSCOP_SET_TPOLL
+set
+.Va timer_poll
+.It Dv SSCOP_SET_TKA
+set
+.Va timer_keep_alive
+.It Dv SSCOP_SET_TNR
+set
+.Va timer_no_response
+.It Dv SSCOP_SET_TIDLE
+set
+.Va timer_idle
+.It Dv SSCOP_SET_MAXK
+set
+.Va maxk
+.It Dv SSCOP_SET_MAXJ
+set
+.Va maxj
+.It Dv SSCOP_SET_MAXCC
+set
+.Va maxcc
+.It Dv SSCOP_SET_MAXPD
+set
+.Va maxpd
+.It Dv SSCOP_SET_MAXSTAT
+set
+.Va maxstat
+.It Dv SSCOP_SET_MR
+set the initial window
+.It Dv SSCOP_SET_ROBUST
+set or clear
+.Dv SSCOP_ROBUST
+.It Dv SSCOP_SET_POLLREX
+set or clear
+.Dv SSCOP_POLLREX
+.El
+.Pp
+The node responds to the
+.Dv NGM_SSCOP_SETPARAM
+message with the following response:
+.Bd -literal
+struct ng_sscop_setparam_resp {
+ uint32_t mask;
+ int32_t error;
+};
+.Ed
+.Pp
+Here
+.Va mask
+contains a bitmask of the parameters that the user requested to set,
+but that could not be set and
+.Va error
+is an
+.Xr errno 2
+code describing why the parameter could not be set.
+.It Dv NGM_SSCOP_GETPARAM Pq Ic getparam
+This message returns the current operational parameters of the SSCOP
+instance in a
+.Vt sscop_param
+structure.
+.It Dv NGM_SSCOP_ENABLE Pq Ic enable
+This message creates the actual SSCOP instance and initializes it.
+Until this is done, parameters may neither be retrieved nor set, and all
+messages received on any hook are discarded.
+.It Dv NGM_SSCOP_DISABLE Pq Ic disable
+Destroy the SSCOP instance.
+After this, all messages on any hooks are
+discarded.
+.It Dv NGM_SSCOP_SETDEBUG Pq Ic setdebug
+Set debugging flags.
+The argument is a
+.Vt uint32_t .
+.It Dv NGM_SSCOP_GETDEBUG Pq Ic getdebug
+Retrieve the actual debugging flags.
+Needs no arguments and responds with a
+.Vt uint32_t .
+.It Dv NGM_SSCOP_GETSTATE Pq Ic getstate
+Responds with the current state of the SSCOP instance in a
+.Vt uint32_t .
+If the node is not enabled, the retrieved state is 0.
+.El
+.Sh FLOW CONTROL
+Flow control works on the upper and on the lower layer interface.
+At the lower
+layer interface, the two messages,
+.Dv NGM_HIGH_WATER_PASSED
+and
+.Dv NGM_LOW_WATER_PASSED ,
+are used to declare or clear the
+.Dq "lower layer busy"
+state of the protocol.
+.Pp
+At the upper layer interface, the
+.Nm sscop
+node handles three types of flow control messages:
+.Bl -tag -width foo
+.It Dv NGM_HIGH_WATER_PASSED
+If this message is received, the SSCOP stops moving the receive window.
+Each time a data message is handed over to the upper layer, the receive
+window is moved by one message.
+Stopping these updates
+means that the window will start to close and if the peer has sent
+all messages allowed by the current window, it stops transmission.
+This means that the upper layer must be able to still receive a full window
+amount of messages.
+.It Dv NGM_LOW_WATER_PASSED
+This will re-enable the automatic window updates, and if the space indicated
+in the message is larger than the current window, the window will be opened
+by that amount.
+The space is computed as the difference of the
+.Va max_queuelen_packets
+and
+.Va current
+members of the
+.Vt ngm_queue_state
+structure.
+.It Dv NGM_SYNC_QUEUE_STATE
+If the upper layer buffer filling state, as indicated by
+.Va current ,
+is equal to or greater than
+.Va high_watermark
+then the message is ignored.
+If this is not the case, the amount
+of receiver space is computed as the difference of
+.Va max_queuelen_packets
+and
+.Va current
+if automatic window updates are currently allowed, and as the difference of
+.Va high_water_mark
+and
+.Va current
+if window updates are disabled.
+If the resulting value is larger than the current window, the current window
+is opened up to this value.
+Automatic window updates are enabled if they
+were disabled.
+.El
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_atm 4 ,
+.Xr ng_sscfu 4 ,
+.Xr ngctl 8
+.Sh AUTHORS
+.An Harti Brandt Aq harti@FreeBSD.org
diff --git a/share/man/man4/ng_tag.4 b/share/man/man4/ng_tag.4
new file mode 100644
index 0000000..70bd234
--- /dev/null
+++ b/share/man/man4/ng_tag.4
@@ -0,0 +1,338 @@
+.\" Copyright (c) 2006 Vadim Goncharov <vadimnuclight@tpu.ru>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 10, 2006
+.Dt NG_TAG 4
+.Os
+.Sh NAME
+.Nm ng_tag
+.Nd "mbuf tags manipulating netgraph node type"
+.Sh SYNOPSIS
+.In netgraph/ng_tag.h
+.Sh DESCRIPTION
+The
+.Nm tag
+node type allows mbuf packet tags (see
+.Xr mbuf_tags 9 )
+to be examined, stripped or applied to data travelling through a
+Netgraph network.
+Mbuf tags are used in many parts of the
+.Fx
+kernel network subsystem,
+including the storage of VLAN tags as described in
+.Xr vlan 4 ,
+Mandatory Access Control (MAC) labels as described in
+.Xr mac 9 ,
+IPsec policy information as described in
+.Xr ipsec 4 ,
+and packet filter tags used by
+.Xr pf 4 .
+One should also consider useful setting or checking
+.Xr ipfw 8
+tags, which are implemented as mbuf tags, too.
+.Pp
+Each node allows an arbitrary number of connections to arbitrarily
+named hooks.
+With each hook is associated a tag which will be searched in the list
+of all tags attached to a packet incoming to this hook, a destination hook
+for matching packets, a destination hook for non-matching packets,
+a tag which will be appended to data leaving node through this hook,
+and various statistics counters.
+.Pp
+The list of incoming packet's tags is traversed to find a tag with
+specified
+.Va type
+and
+.Va cookie
+values.
+Upon match, if specified
+.Va tag_len
+is non-zero,
+.Va tag_data
+of tag is checked to be identical to that specified in the hook structure.
+Packets with matched tags are forwarded to
+.Dq match
+destination hook, or forwarded to
+.Dq non-match
+hook otherwise.
+Either or both destination hooks can be an empty string, or may
+not exist, in which case the packet is dropped.
+.Pp
+Tag list of packets leaving the node is extended with a new tag
+specified in outgoing hook structure (it is possible to avoid appending
+a new tag to pass packet completely unchanged by specifying zero
+.Va type
+and
+.Va cookie
+values in the structure of the corresponding outgoing hook).
+Additionally,
+a tag can be stripped from incoming packet after match if
+.Va strip
+flag is set.
+This can be used for simple tag removal or tag replacement, if combined
+with tag addition on outgoing matching hook.
+Note that new tag is appended unconditionally, without checking if
+such a tag is already present in the list (it is up to user to check
+if this is a concern).
+.Pp
+New hooks are initially configured to drop all incoming packets
+(as all hook names are empty strings; zero values can be specified
+to forward all packets to non-matching hook),
+and to forward all outgoing packets without any tag appending.
+.Pp
+Data payload of packets passing through the node is completely
+unchanged, all operations can affect tag list only.
+.Sh HOOKS
+This node type supports any number of hooks having arbitrary names.
+In order to allow internal optimizations, user should never try to
+configure a hook with a structure pointing to hooks which do not exist yet.
+The safe way is to create all hooks first, then begin to configure them.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_TAG_SET_HOOKIN Pq Ic sethookin
+This command sets tag values which will be searched in the tag list of
+incoming packets on a hook.
+The following structure must be supplied as an argument:
+.Bd -literal -offset 4n
+struct ng_tag_hookin {
+ char thisHook[NG_HOOKSIZ]; /* name of hook */
+ char ifMatch[NG_HOOKSIZ]; /* match dest hook */
+ char ifNotMatch[NG_HOOKSIZ]; /* !match dest hook */
+ uint8_t strip; /* strip tag if found */
+ uint32_t tag_cookie; /* ABI/Module ID */
+ uint16_t tag_id; /* tag ID */
+ uint16_t tag_len; /* length of data */
+ uint8_t tag_data[0]; /* tag data */
+};
+.Ed
+.Pp
+The hook to be updated is specified in
+.Va thisHook .
+Data bytes of tag corresponding to specified
+.Va tag_id
+(type) and
+.Va tag_cookie
+are placed in the
+.Va tag_data
+array; there must be
+.Va tag_len
+of them.
+Matching and non-matching incoming packets are delivered out the hooks named
+.Va ifMatch
+and
+.Va ifNotMatch ,
+respectively.
+If
+.Va strip
+flag is non-zero, then found tag is deleted from list of packet tags.
+.It Dv NGM_TAG_GET_HOOKIN Pq Ic gethookin
+This command takes an
+.Tn ASCII
+string argument, the hook name, and returns the
+corresponding
+.Vt "struct ng_tag_hookin"
+as shown above.
+.It Dv NGM_TAG_SET_HOOKOUT Pq Ic sethookout
+This command sets tags values which will be applied to outgoing
+packets.
+The following structure must be supplied as an argument:
+.Bd -literal -offset 4n
+struct ng_tag_hookout {
+ char thisHook[NG_HOOKSIZ]; /* name of hook */
+ uint32_t tag_cookie; /* ABI/Module ID */
+ uint16_t tag_id; /* tag ID */
+ uint16_t tag_len; /* length of data */
+ uint8_t tag_data[0]; /* tag data */
+};
+.Ed
+.Pp
+The hook to be updated is specified in
+.Va thisHook .
+Other variables mean basically the same as in
+.Vt "struct ng_tag_hookin"
+shown above, except used for setting values in a new tag.
+.It Dv NGM_TAG_GET_HOOKOUT Pq Ic gethookout
+This command takes an
+.Tn ASCII
+string argument, the hook name, and returns the
+corresponding
+.Vt "struct ng_tag_hookout"
+as shown above.
+.It Dv NGM_TAG_GET_STATS Pq Ic getstats
+This command takes an
+.Tn ASCII
+string argument, the hook name, and returns the
+statistics associated with the hook as a
+.Vt "struct ng_tag_hookstat" .
+.It Dv NGM_TAG_CLR_STATS Pq Ic clrstats
+This command takes an
+.Tn ASCII
+string argument, the hook name, and clears the
+statistics associated with the hook.
+.It Dv NGM_TAG_GETCLR_STATS Pq Ic getclrstats
+This command is identical to
+.Dv NGM_TAG_GET_STATS ,
+except that the statistics are also atomically cleared.
+.El
+.Pp
+.Em Note:
+statistics counters as well as three statistics messages above work
+only if code was compiled with the
+.Dv NG_TAG_DEBUG
+option.
+The reason for this is that statistics is rarely used in practice,
+but still consumes CPU cycles for every packet.
+Moreover, it is even not accurate on SMP systems due to lack of
+synchronization between threads, as this is very expensive.
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh EXAMPLES
+It is possible to do a simple L7 filtering by using
+.Xr ipfw 8
+tags in conjunction with
+.Xr ng_bpf 4
+traffic analyzer.
+Example below explains how to filter DirectConnect P2P network data traffic,
+which cannot be done by usual means as it uses random ports.
+It is known that such data connection always contains a TCP packet with
+6-byte payload string "$Send|".
+So ipfw's
+.Cm netgraph
+action will be used to divert all TCP packets to an
+.Xr ng_bpf 4
+node which will check for the specified string and return non-matching
+packets to
+.Xr ipfw 8 .
+Matching packets are passed to
+.Xr ng_tag 4
+node, which will set a tag and pass them back to
+.Xr ng_bpf 4
+node on a hook programmed to accept all packets and pass them back to
+.Xr ipfw 8 .
+A script provided in
+.Xr ng_bpf 4
+manual page will be used for programming node.
+Note that packets diverted from
+.Xr ipfw 8
+to Netgraph have no link-level header, so offsets in
+.Xr tcpdump 1
+expressions must be altered accordingly.
+Thus, there will be expression
+.Dq Li "ether[40:2]=0x244c && ether[42:4]=0x6f636b20"
+on incoming hook and empty expression to match all packets from
+.Xr ng_tag 4 .
+.Pp
+So, this is
+.Xr ngctl 8
+script for nodes creating and naming for easier access:
+.Bd -literal -offset 4n
+/usr/sbin/ngctl -f- <<-SEQ
+ mkpeer ipfw: bpf 41 ipfw
+ name ipfw:41 dcbpf
+ mkpeer dcbpf: tag matched th1
+ name dcbpf:matched ngdc
+SEQ
+.Ed
+.Pp
+Now
+.Dq Li ngdc
+node (which is of type
+.Nm )
+must be programmed to echo all packets received on the
+.Dq Li th1
+hook back, with the
+.Xr ipfw 8
+tag 412 attached.
+.Dv MTAG_IPFW
+value for
+.Va tag_cookie
+was taken from file
+.In netinet/ip_fw.h
+and value for
+.Va tag_id
+is tag number (412), with zero tag length:
+.Bd -literal -offset 4n
+ngctl msg ngdc: sethookin { thisHook=\e"th1\e" ifNotMatch=\e"th1\e" }
+ngctl msg ngdc: sethookout { thisHook=\e"th1\e" \e
+ tag_cookie=1148380143 \e
+ tag_id=412 }
+.Ed
+.Pp
+Do not forget to program
+.Xr ng_bpf 4
+.Dq Li ipfw
+hook with the above expression (see
+.Xr ng_bpf 4
+for script doing this) and
+.Dq Li matched
+hook with an empty expression:
+.Bd -literal -offset 4n
+ngctl msg dcbpf: setprogram { thisHook=\e"matched\e" ifMatch=\e"ipfw\e" \e
+ bpf_prog_len=1 bpf_prog=[ { code=6 k=8192 } ] }
+.Ed
+.Pp
+After finishing with
+.Xr netgraph 4
+nodes,
+.Xr ipfw 8
+rules must be added to enable packet flow:
+.Bd -literal -offset 4n
+ipfw add 100 netgraph 41 tcp from any to any iplen 46
+ipfw add 110 reset tcp from any to any tagged 412
+.Ed
+.Pp
+Note: one should ensure that packets are returned to ipfw after processing
+inside
+.Xr netgraph 4 ,
+by setting appropriate
+.Xr sysctl 8
+variable:
+.Bd -literal -offset 4n
+sysctl net.inet.ip.fw.one_pass=0
+.Ed
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_bpf 4 ,
+.Xr ng_ipfw 4 ,
+.Xr ipfw 8 ,
+.Xr ngctl 8 ,
+.Xr mbuf_tags 9
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 6.2 .
+.Sh AUTHORS
+.An Vadim Goncharov Aq vadimnuclight@tpu.ru
+.Sh BUGS
+For manipulating any tags with data payload (that is, all tags with non-zero
+.Va tag_len )
+one should care about non-portable machine-dependent representation of
+tags on the low level as byte stream.
+Perhaps this should be done by another program rather than manually.
diff --git a/share/man/man4/ng_tcpmss.4 b/share/man/man4/ng_tcpmss.4
new file mode 100644
index 0000000..240d975
--- /dev/null
+++ b/share/man/man4/ng_tcpmss.4
@@ -0,0 +1,125 @@
+.\" Copyright (c) 2005 Gleb Smirnoff
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 9, 2005
+.Dt NG_TCPMSS 4
+.Os
+.Sh NAME
+.Nm ng_tcpmss
+.Nd "netgraph node to adjust TCP MSS option"
+.Sh SYNOPSIS
+.In netgraph.h
+.In netgraph/ng_tcpmss.h
+.Sh DESCRIPTION
+The
+.Nm tcpmss
+node type is designed to alter the Maximum Segment Size option
+of TCP packets.
+This node accepts an arbitrary number of hooks.
+Initially a new hook is considered unconfigured.
+The
+.Dv NG_TCPMSS_CONFIG
+control message is used to configure a hook.
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following.
+.Bl -tag -width foo
+.It Dv NGM_TCPMSS_CONFIG Pq Ic config
+This control message configures node to do given MSS adjusting on
+a particular hook.
+It requires the
+.Vt "struct ng_tcpmss_config"
+to be supplied as an argument:
+.Bd -literal
+struct ng_tcpmss_config {
+ char inHook[NG_HOOKSIZ];
+ char outHook[NG_HOOKSIZ];
+ uint16_t maxMSS;
+}
+.Ed
+.Pp
+This means: packets received on
+.Va inHook
+would be checked for TCP MSS option and the latter would be
+reduced down to
+.Va maxMSS
+if it exceeds
+.Va maxMSS .
+After that, packets would be sent to hook
+.Va outHook .
+.It Dv NGM_TCPMSS_GET_STATS Pq Ic getstats
+This control message obtains statistics for a given hook.
+The statistics are returned in
+.Vt "struct ng_tcpmss_hookstat" :
+.Bd -literal
+struct ng_tcpmss_hookstat {
+ uint64_t Octets; /* total bytes */
+ uint64_t Packets; /* total packets */
+ uint16_t maxMSS; /* maximum MSS */
+ uint64_t SYNPkts; /* TCP SYN packets */
+ uint64_t FixedPkts; /* changed packets */
+};
+.Ed
+.It Dv NGM_TCPMSS_CLR_STATS Pq Ic clrstats
+This control message clears statistics for a given hook.
+.It Dv NGM_TCPMSS_GETCLR_STATS Pq Ic getclrstats
+This control message obtains and clears statistics for a given hook.
+.El
+.Sh EXAMPLES
+In the following example, packets are injected into the
+.Nm tcpmss
+node using the
+.Xr ng_ipfw 4
+node.
+.Bd -literal -offset indent
+# Create tcpmss node and connect it to ng_ipfw node
+ngctl mkpeer ipfw: tcpmss 100 qqq
+
+# Adjust MSS to 1452
+ngctl msg ipfw:100 config '{ inHook="qqq" outHook="qqq" maxMSS=1452 }'
+
+# Divert traffic into tcpmss node
+ipfw add 300 netgraph 100 tcp from any to any tcpflags syn out via fxp0
+
+# Let packets continue with ipfw after being hacked
+sysctl net.inet.ip.fw.one_pass=0
+.Ed
+.Sh SHUTDOWN
+This node shuts down upon receipt of an
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_ipfw 4
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 6.0 .
+.Sh AUTHORS
+.An Alexey Popov Aq lollypop@flexuser.ru
+.An Gleb Smirnoff Aq glebius@FreeBSD.org
+.Sh BUGS
+When running on SMP, system statistics may be broken.
diff --git a/share/man/man4/ng_tee.4 b/share/man/man4/ng_tee.4
new file mode 100644
index 0000000..e86209d
--- /dev/null
+++ b/share/man/man4/ng_tee.4
@@ -0,0 +1,134 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_tee.8,v 1.4 1999/01/25 23:46:27 archie Exp $
+.\"
+.Dd May 28, 2004
+.Dt NG_TEE 4
+.Os
+.Sh NAME
+.Nm ng_tee
+.Nd netgraph ``tee'' node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/ng_tee.h
+.Sh DESCRIPTION
+The
+.Nm tee
+node type has a purpose similar to the
+.Xr tee 1
+command.
+.Nm Tee
+nodes are useful for debugging or
+.Dq snooping
+on a connection
+between two netgraph nodes.
+.Nm Tee
+nodes have four hooks,
+.Dv right ,
+.Dv left ,
+.Dv right2left ,
+and
+.Dv left2right .
+All data received on
+.Dv right
+is sent unmodified to
+.Em both
+hooks
+.Dv left
+and
+.Dv right2left .
+Similarly, all data received on
+.Dv left
+is sent unmodified to both
+.Dv right
+and
+.Dv left2right .
+.Pp
+Packets may also be received on
+.Dv right2left
+and
+.Dv left2right ;
+if so, they are forwarded unchanged out hooks
+.Dv right
+and
+.Dv left ,
+respectively.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va left2right"
+.It Va right
+The connection to the node on the right.
+.It Va left
+The connection to the node on the left.
+.It Va right2left
+Tap for right to left traffic.
+.It Va left2right
+Tap for left to right traffic.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following.
+.Bl -tag -width foo
+.It Dv NGM_TEE_GET_STATS Pq Ic getstats
+Get statistics, returned as a
+.Dv "struct ng_tee_stats" .
+.It Dv NGM_TEE_CLR_STATS Pq Ic clrstats
+Clear statistics.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of an
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+If both
+.Dv right
+and
+.Dv left
+hooks are present, node removes itself from the chain gently,
+connecting
+.Dv right
+and
+.Dv left
+together.
+.Sh SEE ALSO
+.Xr tee 1 ,
+.Xr netgraph 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Julian Elischer Aq julian@FreeBSD.org
diff --git a/share/man/man4/ng_tty.4 b/share/man/man4/ng_tty.4
new file mode 100644
index 0000000..3add57c
--- /dev/null
+++ b/share/man/man4/ng_tty.4
@@ -0,0 +1,129 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_tty.8,v 1.5 1999/01/25 23:46:28 archie Exp $
+.\"
+.Dd December 25, 2008
+.Dt NG_TTY 4
+.Os
+.Sh NAME
+.Nm ng_tty
+.Nd netgraph node type that is also a TTY hook
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/ttycom.h
+.In netgraph/ng_tty.h
+.Sh DESCRIPTION
+The
+.Nm tty
+node type is both a netgraph node type and a TTY hook.
+.Pp
+The node has a single hook called
+.Dv hook .
+Incoming bytes received on the tty device are sent out on this hook,
+and frames received on
+.Dv hook
+are transmitted out on the tty device.
+No modification to the data is performed in either direction.
+While the hook is installed on a tty, the normal read and write
+operations are unavailable, returning
+.Er EIO .
+.Pp
+Incoming data is delivered directly to ng_tty via the tty bypass hook as a
+buffer pointer and length, this is converted to a mbuf and passed to the peer.
+.Pp
+The node supports an optional
+.Dq hot character .
+If the driver can not deliver data directly to the tty bypass hook then each
+character is input one at a time.
+If set to non-zero and bypass mode is unavailable, incoming
+data from the tty device is queued until this character is seen.
+This avoids sending lots of mbufs containing a small number of bytes,
+but introduces potentially infinite latency.
+The default hot character is 0x7e, consistent with
+.Dv hook
+being connected to a
+.Xr ng_async 4
+type node.
+The hot character has no effect on the transmission of data.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va hook"
+.It Va hook
+.Xr tty 4
+serial data contained in
+.Dv mbuf
+structures, with arbitrary inter-frame boundaries.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_TTY_SET_HOTCHAR
+This command takes an integer argument and sets the hot character
+from the lower 8 bits.
+A hot character of zero disables queueing,
+so that all received data is forwarded immediately.
+.It Dv NGM_TTY_GET_HOTCHAR
+Returns an integer containing the current hot character in the lower
+eight bits.
+.It Dv NGM_TTY_SET_TTY
+This command takes integer process ID and file descriptor of open tty
+and registers the tty hooks.
+.El
+.Sh SHUTDOWN
+This node shuts down when the corresponding device is closed.
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr netgraph 4 ,
+.Xr ng_async 4 ,
+.Xr tty 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@FreeBSD.org
+.An Andrew Thompson Aq thompsa@FreeBSD.org
+.Sh BUGS
+The serial driver code also has a notion of a
+.Dq hot character .
+Unfortunately, this value is statically defined in terms of the
+line discipline and cannot be changed.
+Therefore, if a hot character other than 0x7e (the default) is set for the
+.Nm
+node, the node has no way to convey this information to the
+serial driver, and sub-optimal performance may result.
diff --git a/share/man/man4/ng_ubt.4 b/share/man/man4/ng_ubt.4
new file mode 100644
index 0000000..ef8a57e
--- /dev/null
+++ b/share/man/man4/ng_ubt.4
@@ -0,0 +1,125 @@
+.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $Id: ng_ubt.4,v 1.3 2003/05/21 19:37:35 max Exp $
+.\" $FreeBSD$
+.\"
+.Dd December 26, 2012
+.Dt NG_UBT 4
+.Os
+.Sh NAME
+.Nm ng_ubt
+.Nd Netgraph node type that is also a driver for Bluetooth USB devices
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph/bluetooth/include/ng_ubt.h
+.Sh DESCRIPTION
+The
+.Nm ubt
+node type is both a persistent Netgraph node type and a driver for
+Bluetooth USB devices.
+It implements a Bluetooth USB transport layer
+as per chapter H2 of the Bluetooth Specification Book v1.1.
+A new node is created when a supported USB device is plugged in.
+.Pp
+The node has a single hook called
+.Dv hook .
+Incoming bytes received on the device are re-assembled into HCI frames
+(according to the length).
+Full HCI frames are sent out on the hook.
+The node will add a HCI frame indicator if the device did not send it.
+HCI frames received on
+.Dv hook
+are transmitted out.
+The node will drop the HCI frame indicator unless the device
+requires it to be present.
+.Sh HARDWARE
+The
+.Nm
+driver supports all Bluetooth USB devices that conform with
+the Bluetooth specification v1.1, including:
+.Pp
+.Bl -bullet -compact
+.It
+3Com 3CREB96
+.It
+AIPTEK BR0R02
+.It
+EPoX BT-DG02
+.It
+Mitsumi Bluetooth USB adapter
+.It
+MSI MS-6967
+.It
+TDK Bluetooth USB adapter
+.It
+Broadcom Bluetooth USB adapter
+.El
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va hook"
+.It Va hook
+single HCI frame contained in a single
+.Vt mbuf
+structure.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width indent
+.It Dv NGM_UBT_NODE_GET_DEBUG Pq Ic get_debug
+Returns an integer containing the current debug level for the node.
+.It Dv NGM_UBT_NODE_SET_DEBUG Pq Ic set_debug
+This command takes an integer argument and sets the current debug level
+for the node.
+.It Dv NGM_UBT_NODE_GET_QLEN Pq Ic get_qlen
+This command takes a parameter that specifies the queue number and returns
+the current maximal length of the queue for the node.
+.It Dv NGM_UBT_NODE_SET_QLEN Pq Ic set_qlen
+This command takes two parameters that specify the queue number and the maximum
+length of the queue and sets the maximal length of the queue for the node.
+.It Dv NGM_UBT_NODE_GET_STAT Pq Ic get_stat
+Returns various statistic information for the node, such as: number of
+bytes (frames) sent, number of bytes (frames) received and number of
+input (output) errors.
+.It Dv NGM_UBT_NODE_RESET_STAT Pq Ic reset_stat
+Reset all statistic counters to zero.
+.El
+.Sh SHUTDOWN
+This node shuts down when the corresponding USB device is un-plugged.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ugen 4 ,
+.Xr usb 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm ubt
+node type was implemented in
+.Fx 5.0 .
+.Sh AUTHORS
+.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
+.Sh BUGS
+Isochronous USB transfers are broken.
+This means that the USB device will not be able to transfer SCO data (voice).
+USB interrupt transfers are implemented as bulk-in transfers (not really a bug).
diff --git a/share/man/man4/ng_uni.4 b/share/man/man4/ng_uni.4
new file mode 100644
index 0000000..a2e3c45
--- /dev/null
+++ b/share/man/man4/ng_uni.4
@@ -0,0 +1,420 @@
+.\"
+.\" Copyright (c) 2001-2003
+.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
+.\" All rights reserved.
+.\"
+.\" Author: Hartmut Brandt <harti@FreeBSD.org>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 6, 2003
+.Dt NG_UNI 4
+.Os
+.Sh NAME
+.Nm ng_uni
+.Nd netgraph UNI node type
+.Sh SYNOPSIS
+.In netnatm/msg/unistruct.h
+.In netnatm/sig/unidef.h
+.In netgraph/atm/ng_uni.h
+.Sh DESCRIPTION
+The
+.Nm uni
+netgraph node type implements ATM Forum signalling 4.0.
+.Pp
+After creation of the node, the UNI instance must be created by sending
+an
+.Dq enable
+message to the node.
+If the node is enabled, the UNI parameters
+can be retrieved and modified, and the protocol can be started.
+.Pp
+The node is shut down either by an
+.Dv NGM_SHUTDOWN
+message, or when all hooks are disconnected.
+.Sh HOOKS
+Each
+.Nm uni
+node has three hooks with fixed names:
+.Bl -tag -width ".Va upper"
+.It Va lower
+This hook is the interface of the UNI protocol to the transport layer of
+the ATM control plane.
+The node expects the interface exported by
+.Xr ng_sscfu 4
+at this hook.
+.It Va upper
+This hook is the
+.Dq user
+interface of the UNI protocol.
+Because there is no standardized interface
+at this point, this implementation follows more or less the interface
+specified by the SDL diagrams in ITU-T recommendations Q.2931 and Q.2971.
+Normally either a
+.Xr ng_ccatm 4
+or a switch CAC should be stacked at this interface.
+The message format at the
+.Va upper
+hook is described below.
+Because
+.Xr netgraph 4
+is functional, it makes sometimes sense to switch this hook to queueing mode
+from the peer node upon connection.
+.El
+.Pp
+The
+.Va upper
+interface of the
+.Nm uni
+node is loosely modelled after the interface specified in the ITU-T signalling
+standards.
+There is however one derivation from this: normally there exists
+four kinds of signals: requests, responses, indications and confirmations.
+These signals are usually triggered either by external events (receiving a
+message) or internal events (a timer or another signal).
+This scheme works
+fine for user APIs that are entirely asynchronous, and in cases where
+error handling is not taken into account.
+With synchronous APIs and error
+handling however, there is a problem.
+If, for example, the application
+issues a request to set up a connection,
+it may do it by sending a
+.Dv SETUP.request
+signal to the UNI.
+Normally, the UNI stack will send a SETUP message and
+receive a message from the switch (a RELEASE, CONNECT, CALL PROCEEDING or
+ALERTING), or a timer in the UNI stack will time out.
+In any of these cases,
+the UNI stack is supposed to report an event back to the application, and
+the application will unblock (in the case of a synchronous API) and handle
+the event.
+The problem occurs when an error happens.
+Suppose there is no
+memory to send the SETUP message and to start the timer.
+In this case, the
+application will block forever because no received message and no timer
+will wake it up.
+For this reason this implementation uses an additional message:
+for each signal sent from the application to the stack, the stack will
+respond with an error code.
+If this code is zero, the stack has accepted
+the signal and the application may block; if the code is non-zero, the signal
+is effectively ignored and the code describes what was wrong.
+This system
+makes it very easy to make a blocking interface out of the message based
+netgraph interface.
+.Pp
+The
+.Va upper
+interface uses the following structure:
+.Bd -literal
+struct uni_arg {
+ uint32_t sig;
+ uint32_t cookie;
+ u_char data[];
+};
+.Ed
+The
+.Va sig
+field contains the actual signal that is sent from the user to UNI or from
+UNI to the user.
+The
+.Va cookie
+can be used by the user to correlate requests with events and responses.
+If an error response, a confirmation or an indication was triggered by
+a request or response, the cookie from that request or response is carried in
+the message from the stack to the user.
+The
+.Va cookie
+field is followed by the actual data for the signal.
+.Pp
+The signal is one of the following:
+.Bd -literal
+enum uni_sig {
+ UNIAPI_ERROR, /* UNI -> API */
+
+ UNIAPI_CALL_CREATED, /* UNI -> API */
+ UNIAPI_CALL_DESTROYED, /* UNI -> API */
+ UNIAPI_PARTY_CREATED, /* UNI -> API */
+ UNIAPI_PARTY_DESTROYED, /* UNI -> API */
+
+ UNIAPI_LINK_ESTABLISH_request, /* API -> UNI */
+ UNIAPI_LINK_ESTABLISH_confirm, /* UNI -> API */
+ UNIAPI_LINK_RELEASE_request, /* API -> UNI */
+ UNIAPI_LINK_RELEASE_confirm, /* UNI -> API */
+
+ UNIAPI_RESET_request, /* API -> UNI */
+ UNIAPI_RESET_confirm, /* UNI -> API */
+ UNIAPI_RESET_indication, /* UNI -> API */
+ UNIAPI_RESET_ERROR_indication, /* UNI -> API */
+ UNIAPI_RESET_response, /* API -> UNI */
+ UNIAPI_RESET_ERROR_response, /* API -> UNI */
+ UNIAPI_RESET_STATUS_indication, /* UNI -> API */
+
+ UNIAPI_SETUP_request, /* API -> UNI */
+ UNIAPI_SETUP_indication, /* UNI -> API */
+ UNIAPI_SETUP_response, /* API -> UNI */
+ UNIAPI_SETUP_confirm, /* UNI -> API */
+ UNIAPI_SETUP_COMPLETE_indication, /* UNI -> API */
+ UNIAPI_ALERTING_request, /* API -> UNI */
+ UNIAPI_ALERTING_indication, /* UNI -> API */
+ UNIAPI_PROCEEDING_request, /* API -> UNI */
+ UNIAPI_PROCEEDING_indication, /* UNI -> API */
+ UNIAPI_RELEASE_request, /* API -> UNI */
+ UNIAPI_RELEASE_indication, /* UNI -> API */
+ UNIAPI_RELEASE_response, /* API -> UNI */
+ UNIAPI_RELEASE_confirm, /* UNI -> API */
+ UNIAPI_NOTIFY_request, /* API -> UNI */
+ UNIAPI_NOTIFY_indication, /* UNI -> API */
+ UNIAPI_STATUS_indication, /* UNI -> API */
+ UNIAPI_STATUS_ENQUIRY_request, /* API -> UNI */
+
+ UNIAPI_ADD_PARTY_request, /* API -> UNI */
+ UNIAPI_ADD_PARTY_indication, /* UNI -> API */
+ UNIAPI_PARTY_ALERTING_request, /* API -> UNI */
+ UNIAPI_PARTY_ALERTING_indication, /* UNI -> API */
+ UNIAPI_ADD_PARTY_ACK_request, /* API -> UNI */
+ UNIAPI_ADD_PARTY_ACK_indication, /* UNI -> API */
+ UNIAPI_ADD_PARTY_REJ_request, /* API -> UNI */
+ UNIAPI_ADD_PARTY_REJ_indication, /* UNI -> API */
+ UNIAPI_DROP_PARTY_request, /* API -> UNI */
+ UNIAPI_DROP_PARTY_indication, /* UNI -> API */
+ UNIAPI_DROP_PARTY_ACK_request, /* API -> UNI */
+ UNIAPI_DROP_PARTY_ACK_indication, /* UNI -> API */
+
+ UNIAPI_ABORT_CALL_request, /* API -> UNI */
+
+ UNIAPI_MAXSIG
+};
+.Ed
+.Pp
+The meaning of most of the signals can be deduced from the ITU-T SDLs.
+A number of signals, however, is unique to this implementation:
+.Bl -tag -width foo
+.It Dv UNIAPI_ERROR
+This is the error response, mentioned earlier.
+It carries an error code or
+zero, if the signal was accepted by the stack.
+.It Dv UNIAPI_CALL_CREATED
+The UNI stack has created a call instance either from an incoming SETUP or
+from the user requesting an outgoing SETUP.
+This may be used to synchronize
+the creation and destroying of call data between the UNI stack and the user.
+.It Dv UNIAPI_CALL_DESTROYED
+A call instance has been destroyed and all resources have been freed.
+.It Dv UNIAPI_PARTY_CREATED
+A new party has been created for an existing point-to-multipoint call.
+This may be used to synchronize the creation and destroying of party data
+between the UNI stack and the user.
+.It Dv UNIAPI_PARTY_DESTROYED
+A party has been destroyed and all resources have been freed.
+.It Dv UNIAPI_ABORT_CALL_request
+This requests the stack to destroy the call instance
+and free all its resources,
+without sending any messages to the network.
+.It Dv UNIAPI_MAXSIG
+This is not a signal, but rather a definition to get the number of defined
+signals.
+.El
+.Pp
+Each of the signals is followed by a fixed size structure defined in
+.In netnatm/sig/unidef.h .
+.Sh CONTROL MESSAGES
+The
+.Nm uni
+node understands the standard control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_UNI_SETDEBUG Pq Ic setdebug
+Set debugging facility levels.
+The UNI stack defines a number of debugging
+facilities, each one associated with a debugging level.
+If the debugging level
+of a facility is non-zero, text output will be generated to the console.
+The message uses the following structure:
+.Bd -literal
+struct ngm_uni_debug {
+ uint32_t level[UNI_MAXFACILITY];
+};
+.Ed
+.It Dv NGM_UNI_GETDEBUG Pq Ic getdebug
+Get debugging facility levels.
+This returns an
+.Vt ngm_uni_debug
+structure.
+.It Dv NGM_UNI_GET_CONFIG Pq Ic get_config
+Retrieve the current configuration of the UNI instance.
+This message returns a
+.Vt uni_config
+structure:
+.Bd -literal
+struct uni_config {
+ uint32_t proto; /* which protocol */
+ uint32_t popt; /* protocol option */
+ uint32_t option; /* other options */
+ uint32_t timer301; /* T301 */
+ uint32_t timer303; /* T303 */
+ uint32_t init303; /* T303 retransmission count */
+ uint32_t timer308; /* T308 */
+ uint32_t init308; /* T308 retransmission count */
+ uint32_t timer309; /* T309 */
+ uint32_t timer310; /* T310 */
+ uint32_t timer313; /* T313 */
+ uint32_t timer316; /* T316 */
+ uint32_t init316; /* T316 retransmission count */
+ uint32_t timer317; /* T317 */
+ uint32_t timer322; /* T322 */
+ uint32_t init322; /* T322 retransmission count */
+ uint32_t timer397; /* T397 */
+ uint32_t timer398; /* T398 */
+ uint32_t timer399; /* T399 */
+};
+.Ed
+.Pp
+The field
+.Va proto
+specifies one of the following protocols:
+.Bd -literal
+enum uni_proto {
+ UNIPROTO_UNI40U, /* UNI4.0 user side */
+ UNIPROTO_UNI40N, /* UNI4.0 network side */
+ UNIPROTO_PNNI10, /* PNNI1.0 */
+};
+.Ed
+.Pp
+Some protocols may have options which can be set in
+.Va popt :
+.Bd -literal
+enum uni_popt {
+ UNIPROTO_GFP, /* enable GFP */
+};
+.Ed
+.Pp
+The
+.Va option
+field controls parsing and checking of messages:
+.Bd -literal
+enum uni_option {
+ UNIOPT_GIT_HARD, /* harder check of GIT IE */
+ UNIOPT_BEARER_HARD, /* harder check of BEARER IE */
+ UNIOPT_CAUSE_HARD, /* harder check of CAUSE IE */
+};
+.Ed
+.Pp
+All timer values are given in milliseconds.
+Note, however, that the actual
+resolution of the timers depend on system configuration (see
+.Xr timeout 9 ) .
+.It Dv NGM_UNI_SET_CONFIG Pq Ic set_config
+Change the UNI configuration.
+This takes a
+.Bd -literal
+struct ngm_uni_set_config {
+ struct uni_config config;
+ struct ngm_uni_config_mask mask;
+};
+struct ngm_uni_config_mask {
+ uint32_t mask;
+ uint32_t popt_mask;
+ uint32_t option_mask;
+};
+.Ed
+.Pp
+The fields of the
+.Vt ngm_uni_config_mask
+specify which configuration parameter to change.
+The
+.Va mask
+field contains bit definitions for all timers, retransmission counters
+and the
+.Va proto
+field,
+.Va popt_mask
+selects which of the protocol options to change, and
+.Va option_mask
+specifies which options should be changed.
+The following bits are defined:
+.Bd -literal
+enum uni_config_mask {
+ UNICFG_PROTO,
+ UNICFG_TIMER301,
+ UNICFG_TIMER303,
+ UNICFG_INIT303,
+ UNICFG_TIMER308,
+ UNICFG_INIT308,
+ UNICFG_TIMER309,
+ UNICFG_TIMER310,
+ UNICFG_TIMER313,
+ UNICFG_TIMER316,
+ UNICFG_INIT316,
+ UNICFG_TIMER317,
+ UNICFG_TIMER322,
+ UNICFG_INIT322,
+ UNICFG_TIMER397,
+ UNICFG_TIMER398,
+ UNICFG_TIMER399,
+};
+.Ed
+.Pp
+For
+.Va popt_mask
+and
+.Va option_mask ,
+the definitions from
+.Vt "enum uni_popt"
+and
+.Vt "enum uni_option"
+should be used.
+.It Dv NGM_UNI_ENABLE Pq Ic enable
+Create the UNI instance and enable processing.
+Before the UNI is enabled parameters cannot be retrieved or set.
+.It Dv NGM_UNI_DISABLE Pq Ic disable
+Destroy the UNI instance and free all resources.
+Note, that connections are not released.
+.El
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_atm 4 ,
+.Xr ng_sscfu 4 ,
+.Xr ng_sscop 4 ,
+.Xr ngctl 8
+.Sh AUTHORS
+The
+.Nm uni
+netgraph node
+and this manual page were written by
+.An Harti Brandt Aq harti@FreeBSD.org
+.Sh BUGS
+.Bl -bullet -compact
+.It
+LIJ (leaf-initiated-join) is not implemented yet.
+.It
+GFP (generic functional protocol, Q.2932.1) is not yet implemented.
+.It
+More testing needed.
+.It
+PNNI not yet implemented.
+.It
+Need to implement connection modification and the Q.2931 amendments.
+.El
diff --git a/share/man/man4/ng_vjc.4 b/share/man/man4/ng_vjc.4
new file mode 100644
index 0000000..83f0269
--- /dev/null
+++ b/share/man/man4/ng_vjc.4
@@ -0,0 +1,238 @@
+.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Subject to the following obligations and disclaimer of warranty, use and
+.\" redistribution of this software, in source or object code forms, with or
+.\" without modifications are expressly permitted by Whistle Communications;
+.\" provided, however, that:
+.\" 1. Any and all reproductions of the source or object code must include the
+.\" copyright notice above and the following disclaimer of warranties; and
+.\" 2. No rights are granted, in any manner or form, to use Whistle
+.\" Communications, Inc. trademarks, including the mark "WHISTLE
+.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as
+.\" such appears in the above copyright notice or in the software.
+.\"
+.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
+.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
+.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
+.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
+.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
+.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
+.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
+.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
+.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
+.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
+.\" OF SUCH DAMAGE.
+.\"
+.\" Author: Archie Cobbs <archie@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\" $Whistle: ng_vjc.8,v 1.4 1999/01/25 23:46:28 archie Exp $
+.\"
+.Dd January 19, 1999
+.Dt NG_VJC 4
+.Os
+.Sh NAME
+.Nm ng_vjc
+.Nd Van Jacobson compression netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netinet/in.h
+.In netinet/in_systm.h
+.In netinet/ip.h
+.In net/slcompress.h
+.In netgraph/ng_vjc.h
+.Sh DESCRIPTION
+The
+.Nm vjc
+node type performs Van Jacobson compression, which is used
+over PPP, SLIP, and other point-to-point IP connections to
+compress TCP packet headers.
+The
+.Dv ip
+hook represents the uncompressed side of the node, while the
+.Dv vjcomp ,
+.Dv vjuncomp ,
+and
+.Dv vjip
+hooks represent the compressed side of the node.
+Packets received on the
+.Dv ip
+will be compressed or passed through as appropriate.
+Packets received on the other three hooks will be uncompressed as appropriate.
+This node also supports
+.Dq always pass through
+mode in either direction.
+.Pp
+Van Jacobson compression only applies to TCP packets.
+Only
+.Dq normal
+(i.e., common case) TCP packets are actually compressed.
+These are output on the
+.Dv vjcomp
+hook.
+Other TCP packets are run through the state machine but not
+compressed; these appear on the
+.Dv vjuncomp
+hook.
+Other non-TCP IP packets are forwarded unchanged to
+.Dv vjip .
+.Pp
+When connecting to a
+.Xr ng_ppp 4
+node, the
+.Dv ip ,
+.Dv vjuncomp ,
+.Dv vjcomp ,
+and
+.Dv vjip
+hooks should be connected to the
+.Xr ng_ppp 4
+node's
+.Dv vjc_ip ,
+.Dv vjc_vjcomp ,
+.Dv vjc_vjuncomp ,
+and
+.Dv vjc_ip
+hooks, respectively.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width ".Va vjuncomp"
+.It Va ip
+Upstream (uncompressed) IP packets.
+.It Va vjcomp
+Downstream compressed TCP packets.
+.It Va vjuncomp
+Downstream uncompressed TCP packets.
+.It Va vjip
+Downstream uncompressed IP packets.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_VJC_SET_CONFIG Pq Ic setconfig
+This command resets the compression state and configures it according
+to the supplied
+.Dv "struct ngm_vjc_config"
+argument.
+This structure contains the following fields:
+.Bd -literal -offset 4n
+struct ngm_vjc_config {
+ u_char enableComp; /* Enable compression */
+ u_char enableDecomp; /* Enable decompression */
+ u_char maxChannel; /* Number of outgoing channels - 1 */
+ u_char compressCID; /* OK to compress outgoing CID's */
+};
+.Ed
+.Pp
+When
+.Dv enableComp
+is set to zero, all packets received on the
+.Dv ip
+hook are forwarded unchanged out the
+.Dv vjip
+hook.
+Similarly, when
+.Dv enableDecomp
+is set to zero, all packets received on the
+.Dv vjip
+hook are forwarded unchanged out the
+.Dv ip
+hook, and packets are not accepted on the
+.Dv vjcomp
+and
+.Dv vjuncomp
+hooks.
+When a node is first created,
+both compression and decompression are disabled and the node is
+therefore operating in bi-directional
+.Dq pass through
+mode.
+.Pp
+When enabling compression,
+.Dv maxChannel
+should be set to the number of outgoing compression channels minus one,
+and is a value between 3 and 15, inclusive.
+The
+.Dv compressCID
+field indicates whether it is OK to compress the CID header field for
+outgoing compressed TCP packets.
+This value should be zero unless
+either (a) it is not possible for an outgoing frame to be lost, or
+(b) lost frames can be reliably detected and immediately
+reported to the peer's decompression engine (see
+.Dv NGM_VJC_RECV_ERROR
+below).
+.It Dv NGM_VJC_GET_STATE Pq Ic getstate
+This command returns the node's current state described by the
+.Dv "struct slcompress"
+structure, which is defined in
+.In net/slcompress.h .
+.It Dv NGM_VJC_CLR_STATS Pq Ic clrstats
+Clears the node statistics counters.
+Statistics are also cleared whenever the
+.Dv enableComp
+or
+.Dv enableDecomp
+fields are changed from zero to one by a
+.Dv NGM_VJC_SET_CONFIG
+control message.
+.It Dv NGM_VJC_RECV_ERROR Pq Ic recverror
+When the peer has CID header field compression enabled,
+this message must be sent to the local
+.Nm vjc
+node immediately
+after detecting that a received frame has been lost, due to a bad
+checksum or for any other reason.
+Failing to do this can result in corrupted TCP stream data.
+.El
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_iface 4 ,
+.Xr ng_ppp 4 ,
+.Xr ngctl 8
+.Rs
+.%A V. Jacobson
+.%T "Compressing TCP/IP Headers"
+.%O RFC 1144
+.Re
+.Rs
+.%A G. McGregor
+.%T "The PPP Internet Control Protocol (IPCP)"
+.%O RFC 1332
+.Re
+.Sh HISTORY
+The
+.Nm
+node type was implemented in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Archie Cobbs Aq archie@FreeBSD.org
+.Sh BUGS
+As the initialization routine in the kernel implementation of
+Van Jacobson compression initializes both compression and decompression
+at once, this node does not allow compression and decompression to
+be enabled in separate operations.
+In order to enable one when
+the other is already enabled, first both must be disabled, then
+both enabled.
+This of course resets the node state.
+This restriction may be lifted in a later version.
+.Pp
+When built as a loadable kernel module, this module includes the file
+.Pa net/slcompress.c .
+Although loading the module should fail if
+.Pa net/slcompress.c
+already exists in the kernel, currently it does not, and the duplicate
+copies of the file do not interfere.
+However, this may change in the future.
diff --git a/share/man/man4/ng_vlan.4 b/share/man/man4/ng_vlan.4
new file mode 100644
index 0000000..1efaccc
--- /dev/null
+++ b/share/man/man4/ng_vlan.4
@@ -0,0 +1,145 @@
+.\" Copyright (c) 2003 Ruslan Ermilov
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 1, 2004
+.Dt NG_VLAN 4
+.Os
+.Sh NAME
+.Nm ng_vlan
+.Nd IEEE 802.1Q VLAN tagging netgraph node type
+.Sh SYNOPSIS
+.In sys/types.h
+.In netgraph.h
+.In netgraph/ng_vlan.h
+.Sh DESCRIPTION
+The
+.Nm vlan
+node type multiplexes frames tagged according to
+the IEEE 802.1Q standard between different hooks.
+.Pp
+Each node has two special hooks,
+.Va downstream
+and
+.Va nomatch ,
+and an arbitrary number of
+.Dq vlan
+hooks, each associated with a particular VLAN tag.
+.Pp
+An
+.Dv ETHERTYPE_VLAN
+frame received on the
+.Va downstream
+hook with a tag that the node has been configured to filter
+is sent out the corresponding
+.Dq vlan
+hook.
+If it does not match any of the configured tags, or is not of a type
+.Dv ETHERTYPE_VLAN ,
+it is sent out the
+.Va nomatch
+hook.
+If the
+.Va nomatch
+hook is not connected, the packet is dropped.
+.Pp
+An Ethernet frame received on the
+.Va nomatch
+hook is passed unmodified to the
+.Va downstream
+hook.
+.Pp
+An Ethernet frame received on any of the
+.Dq vlan
+hooks is tagged accordingly and sent out the
+.Va downstream
+hook.
+.Sh HOOKS
+This node type supports the following hooks:
+.Bl -tag -width "Aq Em any valid name"
+.It Va downstream
+Typically this hook would be connected to a
+.Xr ng_ether 4
+node, using the
+.Va lower
+hook.
+.It Va nomatch
+Typically this hook would also be connected to an
+.Xr ng_ether 4
+type node using the
+.Va upper
+hook.
+.It Aq Em "any valid name"
+Any other hook name will be accepted and should later be associated with
+a particular tag.
+Typically this hook would be attached to an
+.Xr ng_eiface 4
+type node using the
+.Va ether
+hook.
+.El
+.Sh CONTROL MESSAGES
+This node type supports the generic control messages, plus the following:
+.Bl -tag -width foo
+.It Dv NGM_VLAN_ADD_FILTER Pq Ic addfilter
+Associates a hook with the tag.
+.It Dv NGM_VLAN_DEL_FILTER Pq Ic delfilter
+Disassociates a hook from the tag.
+.It Dv NGM_VLAN_GET_TABLE Pq Ic gettable
+Returns a table of all hook/tag associations.
+.El
+.Sh EXAMPLES
+.Bd -literal
+#!/bin/sh
+
+ETHER_IF=rl0
+
+ngctl -f- <<EOF
+shutdown ${ETHER_IF}:
+mkpeer ${ETHER_IF}: vlan lower downstream
+name ${ETHER_IF}:lower vlan
+connect ${ETHER_IF}: vlan: upper nomatch
+EOF
+
+ngctl mkpeer vlan: eiface vlan123 ether
+ngctl msg vlan: addfilter '{ vlan=123 hook="vlan123" }'
+.Ed
+.Sh SHUTDOWN
+This node shuts down upon receipt of a
+.Dv NGM_SHUTDOWN
+control message, or when all hooks have been disconnected.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_eiface 4 ,
+.Xr ng_ether 4 ,
+.Xr ngctl 8 ,
+.Xr nghook 8
+.Sh HISTORY
+The
+.Nm
+node type appeared in
+.Fx 4.10 .
+.Sh AUTHORS
+.An Ruslan Ermilov Aq ru@FreeBSD.org
diff --git a/share/man/man4/ngatmbase.4 b/share/man/man4/ngatmbase.4
new file mode 100644
index 0000000..fd885ee
--- /dev/null
+++ b/share/man/man4/ngatmbase.4
@@ -0,0 +1,134 @@
+.\"
+.\" Copyright (c) 2004
+.\" Hartmut Brandt.
+.\" All rights reserved.
+.\"
+.\" Author: Hartmut Brandt <harti@FreeBSD.org>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.\" ngatmbase(4) man page
+.\"
+.Dd August 24, 2004
+.Dt NGATMBASE 4
+.Os
+.Sh NAME
+.Nm ngatmbase
+.Nd netgraph ATM utility module
+.Sh SYNOPSIS
+.In netnatm/unimsg.h
+.In netgraph/atm/ngatmbase.h
+.Ft "struct mbuf *"
+.Fn uni_msg_pack_mbuf "struct uni_msg *msg" "void *hdr" "size_t len"
+.Ft "struct uni_msg *"
+.Fn uni_msg_alloc "size_t len"
+.Ft "struct uni_msg *"
+.Fn uni_msg_build "void *buf" ...
+.Ft void
+.Fn uni_msg_destroy "struct uni_msg *msg"
+.Ft int
+.Fn uni_msg_unpack_mbuf "struct mbuf *m" "struct uni_msg *msgp"
+.Sh DESCRIPTION
+This module provides utility functions for the handling of signalling
+messages to the NgATM modules.
+.Pp
+The
+.Fn uni_msg_pack_mbuf
+function
+packs a message into one or several
+.Vt mbuf Ns s
+optionally prepending a header.
+The header is given by its address
+.Fa hdr
+and length
+.Fa len .
+If
+.Fa hdr
+is
+.Dv NULL
+or
+.Fa len
+equals 0, no header is prepended.
+Either
+.Fa msg
+or
+.Fa hdr
+may be
+.Dv NULL
+but not both.
+The
+.Fn uni_msg_pack_mbuf
+function
+returns a pointer to the allocated
+.Vt mbuf
+chain or
+.Dv NULL
+in the case of an error.
+.Pp
+The
+.Fn uni_msg_alloc
+function
+allocates a new message with space for at least
+.Fa len
+bytes.
+In the case of an error
+.Dv NULL
+is returned.
+.Pp
+The
+.Fn uni_msg_build
+function constructs a message from pieces.
+Each piece is given by a pair of
+arguments, the first of type
+.Vt "void *"
+and the second a
+.Vt size_t .
+The list of pieces must be terminated by
+.Po Vt "void *" Pc Ns Dv NULL .
+.Pp
+The
+.Fn uni_msg_destroy
+function
+destroys the messages and frees all the messages's memory.
+.Pp
+The
+.Fn uni_msg_unpack_mbuf
+function
+unpacks an
+.Vt mbuf
+chain info a
+.Vt uni_msg .
+A pointer to the newly allocated message is stored in
+.Fa msgp
+and 0 is returned.
+In the case of an error (either when no packet header is found
+in the first mbuf or memory cannot be allocated) the function
+returns an appropriate error code.
+.Sh SEE ALSO
+.Xr ng_ccatm 4 ,
+.Xr ng_sscfu 4 ,
+.Xr ng_sscop 4 ,
+.Xr ng_uni 4
+.Sh AUTHORS
+.An Harti Brandt Aq harti@FreeBSD.org
diff --git a/share/man/man4/nge.4 b/share/man/man4/nge.4
new file mode 100644
index 0000000..ec02052
--- /dev/null
+++ b/share/man/man4/nge.4
@@ -0,0 +1,227 @@
+.\" Copyright (c) 2001 Wind River Systems
+.\" Copyright (c) 1997, 1998, 1999, 2000, 2001
+.\" Bill Paul <wpaul@bsdi.com>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 23, 2010
+.Dt NGE 4
+.Os
+.Sh NAME
+.Nm nge
+.Nd "National Semiconductor PCI Gigabit Ethernet adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device nge"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_nge_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for various NICs based on the National Semiconductor
+DP83820 and DP83821 Gigabit Ethernet controller chips.
+.Pp
+The DP83820 supports TBI (ten bit interface) and GMII
+transceivers, which means it can be used with either copper or 1000baseX
+fiber applications.
+The DP83820 supports TCP/IP checksum offload and
+VLAN tagging/insertion as well as a 2048-bit multicast hash filter
+and up to 4 pattern match buffers.
+.Pp
+Most cards also use the DP83861 10/100/1000 copper gigabit transceiver
+chip, which supports autonegotiation of 10, 100 and 1000Mbps modes in
+full or half duplex.
+.Pp
+The DP83820 and DP83821 also support jumbo frames, which can be
+configured via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit jumbo frames.
+Using jumbo frames can greatly improve performance for certain tasks,
+such as file transfers and data streaming.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width 10baseTXUTP
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+The
+.Xr ifconfig 8
+.Ic mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Xr ifconfig 8
+.Ic mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 1000baseTX
+Set 1000baseTX operation over twisted pair.
+.Cm full-duplex
+and
+.Cm half-duplex
+modes are supported.
+.It Cm 1000baseSX
+Set 1000Mbps (Gigabit Ethernet) operation.
+Both
+.Cm full-duplex
+and
+.Cm half-duplex
+modes are supported.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width full-duplex
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports National Semiconductor DP83820 and DP83821 based
+Gigabit Ethernet adapters including:
+.Pp
+.Bl -bullet -compact
+.It
+Addtron AEG320T
+.It
+Ark PC SOHO-GA2500T (32-bit PCI) and SOHO-GA2000T (64-bit PCI)
+.It
+Asante FriendlyNet GigaNIX 1000TA and 1000TPC
+.It
+D-Link DGE-500T
+.It
+Linksys EG1032, revision 1
+.It
+Netgear GA621
+.It
+Netgear GA622T
+.It
+SMC EZ Card 1000 (SMC9462TX)
+.It
+Surecom Technology EP-320G-TX
+.It
+Trendware TEG-PCITX (32-bit PCI) and TEG-PCITX2 (64-bit PCI)
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width "xxxxxx"
+.It Va dev.nge.%d.int_holdoff
+Maximum amount of time to delay interrupt processing in units of
+100us.
+The accepted range is 0 to 255, the default is 1(100us).
+Value 0 completely disables the interrupt moderation.
+The interface has to be brought down and up again before a change
+takes effect.
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "nge%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "nge%d: couldn't map ports"
+A fatal initialization error has occurred.
+.It "nge%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "nge%d: no memory for softc struct!"
+The driver failed to allocate memory for per-device instance information
+during initialization.
+.It "nge%d: failed to enable memory mapping!"
+The driver failed to initialize PCI shared memory mapping.
+This might
+happen if the card is not in a bus-master slot.
+.It "nge%d: no memory for jumbo buffers!"
+The driver failed to allocate memory for jumbo frames during
+initialization.
+.It "nge%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Rs
+.%T National Semiconductor DP83820 datasheet
+.%U http://www.national.com
+.Re
+.Rs
+.%T National Semiconductor DP83861 datasheet
+.%U http://www.national.com
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.4 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@bsdi.com .
diff --git a/share/man/man4/nmdm.4 b/share/man/man4/nmdm.4
new file mode 100644
index 0000000..7dccb00
--- /dev/null
+++ b/share/man/man4/nmdm.4
@@ -0,0 +1,85 @@
+.\" Copyright (c) 2001
+.\" The FreeBSD Project
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 27, 2005
+.Dt NMDM 4
+.Os
+.Sh NAME
+.Nm nmdm
+.Nd nullmodem terminal driver
+.Sh SYNOPSIS
+.Cd "device nmdm"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides two
+.Xr tty 4
+devices connected
+by a virtual
+.Dq "null modem"
+cable.
+.Pp
+If either of the two tty devices have the
+.Dv CDSR_OFLOW
+bit
+.Pq Dq Li "stty dsrflow"
+set in their line discipline, the
+.Nm
+device will emulate the speed configured in the
+.Xr termios 4
+settings.
+The speed emulation works independently in the two directions,
+controlled by the slower end's termios settings
+.Va ( c_ispeed , c_ospeed ,
+.Dv CS5 ... CS8 , CSTOPB
+and
+.Dv PARENB ) .
+.Sh FILES
+.Bl -tag -width ".Pa /dev/nmdm Ns Ar N Ns Op Pa AB" -compact
+.It Pa /dev/nmdm Ns Ar N Ns Op Pa AB
+nullmodem device nodes.
+Where the
+.Pa A
+node has a matching
+.Pa B
+node.
+.El
+.Pp
+The
+.Nm
+driver implements
+.Dq "on-demand device creation"
+so simply accessing a given instance in
+.Pa /dev
+will create it.
+.Sh DIAGNOSTICS
+None.
+.Sh SEE ALSO
+.Xr stty 1 ,
+.Xr termios 4 ,
+.Xr tty 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.4 .
diff --git a/share/man/man4/nsp.4 b/share/man/man4/nsp.4
new file mode 100644
index 0000000..7ff7fe1
--- /dev/null
+++ b/share/man/man4/nsp.4
@@ -0,0 +1,98 @@
+.\" Copyright (c) 2003 Noriaki MITSUNAGA. All rights reserved.
+.\" Copyright (c) 2003 Hideyuki KURASHINA. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 8, 2004
+.Dt NSP 4
+.Os
+.Sh NAME
+.Nm nsp
+.Nd "Workbit Ninja SCSI-3 based PC-Card SCSI host adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device nsp"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+nsp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides access to the
+.Tn SCSI
+bus connected to a PC-Card
+.Tn SCSI
+host adapter based on a Ninja SCSI-3 controller by Workbit.
+.Sh HARDWARE
+Controllers supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Alpha-Data AD-PCS201
+.It
+I-O DATA CBSC16
+.El
+.Sh SEE ALSO
+.Xr cd 4 ,
+.Xr ch 4 ,
+.Xr da 4 ,
+.Xr intro 4 ,
+.Xr pccard 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.Sh HISTORY
+The
+.Nm
+driver has been developed for
+.Nx Ns / Ns Tn pc98
+and ported for
+.Fx .
+It first appeared in
+.Fx 3.4
+with PAO3 and merged in
+.Fx 4.2 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Naofumi HONDA .
+.Pp
+This manual page was written by
+.An Noriaki MITSUNAGA Aq non@FreeBSD.org
+and
+.An Hideyuki KURASHINA Aq rushani@FreeBSD.org .
+.Sh BUGS
+SMIT mode is only supported under OLDCARD now.
diff --git a/share/man/man4/ntb.4 b/share/man/man4/ntb.4
new file mode 100644
index 0000000..ac16c61
--- /dev/null
+++ b/share/man/man4/ntb.4
@@ -0,0 +1,114 @@
+.\"
+.\" Copyright (c) 2013 Intel Corporation
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions, and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" substantially similar to the "NO WARRANTY" disclaimer below
+.\" ("Disclaimer") and any redistribution must be conditioned upon
+.\" including a substantially similar Disclaimer requirement for further
+.\" binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" ntb driver man page.
+.\"
+.\" Author: Carl Delsey <carl@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd Apr 11, 2013
+.Dt NTB 4
+.Os
+.Sh NAME
+.Nm ntb ,
+.Nm ntb_hw ,
+.Nm if_ntb
+.Nd Intel(R) Non-Transparent Bridge driver
+.Sh SYNOPSIS
+To compile this driver into your kernel,
+place the following lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ntb_hw"
+.Cd "device if_ntb"
+.Ed
+.Pp
+Or, to load the driver as a module at boot, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ntb_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Non-Transparent Bridge (NTB) in the Intel S1200,
+Xeon E3 and Xeon E5 processor families.
+.Pp
+The NTB allows you to connect two computer systems using a PCI-e link if they
+have the correct equipment and connectors.
+.Sh CONFIGURATION
+The NTB memory windows need to be configured by the BIOS.
+If your BIOS allows you to set their size, you should set the size of both
+memory windows to 1 MiB.
+This needs to be done on both systems.
+.Pp
+Each system needs to have a different IP address assigned.
+The MAC address is randomly generated.
+Also for maximum performance, the MTU should be set to 16 kiB.
+This can be done by adding the line below to
+.Xr rc.conf 5 :
+.Bd -literal -offset indent
+ifconfig_ntb0="inet 192.168.1.10 netmask 255.255.255.0 mtu 16384"
+.Ed
+.Pp
+And on the second system :
+.Bd -literal -offset indent
+ifconfig_ntb0="inet 192.168.1.11 netmask 255.255.255.0 mtu 16384"
+.Ed
+.Pp
+If you are using the UDP protocol, you may want to increase the
+.Va net.inet.udp.maxdgram
+.Xr sysctl 8
+variable.
+.Sh SEE ALSO
+.Xr rc.conf 5 ,
+.Xr sysctl 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was developed by Intel and originally written by
+.An Carl Delsey Aq carl@FreeBSD.org.
+.Sh BUGS
+If the driver is unloaded, it cannot be reloaded without a system reboot.
+.Pp
+The network support is limited.
+It isn't fully configurable yet.
+It also isn't integrated into
+.Xr netgraph 4
+or
+.Xr bpf 4 .
+.Pp
+NTB to Root Port mode is not yet supported.
+.Pp
+There is no way to protect your system from malicious behavior on the other
+system once the link is brought up.
+Anyone with root or kernel access on the other system can read or write to
+any location on your system.
+In other words, only connect two systems that completely trust each other.
diff --git a/share/man/man4/null.4 b/share/man/man4/null.4
new file mode 100644
index 0000000..067c2d8
--- /dev/null
+++ b/share/man/man4/null.4
@@ -0,0 +1,57 @@
+.\" Copyright (c) 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)null.4 8.1 (Berkeley) 6/5/93
+.\" $FreeBSD$
+.\"
+.Dd June 5, 1993
+.Dt NULL 4
+.Os
+.Sh NAME
+.Nm null
+.Nd the null device
+.Sh DESCRIPTION
+The
+.Nm
+device accepts and reads data as any ordinary (and willing)
+file -
+but throws it away.
+The length of the
+.Nm
+device is always zero.
+.Sh FILES
+.Bl -tag -width /dev/null
+.It Pa /dev/null
+.El
+.Sh SEE ALSO
+.Xr full 4 ,
+.Xr zero 4
+.Sh HISTORY
+A
+.Nm
+device appeared in
+.At v7 .
diff --git a/share/man/man4/nvd.4 b/share/man/man4/nvd.4
new file mode 100644
index 0000000..0874ad5
--- /dev/null
+++ b/share/man/man4/nvd.4
@@ -0,0 +1,97 @@
+.\"
+.\" Copyright (c) 2012-2014 Intel Corporation
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions, and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" substantially similar to the "NO WARRANTY" disclaimer below
+.\" ("Disclaimer") and any redistribution must be conditioned upon
+.\" including a substantially similar Disclaimer requirement for further
+.\" binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" nvd driver man page.
+.\"
+.\" Author: Jim Harris <jimharris@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 18, 2014
+.Dt NVD 4
+.Os
+.Sh NAME
+.Nm nvd
+.Nd NVM Express disk driver
+.Sh SYNOPSIS
+To compile this driver into your kernel,
+place the following lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device nvme"
+.Cd "device nvd"
+.Ed
+.Pp
+Or, to load the driver as a module at boot, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+nvme_load="YES"
+nvd_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver exposes NVM Express (NVMe) namespaces as disks to the kernel disk
+storage API.
+It depends on the
+.Xr nvme 4
+driver for notification of existing NVMe namespaces and submission of NVM
+I/O commands.
+.Pp
+Device nodes from the
+.Nm
+driver will have the format /dev/nvdX and are
+.Xr GEOM 4
+disks which can be partitioned by
+.Xr geom 8 .
+Note that device nodes from the
+.Xr nvme 4
+driver are not
+.Xr GEOM 4
+disks and cannot be partitioned.
+.Sh SEE ALSO
+.Xr GEOM 4 ,
+.Xr nvme 4 ,
+.Xr geom 8 ,
+.Xr nvmecontrol 8 ,
+.Xr disk 9
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 9.2 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was developed by Intel and originally written by
+.An Jim Harris Aq jimharris@FreeBSD.org ,
+with contributions from Joe Golio at EMC.
+.Pp
+This man page was written by
+.An Jim Harris Aq jimharris@FreeBSD.org .
diff --git a/share/man/man4/nvme.4 b/share/man/man4/nvme.4
new file mode 100644
index 0000000..0ea529b
--- /dev/null
+++ b/share/man/man4/nvme.4
@@ -0,0 +1,171 @@
+.\"
+.\" Copyright (c) 2012-2014 Intel Corporation
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions, and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" substantially similar to the "NO WARRANTY" disclaimer below
+.\" ("Disclaimer") and any redistribution must be conditioned upon
+.\" including a substantially similar Disclaimer requirement for further
+.\" binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" nvme driver man page.
+.\"
+.\" Author: Jim Harris <jimharris@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 18, 2014
+.Dt NVME 4
+.Os
+.Sh NAME
+.Nm nvme
+.Nd NVM Express core driver
+.Sh SYNOPSIS
+To compile this driver into your kernel,
+place the following line in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device nvme"
+.Ed
+.Pp
+Or, to load the driver as a module at boot, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+nvme_load="YES"
+.Ed
+.Pp
+Most users will also want to enable
+.Xr nvd 4
+to surface NVM Express namespaces as disk devices which can be
+partitioned.
+Note that in NVM Express terms, a namespace is roughly equivalent to a
+SCSI LUN.
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for NVM Express (NVMe) controllers, such as:
+.Bl -bullet
+.It
+Hardware initialization
+.It
+Per-CPU IO queue pairs
+.It
+API for registering NVMe namespace consumers such as
+.Xr nvd 4
+.It
+API for submitting NVM commands to namespaces
+.It
+Ioctls for controller and namespace configuration and management
+.El
+.Pp
+The
+.Nm
+driver creates controller device nodes in the format
+.Pa /dev/nvmeX
+and namespace device nodes in
+the format
+.Pa /dev/nvmeXnsY .
+Note that the NVM Express specification starts numbering namespaces at 1,
+not 0, and this driver follows that convention.
+.Sh CONFIGURATION
+By default,
+.Nm
+will create an I/O queue pair for each CPU, provided enough MSI-X vectors
+can be allocated.
+To force a single I/O queue pair shared by all CPUs, set the following
+tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hw.nvme.per_cpu_io_queues=0
+.Ed
+.Pp
+To force legacy interrupts for all
+.Nm
+driver instances, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hw.nvme.force_intx=1
+.Ed
+.Pp
+Note that use of INTx implies disabling of per-CPU I/O queue pairs.
+.Sh SYSCTL VARIABLES
+The following controller-level sysctls are currently implemented:
+.Bl -tag -width indent
+.It Va dev.nvme.0.int_coal_time
+(R/W) Interrupt coalescing timer period in microseconds.
+Set to 0 to disable.
+.It Va dev.nvme.0.int_coal_threshold
+(R/W) Interrupt coalescing threshold in number of command completions.
+Set to 0 to disable.
+.El
+.Pp
+The following queue pair-level sysctls are currently implemented.
+Admin queue sysctls take the format of dev.nvme.0.adminq and I/O queue sysctls
+take the format of dev.nvme.0.ioq0.
+.Bl -tag -width indent
+.It Va dev.nvme.0.ioq0.num_entries
+(R) Number of entries in this queue pair's command and completion queue.
+.It Va dev.nvme.0.ioq0.num_tr
+(R) Number of nvme_tracker structures currently allocated for this queue pair.
+.It Va dev.nvme.0.ioq0.num_prp_list
+(R) Number of nvme_prp_list structures currently allocated for this queue pair.
+.It Va dev.nvme.0.ioq0.sq_head
+(R) Current location of the submission queue head pointer as observed by
+the driver.
+The head pointer is incremented by the controller as it takes commands off
+of the submission queue.
+.It Va dev.nvme.0.ioq0.sq_tail
+(R) Current location of the submission queue tail pointer as observed by
+the driver.
+The driver increments the tail pointer after writing a command
+into the submission queue to signal that a new command is ready to be
+processed.
+.It Va dev.nvme.0.ioq0.cq_head
+(R) Current location of the completion queue head pointer as observed by
+the driver.
+The driver increments the head pointer after finishing
+with a completion entry that was posted by the controller.
+.It Va dev.nvme.0.ioq0.num_cmds
+(R) Number of commands that have been submitted on this queue pair.
+.It Va dev.nvme.0.ioq0.dump_debug
+(W) Writing 1 to this sysctl will dump the full contents of the submission
+and completion queues to the console.
+.El
+.Sh SEE ALSO
+.Xr nvd 4 ,
+.Xr pci 4 ,
+.Xr nvmecontrol 8 ,
+.Xr disk 9
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 9.2 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was developed by Intel and originally written by
+.An Jim Harris Aq jimharris@FreeBSD.org ,
+with contributions from Joe Golio at EMC.
+.Pp
+This man page was written by
+.An Jim Harris Aq jimharris@FreeBSD.org .
diff --git a/share/man/man4/nvram.4 b/share/man/man4/nvram.4
new file mode 100644
index 0000000..25d6852
--- /dev/null
+++ b/share/man/man4/nvram.4
@@ -0,0 +1,93 @@
+.\"
+.\"Copyright (c) 2010 iXsystems, Inc.
+.\"All rights reserved.
+.\" written by: Xin LI <delphij@FreeBSD.org>
+.\"
+.\"Redistribution and use in source and binary forms, with or without
+.\"modification, are permitted provided that the following conditions
+.\"are met:
+.\"1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\"2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\"THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\"ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\"ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\"FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\"OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\"HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\"LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\"SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 8, 2010
+.Dt NVRAM 4
+.Os
+.Sh NAME
+.Nm nvram
+.Nd "non-volatile RAM"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device nvram"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+nvram_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides access to BIOS configuration NVRAM on i386 and amd64
+systems.
+.Pp
+PC motherboard uses a small non-volatile memory to store BIOS settings
+which is usually part of its clock chip and sometimes referred as
+.Dq CMOS SRAM .
+This driver exposes bytes 14 through 128 of the NVRAM, or a total of
+114 bytes, at offset zero of the device file
+.Pa /dev/nvram .
+.Pp
+This driver is useful for cloning machines that shares the same hardware
+configuration and need same BIOS setting tweaks.
+.Sh IMPLEMENTATION NOTES
+The BIOS NVRAM's bytes 16 through 31 are checksummed at byte 32.
+This driver
+.Em does not
+take care for these checksums.
+.Sh EXAMPLES
+Backup existing BIOS NVRAM to
+.Pa nvram.bin :
+.Pp
+.Dl dd if=/dev/nvram of=nvram.bin
+.Pp
+Restore BIOS NVRAM from
+.Pa nvram.bin :
+.Pp
+.Dl dd if=nvram.bin of=/dev/nvram
+.Sh SEE ALSO
+.Xr dd 1
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 6.4 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An Peter Wemm .
+This manual page was written by
+.An Xin LI .
diff --git a/share/man/man4/nvram2env.4 b/share/man/man4/nvram2env.4
new file mode 100644
index 0000000..36423fb
--- /dev/null
+++ b/share/man/man4/nvram2env.4
@@ -0,0 +1,118 @@
+.\" Copyright (c) 2011 Aleksandr Rybalko
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 3, 2011
+.Dt NVRAM2ENV 4
+.Os
+.Sh NAME
+.Nm nvram2env
+.Nd "copy nvram-like data into kernel environment"
+.Sh SYNOPSIS
+.Cd "device nvram2env"
+.Sh DESCRIPTION
+.Nm
+implements a simple method of reading the NVRAM-like data and information
+stored in flash and storing it in the kernel environment. It can then be
+used by various device drivers at boot-time.
+.Pp
+The NVRAM-like data is an array of zero terminated strings. Each string contains
+the string name, "=" delimiter and the string value.
+.Pp
+.Nm
+copies the environment values into kernel environment using the kernel setenv call.
+.Pp
+Configuration of
+.Nm
+is done in
+.Xr device.hints 5
+defining the NVRAM base address, fallback base address, maxsize and flags.
+.Pp
+.Nm
+is currently MIPS-specific.
+.Ss base
+base - physical address where data block is stored.
+.Ss fallbackbase
+fallbackbase - physical address where data block is stored, but only
+if not found at base.
+.Ss maxsize
+maxsize - maximum size of data block.
+.Ss flags
+flags - control flags, used to select nvram type and enable/disable CRC check.
+.Bl -tag -width indent
+.It Fa 0x0001
+Avoid CRC checking. Currently CRC checking is not implemented, so to be future
+compatible, please set it to "1".
+.It Fa 0x0002
+Use format "Generic", skip uint32_t field, then zero terminating array of
+strings.
+.It Fa 0x0004
+Use Broadcom CFE format. uint32_t signature "FLSH", uint32_t size,
+three unused fields uint32_t, then data.
+.It Fa 0x0008
+Use U-Boot format, uint32_t crc, then zero terminating array of strings.
+.El
+.Sh EXAMPLES
+Usage in U-Boot case:
+.Bd -literal -offset indent
+hint.nvram.0.base=0x1f030000
+hint.nvram.0.maxsize=0x2000
+hint.nvram.0.flags=3 # 1 = No check, 2 = Format Generic
+hint.nvram.1.base=0x1f032000
+hint.nvram.1.maxsize=0x4000
+hint.nvram.1.flags=3 # 1 = No check, 2 = Format Generic
+.Ed
+.Pp
+CFE nvram with fallback:
+.Bd -literal -offset indent
+hint.nvram.0.base=0x1fff8000
+hint.nvram.0.fallbackbase=0x1fc00400
+hint.nvram.0.flags=4 # 4 = Format Broadcom
+.Ed
+.Pp
+but seems for CFE nvram preferred to read both blocks:
+.Pp
+NVRAM partition: Static, CFE internal
+.Bd -literal -offset indent
+hint.nvram.0.flags=0x05 # Broadcom + nocheck
+hint.nvram.0.base=0x1fc00400
+.Ed
+.Pp
+Dynamic, editable form CFE, override values from first
+.Bd -literal -offset indent
+hint.nvram.1.flags=0x05 # Broadcom + nocheck
+hint.nvram.1.base=0x1cff8000
+.Ed
+.Sh SEE ALSO
+.Xr kenv 1 ,
+.Xr kenv 2 .
+.Sh HISTORY
+.Nm
+first appeared in
+.Fx 9.0 .
+.Sh AUTHORS
+.An -nosplit
+.Nm
+.An Aleksandr Rybalko Aq ray@ddteam.net .
diff --git a/share/man/man4/nxge.4 b/share/man/man4/nxge.4
new file mode 100644
index 0000000..8d94afc
--- /dev/null
+++ b/share/man/man4/nxge.4
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2007, Neterion Inc
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 16, 2007
+.Dt NXGE 4
+.Os
+.Sh NAME
+.Nm nxge
+.Nd "Neterion Xframe 10GbE Server/Storage adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device nxge"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_nxge_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Neterion Xframe-I and Xframe-II adapters.
+The driver supports TCP Segmentation Offload (TSO/LSO),
+Large Receive Offload (LRO), Jumbo Frames (5 buffer mode),
+Header Separation (Rx 2 buffer mode), VLAN, and Promiscuous mode.
+.Pp
+For general information and support, please visit the Neterion support page
+.Pa http://www.neterion.com/support/support.html .
+.Pp
+Support for Jumbo Frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to transmit and receive Jumbo Frames.
+Xframe adapters support Jumbo Frames up to 9600 bytes.
+.Pp
+For Jumbo Frames, the driver will try to allocate physically contiguous buffers.
+Failures to do so may degrade the performance.
+To resolve such problems, please visit
+.Pa http://www.neterion.com
+where additional information and a kernel patch can be found.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Neterion Xframe 10 Gigabit Ethernet adapters listed in
+.Pa http://www.neterion.com/how/pricing.html .
+.Sh SUPPORT
+For troubleshooting tips and FAQs, please visit
+.Pa http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous .
+.Pp
+For any issues please send an email to
+.Aq support@neterion.com .
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 7.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Neterion
+.Aq support@neterion.com .
diff --git a/share/man/man4/oce.4 b/share/man/man4/oce.4
new file mode 100644
index 0000000..51ac5ec
--- /dev/null
+++ b/share/man/man4/oce.4
@@ -0,0 +1,135 @@
+.\" Copyright (C) 2013 Emulex
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright notice,
+.\" this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" 3. Neither the name of the Emulex Corporation nor the names of its
+.\" contributors may be used to endorse or promote products derived from
+.\" this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" Contact Information:
+.\" freebsd-drivers@emulex.com
+.\"
+.\" Emulex
+.\" 3333 Susan Street
+.\" Costa Mesa, CA 92626
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 19, 2012
+.Dt OCE 4
+.Os
+.Sh NAME
+.Nm oce
+.Nd "Device driver for Emulex OneConnect 10Gb network adapters"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device oce"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_oce_load="YES"
+.Ed
+.Sh DESCRIPTION
+Emulex OneConnect adapters come in various skews and with
+different combinations of NIC, FCoE and iSCSI functions.
+The
+.Nm
+driver claims the NIC functions in all these adapters.
+.Pp
+The
+.Nm
+driver supports VLAN Hardware offload, TCP checksum offload,
+TCP segmentation offload (TSO), Large receive offload (LRO),
+Bonding, Jumbo frames (from 1500 - 9000), Multiple TX queues,
+Receive-Side Scaling (RSS) and MSI-X interrupts.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following network adapters:
+.Pp
+.Bl -bullet -compact
+.It
+Emulex BladeEngine 2
+.It
+Emulex BladeEngine 3
+.It
+Emulex Lancer
+.El
+.Sh UPDATING FIRMWARE
+Adapter firmware updates are persistent.
+.Pp
+Firmware can be updated by following the steps below:
+.Bl -enum
+.It
+Copy the below code to a Makefile:
+.Bd -literal -offset indent
+KMOD=elxflash
+FIRMWS=imagename.ufi:elxflash
+\&.include <bsd.kmod.mk>
+.Ed
+.It
+Replace imagename in above with UFI file name
+.It
+Copy Makefile and UFI file to a directory
+.It
+Execute make & copy generated elxflash.ko to
+.Pa /lib/modules
+.It
+sysctl dev.oce.<if_id>.fw_upgrade=elxflash
+.It
+Reboot the machine
+.El
+.Pp
+In case of issues with supplied UFI, flashing fails with one
+of the following errors.
+.Pp
+.Bl -enum -compact
+.It
+.Qq Invalid BE3 firmware image
+.It
+.Qq "Invalid Cookie. Firmware image corrupted ?"
+.It
+.Qq cmd to write to flash rom failed.
+.El
+.Sh SUPPORT
+For general information and support,
+go to the Emulex website at:
+.Pa http://www.Emulex.com/
+or E-Mail at
+.Pa freebsd-drivers@emulex.com .
+.Sh SEE ALSO
+.Xr ifconfig 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An freebsd-drivers@emulex.com .
diff --git a/share/man/man4/ohci.4 b/share/man/man4/ohci.4
new file mode 100644
index 0000000..4a60c8b
--- /dev/null
+++ b/share/man/man4/ohci.4
@@ -0,0 +1,78 @@
+.\" Copyright (c) 1999
+.\" Nick Hibma <n_hibma@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 23, 2005
+.Dt OHCI 4
+.Os
+.Sh NAME
+.Nm ohci
+.Nd OHCI USB Host Controller driver
+.Sh SYNOPSIS
+.Cd "device ohci"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for OHCI-type PCI based USB controllers.
+.Sh HARDWARE
+The
+.Nm
+driver supports all OHCI v1.0 compliant controllers including:
+.Pp
+.Bl -bullet -compact
+.It
+AcerLabs M5237 (Aladdin-V)
+.It
+AMD-756
+.It
+OPTi 82C861 (FireLink)
+.It
+NEC uPD 9210
+.It
+CMD Tech 670 (USB0670)
+.It
+CMD Tech 673 (USB0673)
+.It
+NVIDIA nForce3
+.It
+Sun PCIO-2 (RIO USB)
+.El
+.Sh SEE ALSO
+.Xr xhci 4 ,
+.Xr ehci 4 ,
+.Xr uhci 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Lennart Augustsson Aq augustss@carlstedt.se
+for the
+.Nx
+project.
diff --git a/share/man/man4/orm.4 b/share/man/man4/orm.4
new file mode 100644
index 0000000..2922cb6
--- /dev/null
+++ b/share/man/man4/orm.4
@@ -0,0 +1,47 @@
+.\" Copyright (c) 2000 Nikolai Saoukh
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2000
+.Dt ORM 4
+.Os
+.Sh NAME
+.Nm orm
+.Nd ISA I/O space option ROM(s) driver
+.Sh SYNOPSIS
+.Nm
+is automatically included on all systems that have an ISA bus.
+.Sh DESCRIPTION
+The driver scans at boot time the ISA I/O memory space for option
+ROM(s) and claims them.
+Other drivers are thus precluded from using ISA I/O memory that is on
+top of an option ROM.
+.Sh AUTHORS
+This
+manual page was written by
+.An Nikolai Saoukh Aq nms@otdel-1.org .
+.Sh BUGS
+Due to the implementation of the resource manager,
+other drivers cannot attach to the option ROM address range.
diff --git a/share/man/man4/padlock.4 b/share/man/man4/padlock.4
new file mode 100644
index 0000000..2a74f63
--- /dev/null
+++ b/share/man/man4/padlock.4
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2005 Christian Brueffer
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 8, 2010
+.Dt PADLOCK 4
+.Os
+.Sh NAME
+.Nm padlock
+.Nd "driver for the cryptographic functions and RNG in VIA C3, C7 and Eden processors"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device crypto"
+.Cd "device padlock"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+padlock_load="YES"
+.Ed
+.Sh DESCRIPTION
+The C3 and Eden processor series from VIA include hardware acceleration for
+AES.
+The C7 series includes hardware acceleration for AES, SHA1, SHA256 and RSA.
+All of the above processor series include a hardware random number generator.
+.Pp
+The
+.Nm
+driver registers itself to accelerate AES operations and, if available, HMAC/SHA1
+and HMAC/SHA256 for
+.Xr crypto 4 .
+It also registers itself to accelerate other HMAC algorithms, although
+there is no hardware acceleration for those algorithms.
+This is only needed so
+.Nm
+can work with
+.Xr ipsec 4 .
+.Pp
+The hardware random number generator supplies data for the kernel
+.Xr random 4
+subsystem.
+.Sh SEE ALSO
+.Xr crypt 3 ,
+.Xr crypto 4 ,
+.Xr intro 4 ,
+.Xr ipsec 4 ,
+.Xr random 4 ,
+.Xr crypto 9
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox .
+The first
+.Fx
+release to include it was
+.Fx 6.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver with AES encryption support was written by
+.An Jason Wright Aq jason@OpenBSD.org .
+It was ported to
+.Fx
+and then extended to support SHA1 and SHA256
+by
+.An Pawel Jakub Dawidek Aq pjd@FreeBSD.org .
+This manual page was written by
+.An Christian Brueffer Aq brueffer@FreeBSD.org .
diff --git a/share/man/man4/pass.4 b/share/man/man4/pass.4
new file mode 100644
index 0000000..7819ea3
--- /dev/null
+++ b/share/man/man4/pass.4
@@ -0,0 +1,120 @@
+.\"
+.\" Copyright (c) 1998, 1999 Kenneth D. Merry.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 10, 1998
+.Dt PASS 4
+.Os
+.Sh NAME
+.Nm pass
+.Nd CAM application passthrough driver
+.Sh SYNOPSIS
+.Cd device pass
+.Sh DESCRIPTION
+The
+.Nm
+driver provides a way for userland applications to issue CAM CCBs to the
+kernel.
+.Pp
+Since the
+.Nm
+driver allows direct access to the CAM subsystem, system administrators
+should exercise caution when granting access to this driver.
+If used
+improperly, this driver can allow userland applications to crash a machine
+or cause data loss.
+.Pp
+The
+.Nm
+driver attaches to every
+.Tn SCSI
+device found in the system.
+Since it attaches to every device, it provides a generic means of accessing
+.Tn SCSI
+devices, and allows the user to access devices which have no
+"standard" peripheral driver associated with them.
+.Sh KERNEL CONFIGURATION
+It is only necessary to configure one
+.Nm
+device in the kernel;
+.Nm
+devices are automatically allocated as
+.Tn SCSI
+devices are found.
+.Sh IOCTLS
+.Bl -tag -width 012345678901234
+.It CAMIOCOMMAND
+This ioctl takes most kinds of CAM CCBs and passes them through to the CAM
+transport layer for action.
+Note that some CCB types are not allowed
+through the passthrough device, and must be sent through the
+.Xr xpt 4
+device instead.
+Some examples of xpt-only CCBs are XPT_SCAN_BUS,
+XPT_DEV_MATCH, XPT_RESET_BUS, XPT_SCAN_LUN, XPT_ENG_INQ, and XPT_ENG_EXEC.
+These CCB types have various attributes that make it illogical or
+impossible to service them through the passthrough interface.
+.It CAMGETPASSTHRU
+This ioctl takes an XPT_GDEVLIST CCB, and returns the passthrough device
+corresponding to the device in question.
+Although this ioctl is available through the
+.Nm
+driver, it is of limited use, since the caller must already know that
+the device in question is a passthrough device if they are issuing this
+ioctl.
+It is probably more useful to issue this ioctl through the
+.Xr xpt 4
+device.
+.El
+.Sh FILES
+.Bl -tag -width /dev/passn -compact
+.It Pa /dev/pass Ns Ar n
+Character device nodes for the
+.Nm
+driver.
+There should be one of these for each device accessed through the
+CAM subsystem.
+.El
+.Sh DIAGNOSTICS
+None.
+.Sh SEE ALSO
+.Xr cam 3 ,
+.Xr cam 4 ,
+.Xr cam_cdbparse 3 ,
+.Xr xpt 4 ,
+.Xr camcontrol 8
+.Sh HISTORY
+The CAM passthrough driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+.An Kenneth Merry Aq ken@FreeBSD.org
+.Sh BUGS
+It might be nice to have a way to asynchronously send CCBs through the
+passthrough driver.
+This would probably require some sort of read/write
+interface or an asynchronous ioctl interface.
diff --git a/share/man/man4/patm.4 b/share/man/man4/patm.4
new file mode 100644
index 0000000..443b9f7
--- /dev/null
+++ b/share/man/man4/patm.4
@@ -0,0 +1,192 @@
+.\"
+.\" Copyright (c) 2003
+.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Author: Hartmut Brandt <harti@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.\" patm(4) man page
+.\"
+.Dd July 15, 2003
+.Dt PATM 4
+.Os
+.Sh NAME
+.Nm patm
+.Nd "device driver for IDT77252 based ATM interfaces (ProSum and IDT)"
+.Sh SYNOPSIS
+.Cd device patm
+.Cd device utopia
+.Cd device atm
+.Pp
+.Cd options NATM
+.Cd options LIBMBPOOL
+.Sh DESCRIPTION
+The
+.Nm
+device driver supports ATM cards based on the IDT77252 chip.
+It has been tested with ProSum's ProATM-155 cards and with IDT's evaluation
+boards.
+The driver interfaces with the
+.Xr natm 4
+framework,
+.Xr netgraph 4
+and HARP.
+It provides only PVC services.
+Signalling, ATMARP, ILMI and other
+higher layer protocols are implemented using
+.Xr netgraph 4
+or HARP.
+.Pp
+For configuring the card for IP see
+.Xr natmip 4 .
+.Pp
+The driver supports UBR, CBR, VBR and ABR traffic.
+Supported AALs are:
+AAL0 (cell payloads), AAL5 and raw AAL.
+The driver supports opening of VCI/VPI 0/0 in RX, raw AAL-mode.
+This VC will receive all incoming cells (even those with non-zero GFC
+fields and VPI/VCI values outside the allowed range) that are not
+claimed by other open connections.
+This may be used for monitoring purposes.
+.Pp
+The following sysctls are recognized by the driver additionally to those
+handled by
+.Xr utopia 4 :
+.Bl -tag -width indent
+.It Va hw.atm.patm Ns Ar N Ns Va .istats
+Returns a list of
+.Vt uint32_t
+statistic counters with internal driver statistics.
+.It Va hw.atm.patm Ns Ar N Ns Va .eeprom
+This is a read-only variable containing the contents of the on-board EEPROM
+device.
+.It Va hw.atm.patm Ns Ar N Ns Va .lbuf_max
+This puts an upper limit on the number of large receive buffers the
+driver will allocate.
+This is a read-only variable that can be set via a
+.Xr loader 8
+tunable.
+.It Va hw.atm.patm Ns Ar N Ns Va .tx_maxmaps
+This is the upper limit of transmission DMA maps the driver will allocate.
+This is read-only but may be set via a
+.Xr loader 8
+tunable.
+.It Va hw.atm.patm Ns Ar N Ns Va .debug
+.Bf Em
+(Only if debugging enabled.)
+.Ef
+These are debugging flags.
+See
+.Pa src/sys/dev/patm/if_patmvar.h
+for the possible flags.
+This may be initialized via a
+.Xr loader 8
+tunable.
+.It Va hw.atm.patm Ns Ar N Ns Va .regs
+.Bf Em
+(Only if debugging enabled.)
+.Ef
+Returns the current values of the card's registers.
+.It Va hw.atm.patm Ns Ar N Ns Va .tsq
+Returns the transmit status queue.
+.El
+.Pp
+When loaded, the driver initializes several variables from
+.Xr loader 8
+tunables:
+.Bl -tag -width indent
+.It Va hw.patm Ns Ar N Ns Va .lbuf_max
+This initializes the corresponding
+.Xr sysctl 8
+variable and defines an upper
+limit on the number of large receive buffers (mbuf clusters).
+.It Va hw.patm Ns Ar N Ns Va .tx_maxmaps
+This initializes the corresponding
+.Xr sysctl 8
+variable and is the maximum
+number of DMA maps for transmission that the driver will allocated.
+.It Va hw.patm Ns Ar N Ns Va .debug
+.Bf Em
+(Only if debugging enabled.)
+.Ef
+Initializes the debugging flags.
+.El
+.Pp
+The driver supports the media options
+.Cm sdh , noscramb
+and
+.Cm unassigned
+(see
+.Xr utopia 4 )
+when the card is a 155MBit card.
+Both PMC-Sierra S/UNI and IDT77155 PHY chips are supported for these cards.
+For 25MBit cards the IDT77105 is supported.
+.Sh DIAGNOSTICS
+.Bd -literal
+patm1: <NICStAR (77222/77252) ATM adapter> port 0xc000-0xc0ff mem 0xf8000000-0xf83fffff,0xf4000000-0xf4000fff irq 11 at device 8.0 on pci2
+patm1: IDT77252 155MBit interface; idt77252 Rev. G; IDT77155 PHY
+patm1: 128K x 32 SRAM; 4096 connections
+.Ed
+.Sh SEE ALSO
+.Xr natm 4 ,
+.Xr natmip 4 ,
+.Xr utopia 4
+.Sh ACKNOWLEDGEMENTS
+Thanks to Christian Bucari from ProSum for lending two of these cards to enable
+the development of this driver.
+Thanks also for answering my questions.
+.Sh AUTHORS
+.An Harti Brandt Aq harti@FreeBSD.org
+.Sh CAVEATS
+The card fails to generate an interrupt if a cell is received in AAL0 mode
+that has the MSB of the PTI field cleared.
+Therefore cells will be delivered on the next receive interrupt which can happen
+either when the receive status queue is full, or a cell with the last bit of
+the PTI set is received.
+.Pp
+Although the card supports AAL3/4 the driver does not.
+.Pp
+The rate tables used by this driver are not the tables recommended by IDT
+(they are wrong anyway).
+The driver's tables are slightly more aggressive than IDT's.
+That means, that the actual cell rate can be slightly higher than the
+specified.
+This is in contrast to the IDT tables where cell rates 5% less than the
+allowed one have been observed.
+This can be changed by changing the program that generates these tables,
+found in
+.Pa /usr/src/sys/dev/patm/genrtab ,
+and regenerating them.
+.Pp
+The reported media for the 155MBit cards will always be OC3/MM, because
+there is no (known to me) way to figure out the actual medium.
+The medium should really be coded in the EEPROM by the manufacturer.
+.Pp
+The Tx cell counter in the utopia statistics is wrong, because the chip
+uses idle cells for spacing and the PHY counts these cells.
+While there is a configuration option for the chip to switch of these cells
+and, according to the documentation, this should not influence cell spacing,
+it does, so the driver lets the chip generate idle cells.
diff --git a/share/man/man4/pccard.4 b/share/man/man4/pccard.4
new file mode 100644
index 0000000..f955804
--- /dev/null
+++ b/share/man/man4/pccard.4
@@ -0,0 +1,78 @@
+.\"
+.\" Copyright (c) 2002 M. Warner Losh
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 9, 2002
+.Dt PCCARD 4
+.Os
+.Sh NAME
+.Nm pccard
+.Nd PC Card bus driver
+.Sh SYNOPSIS
+.Cd device pccard
+.Sh DESCRIPTION
+The
+.Nm
+driver implements the PC Card bus.
+The
+.Nm
+driver supports all PC Card bridges in the system.
+.Sh TUNABLES
+The driver supports the following tunable parameters, which may be
+added to
+.Pa /boot/loader.conf
+or set via the
+.Xr sysctl 8
+command:
+.Bl -tag -width ".Cm hw.pccard.cis_debug" -compact
+.It Cm hw.pccard.debug
+Non-zero values cause more verbose information to be printed when a
+16-bit PC Card is inserted or removed.
+.It Cm hw.pccard.cis_debug
+Non-zero value causes the CIS parsing of the 16-bit PC Card to be much
+more verbose and include a complete CIS dump.
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/pccard0.cis" -compact
+.It Pa /dev/pccard0.cis
+This exclusive-use device will report all the CIS chains present in a
+PC Card, if a 16-bit PC Card is inserted in the slot.
+Only one user at a time may access the CIS.
+The CIS is presented as the relevant byte stream from the PC Card.
+For CIS tuples in Attribute Memory (the default), only the even
+locations are presented (the ODD locations are undefined per the
+standard).
+For CIS tuples in Common Memory, every byte is presented to the user.
+Decoding of the CIS tuples is done via a userland program.
+All tuples are presented to the user.
+.El
+.Sh SEE ALSO
+.Xr cardbus 4 ,
+.\" .Xr mecia 4 ,
+.Xr pccbb 4
+.\" .Xr tcic 4
+.Rs
+.%T "PC Card Standard, Release 8"
+.Re
diff --git a/share/man/man4/pccbb.4 b/share/man/man4/pccbb.4
new file mode 100644
index 0000000..d8d955e
--- /dev/null
+++ b/share/man/man4/pccbb.4
@@ -0,0 +1,183 @@
+.\"
+.\" Copyright (c) 2002-2003 M. Warner Losh
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 21, 2004
+.Dt PCCBB 4
+.Os
+.Sh NAME
+.Nm pccbb
+.Nd cardbus bridge driver
+.Sh SYNOPSIS
+.Cd device cbb
+.Cd device pccard
+.Cd device cardbus
+.Cd device exca
+.Sh DESCRIPTION
+The
+.Nm
+driver implements the Yenta specification for CardBus bridges.
+.Pp
+The following PCI cardbus and pcmcia bridges are supported:
+.Pp
+.Bl -item -compact
+.It
+Cirrus Logic PD6832
+.It
+Cirrus Logic PD6833
+.It
+Cirrus Logic PD6834
+.Pp
+.It
+O2micro OZ6812
+.It
+O2micro OZ6832
+.It
+O2micro OZ6833
+.It
+O2micro OZ6836
+.It
+O2micro OZ6860
+.It
+O2micro OZ6872
+.It
+O2micro OZ6912
+.It
+O2micro OZ6922
+.It
+O2micro OZ6933
+.It
+O2micro OZ6972
+.It
+O2Micro OZ711E1
+.It
+O2Micro OZ711M1
+.El
+.Bl -item -compact
+.It
+Ricoh RL4C475
+.It
+Ricoh RL4C476
+.It
+Ricoh RL4C477
+.It
+Ricoh RL4C478
+.Pp
+.It
+TI PCI-1031
+.It
+TI PCI-1130
+.It
+TI PCI-1131
+.It
+TI PCI-1210
+.It
+TI PCI-1211
+.It
+TI PCI-1220
+.It
+TI PCI-1221
+.It
+TI PCI-1225
+.It
+TI PCI-1250
+.It
+TI PCI-1251
+.It
+TI PCI-1251B
+.It
+TI PCI-1260
+.It
+TI PCI-1260B
+.It
+TI PCI-1410
+.It
+TI PCI-1420
+.It
+TI PCI-1450
+.It
+TI PCI-1451
+.It
+TI PCI-1510
+.It
+TI PCI-1515
+.It
+TI PCI-1520
+.It
+TI PCI-1530
+.It
+TI PCI-1620
+.It
+TI PCI-4410
+.It
+TI PCI-4450
+.It
+TI PCI-4451
+.It
+TI PCI-4510
+.It
+TI PCI-4520
+.It
+TI PCI-[67]x[12]1
+.It
+TI PCI-[67]x20
+.It
+ENE CB710
+.It
+ENE CB720
+.It
+ENE CB1211
+.It
+ENE CB1255
+.It
+ENE CB1410
+.It
+ENE CB1420
+.Pp
+.It
+Toshiba ToPIC95
+.It
+Toshiba ToPIC95B
+.It
+Toshiba ToPIC97
+.It
+Toshiba ToPIC100
+.El
+.Sh TUNABLES
+The driver supports the following tunable parameters, which may be
+added to
+.Pa /boot/loader.conf
+or set via the
+.Xr sysctl 8
+command:
+.Bl -tag -width ".Cm hw.cbb.debug" -compact
+.It Cm hw.cbb.debug
+Non-zero values cause more verbose information to be printed to aid in
+debugging problems with the bridge chipset.
+.El
+.Sh SEE ALSO
+.Xr cardbus 4 ,
+.Xr pccard 4 ,
+.Xr exca 4
diff --git a/share/man/man4/pcf.4 b/share/man/man4/pcf.4
new file mode 100644
index 0000000..cc8915f
--- /dev/null
+++ b/share/man/man4/pcf.4
@@ -0,0 +1,72 @@
+.\" Copyright (c) 1998, Nicolas Souchu
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 6, 1998
+.Dt PCF 4
+.Os
+.Sh NAME
+.Nm pcf
+.Nd Philips I2C bus controller
+.Sh SYNOPSIS
+.Cd "device pcf"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.pcf.0.at="isa"
+.Cd hint.pcf.0.port="0x320"
+.Cd hint.pcf.0.irq="5"
+.Pp
+For one or more iicbus busses:
+.Cd "device iicbus"
+.Sh DESCRIPTION
+The
+.Em pcf
+driver provides support to the Philips PCF8584 I2C controller for the
+.Xr iicbus 4
+system.
+.Pp
+The PCF8584 is an integrated circuit designed in CMOS technology which serves
+as an interface between most standard parallel-bus
+microcontrollers/microprocessors and the serial I2C-bus.
+The PCF8584
+provides both master and slave functions.
+Communication with I2C-bus is
+carried out on a byte-wise basis using interrupt or polled handshake.
+It
+controls all the I2C-bus specific sequences, protocol, arbitration and timing.
+The PCF8584 allows parallel-bus systems to communicate bidirectionally with
+the I2C-bus.
+.Sh SEE ALSO
+.Xr iicbus 4
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Nicolas Souchu .
diff --git a/share/man/man4/pci.4 b/share/man/man4/pci.4
new file mode 100644
index 0000000..c79626f
--- /dev/null
+++ b/share/man/man4/pci.4
@@ -0,0 +1,343 @@
+.\"
+.\" Copyright (c) 1999 Kenneth D. Merry.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 3, 2008
+.Dt PCI 4
+.Os
+.Sh NAME
+.Nm pci
+.Nd generic PCI driver
+.Sh SYNOPSIS
+.Cd device pci
+.Sh DESCRIPTION
+The
+.Nm
+driver provides a way for userland programs to read and write
+.Tn PCI
+configuration registers.
+It also provides a way for userland programs to get a list of all
+.Tn PCI
+devices, or all
+.Tn PCI
+devices that match various patterns.
+.Pp
+Since the
+.Nm
+driver provides a write interface for
+.Tn PCI
+configuration registers, system administrators should exercise caution when
+granting access to the
+.Nm
+device.
+If used improperly, this driver can allow userland applications to
+crash a machine or cause data loss.
+.Pp
+The
+.Nm
+driver implements the
+.Tn PCI
+bus in the kernel.
+It enumerates any devices on the
+.Tn PCI
+bus and gives
+.Tn PCI
+client drivers the chance to attach to them.
+It assigns resources to children, when the BIOS does not.
+It takes care of routing interrupts when necessary.
+It reprobes the unattached
+.Tn PCI
+children when
+.Tn PCI
+client drivers are dynamically
+loaded at runtime.
+.Sh KERNEL CONFIGURATION
+The
+.Nm
+device is included in the kernel as described in the SYNOPSIS section.
+The
+.Nm
+driver cannot be built as a
+.Xr kld 4 .
+.Sh IOCTLS
+The following
+.Xr ioctl 2
+calls are supported by the
+.Nm
+driver.
+They are defined in the header file
+.In sys/pciio.h .
+.Bl -tag -width 012345678901234
+.It PCIOCGETCONF
+This
+.Xr ioctl 2
+takes a
+.Va pci_conf_io
+structure.
+It allows the user to retrieve information on all
+.Tn PCI
+devices in the system, or on
+.Tn PCI
+devices matching patterns supplied by the user.
+The call may set
+.Va errno
+to any value specified in either
+.Xr copyin 9
+or
+.Xr copyout 9 .
+The
+.Va pci_conf_io
+structure consists of a number of fields:
+.Bl -tag -width match_buf_len
+.It pat_buf_len
+The length, in bytes, of the buffer filled with user-supplied patterns.
+.It num_patterns
+The number of user-supplied patterns.
+.It patterns
+Pointer to a buffer filled with user-supplied patterns.
+.Va patterns
+is a pointer to
+.Va num_patterns
+.Va pci_match_conf
+structures.
+The
+.Va pci_match_conf
+structure consists of the following elements:
+.Bl -tag -width pd_vendor
+.It pc_sel
+.Tn PCI
+domain, bus, slot and function.
+.It pd_name
+.Tn PCI
+device driver name.
+.It pd_unit
+.Tn PCI
+device driver unit number.
+.It pc_vendor
+.Tn PCI
+vendor ID.
+.It pc_device
+.Tn PCI
+device ID.
+.It pc_class
+.Tn PCI
+device class.
+.It flags
+The flags describe which of the fields the kernel should match against.
+A device must match all specified fields in order to be returned.
+The match flags are enumerated in the
+.Va pci_getconf_flags
+structure.
+Hopefully the flag values are obvious enough that they do not need to
+described in detail.
+.El
+.It match_buf_len
+Length of the
+.Va matches
+buffer allocated by the user to hold the results of the
+.Dv PCIOCGETCONF
+query.
+.It num_matches
+Number of matches returned by the kernel.
+.It matches
+Buffer containing matching devices returned by the kernel.
+The items in this buffer are of type
+.Va pci_conf ,
+which consists of the following items:
+.Bl -tag -width pc_subvendor
+.It pc_sel
+.Tn PCI
+domain, bus, slot and function.
+.It pc_hdr
+.Tn PCI
+header type.
+.It pc_subvendor
+.Tn PCI
+subvendor ID.
+.It pc_subdevice
+.Tn PCI
+subdevice ID.
+.It pc_vendor
+.Tn PCI
+vendor ID.
+.It pc_device
+.Tn PCI
+device ID.
+.It pc_class
+.Tn PCI
+device class.
+.It pc_subclass
+.Tn PCI
+device subclass.
+.It pc_progif
+.Tn PCI
+device programming interface.
+.It pc_revid
+.Tn PCI
+revision ID.
+.It pd_name
+Driver name.
+.It pd_unit
+Driver unit number.
+.El
+.It offset
+The offset is passed in by the user to tell the kernel where it should
+start traversing the device list.
+The value passed out by the kernel
+points to the record immediately after the last one returned.
+The user may
+pass the value returned by the kernel in subsequent calls to the
+.Dv PCIOCGETCONF
+ioctl.
+If the user does not intend to use the offset, it must be set to zero.
+.It generation
+.Tn PCI
+configuration generation.
+This value only needs to be set if the offset is set.
+The kernel will compare the current generation number of its internal
+device list to the generation passed in by the user to determine whether
+its device list has changed since the user last called the
+.Dv PCIOCGETCONF
+ioctl.
+If the device list has changed, a status of
+.Va PCI_GETCONF_LIST_CHANGED
+will be passed back.
+.It status
+The status tells the user the disposition of his request for a device list.
+The possible status values are:
+.Bl -ohang
+.It PCI_GETCONF_LAST_DEVICE
+This means that there are no more devices in the PCI device list after the
+ones returned in the
+.Va matches
+buffer.
+.It PCI_GETCONF_LIST_CHANGED
+This status tells the user that the
+.Tn PCI
+device list has changed since his last call to the
+.Dv PCIOCGETCONF
+ioctl and he must reset the
+.Va offset
+and
+.Va generation
+to zero to start over at the beginning of the list.
+.It PCI_GETCONF_MORE_DEVS
+This tells the user that his buffer was not large enough to hold all of the
+remaining devices in the device list that possibly match his criteria.
+It is possible for this status to be returned, even when none of the remaining
+devices in the list would match the user's criteria.
+.It PCI_GETCONF_ERROR
+This indicates a general error while servicing the user's request.
+If the
+.Va pat_buf_len
+is not equal to
+.Va num_patterns
+times
+.Fn sizeof "struct pci_match_conf" ,
+.Va errno
+will be set to
+.Er EINVAL .
+.El
+.El
+.It PCIOCREAD
+This
+.Xr ioctl 2
+reads the
+.Tn PCI
+configuration registers specified by the passed-in
+.Va pci_io
+structure.
+The
+.Va pci_io
+structure consists of the following fields:
+.Bl -tag -width pi_width
+.It pi_sel
+A
+.Va pcisel
+structure which specifies the domain, bus, slot and function the user would
+like to query.
+If the specific bus is not found, errno will be set to ENODEV and -1 returned
+from the ioctl.
+.It pi_reg
+The
+.Tn PCI
+configuration register the user would like to access.
+.It pi_width
+The width, in bytes, of the data the user would like to read.
+This value
+may be either 1, 2, or 4.
+3-byte reads and reads larger than 4 bytes are
+not supported.
+If an invalid width is passed, errno will be set to EINVAL.
+.It pi_data
+The data returned by the kernel.
+.El
+.It PCIOCWRITE
+This
+.Xr ioctl 2
+allows users to write to the
+.Tn PCI
+specified in the passed-in
+.Va pci_io
+structure.
+The
+.Va pci_io
+structure is described above.
+The limitations on data width described for
+reading registers, above, also apply to writing
+.Tn PCI
+configuration registers.
+.El
+.Sh FILES
+.Bl -tag -width /dev/pci -compact
+.It Pa /dev/pci
+Character device for the
+.Nm
+driver.
+.El
+.Sh SEE ALSO
+.Xr pciconf 8
+.Sh HISTORY
+The
+.Nm
+driver (not the kernel's
+.Tn PCI
+support code) first appeared in
+.Fx 2.2 ,
+and was written by Stefan Esser and Garrett Wollman.
+Support for device listing and matching was re-implemented by
+Kenneth Merry, and first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+.An Kenneth Merry Aq ken@FreeBSD.org
+.Sh BUGS
+It is not possible for users to specify an accurate offset into the device
+list without calling the
+.Dv PCIOCGETCONF
+at least once, since they have no way of knowing the current generation
+number otherwise.
+This probably is not a serious problem, though, since
+users can easily narrow their search by specifying a pattern or patterns
+for the kernel to match against.
diff --git a/share/man/man4/pcib.4 b/share/man/man4/pcib.4
new file mode 100644
index 0000000..e57b66c9
--- /dev/null
+++ b/share/man/man4/pcib.4
@@ -0,0 +1,49 @@
+.\"
+.\" Copyright (c) 2008 M. Warner Losh
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 18, 2008
+.Dt PCIB 4
+.Os
+.Sh NAME
+.Nm pcib
+.Nd PCI bridge driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides for host and
+.Tn PCI
+bridges in a
+.Tn PCI
+system.
+.Sh BUGS
+This man page is too short.
diff --git a/share/man/man4/pcic.4 b/share/man/man4/pcic.4
new file mode 100644
index 0000000..589a2ed
--- /dev/null
+++ b/share/man/man4/pcic.4
@@ -0,0 +1,103 @@
+.\"
+.\" Copyright (c) 2001, 2002 M. Warner Losh
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 9, 2002
+.Dt PCIC 4
+.Os
+.Sh NAME
+.Nm pcic
+.Nd PC Card bridge driver
+.Sh SYNOPSIS
+.Cd device pcic
+.Cd device pccard
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for older ISA and non-Yenta PCI PC Card bridges.
+The
+.Nm
+driver supports most
+.Tn ExCA
+devices attached to the
+.Tn ISA
+bus or
+.Tn PCI
+devices that do not conform to the Yenta specification.
+.Pp
+The following
+.Tn ISA
+devices, or true clones, are supported in the current code.
+.Pp
+.Bl -tag -width "Intel i82365SL Step A" -compact
+.It Intel i82365SL Step A
+.It Intel i82365SL Step B
+.It Intel i82365SL Step C
+.Tn Intel Ns 's
+original 16-bit PC Card controller.
+.It Intel i82365SL-DF
+.Tn Intel Ns 's
+last version of this device.
+3.3V support was added.
+.It VLSI 82C146
+An older VLSI part with some issues on some machines.
+.It Cirrus Logic PD-6710
+.It Cirrus Logic PD-6720
+.It Cirrus Logic PD-6722
+Cirrus Logic's pcic controller.
+Compatible with the i82365SL Step C with the addition of a different
+3.3V control.
+.It Ricoh RF5C296
+.It Ricoh RF5C396
+Ricoh's PC Card bridge chips.
+These are compatible with the i82365SL Step C, but with yet another
+different 3.3V control.
+.It Vadem 365
+.It Vadem 465
+Compatible with i82365SL Step C.
+.It Vadem 468
+.It Vadem 469
+Like the earlier Vadem models, but with Vadem's own, incompatible, 3.3V
+control system.
+.It IBM PCIC
+.Tn IBM
+clone of the original i82365SL part, with its own ID register value.
+Has no 3.3V ability.
+.El
+.Pp
+Many other vendors made parts in this arena, but most of them were
+compatible with one of the above chipsets.
+.Pp
+The following PCI pcmcia bridges are supported:
+.Pp
+.Bl -tag -width "Intel i82365SL Step A" -compact
+.It Cirrus Logic PD6729
+.It Cirrus Logic PD6730
+.Pp
+.It O2micro OZ6729
+.It O2micro OZ6730
+.El
+.Sh BUGS
+This does not work at all at the moment.
diff --git a/share/man/man4/pcii.4 b/share/man/man4/pcii.4
new file mode 100644
index 0000000..3369d3f
--- /dev/null
+++ b/share/man/man4/pcii.4
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2010, Joerg Wunsch
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 24, 2010
+.Dt PCII 4
+.Os
+.Sh NAME
+.Nm pcii
+.Nd National Instruments PCIIA GPIB controller driver
+.Sh SYNOPSIS
+.Cd "device pcii"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.pcii.0.at="isa"
+.Cd hint.pcii.0.port="0x2e1"
+.Cd hint.pcii.0.irq="7"
+.Cd hint.pcii.0.drq="1"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for driving an IEEE-488 bus, also called
+IEC-625 (or just "IEC bus"), or HP-IB (Hewlett Packard Instrument
+Bus), or GPIB (General Purpose Instrument Bus).
+The driver supports National Instruments PCIIA cards (sometimes
+also referred to as PC2A) and compatibles.
+These cards use a NEC \(mcPD7210 controller IC as the main
+interface between the host computer and the instrument bus.
+.Ss IO memory space layout
+The PCIIA cards use a very specific IO memory space allocation layout.
+The address bits A0 through A9 (which have traditionally been the only
+address bits evaluated on IBM PC XT extension cards) are hardwired to
+address 0x2e1.
+Bits A10 through A12 are used by the \(mcPD7210 register select lines.
+This makes the individual 7210 registers being 0x400 bytes apart in the
+ISA bus address space.
+Address bits A13 and A14 are compared to a DIP switch setting on the
+card, allowing for up to 4 different cards being installed (at base
+addresses 0x2e1, 0x22e1, 0x42e1, and 0x62e1, respectively).
+A15 has been used to select an optional on-board time-of-day clock
+chip (MM58167A) on the original PCIIA rather than the \(mcPD7210
+(which is not implemented on later boards and clones).
+Finally, the IO addresses 0x2f0 ... 0x2f7 are used for a
+.Em special interrupt handling feature
+(re-enable interrupts so the IRQ can be shared), where actually only
+address 0x2f0 plus the actual IRQ level is required for each card.
+Some clones do not appear to require this special IRQ handling, and
+are thus likely to not support the shared IRQ feature.
+.Pp
+Only the base address of the card needs to be specified in the ISA
+device hints; the driver takes care to derive all other IO addresses
+needed during the probe phase.
+.Ss Supported cards
+The following cards are known to be supported:
+.Bl -bullet -offset indent
+.It
+B&C Microsystems PC488A-0
+.It
+National Instruments GPIB-PCII/PCIIA (in PCIIa mode)
+.It
+Axiom AX5488
+.El
+.Sh SEE ALSO
+.Xr gpib 3 ,
+.Xr gpib 4 ,
+.Xr device.hints 5
+.Sh HISTORY
+The
+.Nm
+driver was written by Poul-Henning Kamp, and first appeared in
+.Fx 5.4 .
+.Sh AUTHORS
+This manual page was written by
+.An J\(:org Wunsch .
diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4
new file mode 100644
index 0000000..c92b1e6
--- /dev/null
+++ b/share/man/man4/pcm.4
@@ -0,0 +1,796 @@
+.\"
+.\" Copyright (c) 2009-2011 Joel Dahl <joel@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 22, 2012
+.Dt SOUND 4
+.Os
+.Sh NAME
+.Nm sound ,
+.Nm pcm ,
+.Nm snd
+.Nd
+.Fx
+PCM audio device infrastructure
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver is the main component of the
+.Fx
+sound system.
+It works in conjunction with a bridge device driver on supported devices
+and provides PCM audio record and playback once it attaches.
+Each bridge device driver supports a specific set of audio chipsets and
+needs to be enabled together with the
+.Nm
+driver.
+PCI and ISA PnP audio devices identify themselves so users are usually not
+required to add anything to
+.Pa /boot/device.hints .
+.Pp
+Some of the main features of the
+.Nm
+driver are: multichannel audio, per-application
+volume control, dynamic mixing through virtual sound channels, true full
+duplex operation, bit perfect audio, rate conversion and low latency
+modes.
+.Pp
+The
+.Nm
+driver is enabled by default, along with several bridge device drivers.
+Those not enabled by default can be loaded during runtime with
+.Xr kldload 8
+or during boot via
+.Xr loader.conf 5 .
+The following bridge device drivers are available:
+.Pp
+.Bl -bullet -compact
+.It
+.Xr snd_ad1816 4
+.It
+.Xr snd_ai2s 4 (enabled by default on powerpc)
+.It
+.Xr snd_als4000 4
+.It
+.Xr snd_atiixp 4
+.It
+.Xr snd_audiocs 4 (enabled by default on sparc64)
+.It
+.Xr snd_cmi 4 (enabled by default on amd64, i386)
+.It
+.Xr snd_cs4281 4
+.It
+.Xr snd_csa 4 (enabled by default on amd64, i386)
+.It
+.Xr snd_davbus 4 (enabled by default on powerpc)
+.It
+.Xr snd_ds1 4
+.It
+.Xr snd_emu10k1 4
+.It
+.Xr snd_emu10kx 4 (enabled by default on amd64, i386)
+.It
+.Xr snd_envy24 4
+.It
+.Xr snd_envy24ht 4
+.It
+.Xr snd_es137x 4 (enabled by default on amd64, i386, sparc64)
+.It
+.Xr snd_ess 4
+.It
+.Xr snd_fm801 4
+.It
+.Xr snd_gusc 4
+.It
+.Xr snd_hda 4 (enabled by default on amd64, i386)
+.It
+.Xr snd_hdspe 4
+.It
+.Xr snd_ich 4 (enabled by default on amd64, i386)
+.It
+.Xr snd_maestro 4
+.It
+.Xr snd_maestro3 4
+.It
+.Xr snd_mss 4
+.It
+.Xr snd_neomagic 4
+.It
+snd_sb16
+.It
+snd_sb8
+.It
+.Xr snd_sbc 4
+.It
+.Xr snd_solo 4
+.It
+.Xr snd_spicds 4
+.It
+.Xr snd_t4dwave 4 (enabled by default on sparc64)
+.It
+.Xr snd_uaudio 4 (enabled by default on amd64, i386, powerpc, sparc64)
+.It
+.Xr snd_via8233 4 (enabled by default on amd64, i386)
+.It
+.Xr snd_via82c686 4
+.It
+.Xr snd_vibes 4
+.El
+.Pp
+Refer to the manual page for each bridge device driver for driver specific
+settings and information.
+.Ss Legacy Hardware
+For old legacy
+.Tn ISA
+cards, the driver looks for
+.Tn MSS
+cards at addresses
+.Dv 0x530
+and
+.Dv 0x604 .
+These values can be overridden in
+.Pa /boot/device.hints .
+Non-PnP sound cards require the following lines in
+.Xr device.hints 5 :
+.Bd -literal -offset indent
+hint.pcm.0.at="isa"
+hint.pcm.0.irq="5"
+hint.pcm.0.drq="1"
+hint.pcm.0.flags="0x0"
+.Ed
+.Pp
+Apart from the usual parameters, the flags field is used to specify
+the secondary
+.Tn DMA
+channel (generally used for capture in full duplex cards).
+Flags are set to 0 for cards not using a secondary
+.Tn DMA
+channel, or to 0x10 + C to specify channel C.
+.Ss Boot Variables
+In general, the module
+.Pa snd_foo
+corresponds to
+.Cd "device snd_foo"
+and can be
+loaded by the boot
+.Xr loader 8
+via
+.Xr loader.conf 5
+or from the command line using the
+.Xr kldload 8
+utility.
+Options which can be specified in
+.Pa /boot/loader.conf
+include:
+.Bl -tag -width ".Va snd_driver_load" -offset indent
+.It Va snd_driver_load
+.Pq Dq Li NO
+If set to
+.Dq Li YES ,
+this option loads all available drivers.
+.It Va snd_hda_load
+.Pq Dq Li NO
+If set to
+.Dq Li YES ,
+only the Intel High Definition Audio bridge device driver and dependent
+modules will be loaded.
+.It Va snd_foo_load
+.Pq Dq Li NO
+If set to
+.Dq Li YES ,
+load driver for card/chipset foo.
+.El
+.Pp
+To define default values for the different mixer channels,
+set the channel to the preferred value using hints, e.g.:
+.Va hint.pcm.0.line Ns = Ns Qq Li 0 .
+This will mute the input channel per default.
+.Ss Multichannel Audio
+Multichannel audio, popularly referred to as
+.Dq surround sound
+is supported and enabled by default.
+The FreeBSD multichannel matrix processor supports up to 18 interleaved
+channels, but the limit is currently set to 8 channels (as commonly used
+for 7.1 surround sound).
+The internal matrix mapping can handle reduction, expansion or
+re-routing of channels.
+This provides a base interface for related multichannel
+.Fn ioctl
+support.
+Multichannel audio works both with and without
+.Tn VCHANs .
+.Pp
+Most bridge device drivers are still missing multichannel matrixing
+support, but in most cases this should be trivial to implement.
+Use the
+.Va dev.pcm.%d.[play|rec].vchanformat
+.Xr sysctl(8)
+to adjust the number of channels used.
+The current multichannel interleaved structure and arrangement was
+implemented by inspecting various popular UNIX applications.
+There were no single standard, so much care has been taken to try
+to satisfy each possible scenario, despite the fact that each
+application has its own conflicting standard.
+.Ss EQ
+The Parametric Software Equalizer (EQ) enables the use of
+.Dq tone
+controls (bass and treble).
+Commonly used for ear-candy or frequency compensation due to the vast
+difference in hardware quality.
+EQ is disabled by default, but can be enabled with the
+.Va hint.pcm.%d.eq
+tunable.
+.Ss VCHANs
+Each device can optionally support more playback and recording channels
+than physical hardware provides by using
+.Dq virtual channels
+or
+.Tn VCHANs .
+.Tn VCHAN
+options can be configured via the
+.Xr sysctl 8
+interface but can only be manipulated while the device is inactive.
+.Ss VPC
+FreeBSD supports independent and individual volume controls for each active
+application, without touching the master
+.Nm
+volume.
+This is sometimes referred to as Volume Per Channel (VPC).
+The
+.Tn VPC
+feature is enabled by default.
+.Ss Loader Tunables
+The following loader tunables are used to set driver configuration at the
+.Xr loader 8
+prompt before booting the kernel, or they can be stored in
+.Pa /boot/loader.conf
+in order to automatically set them before booting the kernel.
+It is also possible to use
+.Xr kenv 1
+to change these tunables before loading the
+.Nm
+driver.
+The following tunables can not be changed during runtime using
+.Xr sysctl 8 .
+.Bl -tag -width indent
+.It Va hint.pcm.%d.eq
+Set to 1 or 0 to explicitly enable (1) or disable (0) the equalizer.
+Requires a driver reload if changed.
+Enabling this will make bass and treble controls appear in mixer applications.
+This tunable is undefined by default.
+Equalizing is disabled by default.
+.It Va hint.pcm.%d.vpc
+Set to 1 or 0 to explicitly enable (1) or disable (0) the
+.Tn VPC
+feature.
+This tunable is undefined by default.
+.Tn VPC
+is however enabled by default.
+.El
+.Ss Runtime Configuration
+There are a number of
+.Xr sysctl 8
+variables available which can be modified during runtime.
+These values can also be stored in
+.Pa /etc/sysctl.conf
+in order to automatically set them during the boot process.
+.Va hw.snd.*
+are global settings and
+.Va dev.pcm.*
+are device specific.
+.Bl -tag -width indent
+.It Va hw.snd.compat_linux_mmap
+Linux
+.Xr mmap 2
+compatibility.
+The following values are supported (default is 0):
+.Bl -tag -width 2n
+.It -1
+Force disabling/denying PROT_EXEC
+.Xr mmap 2
+requests.
+.It 0
+Auto detect proc/ABI type, allow
+.Xr mmap 2
+for Linux applications, and deny for everything else.
+.It 1
+Always allow PROT_EXEC page mappings.
+.El
+.It Va hw.snd.default_auto
+Automatically assign the default sound unit.
+The following values are supported (default is 1):
+.Bl -tag -width 2n
+.It 0
+Do not assign the default sound unit automatically.
+.It 1
+Use the best available sound device based on playing and recording
+capabilities of the device.
+.It 2
+Use the most recently attached device.
+.El
+.It Va hw.snd.default_unit
+Default sound card for systems with multiple sound cards.
+When using
+.Xr devfs 5 ,
+the default device for
+.Pa /dev/dsp .
+Equivalent to a symlink from
+.Pa /dev/dsp
+to
+.Pa /dev/dsp Ns Va ${hw.snd.default_unit} .
+.It Va hw.snd.feeder_eq_exact_rate
+Only certain rates are allowed for precise processing.
+The default behavior is however to allow sloppy processing for all rates,
+even the unsupported ones.
+Enable to toggle this requirement and only allow processing for supported
+rates.
+.It Va hw.snd.feeder_rate_max
+Maximum allowable sample rate.
+.It Va hw.snd.feeder_rate_min
+Minimum allowable sample rate.
+.It Va hw.snd.feeder_rate_polyphase_max
+Adjust to set the maximum number of allowed polyphase entries during the
+process of building resampling filters.
+Disabling polyphase resampling has the benefit of reducing memory usage, at
+the expense of slower and lower quality conversion.
+Only applicable when the SINC interpolator is used.
+Default value is 183040.
+Set to 0 to disable polyphase resampling.
+.It Va hw.snd.feeder_rate_quality
+Sample rate converter quality.
+Default value is 1, linear interpolation.
+Available options include:
+.Bl -tag -width 2n
+.It 0
+Zero Order Hold, ZOH.
+Very fast, but with poor quality.
+.It 1
+Linear interpolation.
+Fast, quality is subject to personal preference.
+Technically the quality is poor however, due to the lack of anti-aliasing
+filtering.
+.It 2
+Bandlimited SINC interpolator.
+Implements polyphase banking to boost the conversion speed, at the cost of
+memory usage, with multiple high quality polynomial interpolators to improve
+the conversion accuracy.
+100% fixed point, 64bit accumulator with 32bit coefficients and high precision
+sample buffering.
+Quality values are 100dB stopband, 8 taps and 85% bandwidth.
+.It 3
+Continuation of the bandlimited SINC interpolator, with 100dB stopband, 36
+taps and 90% bandwidth as quality values.
+.It 4
+Continuation of the bandlimited SINC interprolator, with 100dB stopband, 164
+taps and 97% bandwidth as quality values.
+.El
+.It Va hw.snd.feeder_rate_round
+Sample rate rounding threshold, to avoid large prime division at the
+cost of accuracy.
+All requested sample rates will be rounded to the nearest threshold value.
+Possible values range between 0 (disabled) and 500.
+Default is 25.
+.It Va hw.snd.latency
+Configure the buffering latency.
+Only affects applications that do not explicitly request
+blocksize / fragments.
+This tunable provides finer granularity than the
+.Va hw.snd.latency_profile
+tunable.
+Possible values range between 0 (lowest latency) and 10 (highest latency).
+.It Va hw.snd.latency_profile
+Define sets of buffering latency conversion tables for the
+.Va hw.snd.latency
+tunable.
+A value of 0 will use a low and aggressive latency profile which can result
+in possible underruns if the application cannot keep up with a rapid irq
+rate, especially during high workload.
+The default value is 1, which is considered a moderate/safe latency profile.
+.It Va hw.snd.maxautovchans
+Global
+.Tn VCHAN
+setting that only affects devices with at least one playback or recording channel available.
+The sound system will dynamically create up to this many
+.Tn VCHANs .
+Set to
+.Dq 0
+if no
+.Tn VCHANs
+are desired.
+Maximum value is 256.
+.It Va hw.snd.report_soft_formats
+Controls the internal format conversion if it is
+available transparently to the application software.
+When disabled or not available, the application will
+only be able to select formats the device natively supports.
+.It Va hw.snd.report_soft_matrix
+Enable seamless channel matrixing even if the hardware does not support it.
+Makes it possible to play multichannel streams even with a simple stereo
+sound card.
+.It Va hw.snd.verbose
+Level of verbosity for the
+.Pa /dev/sndstat
+device.
+Higher values include more output and the highest level,
+four, should be used when reporting problems.
+Other options include:
+.Bl -tag -width 2n
+.It 0
+Installed devices and their allocated bus resources.
+.It 1
+The number of playback, record, virtual channels, and
+flags per device.
+.It 2
+Channel information per device including the channel's
+current format, speed, and pseudo device statistics such as
+buffer overruns and buffer underruns.
+.It 3
+File names and versions of the currently loaded sound modules.
+.It 4
+Various messages intended for debugging.
+.El
+.It Va hw.snd.vpc_0db
+Default value for
+.Nm
+volume.
+Increase to give more room for attenuation control.
+Decrease for more amplification, with the possible cost of sound clipping.
+.It Va hw.snd.vpc_autoreset
+When a channel is closed the channel volume will be reset to 0db.
+This means that any changes to the volume will be lost.
+Enabling this will preserve the volume, at the cost of possible confusion
+when applications tries to re-open the same device.
+.It Va hw.snd.vpc_mixer_bypass
+The recommended way to use the
+.Tn VPC
+feature is to teach applications to use
+the correct
+.Fn ioctl :
+.Dv SNDCTL_DSP_GETPLAYVOL, SNDCTL_DSP_SETPLAYVOL,
+.Dv SNDCTL_DSP_SETRECVOL, SNDCTL_DSP_SETRECVOL.
+This is however not always possible.
+Enable this to allow applications to use their own existing mixer logic
+to control their own channel volume.
+.It Va hw.snd.vpc_reset
+Enable to restore all channel volumes back to the default value of 0db.
+.It Va dev.pcm.%d.bitperfect
+Enable or disable bitperfect mode.
+When enabled, channels will skip all dsp processing, such as channel
+matrixing, rate converting and equalizing.
+The pure
+.Nm
+stream will be fed directly to the hardware.
+If
+.Tn VCHANs
+are enabled, the bitperfect mode will use the
+.Tn VCHAN
+format/rate as the definitive format/rate target.
+The recommended way to use bitperfect mode is to disable
+.Tn VCHANs
+and enable this sysctl.
+Default is disabled.
+.It Va dev.pcm.%d.[play|rec].vchans
+The current number of
+.Tn VCHANs
+allocated per device.
+This can be set to preallocate a certain number of
+.Tn VCHANs .
+Setting this value to
+.Dq 0
+will disable
+.Tn VCHANs
+for this device.
+.It Va dev.pcm.%d.[play|rec].vchanformat
+Format for
+.Tn VCHAN
+mixing.
+All playback paths will be converted to this format before the mixing
+process begins.
+By default only 2 channels are enabled.
+Available options include:
+.Bl -tag -width 2n
+.It s16le:1.0
+Mono.
+.It s16le:2.0
+Stereo, 2 channels (left, right).
+.It s16le:2.1
+3 channels (left, right, LFE).
+.It s16le:3.0
+3 channels (left, right, rear center).
+.It s16le:4.0
+Quadraphonic, 4 channels (front/rear left and right).
+.It s16le:4.1
+5 channels (4.0 + LFE).
+.It s16le:5.0
+5 channels (4.0 + center).
+.It s16le:5.1
+6 channels (4.0 + center + LFE).
+.It s16le:6.0
+6 channels (4.0 + front/rear center).
+.It s16le:6.1
+7 channels (6.0 + LFE).
+.It s16le:7.1
+8 channels (4.0 + center + LFE + left and right side).
+.El
+.It Va dev.pcm.%d.[play|rec].vchanmode
+.Tn VCHAN
+format/rate selection.
+Available options include:
+.Bl -tag -width 2n
+.It fixed
+Channel mixing is done using fixed format/rate.
+Advanced operations such as digital passthrough will not work.
+Can be considered as a
+.Dq legacy
+mode.
+This is the default mode for hardware channels which lack support for digital
+formats.
+.It passthrough
+Channel mixing is done using fixed format/rate, but advanced operations such
+as digital passthrough also work.
+All channels will produce sound as usual until a digital format playback is
+requested.
+When this happens all other channels will be muted and the latest incoming
+digital format will be allowed to pass through undisturbed.
+Multiple concurrent digital streams are supported, but the latest stream will
+take precedence and mute all other streams.
+.It adaptive
+Works like the
+.Dq passthrough
+mode, but is a bit smarter, especially for
+multiple
+.Nm
+channels with different format/rate.
+When a new channel is about to start, the entire list of virtual channels will
+be scanned, and the channel with the best format/rate (usually the
+highest/biggest) will be selected.
+This ensures that mixing quality depends on the best channel.
+The downside is that the hardware DMA mode needs to be restarted, which may
+cause annoying pops or clicks.
+.El
+.It Va dev.pcm.%d.[play|rec].vchanrate
+Sample rate speed for
+.Tn VCHAN
+mixing.
+All playback paths will be converted to this sample rate before the mixing
+process begins.
+.It Va dev.pcm.%d.polling
+Experimental polling mode support where the driver operates by querying the
+device state on each tick using a
+.Xr callout 9
+mechanism.
+Disabled by default and currently only available for a few device drivers.
+.El
+.Ss Recording Channels
+On devices that have more than one recording source (ie: mic and line),
+there is a corresponding
+.Pa /dev/dsp%d.r%d
+device.
+The
+.Xr mixer 8
+utility can be used to start and stop recording from an specific device.
+.Ss Statistics
+Channel statistics are only kept while the device is open.
+So with situations involving overruns and underruns, consider the output
+while the errant application is open and running.
+.Ss IOCTL Support
+The driver supports most of the
+.Tn OSS
+.Fn ioctl
+functions, and most applications work unmodified.
+A few differences exist, while memory mapped playback is
+supported natively and in
+.Tn Linux
+emulation, memory mapped recording is
+not due to
+.Tn VM
+system design.
+As a consequence, some applications may need to be recompiled
+with a slightly modified audio module.
+See
+.In sys/soundcard.h
+for a complete list of the supported
+.Fn ioctl
+functions.
+.Sh FILES
+The
+.Nm
+drivers may create the following
+device nodes:
+.Pp
+.Bl -tag -width ".Pa /dev/audio%d.%d" -compact
+.It Pa /dev/audio%d.%d
+Sparc-compatible audio device.
+.It Pa /dev/dsp%d.%d
+Digitized voice device.
+.It Pa /dev/dspW%d.%d
+Like
+.Pa /dev/dsp ,
+but 16 bits per sample.
+.It Pa /dev/dsp%d.p%d
+Playback channel.
+.It Pa /dev/dsp%d.r%d
+Record channel.
+.It Pa /dev/dsp%d.vp%d
+Virtual playback channel.
+.It Pa /dev/dsp%d.vr%d
+Virtual recording channel.
+.It Pa /dev/sndstat
+Current
+.Nm
+status, including all channels and drivers.
+.El
+.Pp
+The first number in the device node
+represents the unit number of the
+.Nm
+device.
+All
+.Nm
+devices are listed
+in
+.Pa /dev/sndstat .
+Additional messages are sometimes recorded when the
+device is probed and attached, these messages can be viewed with the
+.Xr dmesg 8
+utility.
+.Pp
+The above device nodes are only created on demand through the dynamic
+.Xr devfs 5
+clone handler.
+Users are strongly discouraged to access them directly.
+For specific sound card access, please instead use
+.Pa /dev/dsp
+or
+.Pa /dev/dsp%d .
+.Sh EXAMPLES
+Use the sound metadriver to load all
+.Nm
+bridge device drivers at once
+(for example if it is unclear which the correct driver to use is):
+.Pp
+.Dl kldload snd_driver
+.Pp
+Load a specific bridge device driver, in this case the Intel
+High Definition Audio driver:
+.Pp
+.Dl kldload snd_hda
+.Pp
+Check the status of all detected
+.Nm
+devices:
+.Pp
+.Dl cat /dev/sndstat
+.Pp
+Change the default sound device, in this case to the second device.
+This is handy if there are multiple
+.Nm
+devices available:
+.Pp
+.Dl sysctl hw.snd.default_unit=1
+.Sh DIAGNOSTICS
+.Bl -diag
+.It pcm%d:play:%d:dsp%d.p%d: play interrupt timeout, channel dead
+The hardware does not generate interrupts to serve incoming (play)
+or outgoing (record) data.
+.It unsupported subdevice XX
+A device node is not created properly.
+.El
+.Sh SEE ALSO
+.Xr snd_ad1816 4 ,
+.Xr snd_ai2s 4 ,
+.Xr snd_als4000 4 ,
+.Xr snd_atiixp 4 ,
+.Xr snd_audiocs 4 ,
+.Xr snd_cmi 4 ,
+.Xr snd_cs4281 4 ,
+.Xr snd_csa 4 ,
+.Xr snd_davbus 4 ,
+.Xr snd_ds1 4 ,
+.Xr snd_emu10k1 4 ,
+.Xr snd_emu10kx 4 ,
+.Xr snd_envy24 4 ,
+.Xr snd_envy24ht 4 ,
+.Xr snd_es137x 4 ,
+.Xr snd_ess 4 ,
+.Xr snd_fm801 4 ,
+.Xr snd_gusc 4 ,
+.Xr snd_hda 4 ,
+.Xr snd_hdspe 4 ,
+.Xr snd_ich 4 ,
+.Xr snd_maestro 4 ,
+.Xr snd_maestro3 4 ,
+.Xr snd_mss 4 ,
+.Xr snd_neomagic 4 ,
+.Xr snd_sbc 4 ,
+.Xr snd_solo 4 ,
+.Xr snd_spicds 4 ,
+.Xr snd_t4dwave 4 ,
+.Xr snd_uaudio 4 ,
+.Xr snd_via8233 4 ,
+.Xr snd_via82c686 4 ,
+.Xr snd_vibes 4 ,
+.Xr devfs 5 ,
+.Xr device.hints 5 ,
+.Xr loader.conf 5 ,
+.Xr dmesg 8 ,
+.Xr kldload 8 ,
+.Xr mixer 8 ,
+.Xr sysctl 8
+.Rs
+.%T "Cookbook formulae for audio EQ biquad filter coefficients, by Robert Bristow-Johnson"
+.%U "http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt"
+.Re
+.Rs
+.%T "Julius O'Smith's Digital Audio Resampling"
+.%U "http://ccrma.stanford.edu/~jos/resample/"
+.Re
+.Rs
+.%T "Polynomial Interpolators for High-Quality Resampling of Oversampled Audio, by Olli Niemitalo"
+.%U "http://www.student.oulu.fi/~oniemita/dsp/deip.pdf"
+.Re
+.Rs
+.%T "The OSS API"
+.%U "http://www.opensound.com/pguide/oss.pdf"
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 2.2.6
+as
+.Nm pcm ,
+written by
+.An Luigi Rizzo .
+It was later
+rewritten in
+.Fx 4.0
+by
+.An Cameron Grant .
+The API evolved from the VOXWARE
+standard which later became OSS standard.
+.Sh AUTHORS
+.An -nosplit
+.An Luigi Rizzo Aq luigi@iet.unipi.it
+initially wrote the
+.Nm pcm
+device driver and this manual page.
+.An Cameron Grant Aq gandalf@vilnya.demon.co.uk
+later revised the device driver for
+.Fx 4.0 .
+.An Seigo Tanimura Aq tanimura@r.dl.itc.u-tokyo.ac.jp
+revised this manual page.
+It was then rewritten for
+.Fx 5.2 .
+.Sh BUGS
+Some features of your sound card (e.g., global volume control) might not
+be supported on all devices.
diff --git a/share/man/man4/pcn.4 b/share/man/man4/pcn.4
new file mode 100644
index 0000000..b86e4fb
--- /dev/null
+++ b/share/man/man4/pcn.4
@@ -0,0 +1,191 @@
+.\" Copyright (c) Berkeley Software Design, Inc.
+.\" Copyright (c) 1997, 1998, 1999, 2000
+.\" Bill Paul <wpaul@osd.bsdi.com>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 31, 2006
+.Dt PCN 4
+.Os
+.Sh NAME
+.Nm pcn
+.Nd "AMD PCnet/PCI Fast Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device pcn"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_pcn_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Ethernet adapters and embedded
+controllers based on the AMD PCnet/FAST, PCnet/FAST+, PCnet/FAST III,
+PCnet/PRO and PCnet/Home Ethernet controller chips.
+Supported NIC's include the Allied Telesyn AT-2700 family.
+.Pp
+The PCnet/PCI chips include a 100Mbps Ethernet MAC and support
+both a serial and MII-compliant transceiver interface.
+They use a bus master DMA and a scatter/gather descriptor scheme.
+The AMD chips provide a mechanism for zero-copy receive,
+providing good performance in server environments.
+Receive address filtering is provided using a single perfect filter entry
+for the station address and a 64-bit multicast hash table.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width 10baseTXUTP
+.It autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It 10baseT/UTP
+Set 10Mbps operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Sq full-duplex
+or
+.Sq half-duplex
+modes.
+.It 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Sq full-duplex
+or
+.Sq half-duplex
+modes.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width full-duplex
+.It full-duplex
+Force full duplex operation.
+.It half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports adapters and embedded controllers based on the AMD PCnet/FAST,
+PCnet/FAST+, PCnet/FAST III, PCnet/PRO and PCnet/Home Fast Ethernet chips:
+.Pp
+.Bl -bullet -compact
+.It
+AMD Am79C971 PCnet-FAST
+.It
+AMD Am79C972 PCnet-FAST+
+.It
+AMD Am79C973/Am79C975 PCnet-FAST III
+.It
+AMD Am79C976 PCnet-PRO
+.It
+AMD Am79C978 PCnet-Home
+.It
+Allied-Telesis LA-PCI
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "pcn%d: couldn't map ports/memory"
+A fatal initialization error has occurred.
+.It "pcn%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "pcn%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (e.g.\& a cable fault).
+.It "pcn%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.It "pcn%d: no memory for tx list"
+The driver failed to allocate an mbuf for the transmitter ring when
+allocating a pad buffer or collapsing an mbuf chain into a cluster.
+.It "pcn%d: chip is in D3 power state -- setting to D0"
+This message applies only to adapters which support power
+management.
+Some operating systems place the controller in low power
+mode when shutting down, and some PCI BIOSes fail to bring the chip
+out of this state before configuring it.
+The controller loses all of
+its PCI configuration in the D3 state, so if the BIOS does not set
+it back to full power mode in time, it will not be able to configure it
+correctly.
+The driver tries to detect this condition and bring
+the adapter back to the D0 (full power) state, but this may not be
+enough to return the driver to a fully operational condition.
+If
+you see this message at boot time and the driver fails to attach
+the device as a network interface, you will have to perform a
+warm boot to have the device properly configured.
+.Pp
+Note that this condition only occurs when warm booting from another
+operating system.
+If you power down your system prior to booting
+.Fx ,
+the card should be configured correctly.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Rs
+.%T AMD PCnet/FAST, PCnet/FAST+ and PCnet/Home datasheets
+.%U http://www.amd.com
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.3 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@osd.bsdi.com .
diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4
new file mode 100644
index 0000000..b7b504d
--- /dev/null
+++ b/share/man/man4/pf.4
@@ -0,0 +1,1188 @@
+.\" $OpenBSD: pf.4,v 1.62 2008/09/10 14:57:37 jmc Exp $
+.\"
+.\" Copyright (C) 2001, Kjell Wooding. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the project nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 14, 2013
+.Dt PF 4
+.Os
+.Sh NAME
+.Nm pf
+.Nd packet filter
+.Sh SYNOPSIS
+.Cd "device pf"
+.Cd "options PF_DEFAULT_TO_DROP"
+.Sh DESCRIPTION
+Packet filtering takes place in the kernel.
+A pseudo-device,
+.Pa /dev/pf ,
+allows userland processes to control the
+behavior of the packet filter through an
+.Xr ioctl 2
+interface.
+There are commands to enable and disable the filter, load rulesets,
+add and remove individual rules or state table entries,
+and retrieve statistics.
+The most commonly used functions are covered by
+.Xr pfctl 8 .
+.Pp
+Manipulations like loading a ruleset that involve more than a single
+.Xr ioctl 2
+call require a so-called
+.Em ticket ,
+which prevents the occurrence of
+multiple concurrent manipulations.
+.Pp
+Fields of
+.Xr ioctl 2
+parameter structures that refer to packet data (like
+addresses and ports) are generally expected in network byte-order.
+.Pp
+Rules and address tables are contained in so-called
+.Em anchors .
+When servicing an
+.Xr ioctl 2
+request, if the anchor field of the argument structure is empty,
+the kernel will use the default anchor (i.e., the main ruleset)
+in operations.
+Anchors are specified by name and may be nested, with components
+separated by
+.Sq /
+characters, similar to how file system hierarchies are laid out.
+The final component of the anchor path is the anchor under which
+operations will be performed.
+.Sh SYSCTL VARIABLES AND LOADER TUNABLES
+The following
+.Xr loader 8
+tunables are available.
+.Bl -tag -width indent
+.It Va net.pf.states_hashsize
+Size of hash tables that store states.
+Should be power of 2.
+Default value is 32768.
+.It Va net.pf.source_nodes_hashsize
+Size of hash table that store source nodes.
+Should be power of 2.
+Default value is 8192.
+.El
+.Pp
+Read only
+.Xr sysctl 8
+variables with matching names are provided to obtain current values
+at runtime.
+.Sh KERNEL OPTIONS
+The following options in the kernel configuration file are related to
+.Nm
+operation:
+.Pp
+.Bl -tag -width ".Dv PF_DEFAULT_TO_DROP" -compact
+.It Dv PF_DEFAULT_TO_DROP
+Change default policy to drop by default
+.El
+.Sh IOCTL INTERFACE
+.Nm
+supports the following
+.Xr ioctl 2
+commands, available through
+.Aq Pa net/pfvar.h :
+.Bl -tag -width xxxxxx
+.It Dv DIOCSTART
+Start the packet filter.
+.It Dv DIOCSTOP
+Stop the packet filter.
+.It Dv DIOCSTARTALTQ
+Start the ALTQ bandwidth control system (see
+.Xr altq 9 ) .
+.It Dv DIOCSTOPALTQ
+Stop the ALTQ bandwidth control system.
+.It Dv DIOCBEGINADDRS Fa "struct pfioc_pooladdr *pp"
+.Bd -literal
+struct pfioc_pooladdr {
+ u_int32_t action;
+ u_int32_t ticket;
+ u_int32_t nr;
+ u_int32_t r_num;
+ u_int8_t r_action;
+ u_int8_t r_last;
+ u_int8_t af;
+ char anchor[MAXPATHLEN];
+ struct pf_pooladdr addr;
+};
+.Ed
+.Pp
+Clear the buffer address pool and get a
+.Va ticket
+for subsequent
+.Dv DIOCADDADDR ,
+.Dv DIOCADDRULE ,
+and
+.Dv DIOCCHANGERULE
+calls.
+.It Dv DIOCADDADDR Fa "struct pfioc_pooladdr *pp"
+.Pp
+Add the pool address
+.Va addr
+to the buffer address pool to be used in the following
+.Dv DIOCADDRULE
+or
+.Dv DIOCCHANGERULE
+call.
+All other members of the structure are ignored.
+.It Dv DIOCADDRULE Fa "struct pfioc_rule *pr"
+.Bd -literal
+struct pfioc_rule {
+ u_int32_t action;
+ u_int32_t ticket;
+ u_int32_t pool_ticket;
+ u_int32_t nr;
+ char anchor[MAXPATHLEN];
+ char anchor_call[MAXPATHLEN];
+ struct pf_rule rule;
+};
+.Ed
+.Pp
+Add
+.Va rule
+at the end of the inactive ruleset.
+This call requires a
+.Va ticket
+obtained through a preceding
+.Dv DIOCXBEGIN
+call and a
+.Va pool_ticket
+obtained through a
+.Dv DIOCBEGINADDRS
+call.
+.Dv DIOCADDADDR
+must also be called if any pool addresses are required.
+The optional
+.Va anchor
+name indicates the anchor in which to append the rule.
+.Va nr
+and
+.Va action
+are ignored.
+.It Dv DIOCADDALTQ Fa "struct pfioc_altq *pa"
+Add an ALTQ discipline or queue.
+.Bd -literal
+struct pfioc_altq {
+ u_int32_t action;
+ u_int32_t ticket;
+ u_int32_t nr;
+ struct pf_altq altq;
+};
+.Ed
+.It Dv DIOCGETRULES Fa "struct pfioc_rule *pr"
+Get a
+.Va ticket
+for subsequent
+.Dv DIOCGETRULE
+calls and the number
+.Va nr
+of rules in the active ruleset.
+.It Dv DIOCGETRULE Fa "struct pfioc_rule *pr"
+Get a
+.Va rule
+by its number
+.Va nr
+using the
+.Va ticket
+obtained through a preceding
+.Dv DIOCGETRULES
+call.
+If
+.Va action
+is set to
+.Dv PF_GET_CLR_CNTR ,
+the per-rule statistics on the requested rule are cleared.
+.It Dv DIOCGETADDRS Fa "struct pfioc_pooladdr *pp"
+Get a
+.Va ticket
+for subsequent
+.Dv DIOCGETADDR
+calls and the number
+.Va nr
+of pool addresses in the rule specified with
+.Va r_action ,
+.Va r_num ,
+and
+.Va anchor .
+.It Dv DIOCGETADDR Fa "struct pfioc_pooladdr *pp"
+Get the pool address
+.Va addr
+by its number
+.Va nr
+from the rule specified with
+.Va r_action ,
+.Va r_num ,
+and
+.Va anchor
+using the
+.Va ticket
+obtained through a preceding
+.Dv DIOCGETADDRS
+call.
+.It Dv DIOCGETALTQS Fa "struct pfioc_altq *pa"
+Get a
+.Va ticket
+for subsequent
+.Dv DIOCGETALTQ
+calls and the number
+.Va nr
+of queues in the active list.
+.It Dv DIOCGETALTQ Fa "struct pfioc_altq *pa"
+Get the queueing discipline
+.Va altq
+by its number
+.Va nr
+using the
+.Va ticket
+obtained through a preceding
+.Dv DIOCGETALTQS
+call.
+.It Dv DIOCGETQSTATS Fa "struct pfioc_qstats *pq"
+Get the statistics on a queue.
+.Bd -literal
+struct pfioc_qstats {
+ u_int32_t ticket;
+ u_int32_t nr;
+ void *buf;
+ int nbytes;
+ u_int8_t scheduler;
+};
+.Ed
+.Pp
+This call fills in a pointer to the buffer of statistics
+.Va buf ,
+of length
+.Va nbytes ,
+for the queue specified by
+.Va nr .
+.It Dv DIOCGETRULESETS Fa "struct pfioc_ruleset *pr"
+.Bd -literal
+struct pfioc_ruleset {
+ u_int32_t nr;
+ char path[MAXPATHLEN];
+ char name[PF_ANCHOR_NAME_SIZE];
+};
+.Ed
+.Pp
+Get the number
+.Va nr
+of rulesets (i.e., anchors) directly attached to the anchor named by
+.Va path
+for use in subsequent
+.Dv DIOCGETRULESET
+calls.
+Nested anchors, since they are not directly attached to the given
+anchor, will not be included.
+This ioctl returns
+.Er EINVAL
+if the given anchor does not exist.
+.It Dv DIOCGETRULESET Fa "struct pfioc_ruleset *pr"
+Get a ruleset (i.e., an anchor)
+.Va name
+by its number
+.Va nr
+from the given anchor
+.Va path ,
+the maximum number of which can be obtained from a preceding
+.Dv DIOCGETRULESETS
+call.
+This ioctl returns
+.Er EINVAL
+if the given anchor does not exist or
+.Er EBUSY
+if another process is concurrently updating a ruleset.
+.It Dv DIOCADDSTATE Fa "struct pfioc_state *ps"
+Add a state entry.
+.Bd -literal
+struct pfioc_state {
+ struct pfsync_state state;
+};
+.Ed
+.It Dv DIOCGETSTATE Fa "struct pfioc_state *ps"
+Extract the entry identified by the
+.Va id
+and
+.Va creatorid
+fields of the
+.Va state
+structure from the state table.
+.It Dv DIOCKILLSTATES Fa "struct pfioc_state_kill *psk"
+Remove matching entries from the state table.
+This ioctl returns the number of killed states in
+.Va psk_killed .
+.Bd -literal
+struct pfioc_state_kill {
+ struct pf_state_cmp psk_pfcmp;
+ sa_family_t psk_af;
+ int psk_proto;
+ struct pf_rule_addr psk_src;
+ struct pf_rule_addr psk_dst;
+ char psk_ifname[IFNAMSIZ];
+ char psk_label[PF_RULE_LABEL_SIZE];
+ u_int psk_killed;
+};
+.Ed
+.It Dv DIOCCLRSTATES Fa "struct pfioc_state_kill *psk"
+Clear all states.
+It works like
+.Dv DIOCKILLSTATES ,
+but ignores the
+.Va psk_af ,
+.Va psk_proto ,
+.Va psk_src ,
+and
+.Va psk_dst
+fields of the
+.Vt pfioc_state_kill
+structure.
+.It Dv DIOCSETSTATUSIF Fa "struct pfioc_if *pi"
+Specify the interface for which statistics are accumulated.
+.Bd -literal
+struct pfioc_if {
+ char ifname[IFNAMSIZ];
+};
+.Ed
+.It Dv DIOCGETSTATUS Fa "struct pf_status *s"
+Get the internal packet filter statistics.
+.Bd -literal
+struct pf_status {
+ u_int64_t counters[PFRES_MAX];
+ u_int64_t lcounters[LCNT_MAX];
+ u_int64_t fcounters[FCNT_MAX];
+ u_int64_t scounters[SCNT_MAX];
+ u_int64_t pcounters[2][2][3];
+ u_int64_t bcounters[2][2];
+ u_int32_t running;
+ u_int32_t states;
+ u_int32_t src_nodes;
+ u_int32_t since;
+ u_int32_t debug;
+ u_int32_t hostid;
+ char ifname[IFNAMSIZ];
+ u_int8_t pf_chksum[MD5_DIGEST_LENGTH];
+};
+.Ed
+.It Dv DIOCCLRSTATUS
+Clear the internal packet filter statistics.
+.It Dv DIOCNATLOOK Fa "struct pfioc_natlook *pnl"
+Look up a state table entry by source and destination addresses and ports.
+.Bd -literal
+struct pfioc_natlook {
+ struct pf_addr saddr;
+ struct pf_addr daddr;
+ struct pf_addr rsaddr;
+ struct pf_addr rdaddr;
+ u_int16_t sport;
+ u_int16_t dport;
+ u_int16_t rsport;
+ u_int16_t rdport;
+ sa_family_t af;
+ u_int8_t proto;
+ u_int8_t direction;
+};
+.Ed
+.It Dv DIOCSETDEBUG Fa "u_int32_t *level"
+Set the debug level.
+.Bd -literal
+enum { PF_DEBUG_NONE, PF_DEBUG_URGENT, PF_DEBUG_MISC,
+ PF_DEBUG_NOISY };
+.Ed
+.It Dv DIOCGETSTATES Fa "struct pfioc_states *ps"
+Get state table entries.
+.Bd -literal
+struct pfioc_states {
+ int ps_len;
+ union {
+ caddr_t psu_buf;
+ struct pf_state *psu_states;
+ } ps_u;
+#define ps_buf ps_u.psu_buf
+#define ps_states ps_u.psu_states
+};
+.Ed
+.Pp
+If
+.Va ps_len
+is non-zero on entry, as many states as possible that can fit into this
+size will be copied into the supplied buffer
+.Va ps_states .
+On exit,
+.Va ps_len
+is always set to the total size required to hold all state table entries
+(i.e., it is set to
+.Li sizeof(struct pf_state) * nr ) .
+.It Dv DIOCCHANGERULE Fa "struct pfioc_rule *pcr"
+Add or remove the
+.Va rule
+in the ruleset specified by
+.Va rule.action .
+.Pp
+The type of operation to be performed is indicated by
+.Va action ,
+which can be any of the following:
+.Bd -literal
+enum { PF_CHANGE_NONE, PF_CHANGE_ADD_HEAD, PF_CHANGE_ADD_TAIL,
+ PF_CHANGE_ADD_BEFORE, PF_CHANGE_ADD_AFTER,
+ PF_CHANGE_REMOVE, PF_CHANGE_GET_TICKET };
+.Ed
+.Pp
+.Va ticket
+must be set to the value obtained with
+.Dv PF_CHANGE_GET_TICKET
+for all actions except
+.Dv PF_CHANGE_GET_TICKET .
+.Va pool_ticket
+must be set to the value obtained with the
+.Dv DIOCBEGINADDRS
+call for all actions except
+.Dv PF_CHANGE_REMOVE
+and
+.Dv PF_CHANGE_GET_TICKET .
+.Va anchor
+indicates to which anchor the operation applies.
+.Va nr
+indicates the rule number against which
+.Dv PF_CHANGE_ADD_BEFORE ,
+.Dv PF_CHANGE_ADD_AFTER ,
+or
+.Dv PF_CHANGE_REMOVE
+actions are applied.
+.\" It Dv DIOCCHANGEALTQ Fa "struct pfioc_altq *pcr"
+.It Dv DIOCCHANGEADDR Fa "struct pfioc_pooladdr *pca"
+Add or remove the pool address
+.Va addr
+from the rule specified by
+.Va r_action ,
+.Va r_num ,
+and
+.Va anchor .
+.It Dv DIOCSETTIMEOUT Fa "struct pfioc_tm *pt"
+.Bd -literal
+struct pfioc_tm {
+ int timeout;
+ int seconds;
+};
+.Ed
+.Pp
+Set the state timeout of
+.Va timeout
+to
+.Va seconds .
+The old value will be placed into
+.Va seconds .
+For possible values of
+.Va timeout ,
+consult the
+.Dv PFTM_*
+values in
+.Aq Pa net/pfvar.h .
+.It Dv DIOCGETTIMEOUT Fa "struct pfioc_tm *pt"
+Get the state timeout of
+.Va timeout .
+The value will be placed into the
+.Va seconds
+field.
+.It Dv DIOCCLRRULECTRS
+Clear per-rule statistics.
+.It Dv DIOCSETLIMIT Fa "struct pfioc_limit *pl"
+Set the hard limits on the memory pools used by the packet filter.
+.Bd -literal
+struct pfioc_limit {
+ int index;
+ unsigned limit;
+};
+
+enum { PF_LIMIT_STATES, PF_LIMIT_SRC_NODES, PF_LIMIT_FRAGS,
+ PF_LIMIT_TABLE_ENTRIES, PF_LIMIT_MAX };
+.Ed
+.It Dv DIOCGETLIMIT Fa "struct pfioc_limit *pl"
+Get the hard
+.Va limit
+for the memory pool indicated by
+.Va index .
+.It Dv DIOCRCLRTABLES Fa "struct pfioc_table *io"
+Clear all tables.
+All the ioctls that manipulate radix tables
+use the same structure described below.
+For
+.Dv DIOCRCLRTABLES ,
+.Va pfrio_ndel
+contains on exit the number of tables deleted.
+.Bd -literal
+struct pfioc_table {
+ struct pfr_table pfrio_table;
+ void *pfrio_buffer;
+ int pfrio_esize;
+ int pfrio_size;
+ int pfrio_size2;
+ int pfrio_nadd;
+ int pfrio_ndel;
+ int pfrio_nchange;
+ int pfrio_flags;
+ u_int32_t pfrio_ticket;
+};
+#define pfrio_exists pfrio_nadd
+#define pfrio_nzero pfrio_nadd
+#define pfrio_nmatch pfrio_nadd
+#define pfrio_naddr pfrio_size2
+#define pfrio_setflag pfrio_size2
+#define pfrio_clrflag pfrio_nadd
+.Ed
+.It Dv DIOCRADDTABLES Fa "struct pfioc_table *io"
+Create one or more tables.
+On entry,
+.Va pfrio_buffer
+must point to an array of
+.Vt struct pfr_table
+containing at least
+.Vt pfrio_size
+elements.
+.Vt pfrio_esize
+must be the size of
+.Vt struct pfr_table .
+On exit,
+.Va pfrio_nadd
+contains the number of tables effectively created.
+.Bd -literal
+struct pfr_table {
+ char pfrt_anchor[MAXPATHLEN];
+ char pfrt_name[PF_TABLE_NAME_SIZE];
+ u_int32_t pfrt_flags;
+ u_int8_t pfrt_fback;
+};
+.Ed
+.It Dv DIOCRDELTABLES Fa "struct pfioc_table *io"
+Delete one or more tables.
+On entry,
+.Va pfrio_buffer
+must point to an array of
+.Vt struct pfr_table
+containing at least
+.Vt pfrio_size
+elements.
+.Vt pfrio_esize
+must be the size of
+.Vt struct pfr_table .
+On exit,
+.Va pfrio_ndel
+contains the number of tables effectively deleted.
+.It Dv DIOCRGETTABLES Fa "struct pfioc_table *io"
+Get the list of all tables.
+On entry,
+.Va pfrio_buffer[pfrio_size]
+contains a valid writeable buffer for
+.Vt pfr_table
+structures.
+On exit,
+.Va pfrio_size
+contains the number of tables written into the buffer.
+If the buffer is too small, the kernel does not store anything but just
+returns the required buffer size, without error.
+.It Dv DIOCRGETTSTATS Fa "struct pfioc_table *io"
+This call is like
+.Dv DIOCRGETTABLES
+but is used to get an array of
+.Vt pfr_tstats
+structures.
+.Bd -literal
+struct pfr_tstats {
+ struct pfr_table pfrts_t;
+ u_int64_t pfrts_packets
+ [PFR_DIR_MAX][PFR_OP_TABLE_MAX];
+ u_int64_t pfrts_bytes
+ [PFR_DIR_MAX][PFR_OP_TABLE_MAX];
+ u_int64_t pfrts_match;
+ u_int64_t pfrts_nomatch;
+ long pfrts_tzero;
+ int pfrts_cnt;
+ int pfrts_refcnt[PFR_REFCNT_MAX];
+};
+#define pfrts_name pfrts_t.pfrt_name
+#define pfrts_flags pfrts_t.pfrt_flags
+.Ed
+.It Dv DIOCRCLRTSTATS Fa "struct pfioc_table *io"
+Clear the statistics of one or more tables.
+On entry,
+.Va pfrio_buffer
+must point to an array of
+.Vt struct pfr_table
+containing at least
+.Vt pfrio_size
+elements.
+.Vt pfrio_esize
+must be the size of
+.Vt struct pfr_table .
+On exit,
+.Va pfrio_nzero
+contains the number of tables effectively cleared.
+.It Dv DIOCRCLRADDRS Fa "struct pfioc_table *io"
+Clear all addresses in a table.
+On entry,
+.Va pfrio_table
+contains the table to clear.
+On exit,
+.Va pfrio_ndel
+contains the number of addresses removed.
+.It Dv DIOCRADDADDRS Fa "struct pfioc_table *io"
+Add one or more addresses to a table.
+On entry,
+.Va pfrio_table
+contains the table ID and
+.Va pfrio_buffer
+must point to an array of
+.Vt struct pfr_addr
+containing at least
+.Vt pfrio_size
+elements to add to the table.
+.Vt pfrio_esize
+must be the size of
+.Vt struct pfr_addr .
+On exit,
+.Va pfrio_nadd
+contains the number of addresses effectively added.
+.Bd -literal
+struct pfr_addr {
+ union {
+ struct in_addr _pfra_ip4addr;
+ struct in6_addr _pfra_ip6addr;
+ } pfra_u;
+ u_int8_t pfra_af;
+ u_int8_t pfra_net;
+ u_int8_t pfra_not;
+ u_int8_t pfra_fback;
+};
+#define pfra_ip4addr pfra_u._pfra_ip4addr
+#define pfra_ip6addr pfra_u._pfra_ip6addr
+.Ed
+.It Dv DIOCRDELADDRS Fa "struct pfioc_table *io"
+Delete one or more addresses from a table.
+On entry,
+.Va pfrio_table
+contains the table ID and
+.Va pfrio_buffer
+must point to an array of
+.Vt struct pfr_addr
+containing at least
+.Vt pfrio_size
+elements to delete from the table.
+.Vt pfrio_esize
+must be the size of
+.Vt struct pfr_addr .
+On exit,
+.Va pfrio_ndel
+contains the number of addresses effectively deleted.
+.It Dv DIOCRSETADDRS Fa "struct pfioc_table *io"
+Replace the content of a table by a new address list.
+This is the most complicated command, which uses all the structure members.
+.Pp
+On entry,
+.Va pfrio_table
+contains the table ID and
+.Va pfrio_buffer
+must point to an array of
+.Vt struct pfr_addr
+containing at least
+.Vt pfrio_size
+elements which become the new contents of the table.
+.Vt pfrio_esize
+must be the size of
+.Vt struct pfr_addr .
+Additionally, if
+.Va pfrio_size2
+is non-zero,
+.Va pfrio_buffer[pfrio_size..pfrio_size2]
+must be a writeable buffer, into which the kernel can copy the
+addresses that have been deleted during the replace operation.
+On exit,
+.Va pfrio_ndel ,
+.Va pfrio_nadd ,
+and
+.Va pfrio_nchange
+contain the number of addresses deleted, added, and changed by the
+kernel.
+If
+.Va pfrio_size2
+was set on entry,
+.Va pfrio_size2
+will point to the size of the buffer used, exactly like
+.Dv DIOCRGETADDRS .
+.It Dv DIOCRGETADDRS Fa "struct pfioc_table *io"
+Get all the addresses of a table.
+On entry,
+.Va pfrio_table
+contains the table ID and
+.Va pfrio_buffer[pfrio_size]
+contains a valid writeable buffer for
+.Vt pfr_addr
+structures.
+On exit,
+.Va pfrio_size
+contains the number of addresses written into the buffer.
+If the buffer was too small, the kernel does not store anything but just
+returns the required buffer size, without returning an error.
+.It Dv DIOCRGETASTATS Fa "struct pfioc_table *io"
+This call is like
+.Dv DIOCRGETADDRS
+but is used to get an array of
+.Vt pfr_astats
+structures.
+.Bd -literal
+struct pfr_astats {
+ struct pfr_addr pfras_a;
+ u_int64_t pfras_packets
+ [PFR_DIR_MAX][PFR_OP_ADDR_MAX];
+ u_int64_t pfras_bytes
+ [PFR_DIR_MAX][PFR_OP_ADDR_MAX];
+ long pfras_tzero;
+};
+.Ed
+.It Dv DIOCRCLRASTATS Fa "struct pfioc_table *io"
+Clear the statistics of one or more addresses.
+On entry,
+.Va pfrio_table
+contains the table ID and
+.Va pfrio_buffer
+must point to an array of
+.Vt struct pfr_addr
+containing at least
+.Vt pfrio_size
+elements to be cleared from the table.
+.Vt pfrio_esize
+must be the size of
+.Vt struct pfr_addr .
+On exit,
+.Va pfrio_nzero
+contains the number of addresses effectively cleared.
+.It Dv DIOCRTSTADDRS Fa "struct pfioc_table *io"
+Test if the given addresses match a table.
+On entry,
+.Va pfrio_table
+contains the table ID and
+.Va pfrio_buffer
+must point to an array of
+.Vt struct pfr_addr
+containing at least
+.Vt pfrio_size
+elements, each of which will be tested for a match in the table.
+.Vt pfrio_esize
+must be the size of
+.Vt struct pfr_addr .
+On exit, the kernel updates the
+.Vt pfr_addr
+array by setting the
+.Va pfra_fback
+member appropriately.
+.It Dv DIOCRSETTFLAGS Fa "struct pfioc_table *io"
+Change the
+.Dv PFR_TFLAG_CONST
+or
+.Dv PFR_TFLAG_PERSIST
+flags of a table.
+On entry,
+.Va pfrio_buffer
+must point to an array of
+.Vt struct pfr_table
+containing at least
+.Vt pfrio_size
+elements.
+.Va pfrio_esize
+must be the size of
+.Vt struct pfr_table .
+.Va pfrio_setflag
+must contain the flags to add, while
+.Va pfrio_clrflag
+must contain the flags to remove.
+On exit,
+.Va pfrio_nchange
+and
+.Va pfrio_ndel
+contain the number of tables altered or deleted by the kernel.
+Yes, tables can be deleted if one removes the
+.Dv PFR_TFLAG_PERSIST
+flag of an unreferenced table.
+.It Dv DIOCRINADEFINE Fa "struct pfioc_table *io"
+Defines a table in the inactive set.
+On entry,
+.Va pfrio_table
+contains the table ID and
+.Va pfrio_buffer[pfrio_size]
+contains an array of
+.Vt pfr_addr
+structures to put in the table.
+A valid ticket must also be supplied to
+.Va pfrio_ticket .
+On exit,
+.Va pfrio_nadd
+contains 0 if the table was already defined in the inactive list
+or 1 if a new table has been created.
+.Va pfrio_naddr
+contains the number of addresses effectively put in the table.
+.It Dv DIOCXBEGIN Fa "struct pfioc_trans *io"
+.Bd -literal
+struct pfioc_trans {
+ int size; /* number of elements */
+ int esize; /* size of each element in bytes */
+ struct pfioc_trans_e {
+ int rs_num;
+ char anchor[MAXPATHLEN];
+ u_int32_t ticket;
+ } *array;
+};
+.Ed
+.Pp
+Clear all the inactive rulesets specified in the
+.Vt pfioc_trans_e
+array.
+For each ruleset, a ticket is returned for subsequent "add rule" ioctls,
+as well as for the
+.Dv DIOCXCOMMIT
+and
+.Dv DIOCXROLLBACK
+calls.
+.Pp
+Ruleset types, identified by
+.Va rs_num ,
+include the following:
+.Pp
+.Bl -tag -width PF_RULESET_FILTER -offset ind -compact
+.It Dv PF_RULESET_SCRUB
+Scrub (packet normalization) rules.
+.It Dv PF_RULESET_FILTER
+Filter rules.
+.It Dv PF_RULESET_NAT
+NAT (Network Address Translation) rules.
+.It Dv PF_RULESET_BINAT
+Bidirectional NAT rules.
+.It Dv PF_RULESET_RDR
+Redirect rules.
+.It Dv PF_RULESET_ALTQ
+ALTQ disciplines.
+.It Dv PF_RULESET_TABLE
+Address tables.
+.El
+.It Dv DIOCXCOMMIT Fa "struct pfioc_trans *io"
+Atomically switch a vector of inactive rulesets to the active rulesets.
+This call is implemented as a standard two-phase commit, which will either
+fail for all rulesets or completely succeed.
+All tickets need to be valid.
+This ioctl returns
+.Er EBUSY
+if another process is concurrently updating some of the same rulesets.
+.It Dv DIOCXROLLBACK Fa "struct pfioc_trans *io"
+Clean up the kernel by undoing all changes that have taken place on the
+inactive rulesets since the last
+.Dv DIOCXBEGIN .
+.Dv DIOCXROLLBACK
+will silently ignore rulesets for which the ticket is invalid.
+.It Dv DIOCSETHOSTID Fa "u_int32_t *hostid"
+Set the host ID, which is used by
+.Xr pfsync 4
+to identify which host created state table entries.
+.It Dv DIOCOSFPFLUSH
+Flush the passive OS fingerprint table.
+.It Dv DIOCOSFPADD Fa "struct pf_osfp_ioctl *io"
+.Bd -literal
+struct pf_osfp_ioctl {
+ struct pf_osfp_entry {
+ SLIST_ENTRY(pf_osfp_entry) fp_entry;
+ pf_osfp_t fp_os;
+ char fp_class_nm[PF_OSFP_LEN];
+ char fp_version_nm[PF_OSFP_LEN];
+ char fp_subtype_nm[PF_OSFP_LEN];
+ } fp_os;
+ pf_tcpopts_t fp_tcpopts;
+ u_int16_t fp_wsize;
+ u_int16_t fp_psize;
+ u_int16_t fp_mss;
+ u_int16_t fp_flags;
+ u_int8_t fp_optcnt;
+ u_int8_t fp_wscale;
+ u_int8_t fp_ttl;
+ int fp_getnum;
+};
+.Ed
+.Pp
+Add a passive OS fingerprint to the table.
+Set
+.Va fp_os.fp_os
+to the packed fingerprint,
+.Va fp_os.fp_class_nm
+to the name of the class (Linux, Windows, etc),
+.Va fp_os.fp_version_nm
+to the name of the version (NT, 95, 98), and
+.Va fp_os.fp_subtype_nm
+to the name of the subtype or patchlevel.
+The members
+.Va fp_mss ,
+.Va fp_wsize ,
+.Va fp_psize ,
+.Va fp_ttl ,
+.Va fp_optcnt ,
+and
+.Va fp_wscale
+are set to the TCP MSS, the TCP window size, the IP length, the IP TTL,
+the number of TCP options, and the TCP window scaling constant of the
+TCP SYN packet, respectively.
+.Pp
+The
+.Va fp_flags
+member is filled according to the
+.Aq Pa net/pfvar.h
+include file
+.Dv PF_OSFP_*
+defines.
+The
+.Va fp_tcpopts
+member contains packed TCP options.
+Each option uses
+.Dv PF_OSFP_TCPOPT_BITS
+bits in the packed value.
+Options include any of
+.Dv PF_OSFP_TCPOPT_NOP ,
+.Dv PF_OSFP_TCPOPT_SACK ,
+.Dv PF_OSFP_TCPOPT_WSCALE ,
+.Dv PF_OSFP_TCPOPT_MSS ,
+or
+.Dv PF_OSFP_TCPOPT_TS .
+.Pp
+The
+.Va fp_getnum
+member is not used with this ioctl.
+.Pp
+The structure's slack space must be zeroed for correct operation;
+.Xr memset 3
+the whole structure to zero before filling and sending to the kernel.
+.It Dv DIOCOSFPGET Fa "struct pf_osfp_ioctl *io"
+Get the passive OS fingerprint number
+.Va fp_getnum
+from the kernel's fingerprint list.
+The rest of the structure members will come back filled.
+Get the whole list by repeatedly incrementing the
+.Va fp_getnum
+number until the ioctl returns
+.Er EBUSY .
+.It Dv DIOCGETSRCNODES Fa "struct pfioc_src_nodes *psn"
+.Bd -literal
+struct pfioc_src_nodes {
+ int psn_len;
+ union {
+ caddr_t psu_buf;
+ struct pf_src_node *psu_src_nodes;
+ } psn_u;
+#define psn_buf psn_u.psu_buf
+#define psn_src_nodes psn_u.psu_src_nodes
+};
+.Ed
+.Pp
+Get the list of source nodes kept by sticky addresses and source
+tracking.
+The ioctl must be called once with
+.Va psn_len
+set to 0.
+If the ioctl returns without error,
+.Va psn_len
+will be set to the size of the buffer required to hold all the
+.Va pf_src_node
+structures held in the table.
+A buffer of this size should then be allocated, and a pointer to this buffer
+placed in
+.Va psn_buf .
+The ioctl must then be called again to fill this buffer with the actual
+source node data.
+After that call,
+.Va psn_len
+will be set to the length of the buffer actually used.
+.It Dv DIOCCLRSRCNODES
+Clear the tree of source tracking nodes.
+.It Dv DIOCIGETIFACES Fa "struct pfioc_iface *io"
+Get the list of interfaces and interface drivers known to
+.Nm .
+All the ioctls that manipulate interfaces
+use the same structure described below:
+.Bd -literal
+struct pfioc_iface {
+ char pfiio_name[IFNAMSIZ];
+ void *pfiio_buffer;
+ int pfiio_esize;
+ int pfiio_size;
+ int pfiio_nzero;
+ int pfiio_flags;
+};
+.Ed
+.Pp
+If not empty,
+.Va pfiio_name
+can be used to restrict the search to a specific interface or driver.
+.Va pfiio_buffer[pfiio_size]
+is the user-supplied buffer for returning the data.
+On entry,
+.Va pfiio_size
+contains the number of
+.Vt pfi_kif
+entries that can fit into the buffer.
+The kernel will replace this value by the real number of entries it wants
+to return.
+.Va pfiio_esize
+should be set to
+.Li sizeof(struct pfi_kif) .
+.Pp
+The data is returned in the
+.Vt pfi_kif
+structure described below:
+.Bd -literal
+struct pfi_kif {
+ RB_ENTRY(pfi_kif) pfik_tree;
+ char pfik_name[IFNAMSIZ];
+ u_int64_t pfik_packets[2][2][2];
+ u_int64_t pfik_bytes[2][2][2];
+ u_int32_t pfik_tzero;
+ int pfik_flags;
+ struct pf_state_tree_lan_ext pfik_lan_ext;
+ struct pf_state_tree_ext_gwy pfik_ext_gwy;
+ TAILQ_ENTRY(pfi_kif) pfik_w_states;
+ void *pfik_ah_cookie;
+ struct ifnet *pfik_ifp;
+ struct ifg_group *pfik_group;
+ int pfik_states;
+ int pfik_rules;
+ TAILQ_HEAD(, pfi_dynaddr) pfik_dynaddrs;
+};
+.Ed
+.It Dv DIOCSETIFFLAG Fa "struct pfioc_iface *io"
+Set the user setable flags (described above) of the
+.Nm
+internal interface description.
+The filtering process is the same as for
+.Dv DIOCIGETIFACES .
+.Bd -literal
+#define PFI_IFLAG_SKIP 0x0100 /* skip filtering on interface */
+.Ed
+.It Dv DIOCCLRIFFLAG Fa "struct pfioc_iface *io"
+Works as
+.Dv DIOCSETIFFLAG
+above but clears the flags.
+.It Dv DIOCKILLSRCNODES Fa "struct pfioc_iface *io"
+Explicitly remove source tracking nodes.
+.El
+.Sh FILES
+.Bl -tag -width /dev/pf -compact
+.It Pa /dev/pf
+packet filtering device.
+.El
+.Sh EXAMPLES
+The following example demonstrates how to use the
+.Dv DIOCNATLOOK
+command to find the internal host/port of a NATed connection:
+.Bd -literal
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <sys/fcntl.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <net/pfvar.h>
+#include <err.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+u_int32_t
+read_address(const char *s)
+{
+ int a, b, c, d;
+
+ sscanf(s, "%i.%i.%i.%i", &a, &b, &c, &d);
+ return htonl(a << 24 | b << 16 | c << 8 | d);
+}
+
+void
+print_address(u_int32_t a)
+{
+ a = ntohl(a);
+ printf("%d.%d.%d.%d", a >> 24 & 255, a >> 16 & 255,
+ a >> 8 & 255, a & 255);
+}
+
+int
+main(int argc, char *argv[])
+{
+ struct pfioc_natlook nl;
+ int dev;
+
+ if (argc != 5) {
+ printf("%s <gwy addr> <gwy port> <ext addr> <ext port>\\n",
+ argv[0]);
+ return 1;
+ }
+
+ dev = open("/dev/pf", O_RDWR);
+ if (dev == -1)
+ err(1, "open(\\"/dev/pf\\") failed");
+
+ memset(&nl, 0, sizeof(struct pfioc_natlook));
+ nl.saddr.v4.s_addr = read_address(argv[1]);
+ nl.sport = htons(atoi(argv[2]));
+ nl.daddr.v4.s_addr = read_address(argv[3]);
+ nl.dport = htons(atoi(argv[4]));
+ nl.af = AF_INET;
+ nl.proto = IPPROTO_TCP;
+ nl.direction = PF_IN;
+
+ if (ioctl(dev, DIOCNATLOOK, &nl))
+ err(1, "DIOCNATLOOK");
+
+ printf("internal host ");
+ print_address(nl.rsaddr.v4.s_addr);
+ printf(":%u\\n", ntohs(nl.rsport));
+ return 0;
+}
+.Ed
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr altq 4 ,
+.Xr if_bridge 4 ,
+.Xr pflog 4 ,
+.Xr pflow 4 ,
+.Xr pfsync 4 ,
+.Xr pfctl 8 ,
+.Xr altq 9
+.Sh HISTORY
+The
+.Nm
+packet filtering mechanism first appeared in
+.Ox 3.0
+and then
+.Fx 5.2 .
+.Pp
+This implementation is derived from
+.Ox 4.5 .
+It has been heavily modified to be capable of running in multithreaded
+.Fx
+kernel and scale its performance on multiple CPUs.
diff --git a/share/man/man4/pflog.4 b/share/man/man4/pflog.4
new file mode 100644
index 0000000..c1039a3
--- /dev/null
+++ b/share/man/man4/pflog.4
@@ -0,0 +1,107 @@
+.\" $OpenBSD: pflog.4,v 1.10 2007/05/31 19:19:51 jmc Exp $
+.\"
+.\" Copyright (c) 2001 Tobias Weingartner
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 31 2007
+.Dt PFLOG 4
+.Os
+.Sh NAME
+.Nm pflog
+.Nd packet filter logging interface
+.Sh SYNOPSIS
+.Cd "device pflog"
+.Sh DESCRIPTION
+The
+.Nm pflog
+interface is a device which makes visible all packets logged by
+the packet filter,
+.Xr pf 4 .
+Logged packets can easily be monitored in real
+time by invoking
+.Xr tcpdump 1
+on the
+.Nm
+interface, or stored to disk using
+.Xr pflogd 8 .
+.Pp
+The pflog0 interface is created automatically at boot if both
+.Xr pf 4
+and
+.Xr pflogd 8
+are enabled;
+further instances can be created using
+.Xr ifconfig 8 .
+.Pp
+Each packet retrieved on this interface has a header associated
+with it of length
+.Dv PFLOG_HDRLEN .
+This header documents the address family, interface name, rule
+number, reason, action, and direction of the packet that was logged.
+This structure, defined in
+.Aq Pa net/if_pflog.h
+looks like
+.Bd -literal -offset indent
+struct pfloghdr {
+ u_int8_t length;
+ sa_family_t af;
+ u_int8_t action;
+ u_int8_t reason;
+ char ifname[IFNAMSIZ];
+ char ruleset[PF_RULESET_NAME_SIZE];
+ u_int32_t rulenr;
+ u_int32_t subrulenr;
+ uid_t uid;
+ pid_t pid;
+ uid_t rule_uid;
+ pid_t rule_pid;
+ u_int8_t dir;
+ u_int8_t pad[3];
+};
+.Ed
+.Sh EXAMPLES
+Create a
+.Nm
+interface
+and monitor all packets logged on it:
+.Bd -literal -offset indent
+# ifconfig pflog1 up
+# tcpdump -n -e -ttt -i pflog1
+.Ed
+.Sh SEE ALSO
+.Xr inet 4 ,
+.Xr inet6 4 ,
+.Xr netintro 4 ,
+.Xr pf 4 ,
+.Xr ifconfig 8 ,
+.Xr pflogd 8 ,
+.Xr tcpdump 1
+.Sh HISTORY
+The
+.Nm
+device first appeared in
+.Ox 3.0 .
+.\" .Sh BUGS
+.\" Anything here?
diff --git a/share/man/man4/pfsync.4 b/share/man/man4/pfsync.4
new file mode 100644
index 0000000..b00bf9d
--- /dev/null
+++ b/share/man/man4/pfsync.4
@@ -0,0 +1,229 @@
+.\" $OpenBSD: pfsync.4,v 1.28 2009/02/17 10:05:18 dlg Exp $
+.\"
+.\" Copyright (c) 2002 Michael Shalayeff
+.\" Copyright (c) 2003-2004 Ryan McBride
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF MIND,
+.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 20 2011
+.Dt PFSYNC 4
+.Os
+.Sh NAME
+.Nm pfsync
+.Nd packet filter state table sychronisation interface
+.Sh SYNOPSIS
+.Cd "device pfsync"
+.Sh DESCRIPTION
+The
+.Nm
+interface is a pseudo-device which exposes certain changes to the state
+table used by
+.Xr pf 4 .
+State changes can be viewed by invoking
+.Xr tcpdump 1
+on the
+.Nm
+interface.
+If configured with a physical synchronisation interface,
+.Nm
+will also send state changes out on that interface,
+and insert state changes received on that interface from other systems
+into the state table.
+.Pp
+By default, all local changes to the state table are exposed via
+.Nm .
+State changes from packets received by
+.Nm
+over the network are not rebroadcast.
+Updates to states created by a rule marked with the
+.Ar no-sync
+keyword are ignored by the
+.Nm
+interface (see
+.Xr pf.conf 5
+for details).
+.Pp
+The
+.Nm
+interface will attempt to collapse multiple state updates into a single
+packet where possible.
+The maximum number of times a single state can be updated before a
+.Nm
+packet will be sent out is controlled by the
+.Ar maxupd
+parameter to ifconfig
+(see
+.Xr ifconfig 8
+and the example below for more details).
+The sending out of a
+.Nm
+packet will be delayed by a maximum of one second.
+.Sh NETWORK SYNCHRONISATION
+States can be synchronised between two or more firewalls using this
+interface, by specifying a synchronisation interface using
+.Xr ifconfig 8 .
+For example, the following command sets fxp0 as the synchronisation
+interface:
+.Bd -literal -offset indent
+# ifconfig pfsync0 syncdev fxp0
+.Ed
+.Pp
+By default, state change messages are sent out on the synchronisation
+interface using IP multicast packets to the 244.0.0.240 group address.
+An alternative destination address for
+.Nm
+packets can be specified using the
+.Ic syncpeer
+keyword.
+This can be used in combination with
+.Xr ipsec 4
+to protect the synchronisation traffic.
+In such a configuration, the syncdev should be set to the
+.Xr enc 4
+interface, as this is where the traffic arrives when it is decapsulated,
+e.g.:
+.Bd -literal -offset indent
+# ifconfig pfsync0 syncpeer 10.0.0.2 syncdev enc0
+.Ed
+.Pp
+It is important that the pfsync traffic be well secured
+as there is no authentication on the protocol and it would
+be trivial to spoof packets which create states, bypassing the pf ruleset.
+Either run the pfsync protocol on a trusted network \- ideally a network
+dedicated to pfsync messages such as a crossover cable between two firewalls,
+or specify a peer address and protect the traffic with
+.Xr ipsec 4 .
+.Pp
+.Nm
+has the following
+.Xr sysctl 8
+tunables:
+.Bl -tag -width ".Va net.pfsync"
+.It Va net.pfsync.carp_demotion_factor
+Value added to
+.Va net.inet.carp.demotion
+while
+.Nm
+tries to perform its bulk update.
+See
+.Xr carp 4
+for more information.
+Default value is 240.
+.El
+.Sh EXAMPLES
+.Nm
+and
+.Xr carp 4
+can be used together to provide automatic failover of a pair of firewalls
+configured in parallel.
+One firewall will handle all traffic until it dies, is shut down, or is
+manually demoted, at which point the second firewall will take over
+automatically.
+.Pp
+Both firewalls in this example have three
+.Xr sis 4
+interfaces.
+sis0 is the external interface, on the 10.0.0.0/24 subnet; sis1 is the
+internal interface, on the 192.168.0.0/24 subnet; and sis2 is the
+.Nm
+interface, using the 192.168.254.0/24 subnet.
+A crossover cable connects the two firewalls via their sis2 interfaces.
+On all three interfaces, firewall A uses the .254 address, while firewall B
+uses .253.
+The interfaces are configured as follows (firewall A unless otherwise
+indicated):
+.Pp
+Interfaces configuration in
+.Pa /etc/rc.conf :
+.Bd -literal -offset indent
+network_interfaces="lo0 sis0 sis1 sis2"
+ifconfig_sis0="10.0.0.254/24"
+ifconfig_sis0_alias0="inet 10.0.0.1/24 vhid 1 pass foo"
+ifconfig_sis1="192.168.0.254/24"
+ifconfig_sis1_alias0="inet 192.168.0.1/24 vhid 2 pass bar"
+ifconfig_sis2="192.168.254.254/24"
+pfsync_enable="YES"
+pfsync_syncdev="sis2"
+.Ed
+.Pp
+.Xr pf 4
+must also be configured to allow
+.Nm
+and
+.Xr carp 4
+traffic through.
+The following should be added to the top of
+.Pa /etc/pf.conf :
+.Bd -literal -offset indent
+pass quick on { sis2 } proto pfsync keep state (no-sync)
+pass on { sis0 sis1 } proto carp keep state (no-sync)
+.Ed
+.Pp
+It is preferable that one firewall handle the forwarding of all the traffic,
+therefore the
+.Ar advskew
+on the backup firewall's
+.Xr carp 4
+vhids should be set to something higher than
+the primary's.
+For example, if firewall B is the backup, its
+carp1 configuration would look like this:
+would look like this:
+.Bd -literal -offset indent
+ifconfig_sis1_alias0="inet 192.168.0.1/24 vhid 2 pass bar advskew 100"
+.Ed
+.Pp
+The following must also be added to
+.Pa /etc/sysctl.conf :
+.Bd -literal -offset indent
+net.inet.carp.preempt=1
+.Ed
+.Sh SEE ALSO
+.Xr bpf 4 ,
+.Xr carp 4 ,
+.Xr enc 4 ,
+.Xr inet 4 ,
+.Xr inet6 4 ,
+.Xr ipsec 4 ,
+.Xr netintro 4 ,
+.Xr pf 4 ,
+.Xr pf.conf 5 ,
+.Xr protocols 5 ,
+.Xr rc.conf 5 ,
+.Xr ifconfig 8 ,
+.Xr tcpdump 1
+.Sh HISTORY
+The
+.Nm
+device first appeared in
+.Ox 3.3 .
+It was first imported to
+.Fx 5.3 .
+.Pp
+The
+.Nm
+protocol and kernel implementation were significantly modified in
+.Fx 9.0 .
+The newer protocol is not compatible with older one and will not interoperate
+with it.
diff --git a/share/man/man4/pim.4 b/share/man/man4/pim.4
new file mode 100644
index 0000000..7d334b2
--- /dev/null
+++ b/share/man/man4/pim.4
@@ -0,0 +1,201 @@
+.\" Copyright (c) 2001-2003 International Computer Science Institute
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
+.\" and/or sell copies of the Software, and to permit persons to whom the
+.\" Software is furnished to do so, subject to the following conditions:
+.\"
+.\" The above copyright notice and this permission notice shall be included in
+.\" all copies or substantial portions of the Software.
+.\"
+.\" The names and trademarks of copyright holders may not be used in
+.\" advertising or publicity pertaining to the software without specific
+.\" prior permission. Title to copyright in this software and any associated
+.\" documentation will at all times remain with the copyright holders.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+.\" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+.\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+.\" DEALINGS IN THE SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 12, 2007
+.Dt PIM 4
+.Os
+.\"
+.Sh NAME
+.Nm pim
+.Nd Protocol Independent Multicast
+.\"
+.Sh SYNOPSIS
+.Cd "options MROUTING"
+.Pp
+.In sys/types.h
+.In sys/socket.h
+.In netinet/in.h
+.In netinet/ip_mroute.h
+.In netinet/pim.h
+.Ft int
+.Fn getsockopt "int s" IPPROTO_IP MRT_PIM "void *optval" "socklen_t *optlen"
+.Ft int
+.Fn setsockopt "int s" IPPROTO_IP MRT_PIM "const void *optval" "socklen_t optlen"
+.Ft int
+.Fn getsockopt "int s" IPPROTO_IPV6 MRT6_PIM "void *optval" "socklen_t *optlen"
+.Ft int
+.Fn setsockopt "int s" IPPROTO_IPV6 MRT6_PIM "const void *optval" "socklen_t optlen"
+.Sh DESCRIPTION
+.Tn PIM
+is the common name for two multicast routing protocols:
+Protocol Independent Multicast - Sparse Mode (PIM-SM) and
+Protocol Independent Multicast - Dense Mode (PIM-DM).
+.Pp
+PIM-SM is a multicast routing protocol that can use the underlying
+unicast routing information base or a separate multicast-capable
+routing information base.
+It builds unidirectional shared trees rooted at a Rendezvous
+Point (RP) per group,
+and optionally creates shortest-path trees per source.
+.Pp
+PIM-DM is a multicast routing protocol that uses the underlying
+unicast routing information base to flood multicast datagrams
+to all multicast routers.
+Prune messages are used to prevent future datagrams from propagating
+to routers with no group membership information.
+.Pp
+Both PIM-SM and PIM-DM are fairly complex protocols,
+though PIM-SM is much more complex.
+To enable PIM-SM or PIM-DM multicast routing in a router,
+the user must enable multicast routing and PIM processing in the kernel
+(see
+.Sx SYNOPSIS
+about the kernel configuration options),
+and must run a PIM-SM or PIM-DM capable user-level process.
+From developer's point of view,
+the programming guide described in the
+.Sx "Programming Guide"
+section should be used to control the PIM processing in the kernel.
+.\"
+.Ss Programming Guide
+After a multicast routing socket is open and multicast forwarding
+is enabled in the kernel
+(see
+.Xr multicast 4 ) ,
+one of the following socket options should be used to enable or disable
+PIM processing in the kernel.
+Note that those options require certain privilege
+(i.e., root privilege):
+.Bd -literal
+/* IPv4 */
+int v = 1; /* 1 to enable, or 0 to disable */
+setsockopt(mrouter_s4, IPPROTO_IP, MRT_PIM, (void *)&v, sizeof(v));
+.Ed
+.Bd -literal
+/* IPv6 */
+int v = 1; /* 1 to enable, or 0 to disable */
+setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_PIM, (void *)&v, sizeof(v));
+.Ed
+.Pp
+After PIM processing is enabled, the multicast-capable interfaces
+should be added
+(see
+.Xr multicast 4 ) .
+In case of PIM-SM, the PIM-Register virtual interface must be added
+as well.
+This can be accomplished by using the following options:
+.Bd -literal
+/* IPv4 */
+struct vifctl vc;
+memset(&vc, 0, sizeof(vc));
+/* Assign all vifctl fields as appropriate */
+\&...
+if (is_pim_register_vif)
+ vc.vifc_flags |= VIFF_REGISTER;
+setsockopt(mrouter_s4, IPPROTO_IP, MRT_ADD_VIF, (void *)&vc,
+ sizeof(vc));
+.Ed
+.Bd -literal
+/* IPv6 */
+struct mif6ctl mc;
+memset(&mc, 0, sizeof(mc));
+/* Assign all mif6ctl fields as appropriate */
+\&...
+if (is_pim_register_vif)
+ mc.mif6c_flags |= MIFF_REGISTER;
+setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_ADD_MIF, (void *)&mc,
+ sizeof(mc));
+.Ed
+.Pp
+Sending or receiving of PIM packets can be accomplished by
+opening first a
+.Dq raw socket
+(see
+.Xr socket 2 ) ,
+with protocol value of
+.Dv IPPROTO_PIM :
+.Bd -literal
+/* IPv4 */
+int pim_s4;
+pim_s4 = socket(AF_INET, SOCK_RAW, IPPROTO_PIM);
+.Ed
+.Bd -literal
+/* IPv6 */
+int pim_s6;
+pim_s6 = socket(AF_INET6, SOCK_RAW, IPPROTO_PIM);
+.Ed
+.Pp
+Then, the following system calls can be used to send or receive PIM
+packets:
+.Xr sendto 2 ,
+.Xr sendmsg 2 ,
+.Xr recvfrom 2 ,
+.Xr recvmsg 2 .
+.\"
+.Sh SEE ALSO
+.Xr getsockopt 2 ,
+.Xr recvfrom 2 ,
+.Xr recvmsg 2 ,
+.Xr sendmsg 2 ,
+.Xr sendto 2 ,
+.Xr setsockopt 2 ,
+.Xr socket 2 ,
+.Xr inet 4 ,
+.Xr intro 4 ,
+.Xr ip 4 ,
+.Xr multicast 4
+.\"
+.Sh STANDARDS
+.\" XXX the PIM-SM number must be updated after RFC 2362 is
+.\" replaced by a new RFC by the end of year 2003 or so.
+The PIM-SM protocol is specified in RFC 2362 (to be replaced by
+.%T draft-ietf-pim-sm-v2-new-* ) .
+The PIM-DM protocol is specified in
+.%T draft-ietf-pim-dm-new-v2-* ) .
+.\"
+.Sh AUTHORS
+.An -nosplit
+The original IPv4 PIM kernel support for IRIX and SunOS-4.x was
+implemented by
+.An Ahmed Helmy
+(USC and SGI).
+Later the code was ported to various
+.Bx
+flavors and modified by
+.An George Edmond Eddy
+(Rusty) (ISI),
+.An Hitoshi Asaeda
+(WIDE Project), and
+.An Pavlin Radoslavov
+(USC/ISI and ICSI).
+The IPv6 PIM kernel support was implemented by the KAME project
+.Pq Pa http://www.kame.net ,
+and was based on the IPv4 PIM kernel support.
+.Pp
+This manual page was written by
+.An Pavlin Radoslavov
+(ICSI).
diff --git a/share/man/man4/polling.4 b/share/man/man4/polling.4
new file mode 100644
index 0000000..6abc37c
--- /dev/null
+++ b/share/man/man4/polling.4
@@ -0,0 +1,222 @@
+.\" Copyright (c) 2002 Luigi Rizzo
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 6, 2007
+.Dt POLLING 4
+.Os
+.Sh NAME
+.Nm polling
+.Nd device polling support
+.Sh SYNOPSIS
+.Cd "options DEVICE_POLLING"
+.Sh DESCRIPTION
+Device polling
+.Nm (
+for brevity) refers to a technique that
+lets the operating system periodically poll devices, instead of
+relying on the devices to generate interrupts when they need attention.
+This might seem inefficient and counterintuitive, but when done
+properly,
+.Nm
+gives more control to the operating system on
+when and how to handle devices, with a number of advantages in terms
+of system responsiveness and performance.
+.Pp
+In particular,
+.Nm
+reduces the overhead for context
+switches which is incurred when servicing interrupts, and
+gives more control on the scheduling of the CPU between various
+tasks (user processes, software interrupts, device handling)
+which ultimately reduces the chances of livelock in the system.
+.Ss Principles of Operation
+In the normal, interrupt-based mode, devices generate an interrupt
+whenever they need attention.
+This in turn causes a
+context switch and the execution of an interrupt handler
+which performs whatever processing is needed by the device.
+The duration of the interrupt handler is potentially unbounded
+unless the device driver has been programmed with real-time
+concerns in mind (which is generally not the case for
+.Fx
+drivers).
+Furthermore, under heavy traffic load, the system might be
+persistently processing interrupts without being able to
+complete other work, either in the kernel or in userland.
+.Pp
+Device polling disables interrupts by polling devices at appropriate
+times, i.e., on clock interrupts and within the idle loop.
+This way, the context switch overhead is removed.
+Furthermore,
+the operating system can control accurately how much work to spend
+in handling device events, and thus prevent livelock by reserving
+some amount of CPU to other tasks.
+.Pp
+Enabling
+.Nm
+also changes the way software network interrupts
+are scheduled, so there is never the risk of livelock because
+packets are not processed to completion.
+.Ss Enabling polling
+Currently only network interface drivers support the
+.Nm
+feature.
+It is turned on and off with help of
+.Xr ifconfig 8
+command.
+.Pp
+The historic
+.Va kern.polling.enable ,
+which enabled polling for all interfaces, can be replaced with the following
+code:
+.Bd -literal
+for i in `ifconfig -l` ;
+ do ifconfig $i polling; # use -polling to disable
+done
+.Ed
+.Ss MIB Variables
+The operation of
+.Nm
+is controlled by the following
+.Xr sysctl 8
+MIB variables:
+.Pp
+.Bl -tag -width indent -compact
+.It Va kern.polling.user_frac
+When
+.Nm
+is enabled, and provided that there is some work to do,
+up to this percent of the CPU cycles is reserved to userland tasks,
+the remaining fraction being available for
+.Nm
+processing.
+Default is 50.
+.Pp
+.It Va kern.polling.burst
+Maximum number of packets grabbed from each network interface in
+each timer tick.
+This number is dynamically adjusted by the kernel,
+according to the programmed
+.Va user_frac , burst_max ,
+CPU speed, and system load.
+.Pp
+.It Va kern.polling.each_burst
+The burst above is split into smaller chunks of this number of
+packets, going round-robin among all interfaces registered for
+.Nm .
+This prevents the case that a large burst from a single interface
+can saturate the IP interrupt queue
+.Pq Va net.inet.ip.intr_queue_maxlen .
+Default is 5.
+.Pp
+.It Va kern.polling.burst_max
+Upper bound for
+.Va kern.polling.burst .
+Note that when
+.Nm
+is enabled, each interface can receive at most
+.Pq Va HZ No * Va burst_max
+packets per second unless there are spare CPU cycles available for
+.Nm
+in the idle loop.
+This number should be tuned to match the expected load
+(which can be quite high with GigE cards).
+Default is 150 which is adequate for 100Mbit network and HZ=1000.
+.Pp
+.It Va kern.polling.idle_poll
+Controls if
+.Nm
+is enabled in the idle loop.
+There are no reasons (other than power saving or bugs in the scheduler's
+handling of idle priority kernel threads) to disable this.
+.Pp
+.It Va kern.polling.reg_frac
+Controls how often (every
+.Va reg_frac No / Va HZ
+seconds) the status registers of the device are checked for error
+conditions and the like.
+Increasing this value reduces the load on the bus, but also delays
+the error detection.
+Default is 20.
+.Pp
+.It Va kern.polling.handlers
+How many active devices have registered for
+.Nm .
+.Pp
+.It Va kern.polling.short_ticks
+.It Va kern.polling.lost_polls
+.It Va kern.polling.pending_polls
+.It Va kern.polling.residual_burst
+.It Va kern.polling.phase
+.It Va kern.polling.suspect
+.It Va kern.polling.stalled
+Debugging variables.
+.El
+.Sh SUPPORTED DEVICES
+Device polling requires explicit modifications to the device drivers.
+As of this writing, the
+.Xr bge 4 ,
+.Xr dc 4 ,
+.Xr em 4 ,
+.Xr fwe 4 ,
+.Xr fwip 4 ,
+.Xr fxp 4 ,
+.Xr igb 4 ,
+.Xr ixgb 4 ,
+.Xr nfe 4 ,
+.Xr nge 4 ,
+.Xr re 4 ,
+.Xr rl 4 ,
+.Xr sf 4 ,
+.Xr sis 4 ,
+.Xr ste 4 ,
+.Xr stge 4 ,
+.Xr vge 4 ,
+.Xr vr 4 ,
+and
+.Xr xl 4
+devices are supported, with others in the works.
+The modifications are rather straightforward, consisting in
+the extraction of the inner part of the interrupt service routine
+and writing a callback function,
+.Fn *_poll ,
+which is invoked
+to probe the device for events and process them.
+(See the
+conditionally compiled sections of the devices mentioned above
+for more details.)
+.Pp
+As in the worst case the devices are only polled on clock interrupts,
+in order to reduce the latency in processing packets, it is not advisable
+to decrease the frequency of the clock below 1000 Hz.
+.Sh HISTORY
+Device polling first appeared in
+.Fx 4.6
+and
+.Fx 5.0 .
+.Sh AUTHORS
+Device polling was written by
+.An Luigi Rizzo Aq luigi@iet.unipi.it .
diff --git a/share/man/man4/ppbus.4 b/share/man/man4/ppbus.4
new file mode 100644
index 0000000..327b7c9
--- /dev/null
+++ b/share/man/man4/ppbus.4
@@ -0,0 +1,363 @@
+.\" Copyright (c) 1998, 1999 Nicolas Souchu
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 1, 1998
+.Dt PPBUS 4
+.Os
+.Sh NAME
+.Nm ppbus
+.Nd Parallel Port Bus system
+.Sh SYNOPSIS
+.Cd "device ppbus"
+.Pp
+.Cd "device vpo"
+.Pp
+.Cd "device lpt"
+.Cd "device plip"
+.Cd "device ppi"
+.Cd "device pps"
+.Cd "device lpbb"
+.Sh DESCRIPTION
+The
+.Em ppbus
+system provides a uniform, modular and architecture-independent
+system for the implementation of drivers to control various parallel devices,
+and to utilize different parallel port chipsets.
+.Sh DEVICE DRIVERS
+In order to write new drivers or port existing drivers, the ppbus system
+provides the following facilities:
+.Bl -bullet -offset indent
+.It
+architecture-independent macros or functions to access parallel ports
+.It
+mechanism to allow various devices to share the same parallel port
+.It
+a user interface named
+.Xr ppi 4
+that allows parallel port access from outside the kernel without conflicting
+with kernel-in drivers.
+.El
+.Ss Developing new drivers
+The ppbus system has been designed to support the development of standard
+and non-standard software:
+.Pp
+.Bl -column "Driver" -compact
+.It Em Driver Ta Em Description
+.It Sy vpo Ta "VPI0 parallel to Adaptec AIC-7110 SCSI controller driver" .
+It uses standard and non-standard parallel port accesses.
+.It Sy ppi Ta "Parallel port interface for general I/O"
+.It Sy pps Ta "Pulse per second Timing Interface"
+.It Sy lpbb Ta "Philips official parallel port I2C bit-banging interface"
+.El
+.Ss Porting existing drivers
+Another approach to the ppbus system is to port existing drivers.
+Various drivers have already been ported:
+.Pp
+.Bl -column "Driver" -compact
+.It Em Driver Ta Em Description
+.It Sy lpt Ta "lpt printer driver"
+.It Sy plip Ta "lp parallel network interface driver"
+.El
+.Pp
+ppbus should let you port any other software even from other operating systems
+that provide similar services.
+.Sh PARALLEL PORT CHIPSETS
+Parallel port chipset support is provided by
+.Xr ppc 4 .
+.Pp
+The ppbus system provides functions and macros to allocate a new
+parallel port bus, then initialize it and upper peripheral device drivers.
+.Pp
+ppc makes chipset detection and initialization and then calls ppbus attach
+functions to initialize the ppbus system.
+.Sh PARALLEL PORT MODEL
+The logical parallel port model chosen for the ppbus system is the PC's
+parallel port model.
+Consequently, for the i386 implementation of ppbus,
+most of the services provided by ppc are macros for inb()
+and outb() calls.
+But, for an other architecture, accesses to one of our logical
+registers (data, status, control...) may require more than one I/O access.
+.Ss Description
+The parallel port may operate in the following modes:
+.Bl -bullet -offset indent
+.It
+compatible mode, also called Centronics mode
+.It
+bidirectional 8/4-bits mode, also called NIBBLE mode
+.It
+byte mode, also called PS/2 mode
+.It
+Extended Capability Port mode, ECP
+.It
+Enhanced Parallel Port mode, EPP
+.It
+mixed ECP+EPP or ECP+PS/2 modes
+.El
+.Ss Compatible mode
+This mode defines the protocol used by most PCs to transfer data to a printer.
+In this mode, data is placed on the port's data lines, the printer status is
+checked for no errors and that it is not busy, and then a data Strobe is
+generated by the software to clock the data to the printer.
+.Pp
+Many I/O controllers have implemented a mode that uses a FIFO buffer to
+transfer data with the Compatibility mode protocol.
+This mode is referred to as
+"Fast Centronics" or "Parallel Port FIFO mode".
+.Ss Bidirectional mode
+The NIBBLE mode is the most common way to get reverse channel data from a
+printer or peripheral.
+Combined with the standard host to printer mode, it
+provides a complete bidirectional channel.
+.Pp
+In this mode, outputs are 8-bits long.
+Inputs are accomplished by reading
+4 of the 8 bits of the status register.
+.Ss Byte mode
+In this mode, the data register is used either for outputs and inputs.
+Then,
+any transfer is 8-bits long.
+.Ss Extended Capability Port mode
+The ECP protocol was proposed as an advanced mode for communication with
+printer and scanner type peripherals.
+Like the EPP protocol, ECP mode provides
+for a high performance bidirectional communication path between the host
+adapter and the peripheral.
+.Pp
+ECP protocol features include:
+.Bl -item -offset indent
+.It
+Run_Length_Encoding (RLE) data compression for host adapters
+.It
+FIFOs for both the forward and reverse channels
+.It
+DMA as well as programmed I/O for the host register interface.
+.El
+.Ss Enhanced Parallel Port mode
+The EPP protocol was originally developed as a means to provide a high
+performance parallel port link that would still be compatible with the
+standard parallel port.
+.Pp
+The EPP mode has two types of cycle: address and data.
+What makes the
+difference at hardware level is the strobe of the byte placed on the data
+lines.
+Data are strobed with nAutofeed, addresses are strobed with
+nSelectin signals.
+.Pp
+A particularity of the ISA implementation of the EPP protocol is that an
+EPP cycle fits in an ISA cycle.
+In this fashion, parallel port peripherals can
+operate at close to the same performance levels as an equivalent ISA plug-in
+card.
+.Pp
+At software level, you may implement the protocol you wish, using data and
+address cycles as you want.
+This is for the IEEE1284 compatible part.
+Then,
+peripheral vendors may implement protocol handshake with the following
+status lines: PError, nFault and Select.
+Try to know how these lines toggle
+with your peripheral, allowing the peripheral to request more data, stop the
+transfer and so on.
+.Pp
+At any time, the peripheral may interrupt the host with the nAck signal without
+disturbing the current transfer.
+.Ss Mixed modes
+Some manufacturers, like SMC, have implemented chipsets that support mixed
+modes.
+With such chipsets, mode switching is available at any time by
+accessing the extended control register.
+.Sh IEEE1284-1994 Standard
+.Ss Background
+This standard is also named "IEEE Standard Signaling Method for a
+Bidirectional Parallel Peripheral Interface for Personal Computers".
+It
+defines a signaling method for asynchronous, fully interlocked, bidirectional
+parallel communications between hosts and printers or other peripherals.
+It
+also specifies a format for a peripheral identification string and a method of
+returning this string to the host outside of the bidirectional data stream.
+.Pp
+This standard is architecture independent and only specifies dialog handshake
+at signal level.
+One should refer to architecture specific documentation in
+order to manipulate machine dependent registers, mapped memory or other
+methods to control these signals.
+.Pp
+The IEEE1284 protocol is fully oriented with all supported parallel port
+modes.
+The computer acts as master and the peripheral as slave.
+.Pp
+Any transfer is defined as a finite state automaton.
+It allows software to
+properly manage the fully interlocked scheme of the signaling method.
+The compatible mode is supported "as is" without any negotiation because it
+is compatible.
+Any other mode must be firstly negotiated by the host to check
+it is supported by the peripheral, then to enter one of the forward idle
+states.
+.Pp
+At any time, the slave may want to send data to the host.
+This is only
+possible from forward idle states (nibble, byte, ecp...).
+So, the
+host must have previously negotiated to permit the peripheral to
+request transfer.
+Interrupt lines may be dedicated to the requesting signals
+to prevent time consuming polling methods.
+.Pp
+But peripheral requests are only a hint to the master host.
+If the host
+accepts the transfer, it must firstly negotiate the reverse mode and then
+starts the transfer.
+At any time during reverse transfer, the host may
+terminate the transfer or the slave may drive wires to signal that no more
+data is available.
+.Ss Implementation
+IEEE1284 Standard support has been implemented at the top of the ppbus system
+as a set of procedures that perform high level functions like negotiation,
+termination, transfer in any mode without bothering you with low level
+characteristics of the standard.
+.Pp
+IEEE1284 interacts with the ppbus system as little as possible.
+That means
+you still have to request the ppbus when you want to access it, the negotiate
+function does not do it for you.
+And of course, release it later.
+.Sh ARCHITECTURE
+.Ss adapter, ppbus and device layers
+First, there is the
+.Em adapter
+layer, the lowest of the ppbus system.
+It provides
+chipset abstraction throw a set of low level functions that maps the logical
+model to the underlying hardware.
+.Pp
+Secondly, there is the
+.Em ppbus
+layer that provides functions to:
+.Bl -enum -offset indent
+.It
+share the parallel port bus among the daisy-chain like connected devices
+.It
+manage devices linked to ppbus
+.It
+propose an arch-independent interface to access the hardware layer.
+.El
+.Pp
+Finally, the
+.Em device
+layer gathers the parallel peripheral device drivers.
+.Ss Parallel modes management
+We have to differentiate operating modes at various ppbus system layers.
+Actually, ppbus and adapter operating modes on one hands and for each
+one, current and available modes are separated.
+.Pp
+With this level of abstraction a particular chipset may commute from any
+native mode to any other mode emulated with extended modes without
+disturbing upper layers.
+For example, most chipsets support NIBBLE mode as
+native and emulated with ECP and/or EPP.
+.Pp
+This architecture should support IEEE1284-1994 modes.
+.Sh FEATURES
+.Ss The boot process
+The boot process starts with the probe stage of the
+.Xr ppc 4
+driver during ISA bus (PC architecture) initialization.
+During attachment of
+the ppc driver, a new ppbus structure is allocated, then probe and attachment
+for this new bus node are called.
+.Pp
+ppbus attachment tries to detect any PnP parallel peripheral (according to
+.%T "Plug and Play Parallel Port Devices"
+draft from (c)1993-4 Microsoft Corporation)
+then probes and attaches known device drivers.
+.Pp
+During probe, device drivers are supposed to request the ppbus and try to
+set their operating mode.
+This mode will be saved in the context structure and
+returned each time the driver requests the ppbus.
+.Ss Bus allocation and interrupts
+ppbus allocation is mandatory not to corrupt I/O of other devices.
+Another
+usage of ppbus allocation is to reserve the port and receive incoming
+interrupts.
+.Pp
+High level interrupt handlers are connected to the ppbus system thanks to the
+newbus
+.Fn BUS_SETUP_INTR
+and
+.Fn BUS_TEARDOWN_INTR
+functions.
+But, in order to attach a handler, drivers must
+own the bus.
+Consequently, a ppbus request is mandatory in order to call the above
+functions (see existing drivers for more info).
+Note that the interrupt handler
+is automatically released when the ppbus is released.
+.Ss Microsequences
+.Em Microsequences
+is a general purpose mechanism to allow fast low-level
+manipulation of the parallel port.
+Microsequences may be used to do either
+standard (in IEEE1284 modes) or non-standard transfers.
+The philosophy of
+microsequences is to avoid the overhead of the ppbus layer and do most of
+the job at adapter level.
+.Pp
+A microsequence is an array of opcodes and parameters.
+Each opcode codes an
+operation (opcodes are described in
+.Xr microseq 9 ) .
+Standard I/O operations are implemented at ppbus level whereas basic I/O
+operations and microseq language are coded at adapter level for efficiency.
+.Pp
+As an example, the
+.Xr vpo 4
+driver uses microsequences to implement:
+.Bl -bullet -offset indent
+.It
+a modified version of the NIBBLE transfer mode
+.It
+various I/O sequences to initialize, select and allocate the peripheral
+.El
+.Sh SEE ALSO
+.Xr lpt 4 ,
+.Xr plip 4 ,
+.Xr ppc 4 ,
+.Xr ppi 4 ,
+.Xr vpo 4
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Nicolas Souchu .
diff --git a/share/man/man4/ppc.4 b/share/man/man4/ppc.4
new file mode 100644
index 0000000..9b96625
--- /dev/null
+++ b/share/man/man4/ppc.4
@@ -0,0 +1,136 @@
+.\" Copyright (c) 1998, 1999, Nicolas Souchu
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 5, 1998
+.Dt PPC 4
+.Os
+.Sh NAME
+.Nm ppc
+.Nd Parallel Port Chipset driver
+.Sh SYNOPSIS
+.Cd "device ppc"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.ppc.0.at="isa"
+.Cd hint.ppc.0.irq="7"
+.Pp
+For one or more PPBUS busses:
+.Cd "device ppbus"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides low level support to various parallel port chipsets for the
+.Xr ppbus 4
+system.
+.Pp
+During the probe phase,
+.Nm
+detects parallel port chipsets and initializes
+private data according to their operating mode: COMPATIBLE,
+NIBBLE, PS/2, EPP, ECP and other mixed modes.
+If a mode is provided at startup through the
+.Va flags
+variable of the boot
+interface, the operating mode of the chipset is forced according to
+.Va flags
+and the hardware supported modes.
+.Pp
+During the attach phase,
+.Nm
+allocates a ppbus structure, initializes it and calls the ppbus
+attach function.
+.Ss Supported flags
+.Bl -item -offset indent
+.It
+bits 0-3: chipset forced mode(s)
+.Bd -literal
+PPB_COMPATIBLE 0x0 /* Centronics compatible mode */
+PPB_NIBBLE 0x1 /* reverse 4 bit mode */
+PPB_PS2 0x2 /* PS/2 byte mode */
+PPB_EPP 0x4 /* EPP mode, 32 bit */
+PPB_ECP 0x8 /* ECP mode */
+.Ed
+.Pp
+And any mixed values.
+.It
+bit 4: EPP protocol (0 EPP 1.9, 1 EPP 1.7)
+.It
+bit 5: activate IRQ (1 IRQ disabled, 0 IRQ enabled)
+.It
+bit 6: disable chipset specific detection
+.It
+bit 7: disable FIFO detection
+.El
+.Ss Supported chipsets
+Some parallel port chipsets are explicitly supported:
+detection and initialisation code has been written according to
+their datasheets.
+.Bl -bullet -offset indent
+.It
+SMC FDC37C665GT and FDC37C666GT chipsets
+.It
+Natsemi PC873xx-family (PC87332 and PC87306)
+.It
+Winbond W83877xx-family (W83877F and W83877AF)
+.It
+SMC-like chipsets with mixed modes (see
+.Xr ppbus 4 )
+.El
+.Ss Adding support to a new chipset
+You may want to add support for the newest chipset your motherboard was
+sold with.
+For the ISA bus, just retrieve the specs of the chipset and write the
+corresponding
+.Fn ppc_mychipset_detect ""
+function.
+Then add an entry to the general purpose
+.Fn ppc_detect ""
+function.
+.Pp
+Your
+.Fn ppc_mychipset_detect ""
+function should ensure that if the mode field of the
+.Va flags
+boot variable is not null, then the operating
+mode is forced to the given mode and no other mode is available and
+ppb->ppb_avm field contains the available modes of the chipset.
+.Sh SEE ALSO
+.Xr ppbus 4 ,
+.Xr ppi 4 ,
+.Xr device.hints 5
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This manual page was written by
+.An Nicolas Souchu .
+.Sh BUGS
+The chipset detection process may corrupt your chipset configuration.
+You may
+disable chipset specific detection by using the above flags.
diff --git a/share/man/man4/ppi.4 b/share/man/man4/ppi.4
new file mode 100644
index 0000000..a4084ad
--- /dev/null
+++ b/share/man/man4/ppi.4
@@ -0,0 +1,107 @@
+.\" Copyright (c) 1997
+.\" Michael Smith
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS''
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 2, 1998
+.Dt PPI 4
+.Os
+.Sh NAME
+.Nm ppi
+.Nd "user-space interface to ppbus parallel 'geek' port"
+.Sh SYNOPSIS
+.Cd "device ppi"
+.Pp
+Minor numbering: unit numbers correspond directly to ppbus numbers.
+.Pp
+.In dev/ppbus/ppi.h
+.In dev/ppbus/ppbconf.h
+.Sh DESCRIPTION
+The
+.Nm
+driver provides a convenient means for user applications to manipulate the
+state of the parallel port, enabling easy low-speed I/O operations without
+the security problems inherent with the use of the
+.Pa /dev/io
+interface.
+.Sh PROGRAMMING INTERFACE
+All I/O on the
+.Nm
+interface is performed using
+.Fn ioctl
+calls.
+Each command takes a single
+.Ft uint8_t
+argument, transferring one byte of data.
+The following commands are available:
+.Bl -tag -width indent
+.It Dv PPIGDATA , PPISDATA
+Get and set the contents of the data register.
+.It Dv PPIGSTATUS , PPISSTATUS
+Get and set the contents of the status register.
+.It Dv PPIGCTRL , PPISCTRL
+Get and set the contents of the control register.
+The following defines correspond to bits in this register.
+Setting a bit in the control register drives the corresponding output low.
+.Bl -tag -width indent -compact
+.It Dv STROBE
+.It Dv AUTOFEED
+.It Dv nINIT
+.It Dv SELECTIN
+.It Dv PCD
+.El
+.It Dv PPIGEPP , PPISEPP
+Get and set the contents of the EPP control register.
+.It Dv PPIGECR , PPISECR
+Get and set the contents of the ECP control register.
+.It Dv PPIGFIFO , PPISFIFO
+Read and write the ECP FIFO (8-bit operations only).
+.El
+.Sh EXAMPLES
+To present the value 0x5a to the data port, drive STROBE low and then high
+again, the following code fragment can be used:
+.Bd -literal -compact
+
+ int fd;
+ uint8_t val;
+
+ val = 0x5a;
+ ioctl(fd, PPISDATA, &val);
+ ioctl(fd, PPIGCTRL, &val);
+ val |= STROBE;
+ ioctl(fd, PPISCTRL, &val);
+ val &= ~STROBE;
+ ioctl(fd, PPISCTRL, &val);
+
+.Ed
+.Sh BUGS
+The inverse sense of signals is confusing.
+.Pp
+The
+.Fn ioctl
+interface is slow, and there is no way (yet) to chain multiple operations together.
+.Pp
+The headers required for user applications are not installed as part of the
+standard system.
diff --git a/share/man/man4/procdesc.4 b/share/man/man4/procdesc.4
new file mode 100644
index 0000000..e6895b0
--- /dev/null
+++ b/share/man/man4/procdesc.4
@@ -0,0 +1,91 @@
+.\"
+.\" Copyright (c) 2013 Robert N. M. Watson
+.\" All rights reserved.
+.\"
+.\" This software was developed by SRI International and the University of
+.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+.\" ("CTSRD"), as part of the DARPA CRASH research programme.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 21, 2013
+.Dt PROCDESC 4
+.Os
+.Sh NAME
+.Nm procdesc
+.Nd process descriptor facility
+.Sh DESCRIPTION
+.Nm
+is a file-descriptor-oriented interface to process signalling and control,
+which supplements historic
+.Ux
+.Xr fork 2 ,
+.Xr kill 2 ,
+and
+.Xr wait4 2
+primitives with
+new system calls such as
+.Xr pdfork 2 ,
+.Xr pdkill 2 ,
+and
+.Xr pdwait4 2 .
+.Nm
+is designed for use with
+.Xr capsicum 4 ,
+replacing process identifiers with capability-oriented references.
+However, it can also be used independently of
+.Xr capsicum 4 ,
+displacing PIDs, which may otherwise suffer from race conditions.
+Given a process descriptor, it is possible to query its conventional PID using
+.Xr pdgetpid 2 .
+.Sh SEE ALSO
+.Xr fork 2 ,
+.Xr kill 2 ,
+.Xr pdfork 2 ,
+.Xr pdgetpid 2 ,
+.Xr pdkill 2 ,
+.Xr pdwait4 2 ,
+.Xr wait4 2 ,
+.Xr capsicum 4
+.Sh HISTORY
+.Nm
+first appeared in
+.Fx 9.0 ,
+and was developed at the University of Cambridge.
+.Sh AUTHORS
+.Nm
+was developed by
+.An -nosplit
+.An "Robert Watson" Aq rwatson@FreeBSD.org
+and
+.An "Jonathan Anderson" Aq jonathan@FreeBSD.org
+at the University of Cambridge, and
+.An "Ben Laurie" Aq benl@FreeBSD.org
+and
+.An "Kris Kennaway" Aq kris@FreeBSD.org
+at Google, Inc.
+.Sh BUGS
+.Nm
+is considered experimental in
+.Fx .
diff --git a/share/man/man4/proto.4 b/share/man/man4/proto.4
new file mode 100644
index 0000000..74aa49a
--- /dev/null
+++ b/share/man/man4/proto.4
@@ -0,0 +1,135 @@
+.\"
+.\" Copyright (c) 2014 Marcel Moolenaar
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 29, 2014
+.Dt PROTO 4
+.Os
+.\"
+.Sh NAME
+.Nm proto
+.Nd Driver for prototyping and H/W diagnostics
+.\"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device proto"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+proto_load="YES"
+.Ed
+.\"
+.Sh DESCRIPTION
+The
+.Nm
+device driver attaches to PCI devices when no other device drivers are
+present and creates device special files for all resources associated
+with the device.
+The driver itself has no knowledge of the device it attaches to.
+Programs can open these device special files and perform register-level
+reads and writes.
+As such, the
+.Nm
+device driver is nothing but a conduit or gateway between user space
+programs and the hardware device.
+.Pp
+Examples for why this is useful include hardware diagnostics and prototyping.
+In both these use cases, it is far more convenient to develop and run the
+logic in user space.
+Especially hardware diagnostics requires a somewhat user-friendly interface
+and adequate reporting.
+Neither is done easily as kernel code.
+.\"
+.Sh FILES
+All device special files corresponding to a PCI device are located under
+.Pa /dev/proto/pci<d>:<b>:<s>:<f>
+with
+.Pa pci<d>:<b>:<s>:<f>
+representing the location of the PCI device in the PCI hierarchy.
+A location includes:
+.Pp
+.Bl -tag -width XXXXXX -compact
+.It <d>
+The PCI domain number
+.It <b>
+The PCI bus number
+.It <s>
+The PCI slot or device number
+.It <f>
+The PCI function number
+.El
+.Pp
+Every PCI device has a device special file called
+.Pa pcicfg .
+This device special file gives access to the PCI configuration space.
+For each valid base address register (BAR), a device special file is created
+that contains the BAR offset and the resource type.
+A resource type can be either
+.Pa io
+or
+.Pa mem
+representing I/O port or memory mapped I/O space (resp.)
+.\"
+.Sh EXAMPLES
+A single function PCI device in domain 0, on bus 1, in slot 2 and having a
+single memory mapped I/O region will have the following device special files:
+.Pp
+.Bl -tag -width XXXXXX -compact
+.It Pa /dev/proto/pci0:1:2:0/10.mem
+.It Pa /dev/proto/pci0:1:2:0/pcicfg
+.El
+.\"
+.Sh AUTHORS
+The
+.Nm
+device driver and this manual page were written by
+.An Marcel Moolenaar Aq marcel@xcllnt.net .
+.Sh SECURITY CONSIDERATIONS
+Because programs have direct access to the hardware, the
+.Nm
+driver is inherently insecure.
+It is not advisable to use this driver on a production machine.
+.\"
+.Sh MISSING FUNCTIONALITY
+The
+.Nm
+driver does not yet support interrupts.
+Since interrupts cannot be handled by the driver itself, they must be converted
+into signals and delivered to the program that has registered for interrupts.
+.Pp
+In order to test the transmission or reception of data, some means of doing
+direct memory access (DMA) by the device must be possible.
+This too must be under the control of the program.
+The details of how a program can set up and
+initiate DMA still need to be fleshed out.
+.Pp
+Support for non-PCI devices has not been implemented yet.
diff --git a/share/man/man4/psm.4 b/share/man/man4/psm.4
new file mode 100644
index 0000000..6ecb65c
--- /dev/null
+++ b/share/man/man4/psm.4
@@ -0,0 +1,874 @@
+.\"
+.\" Copyright (c) 1997
+.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 18, 2013
+.Dt PSM 4
+.Os
+.Sh NAME
+.Nm psm
+.Nd PS/2 mouse style pointing device driver
+.Sh SYNOPSIS
+.Cd "options KBD_RESETDELAY=N"
+.Cd "options KBD_MAXWAIT=N"
+.Cd "options PSM_DEBUG=N"
+.Cd "options KBDIO_DEBUG=N"
+.Cd "device psm"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.psm.0.at="atkbdc"
+.Cd hint.psm.0.irq="12"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the PS/2 mouse style pointing device.
+Currently there can be only one
+.Nm
+device node in the system.
+As the PS/2 mouse port is located
+at the auxiliary port of the keyboard controller,
+the keyboard controller driver,
+.Nm atkbdc ,
+must also be configured in the kernel.
+Note that there is currently no provision of changing the
+.Em irq
+number.
+.Pp
+Basic PS/2 style pointing device has two or three buttons.
+Some devices may have a roller or a wheel and/or additional buttons.
+.Ss Device Resolution
+The PS/2 style pointing device usually has several grades of resolution,
+that is, sensitivity of movement.
+They are typically 25, 50, 100 and 200
+pulse per inch.
+Some devices may have finer resolution.
+The current resolution can be changed at runtime.
+The
+.Nm
+driver allows the user to initially set the resolution
+via the driver flag
+(see
+.Sx "DRIVER CONFIGURATION" )
+or change it later via the
+.Xr ioctl 2
+command
+.Dv MOUSE_SETMODE
+(see
+.Sx IOCTLS ) .
+.Ss Report Rate
+Frequency, or report rate, at which the device sends movement
+and button state reports to the host system is also configurable.
+The PS/2 style pointing device typically supports 10, 20, 40, 60, 80, 100
+and 200 reports per second.
+60 or 100 appears to be the default value for many devices.
+Note that when there is no movement and no button has changed its state,
+the device will not send anything to the host system.
+The report rate can be changed via an ioctl call.
+.Ss Operation Levels
+The
+.Nm
+driver has three levels of operation.
+The current operation level can be set via an ioctl call.
+.Pp
+At the level zero the basic support is provided; the device driver will report
+horizontal and vertical movement of the attached device
+and state of up to three buttons.
+The movement and status are encoded in a series of fixed-length data packets
+(see
+.Sx "Data Packet Format" ) .
+This is the default level of operation and the driver is initially
+at this level when opened by the user program.
+.Pp
+The operation level one, the `extended' level, supports a roller (or wheel),
+if any, and up to 11 buttons.
+The movement of the roller is reported as movement along the Z axis.
+8 byte data packets are sent to the user program at this level.
+.Pp
+At the operation level two, data from the pointing device is passed to the
+user program as is. Conversely, command from the user program is passed
+to the pointing device as is and the user program is responsible for
+status validation and error recovery.
+Modern PS/2 type pointing devices often use proprietary data format.
+Therefore, the user program is expected to have
+intimate knowledge about the format from a particular device when operating
+the driver at this level.
+This level is called `native' level.
+.Ss Data Packet Format
+Data packets read from the
+.Nm
+driver are formatted differently at each operation level.
+.Pp
+A data packet from the PS/2 mouse style pointing device
+is three bytes long at the operation level zero:
+.Pp
+.Bl -tag -width Byte_1 -compact
+.It Byte 1
+.Bl -tag -width bit_7 -compact
+.It bit 7
+One indicates overflow in the vertical movement count.
+.It bit 6
+One indicates overflow in the horizontal movement count.
+.It bit 5
+Set if the vertical movement count is negative.
+.It bit 4
+Set if the horizontal movement count is negative.
+.It bit 3
+Always one.
+.\" The ALPS GlidePoint clears this bit when the user `taps' the surface of
+.\" the pad, otherwise the bit is set.
+.\" Most, if not all, other devices always set this bit.
+.It bit 2
+Middle button status; set if pressed.
+For devices without the middle
+button, this bit is always zero.
+.It bit 1
+Right button status; set if pressed.
+.It bit 0
+Left button status; set if pressed.
+.El
+.It Byte 2
+Horizontal movement count in two's complement;
+-256 through 255.
+Note that the sign bit is in the first byte.
+.It Byte 3
+Vertical movement count in two's complement;
+-256 through 255.
+Note that the sign bit is in the first byte.
+.El
+.Pp
+At the level one, a data packet is encoded
+in the standard format
+.Dv MOUSE_PROTO_SYSMOUSE
+as defined in
+.Xr mouse 4 .
+.Pp
+At the level two, native level, there is no standard on the size and format
+of the data packet.
+.Ss Acceleration
+The
+.Nm
+driver can somewhat `accelerate' the movement of the pointing device.
+The faster you move the device, the further the pointer
+travels on the screen.
+The driver has an internal variable which governs the effect of
+the acceleration.
+Its value can be modified via the driver flag
+or via an ioctl call.
+.Sh DRIVER CONFIGURATION
+.Ss Kernel Configuration Options
+There are following kernel configuration options to control the
+.Nm
+driver.
+They may be set in the kernel configuration file
+(see
+.Xr config 8 ) .
+.Bl -tag -width MOUSE
+.It Em KBD_RESETDELAY=X , KBD_MAXWAIT=Y
+The
+.Nm
+driver will attempt to reset the pointing device during the boot process.
+It sometimes takes a long while before the device will respond after
+reset.
+These options control how long the driver should wait before
+it eventually gives up waiting.
+The driver will wait
+.Fa X
+*
+.Fa Y
+msecs at most.
+If the driver seems unable to detect your pointing
+device, you may want to increase these values.
+The default values are
+200 msec for
+.Fa X
+and 5
+for
+.Fa Y .
+.It Em PSM_DEBUG=N , KBDIO_DEBUG=N
+Sets the debug level to
+.Fa N .
+The default debug level is zero.
+See
+.Sx DIAGNOSTICS
+for debug logging.
+.El
+.Ss Driver Flags
+The
+.Nm
+driver accepts the following driver flags.
+Set them in
+.Pa /boot/device.hints
+(see
+.Sx EXAMPLES
+below).
+.Bl -tag -width MOUSE
+.It bit 0..3 RESOLUTION
+This flag specifies the resolution of the pointing device.
+It must be zero through four.
+The greater the value
+is, the finer resolution the device will select.
+Actual resolution selected by this field varies according to the model
+of the device.
+Typical resolutions are:
+.Pp
+.Bl -tag -width 0_(medium_high)__ -compact
+.It Em 1 (low)
+25 pulse per inch (ppi)
+.It Em 2 (medium low)
+50 ppi
+.It Em 3 (medium high)
+100 ppi
+.It Em 4 (high)
+200 ppi
+.El
+.Pp
+Leaving this flag zero will selects the default resolution for the
+device (whatever it is).
+.It bit 4..7 ACCELERATION
+This flag controls the amount of acceleration effect.
+The smaller the value of this flag is, more sensitive the movement becomes.
+The minimum value allowed, thus the value for the most sensitive setting,
+is one.
+Setting this flag to zero will completely disables the
+acceleration effect.
+.It bit 8 NOCHECKSYNC
+The
+.Nm
+driver tries to detect the first byte of the data packet by checking
+the bit pattern of that byte.
+Although this method should work with most
+PS/2 pointing devices, it may interfere with some devices which are not
+so compatible with known devices.
+If you think your pointing device is not functioning as expected,
+and the kernel frequently prints the following message to the console,
+.Bd -literal -offset indent
+psmintr: out of sync (xxxx != yyyy).
+.Ed
+.Pp
+set this flag to disable synchronization check and see if it helps.
+.It bit 9 NOIDPROBE
+The
+.Nm
+driver will not try to identify the model of the pointing device and
+will not carry out model-specific initialization.
+The device should always act like a standard PS/2 mouse without such
+initialization.
+Extra features, such as wheels and additional buttons, will not be
+recognized by the
+.Nm
+driver.
+.It bit 10 NORESET
+When this flag is set, the
+.Nm
+driver will not reset the pointing device when initializing the device.
+If the
+.Fx
+kernel
+is started after another OS has run, the pointing device will inherit
+settings from the previous OS.
+However, because there is no way for the
+.Nm
+driver to know the settings, the device and the driver may not
+work correctly.
+The flag should never be necessary under normal circumstances.
+.It bit 11 FORCETAP
+Some pad devices report as if the fourth button is pressed
+when the user `taps' the surface of the device (see
+.Sx CAVEATS ) .
+This flag will make the
+.Nm
+driver assume that the device behaves this way.
+Without the flag, the driver will assume this behavior
+for ALPS GlidePoint models only.
+.It bit 12 IGNOREPORTERROR
+This flag makes
+.Nm
+driver ignore certain error conditions when probing the PS/2 mouse port.
+It should never be necessary under normal circumstances.
+.It bit 13 HOOKRESUME
+The built-in PS/2 pointing device of some laptop computers is somehow
+not operable immediately after the system `resumes' from
+the power saving mode,
+though it will eventually become available.
+There are reports that
+stimulating the device by performing I/O will help
+waking up the device quickly.
+This flag will enable a piece of code in the
+.Nm
+driver to hook
+the `resume' event and exercise some harmless I/O operations on the
+device.
+.It bit 14 INITAFTERSUSPEND
+This flag adds more drastic action for the above problem.
+It will cause the
+.Nm
+driver to reset and re-initialize the pointing device
+after the `resume' event.
+.El
+.Sh LOADER TUNABLES
+Extended support for Synaptics touchpads can be enabled by setting
+.Va hw.psm.synaptics_support
+to
+.Em 1
+at boot-time.
+This will enable
+.Nm
+to handle packets from guest devices (sticks) and extra buttons.
+Similarly, extended support for IBM/Lenovo TrackPoint can be enabled
+by setting
+.Va hw.psm.trackpoint_support
+to
+.Em 1
+at boot-time.
+.Pp
+Tap and drag gestures can be disabled by setting
+.Va hw.psm.tap_enabled
+to
+.Em 0
+at boot-time.
+Currently, this is only supported on Synaptics touchpads with Extended
+support disabled. The behaviour may be changed after boot by setting
+the sysctl with the same name and by restarting
+.Xr moused 8
+using
+.Pa /etc/rc.d/moused .
+.Sh IOCTLS
+There are a few
+.Xr ioctl 2
+commands for mouse drivers.
+These commands and related structures and constants are defined in
+.In sys/mouse.h .
+General description of the commands is given in
+.Xr mouse 4 .
+This section explains the features specific to the
+.Nm
+driver.
+.Pp
+.Bl -tag -width MOUSE -compact
+.It Dv MOUSE_GETLEVEL Ar int *level
+.It Dv MOUSE_SETLEVEL Ar int *level
+These commands manipulate the operation level of the
+.Nm
+driver.
+.Pp
+.It Dv MOUSE_GETHWINFO Ar mousehw_t *hw
+Returns the hardware information of the attached device in the following
+structure.
+.Bd -literal
+typedef struct mousehw {
+ int buttons; /* number of buttons */
+ int iftype; /* I/F type */
+ int type; /* mouse/track ball/pad... */
+ int model; /* I/F dependent model ID */
+ int hwid; /* I/F dependent hardware ID */
+} mousehw_t;
+.Ed
+.Pp
+The
+.Dv buttons
+field holds the number of buttons on the device.
+The
+.Nm
+driver currently can detect the 3 button mouse from Logitech and report
+accordingly.
+The 3 button mouse from the other manufacturer may or may not be
+reported correctly.
+However, it will not affect the operation of
+the driver.
+.Pp
+The
+.Dv iftype
+is always
+.Dv MOUSE_IF_PS2 .
+.Pp
+The
+.Dv type
+tells the device type:
+.Dv MOUSE_MOUSE ,
+.Dv MOUSE_TRACKBALL ,
+.Dv MOUSE_STICK ,
+.Dv MOUSE_PAD ,
+or
+.Dv MOUSE_UNKNOWN .
+The user should not heavily rely on this field, as the
+driver may not always, in fact it is very rarely able to, identify
+the device type.
+.Pp
+The
+.Dv model
+is always
+.Dv MOUSE_MODEL_GENERIC
+at the operation level 0.
+It may be
+.Dv MOUSE_MODEL_GENERIC
+or one of
+.Dv MOUSE_MODEL_XXX
+constants at higher operation levels.
+Again the
+.Nm
+driver may or may not set an appropriate value in this field.
+.Pp
+The
+.Dv hwid
+is the ID value returned by the device.
+Known IDs include:
+.Pp
+.Bl -tag -width 0__ -compact
+.It Em 0
+Mouse (Microsoft, Logitech and many other manufacturers)
+.It Em 2
+Microsoft Ballpoint mouse
+.It Em 3
+Microsoft IntelliMouse
+.El
+.Pp
+.It Dv MOUSE_SYN_GETHWINFO Ar synapticshw_t *synhw
+Retrieves extra information associated with Synaptics Touchpad.
+Only available when a supported device has been detected.
+.Bd -literal
+typedef struct synapticshw {
+ int infoMajor; /* major hardware revision */
+ int infoMinor; /* minor hardware revision */
+ int infoRot180; /* touchpad is rotated */
+ int infoPortrait; /* touchpad is a portrait */
+ int infoSensor; /* sensor model */
+ int infoHardware; /* hardware model */
+ int infoNewAbs; /* supports the newabs format */
+ int capPen; /* can detect a pen */
+ int infoSimplC; /* supports simple commands */
+ int infoGeometry; /* touchpad dimensions */
+ int capExtended; /* supports extended packets */
+ int capSleep; /* can be suspended/resumed */
+ int capFourButtons; /* has four buttons */
+ int capMultiFinger; /* can detect multiple fingers */
+ int capPalmDetect; /* can detect a palm */
+ int capPassthrough; /* can passthrough guest packets */
+ int capMiddle; /* has a physical middle button */
+ int nExtendedButtons; /* has N additionnal buttons */
+ int nExtendedQueries; /* supports N extended queries */
+} synapticshw_t;
+.Ed
+.Pp
+See the
+.Em Synaptics TouchPad Interfacing Guide
+for more information about the fields in this structure.
+.Pp
+.It Dv MOUSE_GETMODE Ar mousemode_t *mode
+The command gets the current operation parameters of the mouse
+driver.
+.Bd -literal
+typedef struct mousemode {
+ int protocol; /* MOUSE_PROTO_XXX */
+ int rate; /* report rate (per sec), -1 if unknown */
+ int resolution; /* MOUSE_RES_XXX, -1 if unknown */
+ int accelfactor; /* acceleration factor */
+ int level; /* driver operation level */
+ int packetsize; /* the length of the data packet */
+ unsigned char syncmask[2]; /* sync. bits */
+} mousemode_t;
+.Ed
+.Pp
+The
+.Dv protocol
+is
+.Dv MOUSE_PROTO_PS2
+at the operation level zero and two.
+.Dv MOUSE_PROTO_SYSMOUSE
+at the operation level one.
+.Pp
+The
+.Dv rate
+is the status report rate (reports/sec) at which the device will send
+movement report to the host computer.
+Typical supported values are 10, 20, 40, 60, 80, 100 and 200.
+Some mice may accept other arbitrary values too.
+.Pp
+The
+.Dv resolution
+of the pointing device must be one of
+.Dv MOUSE_RES_XXX
+constants or a positive value.
+The greater the value
+is, the finer resolution the mouse will select.
+Actual resolution selected by the
+.Dv MOUSE_RES_XXX
+constant varies according to the model of mouse.
+Typical resolutions are:
+.Pp
+.Bl -tag -width MOUSE_RES_MEDIUMHIGH__ -compact
+.It Dv MOUSE_RES_LOW
+25 ppi
+.It Dv MOUSE_RES_MEDIUMLOW
+50 ppi
+.It Dv MOUSE_RES_MEDIUMHIGH
+100 ppi
+.It Dv MOUSE_RES_HIGH
+200 ppi
+.El
+.Pp
+The
+.Dv accelfactor
+field holds a value to control acceleration feature
+(see
+.Sx Acceleration ) .
+It must be zero or greater.
+If it is zero, acceleration is disabled.
+.Pp
+The
+.Dv packetsize
+field specifies the length of the data packet.
+It depends on the
+operation level and the model of the pointing device.
+.Pp
+.Bl -tag -width level_0__ -compact
+.It Em level 0
+3 bytes
+.It Em level 1
+8 bytes
+.It Em level 2
+Depends on the model of the device
+.El
+.Pp
+The array
+.Dv syncmask
+holds a bit mask and pattern to detect the first byte of the
+data packet.
+.Dv syncmask[0]
+is the bit mask to be ANDed with a byte.
+If the result is equal to
+.Dv syncmask[1] ,
+the byte is likely to be the first byte of the data packet.
+Note that this detection method is not 100% reliable,
+thus, should be taken only as an advisory measure.
+.Pp
+.It Dv MOUSE_SETMODE Ar mousemode_t *mode
+The command changes the current operation parameters of the mouse driver
+as specified in
+.Ar mode .
+Only
+.Dv rate ,
+.Dv resolution ,
+.Dv level
+and
+.Dv accelfactor
+may be modifiable.
+Setting values in the other field does not generate
+error and has no effect.
+.Pp
+If you do not want to change the current setting of a field, put -1
+there.
+You may also put zero in
+.Dv resolution
+and
+.Dv rate ,
+and the default value for the fields will be selected.
+.\" .Pp
+.\" .It Dv MOUSE_GETVARS Ar mousevar_t *vars
+.\" .It Dv MOUSE_SETVARS Ar mousevar_t *vars
+.\" These commands are not supported by the
+.\" .Nm
+.\" driver.
+.Pp
+.It Dv MOUSE_READDATA Ar mousedata_t *data
+.\" The command reads the raw data from the device.
+.\" .Bd -literal
+.\" typedef struct mousedata {
+.\" int len; /* # of data in the buffer */
+.\" int buf[16]; /* data buffer */
+.\" } mousedata_t;
+.\" .Ed
+.\" .Pp
+.\" Upon returning to the user program, the driver will place the number
+.\" of valid data bytes in the buffer in the
+.\" .Dv len
+.\" field.
+.\" .Pp
+.It Dv MOUSE_READSTATE Ar mousedata_t *state
+.\" The command reads the hardware settings from the device.
+.\" Upon returning to the user program, the driver will place the number
+.\" of valid data bytes in the buffer in the
+.\" .Dv len
+.\" field. It is usually 3 bytes.
+.\" The buffer is formatted as follows:
+.\" .Pp
+.\" .Bl -tag -width Byte_1 -compact
+.\" .It Byte 1
+.\" .Bl -tag -width bit_6 -compact
+.\" .It bit 7
+.\" Reserved.
+.\" .It bit 6
+.\" 0 - stream mode, 1 - remote mode.
+.\" In the stream mode, the pointing device sends the device status
+.\" whenever its state changes. In the remote mode, the host computer
+.\" must request the status to be sent.
+.\" The
+.\" .Nm
+.\" driver puts the device in the stream mode.
+.\" .It bit 5
+.\" Set if the pointing device is currently enabled. Otherwise zero.
+.\" .It bit 4
+.\" 0 - 1:1 scaling, 1 - 2:1 scaling.
+.\" 1:1 scaling is the default.
+.\" .It bit 3
+.\" Reserved.
+.\" .It bit 2
+.\" Left button status; set if pressed.
+.\" .It bit 1
+.\" Middle button status; set if pressed.
+.\" .It bit 0
+.\" Right button status; set if pressed.
+.\" .El
+.\" .It Byte 2
+.\" .Bl -tag -width bit_6_0 -compact
+.\" .It bit 7
+.\" Reserved.
+.\" .It bit 6..0
+.\" Resolution code: zero through three. Actual resolution for
+.\" the resolution code varies from one device to another.
+.\" .El
+.\" .It Byte 3
+.\" The status report rate (reports/sec) at which the device will send
+.\" movement report to the host computer.
+.\" .El
+These commands are not currently supported by the
+.Nm
+driver.
+.Pp
+.It Dv MOUSE_GETSTATUS Ar mousestatus_t *status
+The command returns the current state of buttons and
+movement counts as described in
+.Xr mouse 4 .
+.El
+.Sh FILES
+.Bl -tag -width /dev/npsm0 -compact
+.It Pa /dev/psm0
+`non-blocking' device node
+.It Pa /dev/bpsm0
+`blocking' device node
+.El
+.Sh EXAMPLES
+In order to install the
+.Nm
+driver, you need to add
+.Pp
+.Dl "device atkbdc"
+.Dl "device psm"
+.Pp
+to your kernel configuration file, and put the following lines to
+.Pa /boot/device.hints .
+.Pp
+.Dl hint.atkbdc.0.at="isa"
+.Dl hint.atkbdc.0.port="0x060"
+.Dl hint.psm.0.at="atkbdc"
+.Dl hint.psm.0.irq="12"
+.Pp
+If you add the following statement to
+.Pa /boot/device.hints ,
+.Pp
+.Dl hint.psm.0.flags="0x2000"
+.Pp
+you will add the optional code to stimulate the pointing device
+after the `resume' event.
+.Pp
+.Dl hint.psm.0.flags="0x24"
+.Pp
+The above line will set the device resolution high (4)
+and the acceleration factor to 2.
+.Sh DIAGNOSTICS
+At debug level 0, little information is logged except for the following
+line during boot process:
+.Bd -literal -offset indent
+psm0: device ID X
+.Ed
+.Pp
+where
+.Fa X
+the device ID code returned by the found pointing device.
+See
+.Dv MOUSE_GETINFO
+for known IDs.
+.Pp
+At debug level 1 more information will be logged
+while the driver probes the auxiliary port (mouse port).
+Messages are logged with the LOG_KERN facility at the LOG_DEBUG level
+(see
+.Xr syslogd 8 ) .
+.Bd -literal -offset indent
+psm0: current command byte:xxxx
+kbdio: TEST_AUX_PORT status:0000
+kbdio: RESET_AUX return code:00fa
+kbdio: RESET_AUX status:00aa
+kbdio: RESET_AUX ID:0000
+[...]
+psm: status 00 02 64
+psm0 irq 12 on isa
+psm0: model AAAA, device ID X, N buttons
+psm0: config:00000www, flags:0000uuuu, packet size:M
+psm0: syncmask:xx, syncbits:yy
+.Ed
+.Pp
+The first line shows the command byte value of the keyboard
+controller just before the auxiliary port is probed.
+It usually is 40, 45, 47 or 65, depending on how the motherboard BIOS
+initialized the keyboard controller upon power-up.
+.Pp
+The second line shows the result of the keyboard controller's
+test on the auxiliary port interface, with zero indicating
+no error; note that some controllers report no error even if
+the port does not exist in the system, however.
+.Pp
+The third through fifth lines show the reset status of the pointing device.
+The functioning device should return the sequence of FA AA <ID>.
+The ID code is described above.
+.Pp
+The seventh line shows the current hardware settings.
+.\" See
+.\" .Dv MOUSE_READSTATE
+.\" for definitions.
+These bytes are formatted as follows:
+.Pp
+.Bl -tag -width Byte_1 -compact
+.It Byte 1
+.Bl -tag -width bit_6 -compact
+.It bit 7
+Reserved.
+.It bit 6
+0 - stream mode, 1 - remote mode.
+In the stream mode, the pointing device sends the device status
+whenever its state changes.
+In the remote mode, the host computer
+must request the status to be sent.
+The
+.Nm
+driver puts the device in the stream mode.
+.It bit 5
+Set if the pointing device is currently enabled.
+Otherwise zero.
+.It bit 4
+0 - 1:1 scaling, 1 - 2:1 scaling.
+1:1 scaling is the default.
+.It bit 3
+Reserved.
+.It bit 2
+Left button status; set if pressed.
+.It bit 1
+Middle button status; set if pressed.
+.It bit 0
+Right button status; set if pressed.
+.El
+.It Byte 2
+.Bl -tag -width bit_6_0 -compact
+.It bit 7
+Reserved.
+.It bit 6..0
+Resolution code: zero through three.
+Actual resolution for
+the resolution code varies from one device to another.
+.El
+.It Byte 3
+The status report rate (reports/sec) at which the device will send
+movement report to the host computer.
+.El
+.Pp
+Note that the pointing device will not be enabled until the
+.Nm
+driver is opened by the user program.
+.Pp
+The rest of the lines show the device ID code, the number of detected
+buttons and internal variables.
+.Pp
+At debug level 2, much more detailed information is logged.
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr syslog 3 ,
+.Xr atkbdc 4 ,
+.Xr mouse 4 ,
+.Xr mse 4 ,
+.Xr sysmouse 4 ,
+.Xr moused 8 ,
+.Xr syslogd 8
+.Rs
+.%T Synaptics TouchPad Interfacing Guide
+.%U http://www.synaptics.com/
+.Re
+.\".Sh HISTORY
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver is based on the work done by quite a number of people, including
+.An Eric Forsberg ,
+.An Sandi Donno ,
+.An Rick Macklem ,
+.An Andrew Herbert ,
+.An Charles Hannum ,
+.An Shoji Yuen
+and
+.An Kazutaka Yokota
+to name the few.
+.Pp
+This manual page was written by
+.An Kazutaka Yokota Aq yokota@FreeBSD.org .
+.Sh CAVEATS
+Many pad devices behave as if the first (left) button were pressed if
+the user `taps' the surface of the pad.
+In contrast, some pad products, e.g.\& some versions of ALPS GlidePoint
+and Interlink VersaPad, treat the tapping action
+as fourth button events.
+.Pp
+It is reported that ALPS GlidePoint, Synaptics Touchpad, IBM/Lenovo
+TrackPoint, and Interlink VersaPad require
+.Em INITAFTERSUSPEND
+flag in order to recover from suspended state.
+This flag is automatically set when one of these devices is detected by the
+.Nm
+driver.
+.Pp
+Some PS/2 mouse models from MouseSystems require to be put in the
+high resolution mode to work properly.
+Use the driver flag to
+set resolution.
+.Pp
+There is not a guaranteed way to re-synchronize with the first byte
+of the packet once we are out of synchronization with the data
+stream.
+However, if you are using the \fIXFree86\fP server and experiencing
+the problem, you may be able to make the X server synchronize with the mouse
+by switching away to a virtual terminal and getting back to the X server,
+unless the X server is accessing the mouse via
+.Xr moused 8 .
+Clicking any button without moving the mouse may also work.
+.Sh BUGS
+The ioctl command
+.Dv MOUSEIOCREAD
+has been removed.
+It was never functional anyway.
+.Pp
+Enabling the extended support for Synaptics touchpads has been reported to
+cause problems with responsivity on some (newer) models of Synaptics
+hardware, particularly those with guest devices.
diff --git a/share/man/man4/pst.4 b/share/man/man4/pst.4
new file mode 100644
index 0000000..3ce95d8
--- /dev/null
+++ b/share/man/man4/pst.4
@@ -0,0 +1,76 @@
+.\"
+.\" Copyright (c) 2001,2002 Søren Schmidt
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 14, 2004
+.Dt PST 4
+.Os
+.Sh NAME
+.Nm pst
+.Nd device driver for Promise Supertrak SX6000
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pst"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+pst_load="YES"
+.Ed
+.Sh DESCRIPTION
+This driver is for the Promise Supertrak SX6000 ATA hardware RAID controller.
+It supports (in hardware) RAID levels 0, 1, 0+1, 3, 5 and JBOD on up to
+6 ATA disk drives, including automatic rebuild and hotswap, and supports
+signalling disk status on LEDs on Promise Superswap disk enclosures.
+The Supertrak line of controllers does not support non-disk devices.
+.Sh HARDWARE
+The
+.Nm
+driver supports the Promise Supertrak SX6000 ATA hardware RAID
+controller.
+.Sh NOTES
+The
+.Nm
+driver does not support manipulating the RAID from the OS, RAIDs need
+to be set up from the onboard BIOS.
+However, hot swap, hot spare, and
+automatic rebuilds are supported without a reboot.
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.7 .
+.Sh AUTHORS
+The
+.Nm
+driver and man page was written by
+.An S\(/oren Schmidt
+.Aq sos@FreeBSD.org .
diff --git a/share/man/man4/pt.4 b/share/man/man4/pt.4
new file mode 100644
index 0000000..4400af9
--- /dev/null
+++ b/share/man/man4/pt.4
@@ -0,0 +1,91 @@
+.\" Copyright (c) 1995
+.\" Peter Dufault, All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 2, 1995
+.Dt PT 4
+.Os
+.Sh NAME
+.Nm pt
+.Nd SCSI processor type driver
+.Sh SYNOPSIS
+.Cd device pt
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for a
+.Tn SCSI
+processor type device.
+These are usually scanners and other devices using the
+.Tn SCSI
+link as a communication interface with device
+specific commands embedded in the data stream.
+.Pp
+A
+.Tn SCSI
+adapter must be separately configured into the system
+before this driver can be used.
+.Pp
+This device supports
+.Xr read 2
+and
+.Xr write 2 ,
+and the
+.Xr ioctl 2
+calls described below.
+.Sh IOCTLS
+The following
+.Xr ioctl 2
+calls are supported by the
+.Nm
+driver.
+They are defined in the header file
+.In sys/ptio.h .
+.Bl -tag -width 012345678901234
+.It PTIOCGETTIMEOUT
+This ioctl allows userland applications to fetch the current
+.Nm
+driver read and write timeout.
+The value returned is in seconds.
+.It PTIOCSETTIMEOUT
+This ioctl allows userland applications to set the current
+.Nm
+driver read and write timeouts.
+The value should be in seconds.
+.El
+.Sh FILES
+.Bl -tag -width /dev/ptQQQ -compact
+.It Pa /dev/pt Ns Ar N
+the
+.Ar N Ns th processor device.
+.El
+.Sh SEE ALSO
+.Xr cam 4
+.Sh HISTORY
+The
+.Nm
+driver appeared in
+.Fx 2.1 .
diff --git a/share/man/man4/pts.4 b/share/man/man4/pts.4
new file mode 100644
index 0000000..e9aaaaa
--- /dev/null
+++ b/share/man/man4/pts.4
@@ -0,0 +1,158 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)pty.4 8.2 (Berkeley) 11/30/93
+.\" $FreeBSD$
+.\"
+.Dd August 20, 2008
+.Dt PTS 4
+.Os
+.Sh NAME
+.Nm pts
+.Nd pseudo-terminal driver
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for a device-pair termed a
+.Em pseudo-terminal .
+A pseudo-terminal is a pair of character devices, a
+.Em master
+device and a
+.Em slave
+device.
+The slave device provides to a process an interface identical
+to that described in
+.Xr tty 4 .
+However, whereas all other devices which provide the
+interface described in
+.Xr tty 4
+have a hardware device of some sort behind them, the slave
+device has, instead, another process manipulating
+it through the master half of the pseudo-terminal.
+That is, anything written on the master device is
+given to the slave device as input and anything written
+on the slave device is presented as input on the master
+device.
+.Pp
+The following
+.Xr ioctl 2
+calls apply only to pseudo-terminals:
+.Bl -tag -width TIOCPTMASTER
+.It Dv TIOCPKT
+Enable/disable
+.Em packet
+mode.
+Packet mode is enabled by specifying (by reference)
+a nonzero parameter and disabled by specifying (by reference)
+a zero parameter.
+When applied to the master side of a pseudo-terminal, each subsequent
+.Xr read 2
+from the terminal will return data written on the slave part of
+the pseudo-terminal preceded by a zero byte (symbolically
+defined as
+.Dv TIOCPKT_DATA ) ,
+or a single byte reflecting control
+status information.
+In the latter case, the byte is an inclusive-or
+of zero or more of the bits:
+.Bl -tag -width TIOCPKT_FLUSHWRITE
+.It Dv TIOCPKT_FLUSHREAD
+whenever the read queue for the terminal is flushed.
+.It Dv TIOCPKT_FLUSHWRITE
+whenever the write queue for the terminal is flushed.
+.It Dv TIOCPKT_STOP
+whenever output to the terminal is stopped a la
+.Ql ^S .
+.It Dv TIOCPKT_START
+whenever output to the terminal is restarted.
+.It Dv TIOCPKT_DOSTOP
+whenever
+.Dv VSTOP
+is
+.Ql ^S
+and
+.Dv VSTART
+is
+.Ql ^Q .
+.It Dv TIOCPKT_NOSTOP
+whenever the start and stop characters are not
+.Ql ^S/^Q .
+.El
+.Pp
+While this mode is in use, the presence of control status information
+to be read from the master side may be detected by a
+.Xr select 2
+for exceptional conditions.
+.Pp
+This mode is used by
+.Xr rlogin 1
+and
+.Xr rlogind 8
+to implement a remote-echoed, locally
+.Ql ^S/^Q
+flow-controlled
+remote login with proper back-flushing of output; it can be
+used by other similar programs.
+.It Dv TIOCGPTN
+Obtain device unit number, which can be used to generate the filename of
+the pseudo-terminal slave device. This
+.Xr ioctl 2
+should not be used directly. Instead, the
+.Xr ptsname 3
+function should be used.
+.It Dv TIOCPTMASTER
+Determine whether the file descriptor is pointing to a pseudo-terminal
+master device.
+This
+.Xr ioctl 2
+should not be used directly. It is used to implement routines like
+.Xr grantpt 3 .
+.El
+.Sh FILES
+The files used by this
+pseudo-terminals implementation are:
+.Bl -tag -width ".Pa /dev/pts/[num]"
+.It Pa /dev/pts/[num]
+Pseudo-terminal slave devices.
+.El
+.Sh DIAGNOSTICS
+None.
+.Sh SEE ALSO
+.Xr grantpt 3 ,
+.Xr posix_openpt 2 ,
+.Xr ptsname 3 ,
+.Xr pty 4 ,
+.Xr tty 4
+.Sh HISTORY
+A
+pseudo-terminal driver appeared in
+.Bx 4.2 .
+In
+.Fx 8.0 ,
+it was replaced with the
+.Nm
+driver.
diff --git a/share/man/man4/pty.4 b/share/man/man4/pty.4
new file mode 100644
index 0000000..80b584f
--- /dev/null
+++ b/share/man/man4/pty.4
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Portions of this software were developed under sponsorship from Snow
+.\" B.V., the Netherlands.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 20, 2008
+.Dt PTY 4
+.Os
+.Sh NAME
+.Nm pty
+.Nd BSD-style and System V-style compatibility pseudo-terminal driver
+.Sh SYNOPSIS
+.Cd "device pty"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the traditional BSD naming scheme that was
+used for accessing pseudo-terminals.
+When the device
+.Pa /dev/ptyXX
+is being opened, a new terminal shall be created with the
+.Xr pts 4
+driver.
+A device node for this terminal shall be created, which has the name
+.Pa /dev/ttyXX .
+.Pp
+The
+.Nm
+driver also provides a cloning System V
+.Pa /dev/ptmx
+device.
+.Pp
+New code should not try to allocate pseudo-terminals using this
+interface.
+It is only provided for compatibility with older C libraries
+that tried to open such devices when
+.Xr posix_openpt 2
+was being called.
+.Sh FILES
+The BSD-style compatibility pseudo-terminal driver uses the following
+device names:
+.Bl -tag -width ".Pa /dev/pty[l-sL-S][0-9a-v]"
+.It Pa /dev/pty[l-sL-S][0-9a-v]
+Pseudo-terminal master devices.
+.It Pa /dev/tty[l-sL-S][0-9a-v]
+Pseudo-terminal slave devices.
+.It Pa /dev/ptmx
+Control device, returns a file descriptor to a new master
+pseudo-terminal when opened.
+.El
+.Sh DIAGNOSTICS
+None.
+.Sh SEE ALSO
+.Xr posix_openpt 2 ,
+.Xr pts 4 ,
+.Xr tty 4
+.Sh HISTORY
+A
+pseudo-terminal driver appeared in
+.Bx 4.2 .
+.Sh BUGS
+Unlike previous implementations, the master and slave device nodes are
+destroyed when the PTY becomes unused.
+A call to
+.Xr stat 2
+on a nonexistent master device will already cause a new master device
+node to be created.
+The master device can only be destroyed by opening and closing it.
+.Pp
+The
+.Nm
+driver cannot be unloaded, because it cannot determine if it is being
+used.
diff --git a/share/man/man4/puc.4 b/share/man/man4/puc.4
new file mode 100644
index 0000000..34880cd
--- /dev/null
+++ b/share/man/man4/puc.4
@@ -0,0 +1,57 @@
+.\" Copyright (c) 2002 John Hay.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 24, 2008
+.Dt PUC 4
+.Os
+.Sh NAME
+.Nm puc
+.Nd PCI
+.Dq Universal
+Communications driver
+.Sh SYNOPSIS
+.Cd "device pci"
+.Cd "device puc"
+.Cd "device uart"
+.Cd "device ppc"
+.Sh DESCRIPTION
+This driver acts as a shim to connect PCI serial and parallel ports to the
+.Xr uart 4
+and
+.Xr ppc 4
+driver.
+.Pp
+The list of supported devices is in
+.Pa sys/dev/puc/pucdata.c .
+Support for new cards should be added there.
+.Sh SEE ALSO
+.Xr ppc 4 ,
+.Xr uart 4
+.Sh HISTORY
+This driver took the idea from the
+.Nx
+.Xr puc 4
+driver.
diff --git a/share/man/man4/qlxgb.4 b/share/man/man4/qlxgb.4
new file mode 100644
index 0000000..c76386f
--- /dev/null
+++ b/share/man/man4/qlxgb.4
@@ -0,0 +1,93 @@
+.\"-
+.\" Copyright (c) 2011 "Bjoern A. Zeeb" <bz@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 3, 2011
+.Dt QLXGB 4
+.Os
+.Sh NAME
+.Nm qlxgb
+.Nd "QLogic 10 Gigabit Ethernet & CNA Adapter Driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device qlxgb"
+.Ed
+.Pp
+To load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_qlxgb_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports IPv4 checksum offload,
+TCP and UDP checksum offload for both IPv4 and IPv6,
+Large Segment Offload for both IPv4 and IPv6,
+Jumbo frames, VLAN Tag, and
+Receive Side scaling.
+For further hardware information, see
+.Pa http://www.qlogic.com/ .
+.Sh HARDWARE
+The
+.Nm
+driver supports 10 Gigabit Ethernet & CNA Adapter based on the following
+chipsets:
+.Pp
+.Bl -bullet -compact
+.It
+QLogic 3200 series
+.It
+QLogic 8200 series
+.El
+.Sh SUPPORT
+For support questions please contact your QLogic approved reseller or
+QLogic Technical Support at
+.Pa http://support.qlogic.com ,
+or by E-mail at
+.Aq support@qlogic.com .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An David C Somayajulu
+at QLogic Corporation.
diff --git a/share/man/man4/qlxgbe.4 b/share/man/man4/qlxgbe.4
new file mode 100644
index 0000000..888a575
--- /dev/null
+++ b/share/man/man4/qlxgbe.4
@@ -0,0 +1,91 @@
+.\"-
+.\" Copyright (c) 2013 Qlogic Corportaion
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 1, 2013
+.Dt QLXGBE 4
+.Os
+.Sh NAME
+.Nm qlxgbe
+.Nd "QLogic 10 Gigabit Ethernet & CNA Adapter Driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device qlxgbe"
+.Ed
+.Pp
+To load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_qlxgbe_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports IPv4 checksum offload,
+TCP and UDP checksum offload for both IPv4 and IPv6,
+Large Segment Offload for both IPv4 and IPv6,
+Jumbo frames, VLAN Tag, and
+Receive Side scaling.
+For further hardware information, see
+.Pa http://www.qlogic.com/ .
+.Sh HARDWARE
+The
+.Nm
+driver supports 10 Gigabit Ethernet & CNA Adapter based on the following
+chipsets:
+.Pp
+.Bl -bullet -compact
+.It
+QLogic 8300 series
+.El
+.Sh SUPPORT
+For support questions please contact your QLogic approved reseller or
+QLogic Technical Support at
+.Pa http://support.qlogic.com ,
+or by E-mail at
+.Aq support@qlogic.com .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An David C Somayajulu
+at QLogic Corporation.
diff --git a/share/man/man4/qlxge.4 b/share/man/man4/qlxge.4
new file mode 100644
index 0000000..01d2c05
--- /dev/null
+++ b/share/man/man4/qlxge.4
@@ -0,0 +1,91 @@
+.\"-
+.\" Copyright (c) 2013-2014 Qlogic Corporation
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 21, 2013
+.Dt QLXGE 4
+.Os
+.Sh NAME
+.Nm qlxge
+.Nd "QLogic 8100 Series 10 Gigabit Ethernet Adapter Driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device qlxge"
+.Ed
+.Pp
+To load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_qlxge_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports IPv4 checksum offload,
+TCP and UDP checksum offload for both IPv4 and IPv6,
+Large Segment Offload for both IPv4 and IPv6,
+Jumbo frames, VLAN Tag, and
+Receive Side scaling.
+For further hardware information, see
+.Pa http://www.qlogic.com/ .
+.Sh HARDWARE
+The
+.Nm
+driver supports 10 Gigabit Ethernet & CNA Adapter based on the following
+chipsets:
+.Pp
+.Bl -bullet -compact
+.It
+QLogic 8100 series
+.El
+.Sh SUPPORT
+For support questions please contact your QLogic approved reseller or
+QLogic Technical Support at
+.Pa http://support.qlogic.com ,
+or by E-mail at
+.Aq support@qlogic.com .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An David C Somayajulu
+at QLogic Corporation.
diff --git a/share/man/man4/ral.4 b/share/man/man4/ral.4
new file mode 100644
index 0000000..f2a2bd1
--- /dev/null
+++ b/share/man/man4/ral.4
@@ -0,0 +1,295 @@
+.\" Copyright (c) 2005-2010 Damien Bergamini <damien.bergamini@free.fr>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 10, 2012
+.Dt RAL 4
+.Os
+.Sh NAME
+.Nm ral
+.Nd "Ralink Technology IEEE 802.11a/g/n wireless network device"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ral"
+.Cd "device ralfw"
+.Cd "device wlan"
+.Cd "device wlan_amrr"
+.Cd "device firmware"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ral_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports PCI/PCIe/CardBus wireless adapters based on the Ralink RT2500,
+RT2501, RT2600, RT2700, RT2800 and RT3090 chipsets.
+.Pp
+The RT2500 chipset is the first generation of 802.11b/g adapters from Ralink.
+It consists of two integrated chips, an RT2560 MAC/BBP and an RT2525 radio
+transceiver.
+.Pp
+The RT2501 chipset is the second generation of 802.11a/b/g adapters from
+Ralink.
+It consists of two integrated chips, an RT2561 MAC/BBP and an RT2527 radio
+transceiver.
+This chipset provides support for the IEEE 802.11e standard with multiple
+hardware transmission queues and allows scatter/gather for efficient DMA
+operations.
+.Pp
+The RT2600 chipset consists of two integrated chips, an RT2661 MAC/BBP and an
+RT2529 radio transceiver.
+This chipset uses the MIMO (multiple-input multiple-output) technology with
+multiple radio transceivers to extend the operating range of the adapter and
+to achieve higher throughput.
+However, the RT2600 chipset does not support any of the 802.11n features.
+.Pp
+The RT2700 chipset is a low-cost version of the RT2800 chipset.
+It supports a single transmit path and two receiver paths (1T2R).
+It consists of two integrated chips, an RT2760 or RT2790 (PCIe) MAC/BBP and
+an RT2720 (2.4GHz) or RT2750 (2.4GHz/5GHz) radio transceiver.
+.Pp
+The RT2800 chipset is the first generation of 802.11n adapters from Ralink.
+It consists of two integrated chips, an RT2860 or RT2890 (PCIe) MAC/BBP and
+an RT2820 (2.4GHz) or RT2850 (2.4GHz/5GHz) radio transceiver.
+The RT2800 chipset supports two transmit paths and up to three receiver
+paths (2T2R/2T3R).
+It can achieve speeds up to 144Mbps (20MHz bandwidth) and 300Mbps (40MHz
+bandwidth.)
+.Pp
+The RT3090 chipset is the first generation of single-chip 802.11n adapters
+from Ralink.
+.Nm
+supports
+.Cm station ,
+.Cm adhoc ,
+.Cm hostap ,
+.Cm mesh ,
+.Cm wds ,
+and
+.Cm monitor
+mode operation.
+Only one
+.Cm hostap
+or
+.Cm mesh
+virtual interface may be configured at a time.
+Any number of
+.Cm wds
+virtual interfaces may be configured together with a
+.Cm hostap
+interface.
+Multiple
+.Cm station
+interfaces may be operated together with a
+.Cm hostap
+interface to construct a wireless repeater device.
+.Pp
+The transmit speed is user-selectable or can be adapted automatically by the
+driver depending on the number of hardware transmission retries.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports PCI/PCIe/CardBus wireless adapters based on Ralink Technology
+chipsets, including:
+.Pp
+.Bl -column -compact ".Li Atlantis Land A02-PCM-W54" "RT2561S" "CardBus"
+.It Em Card Ta Em MAC/BBP Ta Em Bus
+.It "A-Link WL54H" Ta RT2560 Ta PCI
+.It "A-Link WL54PC" Ta RT2560 Ta CardBus
+.It "AirLink101 AWLC5025" Ta RT2661 Ta CardBus
+.It "AirLink101 AWLH5025" Ta RT2661 Ta PCI
+.It "Amigo AWI-914W" Ta RT2560 Ta CardBus
+.It "Amigo AWI-922W" Ta RT2560 Ta mini-PCI
+.It "Amigo AWI-926W" Ta RT2560 Ta PCI
+.It "AMIT WL531C" Ta RT2560 Ta CardBus
+.It "AMIT WL531P" Ta RT2560 Ta PCI
+.It "AOpen AOI-831" Ta RT2560 Ta PCI
+.It "ASUS WL-107G" Ta RT2560 Ta CardBus
+.It "ASUS WL-130g" Ta RT2560 Ta PCI
+.It "Atlantis Land A02-PCI-W54" Ta RT2560 Ta PCI
+.It "Atlantis Land A02-PCM-W54" Ta RT2560 Ta CardBus
+.It "Belkin F5D7000 v3" Ta RT2560 Ta PCI
+.It "Belkin F5D7010 v2" Ta RT2560 Ta CardBus
+.It "Billionton MIWLGRL" Ta RT2560 Ta mini-PCI
+.It "Canyon CN-WF511" Ta RT2560 Ta PCI
+.It "Canyon CN-WF513" Ta RT2560 Ta CardBus
+.It "CC&C WL-2102" Ta RT2560 Ta CardBus
+.It "CNet CWC-854" Ta RT2560 Ta CardBus
+.It "CNet CWP-854" Ta RT2560 Ta PCI
+.It "Compex WL54G" Ta RT2560 Ta CardBus
+.It "Compex WLP54G" Ta RT2560 Ta PCI
+.It "Conceptronic C54RC" Ta RT2560 Ta CardBus
+.It "Conceptronic C54Ri" Ta RT2560 Ta PCI
+.It "Digitus DN-7001G-RA" Ta RT2560 Ta CardBus
+.It "Digitus DN-7006G-RA" Ta RT2560 Ta PCI
+.It "E-Tech WGPC02" Ta RT2560 Ta CardBus
+.It "E-Tech WGPI02" Ta RT2560 Ta PCI
+.It "Edimax EW-7108PCg" Ta RT2560 Ta CardBus
+.It "Edimax EW-7128g" Ta RT2560 Ta PCI
+.It "Eminent EM3036" Ta RT2560 Ta CardBus
+.It "Eminent EM3037" Ta RT2560 Ta PCI
+.It "Encore ENLWI-G-RLAM" Ta RT2560 Ta PCI
+.It "Encore ENPWI-G-RLAM" Ta RT2560 Ta CardBus
+.It "Fiberline WL-400P" Ta RT2560 Ta PCI
+.It "Fibreline WL-400X" Ta RT2560 Ta CardBus
+.It "Gigabyte GN-WI01GS" Ta RT2561S Ta mini-PCI
+.It "Gigabyte GN-WIKG" Ta RT2560 Ta mini-PCI
+.It "Gigabyte GN-WMKG" Ta RT2560 Ta CardBus
+.It "Gigabyte GN-WP01GS" Ta RT2561S Ta PCI
+.It "Gigabyte GN-WPKG" Ta RT2560 Ta PCI
+.It "Hawking HWC54GR" Ta RT2560 Ta CardBus
+.It "Hawking HWP54GR" Ta RT2560 Ta PCI
+.It "iNexQ CR054g-009 (R03)" Ta RT2560 Ta PCI
+.It "JAHT WN-4054P" Ta RT2560 Ta CardBus
+.It "JAHT WN-4054PCI" Ta RT2560 Ta PCI
+.It "LevelOne WNC-0301 v2" Ta RT2560 Ta PCI
+.It "LevelOne WPC-0301 v2" Ta RT2560 Ta CardBus
+.It "Linksys WMP54G v4" Ta RT2560 Ta PCI
+.It "Micronet SP906GK" Ta RT2560 Ta PCI
+.It "Micronet SP908GK V3" Ta RT2560 Ta CardBus
+.It "Minitar MN54GCB-R" Ta RT2560 Ta CardBus
+.It "Minitar MN54GPC-R" Ta RT2560 Ta PCI
+.It "MSI CB54G2" Ta RT2560 Ta CardBus
+.It "MSI MP54G2" Ta RT2560 Ta mini-PCI
+.It "MSI PC54G2" Ta RT2560 Ta PCI
+.It "OvisLink EVO-W54PCI" Ta RT2560 Ta PCI
+.It "PheeNet HWL-PCIG/RA" Ta RT2560 Ta PCI
+.It "Pro-Nets CB80211G" Ta RT2560 Ta CardBus
+.It "Pro-Nets PC80211G" Ta RT2560 Ta PCI
+.It "Repotec RP-WB7108" Ta RT2560 Ta CardBus
+.It "Repotec RP-WP0854" Ta RT2560 Ta PCI
+.It "SATech SN-54C" Ta RT2560 Ta CardBus
+.It "SATech SN-54P" Ta RT2560 Ta PCI
+.It "Sitecom WL-112" Ta RT2560 Ta CardBus
+.It "Sitecom WL-115" Ta RT2560 Ta PCI
+.It "SMC SMCWCB-GM" Ta RT2661 Ta CardBus
+.It "SMC SMCWPCI-GM" Ta RT2661 Ta PCI
+.It "SparkLAN WL-685R" Ta RT2560 Ta CardBus
+.It "Surecom EP-9321-g" Ta RT2560 Ta PCI
+.It "Surecom EP-9321-g1" Ta RT2560 Ta PCI
+.It "Surecom EP-9428-g" Ta RT2560 Ta CardBus
+.It "Sweex LC500050" Ta RT2560 Ta CardBus
+.It "Sweex LC700030" Ta RT2560 Ta PCI
+.It "TekComm NE-9321-g" Ta RT2560 Ta PCI
+.It "TekComm NE-9428-g" Ta RT2560 Ta CardBus
+.It "Unex CR054g-R02" Ta RT2560 Ta PCI
+.It "Unex MR054g-R02" Ta RT2560 Ta CardBus
+.It "Zinwell ZWX-G160" Ta RT2560 Ta CardBus
+.It "Zinwell ZWX-G360" Ta RT2560 Ta mini-PCI
+.It "Zinwell ZWX-G361" Ta RT2560 Ta PCI
+.It "Zonet ZEW1500" Ta RT2560 Ta CardBus
+.It "Zonet ZEW1600" Ta RT2560 Ta PCI
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Pp
+.Dl "ifconfig wlan create wlandev ral0 inet 192.168.0.20 netmask 0xffffff00"
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Bd -literal -offset indent
+ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e
+ netmask 0xffffff00 ssid my_net
+.Ed
+.Pp
+Join a specific BSS network with 40-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e
+ netmask 0xffffff00 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1
+.Ed
+.Pp
+Join a specific BSS network with 104-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e
+ netmask 0xffffff00 ssid my_net \e
+ wepmode on wepkey 0x01020304050607080910111213 weptxkey 1
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ral%d: could not load 8051 microcode"
+An error occurred while attempting to upload the microcode to the onboard 8051
+microcontroller unit.
+.It "ral%d: timeout waiting for MCU to initialize"
+The onboard 8051 microcontroller unit failed to initialize in time.
+.It "ral%d: device timeout"
+A frame dispatched to the hardware for transmission did not complete in time.
+The driver will reset the hardware.
+This should not happen.
+.El
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr cardbus 4 ,
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr wlan_xauth 4 ,
+.Xr hostapd 8 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Rs
+.%T "Ralink Technology"
+.%U http://www.ralinktech.com/
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 3.7 .
+Support for the RT2501 and RT2600 chipsets was added in
+.Ox 3.9 .
+Support for the RT2800 chipset was added in
+.Ox 4.3 .
+Support for the RT2700 chipset was added in
+.Ox 4.4 .
+Support for the RT3090 chipset was added in
+.Ox 4.9 .
+.Sh AUTHORS
+The original
+.Nm
+driver was written by
+.An Damien Bergamini Aq damien@openbsd.org .
+.Sh CAVEATS
+The
+.Nm
+driver does not make use of the hardware cryptographic engine.
+.Pp
+The
+.Nm
+driver does not support any of the 802.11n capabilities offered by
+the RT2700 and RT2800 chipsets.
+Additional work is required in before those features can be supported.
+.Pp
+Host AP mode doesn't support power saving.
+Clients attempting to use power saving mode may experience significant
+packet loss (disabling power saving on the client will fix this).
+.Pp
+Some PCI
+.Nm
+adapters seem to strictly require a system supporting PCI 2.2 or greater and
+will likely not work in systems based on older revisions of the PCI
+specification.
+Check the board's PCI version before purchasing the card.
diff --git a/share/man/man4/random.4 b/share/man/man4/random.4
new file mode 100644
index 0000000..a87a2ed7
--- /dev/null
+++ b/share/man/man4/random.4
@@ -0,0 +1,330 @@
+.\" Copyright (c) 2001-2013 Mark R V Murray. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 12, 2013
+.Dt RANDOM 4
+.Os
+.Sh NAME
+.Nm random
+.Nd the entropy device
+.Sh SYNOPSIS
+.Cd "device random"
+.Sh DESCRIPTION
+The
+.Nm
+device
+returns an endless supply of random bytes when read.
+It also accepts and reads data
+as any ordinary (and willing) file,
+but discards data written to it.
+The device will probe for
+certain hardware entropy sources,
+and use these in preference to the fallback,
+which is a generator implemented in software.
+.Pp
+The software generator will start in an
+.Em unseeded
+state, and will block reads until
+it is (re)seeded.
+This may cause trouble at system boot
+when keys and the like
+are generated from
+/dev/random
+so steps should be taken to ensure a
+reseed as soon as possible.
+The
+.Xr sysctl 8
+controlling the
+.Em seeded
+status (see below) may be used
+if security is not an issue
+or for convenience
+during setup or development.
+.Pp
+This initial seeding
+of random number generators
+is a bootstrapping problem
+that needs very careful attention.
+In some cases,
+it may be difficult
+to find enough randomness
+to seed a random number generator
+until a system is fully operational,
+but the system requires random numbers
+to become fully operational.
+It is (or more accurately should be)
+critically important that the
+.Nm
+device is seeded
+before the first time it is used.
+In the case where a dummy or "blocking-only"
+device is used,
+it is the responsibility
+of the system architect
+to ensure that no blocking reads
+hold up critical processes.
+.Pp
+To see the current settings of the software
+.Nm
+device, use the command line:
+.Pp
+.Dl sysctl kern.random
+.Pp
+which results in something like:
+.Bd -literal -offset indent
+kern.random.adaptors: yarrow,dummy
+kern.random.active_adaptor: yarrow
+kern.random.yarrow.gengateinterval: 10
+kern.random.yarrow.bins: 10
+kern.random.yarrow.fastthresh: 96
+kern.random.yarrow.slowthresh: 128
+kern.random.yarrow.slowoverthresh: 2
+kern.random.sys.seeded: 1
+kern.random.sys.harvest.ethernet: 1
+kern.random.sys.harvest.point_to_point: 1
+kern.random.sys.harvest.interrupt: 1
+kern.random.sys.harvest.swi: 1
+.Ed
+.Pp
+Other than
+.Dl kern.random.adaptors
+all settings are read/write.
+.Pp
+The
+.Va kern.random.sys.seeded
+variable indicates whether or not the
+.Nm
+device is in an acceptably secure state
+as a result of reseeding.
+If set to 0,
+the device will block (on read)
+until the next reseed
+as a result of entropy harvesting.
+A reseed will set the value to 1 (non-blocking).
+.Pp
+The
+.Va kern.random.sys.harvest.ethernet
+variable is used to select LAN traffic as an entropy source.
+A 0 (zero) value means that LAN traffic
+is not considered as an entropy source.
+Set the variable to 1 (one)
+if you wish to use LAN traffic for entropy harvesting.
+.Pp
+The
+.Va kern.random.sys.harvest.point_to_point
+variable is used to select serial line traffic as an entropy source.
+(Serial line traffic includes PPP, SLIP and all tun0 traffic.)
+A 0 (zero) value means such traffic
+is not considered as an entropy source.
+Set the variable to 1 (one)
+if you wish to use it for entropy harvesting.
+.Pp
+The
+.Va kern.random.sys.harvest.interrupt
+variable is used to select hardware interrupts
+as an entropy source.
+A 0 (zero) value means hardware interrupts
+are not considered as an entropy source.
+Set the variable to 1 (one)
+if you wish to use them for entropy harvesting.
+All hardware interrupt harvesting is set up by the
+individual device drivers.
+.Pp
+The
+.Va kern.random.sys.harvest.swi
+variable is used to select software interrupts
+as an entropy source.
+A 0 (zero) value means software interrupts
+are not considered as an entropy source.
+Set the variable to 1 (one)
+if you wish to use them for entropy harvesting.
+.Pp
+The other variables are explained in the paper describing the
+.Em Yarrow
+algorithm at
+.Pa http://www.schneier.com/yarrow.html .
+.Pp
+These variables are all limited
+in terms of the values they may contain:
+.Bl -tag -width "kern.random.yarrow.gengateinterval" -compact -offset indent
+.It Va kern.random.yarrow.gengateinterval
+.Bq 4..64
+.It Va kern.random.yarrow.bins
+.Bq 2..16
+.It Va kern.random.yarrow.fastthresh
+.Bq 64..256
+.It Va kern.random.yarrow.slowthresh
+.Bq 64..256
+.It Va kern.random.yarrow.slowoverthresh
+.Bq 1..5
+.El
+.Pp
+Internal
+.Xr sysctl 3
+handlers force the above variables
+into the stated ranges.
+.Sh RANDOMNESS
+The use of randomness in the field of computing
+is a rather subtle issue because randomness means
+different things to different people.
+Consider generating a password randomly,
+simulating a coin tossing experiment or
+choosing a random back-off period when a server does not respond.
+Each of these tasks requires random numbers,
+but the random numbers in each case have different requirements.
+.Pp
+Generation of passwords, session keys and the like
+requires cryptographic randomness.
+A cryptographic random number generator should be designed
+so that its output is difficult to guess,
+even if a lot of auxiliary information is known
+(such as when it was seeded, subsequent or previous output, and so on).
+On
+.Fx ,
+seeding for cryptographic random number generators is provided by the
+.Nm
+device,
+which provides real randomness.
+The
+.Xr arc4random 3
+library call provides a pseudo-random sequence
+which is generally reckoned to be suitable for
+simple cryptographic use.
+The OpenSSL library also provides functions for managing randomness
+via functions such as
+.Xr RAND_bytes 3
+and
+.Xr RAND_add 3 .
+Note that OpenSSL uses the
+.Nm
+device for seeding automatically.
+.Pp
+Randomness for simulation is required in engineering or
+scientific software and games.
+The first requirement of these applications is
+that the random numbers produced conform to some well-known,
+usually uniform, distribution.
+The sequence of numbers should also appear numerically uncorrelated,
+as simulation often assumes independence of its random inputs.
+Often it is desirable to reproduce
+the results of a simulation exactly,
+so that if the generator is seeded in the same way,
+it should produce the same results.
+A peripheral concern for simulation is
+the speed of a random number generator.
+.Pp
+Another issue in simulation is
+the size of the state associated with the random number generator, and
+how frequently it repeats itself.
+For example,
+a program which shuffles a pack of cards should have 52!\& possible outputs,
+which requires the random number generator to have 52!\& starting states.
+This means the seed should have at least log_2(52!) ~ 226 bits of state
+if the program is to stand a chance of outputting all possible sequences,
+and the program needs some unbiased way of generating these bits.
+Again,
+the
+.Nm
+device could be used for seeding here,
+but in practice, smaller seeds are usually considered acceptable.
+.Pp
+.Fx
+provides two families of functions which are considered
+suitable for simulation.
+The
+.Xr random 3
+family of functions provides a random integer
+between 0 to
+.if t 2\u\s731\s10\d\(mi1.
+.if n (2**31)\(mi1.
+The functions
+.Xr srandom 3 ,
+.Xr initstate 3
+and
+.Xr setstate 3
+are provided for deterministically setting
+the state of the generator and
+the function
+.Xr srandomdev 3
+is provided for setting the state via the
+.Nm
+device.
+The
+.Xr drand48 3
+family of functions are also provided,
+which provide random floating point numbers in various ranges.
+.Pp
+Randomness that is used for collision avoidance
+(for example, in certain network protocols)
+has slightly different semantics again.
+It is usually expected that the numbers will be uniform,
+as this produces the lowest chances of collision.
+Here again,
+the seeding of the generator is very important,
+as it is required that different instances of
+the generator produce independent sequences.
+However, the guessability or reproducibility of the sequence is unimportant,
+unlike the previous cases.
+.Pp
+.Fx
+does also provide the traditional
+.Xr rand 3
+library call,
+for compatibility purposes.
+However,
+it is known to be poor for simulation and
+absolutely unsuitable for cryptographic purposes,
+so its use is discouraged.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/random"
+.It Pa /dev/random
+.El
+.Sh SEE ALSO
+.Xr arc4random 3 ,
+.Xr drand48 3 ,
+.Xr rand 3 ,
+.Xr RAND_add 3 ,
+.Xr RAND_bytes 3 ,
+.Xr random 3 ,
+.Xr sysctl 8
+.Sh HISTORY
+A
+.Nm
+device appeared in
+.Fx 2.2 .
+The early version was taken from Theodore Ts'o's entropy driver for Linux.
+The current software implementation,
+introduced in
+.Fx 5.0 ,
+is a complete rewrite by
+.An Mark R V Murray ,
+and is an implementation of the
+.Em Yarrow
+algorithm by Bruce Schneier,
+.Em et al .
+Significant infrastructure work was done by Arthur Mesh.
+.Pp
+The author gratefully acknowledges
+significant assistance from VIA Technologies, Inc.
diff --git a/share/man/man4/rc.4 b/share/man/man4/rc.4
new file mode 100644
index 0000000..60c4fa5
--- /dev/null
+++ b/share/man/man4/rc.4
@@ -0,0 +1,125 @@
+.\"
+.\" Copyright (c) 2004 Tom Rhodes
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 18, 2005
+.Dt RC 4
+.Os
+.Sh NAME
+.Nm rc
+.Nd RISCom/8 multiport card
+.Sh SYNOPSIS
+.Cd device isa
+.Cd device rc
+.Sh DESCRIPTION
+The
+.Tn RISCom/8
+is an eight port
+.Tn ISA
+.Tn RS-232C
+communications multiplexer with a built in
+.Tn RISC
+processor.
+It uses a block of sixteen
+.Tn I/O
+ports in the range 0x200 to 0x3f0 selectable by on-board
+switches or jumpers.
+The block must be aligned on a sixteen port boundary.
+The jumper-selectable hardware interrupt level may be set to
+be detected during system
+initialization using settings found in the
+.Pa /boot/device.hints
+file.
+.Pp
+This driver is mostly based on the Cirrus Logic CL-CD180 driver.
+.Sh HARDWARE
+The
+.Nm
+driver provides support for the
+.Tn SDL
+Communications
+.Tn RISCom/8
+boards.
+.Sh DIAGNOSTICS
+The following driver specific error messages
+may be reported:
+.Bl -diag
+.It "rc%d channel%d: interrupt-level buffer overflow"
+An internal buffer overflow error has occurred on
+the listed channel.
+The
+.Nm
+driver will need to be reloaded to correct this.
+.It "rc%d: Bad char chan %d"
+The channel has obtained a bad set of characters.
+.It "rc%d: Got extra chars chan %d"
+The
+.Nm
+driver got more characters than expected on the channel shown.
+.It "rc%d: data mismatch chan %d ptr %d (%d != %d)"
+Data sent from channel
+.Ar %d
+to the rx buffer was different then expected.
+.It "rc%d: channel %d command timeout, rc.c line: %d"
+A command timeout has occurred on the channel, the
+.Pa src/sys/dev/rc/rc.c
+file can be consulted for more information.
+.El
+.Sh SEE ALSO
+.Xr tty 1 ,
+.Xr ttyname 3 ,
+.Xr sio 4 ,
+.Xr tty 4 ,
+.Xr device.hints 5 ,
+.Xr comcontrol 8 ,
+.Xr getty 8 ,
+.Xr mutex 9 ,
+.Xr splx 9
+.Pp
+.Pa http://www.sdlcomm.com
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 2.0.5 .
+This manual page first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+This manual page was written by
+.An Tom Rhodes Aq trhodes@FreeBSD.org .
+.Sh BUGS
+The
+.Nm
+driver code still uses the
+.Xr spl 9
+functions.
+These should be replaced by
+.Xr mutex 9
+functions.
+.Pp
+The various
+.Fn ttyld_*
+functions should be documented.
diff --git a/share/man/man4/re.4 b/share/man/man4/re.4
new file mode 100644
index 0000000..bd720f4
--- /dev/null
+++ b/share/man/man4/re.4
@@ -0,0 +1,285 @@
+.\" Copyright (c) 2003
+.\" Bill Paul <wpaul@windriver.com>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 26, 2011
+.Dt RE 4
+.Os
+.Sh NAME
+.Nm re
+.Nd "RealTek 8139C+/8169/816xS/811xS/8168/810xE/8111 PCI/PCIe Ethernet adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device re"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_re_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for various NICs based on the RealTek RTL8139C+,
+RTL8169, RTL816xS, RTL811xS, RTL8168, RTL810xE and RTL8111 PCI and
+PCIe Ethernet controllers.
+.Pp
+NICs based on the 8139C+ and 810xE are capable of 10 and 100Mbps speeds
+over CAT5 cable.
+NICs based on the 8169, 816xS, 811xS, 8168 and 8111 are capable of 10, 100
+and 1000Mbps operation.
+.Pp
+All NICs supported by the
+.Nm
+driver have TCP/IP checksum offload and hardware VLAN tagging/insertion
+features, and use a descriptor-based DMA mechanism.
+They are also
+capable of TCP large send (TCP segmentation offload).
+.Pp
+The 8139C+ is a single-chip solution combining both a 10/100 MAC and PHY.
+The 8169 is a 10/100/1000 MAC only, requiring a GMII or TBI external PHY.
+The 816xS, 811xS, 8168 and 8111 are single-chip devices containing both a
+10/100/1000 MAC and 10/100/1000 copper PHY.
+Standalone 10/100/1000 cards are available
+in both 32-bit PCI and 64-bit PCI models.
+The 8110S is designed for
+embedded LAN-on-motherboard applications.
+.Pp
+The 8169, 8169S and 8110S also support jumbo frames, which can be configured
+via the interface MTU setting.
+The MTU is limited to 7422, since the chip cannot transmit larger frames.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit jumbo frames.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 1000baseTX
+Set 1000baseTX operation over twisted pair.
+The RealTek gigE chips support 1000Mbps in
+.Cm full-duplex
+mode only.
+.\" .It Cm 1000baseSX
+.\" Set 1000Mbps (Gigabit Ethernet) operation.
+.\" Both
+.\" .Cm full-duplex
+.\" and
+.\" .Cm half-duplex
+.\" modes are supported.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports RealTek RTL8139C+, RTL8169, RTL816xS, RTL811xS, RTL8168,
+RTL810xE and RTL8111 based Fast Ethernet and Gigabit Ethernet adapters including:
+.Pp
+.Bl -bullet -compact
+.It
+Alloy Computer Products EtherGOLD 1439E 10/100 (8139C+)
+.It
+Compaq Evo N1015v Integrated Ethernet (8139C+)
+.It
+Corega CG-LAPCIGT Gigabit Ethernet (8169S)
+.It
+D-Link DGE-528(T) Gigabit Ethernet (8169S)
+.It
+Gigabyte 7N400 Pro2 Integrated Gigabit Ethernet (8110S)
+.It
+LevelOne GNC-0105T (8169S)
+.It
+LinkSys EG1032 (32-bit PCI)
+.It
+PLANEX COMMUNICATIONS Inc.\& GN-1200TC (8169S)
+.It
+USRobotics USR997902 Gigabit Ethernet (8169S)
+.It
+Xterasys XN-152 10/100/1000 NIC (8169)
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "xxxxxx"
+.It Va hw.re.intr_filter
+This tunable makes driver use interrupt filter handler on
+controllers that support MSI/MSI-X capability.
+If MSI/MSI-X is disabled by administrator this tunable has no
+effect and driver will use interrupt filter handler.
+The default value is 0 to use interrupt thread handler.
+.It Va hw.re.msi_disable
+This tunable disables MSI support on the Ethernet hardware.
+The default value is 0.
+.It Va hw.re.msix_disable
+This tunable disables MSI-X support on the Ethernet hardware.
+The default value is 0.
+.It Va hw.re.prefer_iomap
+This tunable controls which register mapping should be used on the
+specified device.
+A non-zero value enables I/O space register mapping.
+The default value is 0 to use memory space register mapping.
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width "xxxxxx"
+.It Va dev.re.%d.int_rx_mod
+Maximum amount of time to delay receive interrupt processing in
+units of 1us.
+The accepted range is 0 to 65, the default is 65(65us).
+Value 0 completely disables the interrupt moderation.
+The interface need to be brought down and up again before a change
+takes effect.
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "re%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "re%d: couldn't map ports"
+A fatal initialization error has occurred.
+.It "re%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "re%d: no memory for softc struct!"
+The driver failed to allocate memory for per-device instance information
+during initialization.
+.It "re%d: failed to enable memory mapping!"
+The driver failed to initialize PCI shared memory mapping.
+This might
+happen if the card is not in a bus-master slot.
+.It "re%d: no memory for jumbo buffers!"
+The driver failed to allocate memory for jumbo frames during
+initialization.
+.It "re%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr rgephy 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Rs
+.%T RealTek Semiconductor RTL8139C+, RTL8169, RTL8169S and RTL8110S datasheets
+.%U http://www.realtek.com.tw/
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.2 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@windriver.com .
+.Sh BUGS
+The Xterasys XN-152 32-bit PCI NIC, which uses the RTL8169 MAC and
+Marvell 88E1000 PHY, has a defect that causes DMA corruption
+if the board is plugged into a 64-bit PCI slot.
+The defect
+lies in the board design, not the chip itself: the PCI REQ64# and ACK64#
+lines should be pulled high, but they are not.
+The result is that the
+8169 chip is tricked into performing 64-bit DMA transfers even though
+a 64-bit data path between the NIC and the bus does not actually exist.
+.Pp
+Unfortunately, it is not possible to correct this problem in software,
+however it is possible to detect it.
+When the
+.Nm
+driver is loaded, it will run a diagnostic routine designed to
+validate DMA operation by placing the chip in digital loopback mode
+and initiating a packet transmission.
+If the card functions properly,
+the transmitted data will
+be echoed back unmodified.
+If the echoed data is corrupt, the driver
+will print an error message on the console and abort the device attach.
+The
+user should ensure the NIC is installed in a 32-bit PCI slot to
+avoid this problem.
+.Pp
+The RealTek 8169, 8169S and 8110S chips appear to only be capable of
+transmitting jumbo frames up to 7.5K in size.
diff --git a/share/man/man4/rgephy.4 b/share/man/man4/rgephy.4
new file mode 100644
index 0000000..4e9e8e1
--- /dev/null
+++ b/share/man/man4/rgephy.4
@@ -0,0 +1,96 @@
+.\"
+.\" Copyright (c) 2011 Marius Strobl <marius@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 16, 2011
+.Dt RGEPHY 4
+.Os
+.Sh NAME
+.Nm rgephy
+.Nd RealTek RTL8168/8169/8110/8211 series 10/100/1000 Gigabit Ethernet PHY driver
+.Sh SYNOPSIS
+To compile all available PHY drivers into the kernel,
+place the following line in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Ed
+.Pp
+Alternatively, to selectively compile this driver into the kernel,
+place the following lines in your kernel configuration file instead:
+.Bd -ragged -offset indent
+.Cd "device mii"
+.Cd "device rgephy"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports the RealTek RTL8168, RTL8169, RTL8110 and RTL8211 series
+integrated 10/100/1000 Gigabit Ethernet PHYs.
+.Pp
+In order to get a list of media types and options supported by a specific
+instance of the
+.Nm
+driver, run
+.Li ifconfig -m
+on the instance of its parent MAC driver.
+.Pp
+Additionally,
+the
+.Nm
+driver supports the following special media option:
+.Bl -tag -width ".Cm flag0"
+.It Cm flag0
+When manually setting media type and options via
+.Xr ifconfig 8 ,
+the
+.Nm
+driver by default also triggers an autonegotiation advertising the selected
+media.
+This is done in order to work around hardware issues in certain scenarios.
+It is believed that this behavior does not cause harm in general but in fact
+can have an adverse effect in edge cases.
+In order to manually set the media type and options without also triggering
+an autonegotiation,
+the
+.Nm
+driver allows to turn this behavior off via the
+.Cm flag0
+media option.
+.El
+.Pp
+Note that this special media option will not show up in the output of
+.Xr ifconfig 8 ,
+even when set.
+.Sh EXAMPLES
+Manually set 100BASE-TX full-duplex without also triggering an
+autonegotiation:
+.Pp
+.Dl "ifconfig re0 media 100baseTX mediaopt full-duplex,flag0"
+.Sh SEE ALSO
+.\".Xr ifmedia 4 ,
+.Xr intro 4 ,
+.Xr miibus 4 ,
+.Xr ifconfig 8
diff --git a/share/man/man4/rights.4 b/share/man/man4/rights.4
new file mode 100644
index 0000000..5819677
--- /dev/null
+++ b/share/man/man4/rights.4
@@ -0,0 +1,674 @@
+.\"
+.\" Copyright (c) 2008-2010 Robert N. M. Watson
+.\" Copyright (c) 2012-2013 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This software was developed at the University of Cambridge Computer
+.\" Laboratory with support from a grant from Google, Inc.
+.\"
+.\" Portions of this documentation were written by Pawel Jakub Dawidek
+.\" under sponsorship from the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 23, 2013
+.Dt RIGHTS 4
+.Os
+.Sh NAME
+.Nm Capability rights
+.Nd Capsicum capability rights for file descriptors
+.Sh DESCRIPTION
+When a file descriptor is created by a function such as
+.Xr accept 2 ,
+.Xr accept4 2 ,
+.Xr fhopen 2 ,
+.Xr kqueue 2 ,
+.Xr mq_open 2 ,
+.Xr open 2 ,
+.Xr openat 2 ,
+.Xr pdfork 2 ,
+.Xr pipe 2 ,
+.Xr shm_open 2 ,
+.Xr socket 2
+or
+.Xr socketpair 2 ,
+it is assigned all capability rights.
+Those rights can be reduced (but never expanded) by using the
+.Xr cap_rights_limit 2 ,
+.Xr cap_fcntls_limit 2 and
+.Xr cap_ioctls_limit 2
+system calls.
+Once capability rights are reduced, operations on the file descriptor will be
+limited to those permitted by rights.
+.Pp
+The complete list of capability rights is provided below.
+The
+.Vt cap_rights_t
+type is used to store list of capability rights.
+The
+.Xr cap_rights_init 3
+family of functions should be used to manage the structure.
+.Sh RIGHTS
+The following rights may be specified in a rights mask:
+.Bl -tag -width CAP_EXTATTR_DELETE
+.It Dv CAP_ACCEPT
+Permit
+.Xr accept 2
+and
+.Xr accept4 2 .
+.It Dv CAP_ACL_CHECK
+Permit
+.Xr acl_valid_fd_np 3 .
+.It Dv CAP_ACL_DELETE
+Permit
+.Xr acl_delete_fd_np 3 .
+.It Dv CAP_ACL_GET
+Permit
+.Xr acl_get_fd 3
+and
+.Xr acl_get_fd_np 3 .
+.It Dv CAP_ACL_SET
+Permit
+.Xr acl_set_fd 3
+and
+.Xr acl_set_fd_np 3 .
+.It Dv CAP_BIND
+Permit
+.Xr bind 2 .
+Note that sockets can also become bound implicitly as a result of
+.Xr connect 2
+or
+.Xr send 2 ,
+and that socket options set with
+.Xr setsockopt 2
+may also affect binding behavior.
+.It Dv CAP_BINDAT
+Permit
+.Xr bindat 2 .
+This right has to be present on the directory descriptor.
+This right includes the
+.Dv CAP_LOOKUP
+right.
+.It Dv CAP_CHFLAGSAT
+An alias to
+.Dv CAP_FCHFLAGS
+and
+.Dv CAP_LOOKUP .
+.It Dv CAP_CONNECT
+Permit
+.Xr connect 2 ;
+also required for
+.Xr sendto 2
+with a non-NULL destination address.
+.It Dv CAP_CONNECTAT
+Permit
+.Xr connectat 2 .
+This right has to be present on the directory descriptor.
+This right includes the
+.Dv CAP_LOOKUP
+right.
+.It Dv CAP_CREATE
+Permit
+.Xr openat 2
+with the
+.Dv O_CREAT
+flag.
+.It Dv CAP_EVENT
+Permit
+.Xr select 2 ,
+.Xr poll 2 ,
+and
+.Xr kevent 2
+to be used in monitoring the file descriptor for events.
+.It Dv CAP_EXTATTR_DELETE
+Permit
+.Xr extattr_delete_fd 2 .
+.It Dv CAP_EXTATTR_GET
+Permit
+.Xr extattr_get_fd 2 .
+.It Dv CAP_EXTATTR_LIST
+Permit
+.Xr extattr_list_fd 2 .
+.It Dv CAP_EXTATTR_SET
+Permit
+.Xr extattr_set_fd 2 .
+.It Dv CAP_FCHDIR
+Permit
+.Xr fchdir 2 .
+.It Dv CAP_FCHFLAGS
+Permit
+.Xr fchflags 2
+and
+.Xr chflagsat 2
+if the
+.Dv CAP_LOOKUP
+right is also present.
+.It Dv CAP_FCHMOD
+Permit
+.Xr fchmod 2
+and
+.Xr fchmodat 2
+if the
+.Dv CAP_LOOKUP
+right is also present.
+.It Dv CAP_FCHMODAT
+An alias to
+.Dv CAP_FCHMOD
+and
+.Dv CAP_LOOKUP .
+.It Dv CAP_FCHOWN
+Permit
+.Xr fchown 2
+and
+.Xr fchownat 2
+if the
+.Dv CAP_LOOKUP
+right is also present.
+.It Dv CAP_FCHOWNAT
+An alias to
+.Dv CAP_FCHOWN
+and
+.Dv CAP_LOOKUP .
+.It Dv CAP_FCNTL
+Permit
+.Xr fcntl 2 .
+Note that only the
+.Dv F_GETFL ,
+.Dv F_SETFL ,
+.Dv F_GETOWN
+and
+.Dv F_SETOWN
+commands require this capability right.
+Also note that the list of permitted commands can be further limited with the
+.Xr cap_fcntls_limit 2
+system call.
+.It Dv CAP_FEXECVE
+Permit
+.Xr fexecve 2
+and
+.Xr openat 2
+with the
+.Dv O_EXEC
+flag;
+.Dv CAP_READ
+is also be required.
+.It Dv CAP_FLOCK
+Permit
+.Xr flock 2 ,
+.Xr fcntl 2
+(with
+.Dv F_GETLK ,
+.Dv F_SETLK ,
+.Dv F_SETLKW
+or
+.Dv F_SETLK_REMOTE
+flag) and
+.Xr openat 2
+(with
+.Dv O_EXLOCK
+or
+.Dv O_SHLOCK
+flag).
+.It Dv CAP_FPATHCONF
+Permit
+.Xr fpathconf 2 .
+.It Dv CAP_FSCK
+Permit UFS background-fsck operations on the descriptor.
+.It Dv CAP_FSTAT
+Permit
+.Xr fstat 2
+and
+.Xr fstatat 2
+if the
+.Dv CAP_LOOKUP
+right is also present.
+.It Dv CAP_FSTATAT
+An alias to
+.Dv CAP_FSTAT
+and
+.Dv CAP_LOOKUP .
+.It Dv CAP_FSTATFS
+Permit
+.Xr fstatfs 2 .
+.It Dv CAP_FSYNC
+Permit
+.Xr aio_fsync 2 ,
+.Xr fsync 2
+and
+.Xr openat 2
+with
+.Dv O_FSYNC
+or
+.Dv O_SYNC
+flag.
+.It Dv CAP_FTRUNCATE
+Permit
+.Xr ftruncate 2
+and
+.Xr openat 2
+with the
+.Dv O_TRUNC
+flag.
+.It Dv CAP_FUTIMES
+Permit
+.Xr futimes 2
+and
+.Xr futimesat 2
+if the
+.Dv CAP_LOOKUP
+right is also present.
+.It Dv CAP_FUTIMESAT
+An alias to
+.Dv CAP_FUTIMES
+and
+.Dv CAP_LOOKUP .
+.It Dv CAP_GETPEERNAME
+Permit
+.Xr getpeername 2 .
+.It Dv CAP_GETSOCKNAME
+Permit
+.Xr getsockname 2 .
+.It Dv CAP_GETSOCKOPT
+Permit
+.Xr getsockopt 2 .
+.It Dv CAP_IOCTL
+Permit
+.Xr ioctl 2 .
+Be aware that this system call has enormous scope, including potentially
+global scope for some objects.
+The list of permitted ioctl commands can be further limited with the
+.Xr cap_ioctls_limit 2
+system call.
+.It Dv CAP_KQUEUE
+An alias to
+.Dv CAP_KQUEUE_CHANGE
+and
+.Dv CAP_KQUEUE_EVENT .
+.It Dv CAP_KQUEUE_CHANGE
+Permit
+.Xr kevent 2
+on a
+.Xr kqueue 2
+descriptor that modifies list of monitored events (the
+.Fa changelist
+argument is non-NULL).
+.It Dv CAP_KQUEUE_EVENT
+Permit
+.Xr kevent 2
+on a
+.Xr kqueue 2
+descriptor that monitors events (the
+.Fa eventlist
+argument is non-NULL).
+.Dv CAP_EVENT
+is also required on file descriptors that will be monitored using
+.Xr kevent 2 .
+.It Dv CAP_LINKAT
+Permit
+.Xr linkat 2
+and
+.Xr renameat 2
+on the destination directory descriptor.
+This right includes the
+.Dv CAP_LOOKUP
+right.
+.It Dv CAP_LISTEN
+Permit
+.Xr listen 2 ;
+not much use (generally) without
+.Dv CAP_BIND .
+.It Dv CAP_LOOKUP
+Permit the file descriptor to be used as a starting directory for calls such as
+.Xr linkat 2 ,
+.Xr openat 2 ,
+and
+.Xr unlinkat 2 .
+.It Dv CAP_MAC_GET
+Permit
+.Xr mac_get_fd 3 .
+.It Dv CAP_MAC_SET
+Permit
+.Xr mac_set_fd 3 .
+.It Dv CAP_MKDIRAT
+Permit
+.Xr mkdirat 2 .
+This right includes the
+.Dv CAP_LOOKUP
+right.
+.It Dv CAP_MKFIFOAT
+Permit
+.Xr mkfifoat 2 .
+This right includes the
+.Dv CAP_LOOKUP
+right.
+.It Dv CAP_MKNODAT
+Permit
+.Xr mknodat 2 .
+This right includes the
+.Dv CAP_LOOKUP
+right.
+.It Dv CAP_MMAP
+Permit
+.Xr mmap 2
+with the
+.Dv PROT_NONE
+protection.
+.It Dv CAP_MMAP_R
+Permit
+.Xr mmap 2
+with the
+.Dv PROT_READ
+protection.
+This right includes the
+.Dv CAP_READ
+and
+.Dv CAP_SEEK
+rights.
+.It Dv CAP_MMAP_RW
+An alias to
+.Dv CAP_MMAP_R
+and
+.Dv CAP_MMAP_W .
+.It Dv CAP_MMAP_RWX
+An alias to
+.Dv CAP_MMAP_R ,
+.Dv CAP_MMAP_W
+and
+.Dv CAP_MMAP_X .
+.It Dv CAP_MMAP_RX
+An alias to
+.Dv CAP_MMAP_R
+and
+.Dv CAP_MMAP_X .
+.It Dv CAP_MMAP_W
+Permit
+.Xr mmap 2
+with the
+.Dv PROT_WRITE
+protection.
+This right includes the
+.Dv CAP_WRITE
+and
+.Dv CAP_SEEK
+rights.
+.It Dv CAP_MMAP_WX
+An alias to
+.Dv CAP_MMAP_W
+and
+.Dv CAP_MMAP_X .
+.It Dv CAP_MMAP_X
+Permit
+.Xr mmap 2
+with the
+.Dv PROT_EXEC
+protection.
+This right includes the
+.Dv CAP_SEEK
+right.
+.It Dv CAP_PDGETPID
+Permit
+.Xr pdgetpid 2 .
+.It Dv CAP_PDKILL
+Permit
+.Xr pdkill 2 .
+.It Dv CAP_PDWAIT
+Permit
+.Xr pdwait4 2 .
+.It Dv CAP_PEELOFF
+Permit
+.Xr sctp_peeloff 2 .
+.It Dv CAP_PREAD
+An alias to
+.Dv CAP_READ
+and
+.Dv CAP_SEEK .
+.It Dv CAP_PWRITE
+An alias to
+.Dv CAP_SEEK
+and
+.Dv CAP_WRITE .
+.It Dv CAP_READ
+Permit
+.Xr aio_read 2
+.Dv ( CAP_SEEK
+is also required),
+.Xr openat 2
+with the
+.Dv O_RDONLY flag,
+.Xr read 2 ,
+.Xr readv 2 ,
+.Xr recv 2 ,
+.Xr recvfrom 2 ,
+.Xr recvmsg 2 ,
+.Xr pread 2
+.Dv ( CAP_SEEK
+is also required),
+.Xr preadv 2
+.Dv ( CAP_SEEK
+is also required) and related system calls.
+.It Dv CAP_RECV
+An alias to
+.Dv CAP_READ .
+.It Dv CAP_RENAMEAT
+Permit
+.Xr renameat 2 .
+This right is required on the source directory descriptor.
+This right includes the
+.Dv CAP_LOOKUP
+right.
+.It Dv CAP_SEEK
+Permit operations that seek on the file descriptor, such as
+.Xr lseek 2 ,
+but also required for I/O system calls that can read or write at any position
+in the file, such as
+.Xr pread 2
+and
+.Xr pwrite 2 .
+.It Dv CAP_SEM_GETVALUE
+Permit
+.Xr sem_getvalue 3 .
+.It Dv CAP_SEM_POST
+Permit
+.Xr sem_post 3 .
+.It Dv CAP_SEM_WAIT
+Permit
+.Xr sem_wait 3
+and
+.Xr sem_trywait 3 .
+.It Dv CAP_SEND
+An alias to
+.Dv CAP_WRITE .
+.It Dv CAP_SETSOCKOPT
+Permit
+.Xr setsockopt 2 ;
+this controls various aspects of socket behavior and may affect binding,
+connecting, and other behaviors with global scope.
+.It Dv CAP_SHUTDOWN
+Permit explicit
+.Xr shutdown 2 ;
+closing the socket will also generally shut down any connections on it.
+.It Dv CAP_SYMLINKAT
+Permit
+.Xr symlinkat 2 .
+This right includes the
+.Dv CAP_LOOKUP
+right.
+.It Dv CAP_TTYHOOK
+Allow configuration of TTY hooks, such as
+.Xr snp 4 ,
+on the file descriptor.
+.It Dv CAP_UNLINKAT
+Permit
+.Xr unlinkat 2
+and
+.Xr renameat 2 .
+This right is only required for
+.Xr renameat 2
+on the destination directory descriptor if the destination object already
+exists and will be removed by the rename.
+This right includes the
+.Dv CAP_LOOKUP
+right.
+.It Dv CAP_WRITE
+Allow
+.Xr aio_write 2 ,
+.Xr openat 2
+with
+.Dv O_WRONLY
+and
+.Dv O_APPEND
+flags set,
+.Xr send 2 ,
+.Xr sendmsg 2 ,
+.Xr sendto 2 ,
+.Xr write 2 ,
+.Xr writev 2 ,
+.Xr pwrite 2 ,
+.Xr pwritev 2
+and related system calls.
+For
+.Xr sendto 2
+with a non-NULL connection address,
+.Dv CAP_CONNECT
+is also required.
+For
+.Xr openat 2
+with the
+.Dv O_WRONLY
+flag, but without the
+.Dv O_APPEND
+flag,
+.Dv CAP_SEEK
+is also required.
+For
+.Xr aio_write 2 ,
+.Xr pwrite 2
+and
+.Xr pwritev 2
+.Dv CAP_SEEK
+is also required.
+.El
+.Sh SEE ALSO
+.Xr accept 2 ,
+.Xr accept4 2 ,
+.Xr aio_fsync 2 ,
+.Xr aio_read 2 ,
+.Xr aio_write 2 ,
+.Xr bind 2 ,
+.Xr bindat 2 ,
+.Xr cap_enter 2 ,
+.Xr cap_fcntls_limit 2 ,
+.Xr cap_ioctls_limit 2 ,
+.Xr cap_rights_limit 2 ,
+.Xr chflagsat 2 ,
+.Xr connect 2 ,
+.Xr connectat 2 ,
+.Xr extattr_delete_fd 2 ,
+.Xr extattr_get_fd 2 ,
+.Xr extattr_list_fd 2 ,
+.Xr extattr_set_fd 2 ,
+.Xr fchflags 2 ,
+.Xr fchmod 2 ,
+.Xr fchmodat 2 ,
+.Xr fchown 2 ,
+.Xr fchownat 2 ,
+.Xr fcntl 2 ,
+.Xr fexecve 2 ,
+.Xr fhopen 2 ,
+.Xr flock 2 ,
+.Xr fpathconf 2 ,
+.Xr fstat 2 ,
+.Xr fstatat 2 ,
+.Xr fstatfs 2 ,
+.Xr fsync 2 ,
+.Xr ftruncate 2 ,
+.Xr futimes 2 ,
+.Xr getpeername 2 ,
+.Xr getsockname 2 ,
+.Xr getsockopt 2 ,
+.Xr ioctl 2 ,
+.Xr kevent 2 ,
+.Xr kqueue 2 ,
+.Xr linkat 2 ,
+.Xr listen 2 ,
+.Xr mmap 2 ,
+.Xr mq_open 2 ,
+.Xr open 2 ,
+.Xr openat 2 ,
+.Xr pdfork 2 ,
+.Xr pdgetpid 2 ,
+.Xr pdkill 2 ,
+.Xr pdwait4 2 ,
+.Xr pipe 2 ,
+.Xr poll 2 ,
+.Xr pread 2 ,
+.Xr preadv 2 ,
+.Xr pwrite 2 ,
+.Xr pwritev 2 ,
+.Xr read 2 ,
+.Xr readv 2 ,
+.Xr recv 2 ,
+.Xr recvfrom 2 ,
+.Xr recvmsg 2 ,
+.Xr renameat 2 ,
+.Xr sctp_peeloff 2 ,
+.Xr select 2 ,
+.Xr send 2 ,
+.Xr sendmsg 2 ,
+.Xr sendto 2 ,
+.Xr setsockopt 2 ,
+.Xr shm_open 2 ,
+.Xr shutdown 2 ,
+.Xr socket 2 ,
+.Xr socketpair 2 ,
+.Xr symlinkat 2 ,
+.Xr unlinkat 2 ,
+.Xr write 2 ,
+.Xr writev 2 ,
+.Xr acl_delete_fd_np 3 ,
+.Xr acl_get_fd 3 ,
+.Xr acl_get_fd_np 3 ,
+.Xr acl_set_fd 3 ,
+.Xr acl_set_fd_np 3 ,
+.Xr acl_valid_fd_np 3 ,
+.Xr mac_get_fd 3 ,
+.Xr mac_set_fd 3 ,
+.Xr sem_getvalue 3 ,
+.Xr sem_post 3 ,
+.Xr sem_trywait 3 ,
+.Xr sem_wait 3 ,
+.Xr capsicum 4 ,
+.Xr snp 4
+.Sh HISTORY
+Support for capabilities and capabilities mode was developed as part of the
+.Tn TrustedBSD
+Project.
+.Sh AUTHORS
+.An -nosplit
+This manual page was created by
+.An Pawel Jakub Dawidek Aq pawel@dawidek.net
+under sponsorship from the FreeBSD Foundation based on the
+.Xr cap_new 2
+manual page by
+.An "Robert Watson" Aq rwatson@FreeBSD.org .
diff --git a/share/man/man4/rl.4 b/share/man/man4/rl.4
new file mode 100644
index 0000000..583274b
--- /dev/null
+++ b/share/man/man4/rl.4
@@ -0,0 +1,312 @@
+.\" Copyright (c) 1997, 1998
+.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 16, 2013
+.Dt RL 4
+.Os
+.Sh NAME
+.Nm rl
+.Nd "RealTek 8129/8139 Fast Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device rl"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_rl_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Ethernet adapters and embedded
+controllers based on the RealTek 8129 and 8139 Fast Ethernet controller
+chips.
+.Pp
+The RealTek 8129/8139 series controllers use bus master DMA but do not use a
+descriptor-based data transfer mechanism.
+The receiver uses a
+single fixed size ring buffer from which packets must be copied
+into mbufs.
+For transmission, there are only four outbound packet
+address registers which require all outgoing packets to be stored
+as contiguous buffers.
+Furthermore, outbound packet buffers must
+be longword aligned or else transmission will fail.
+.Pp
+The 8129 differs from the 8139 in that the 8139 has an internal
+PHY which is controlled through special direct access registers
+whereas the 8129 uses an external PHY via an MII bus.
+The 8139
+supports both 10 and 100Mbps speeds in either full or half duplex.
+The 8129 can support the same speeds and modes given an appropriate
+PHY chip.
+.Pp
+Note: support for the 8139C+ chip is provided by the
+.Xr re 4
+driver.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It autoselect
+Enable autoselection of the media type and options.
+This is only
+supported if the PHY chip attached to the RealTek controller
+supports NWAY autonegotiation.
+The user can manually override
+the autoselected mode by adding media options to the
+.Pa /etc/rc.conf
+file.
+.It 10baseT/UTP
+Set 10Mbps operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.It 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It full-duplex
+Force full duplex operation.
+.It half-duplex
+Force half duplex operation.
+.El
+.Pp
+Note that the 100baseTX media type is only available if supported
+by the adapter.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+Adapters supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Accton
+.Dq Cheetah
+EN1207D (MPX 5030/5038; RealTek 8139 clone)
+.It
+Allied Telesyn AT2550
+.It
+Allied Telesyn AT2500TX
+.It
+Belkin F5D5000
+.It
+BUFFALO (Melco INC.) LPC-CB-CLX (CardBus)
+.It
+Compaq HNE-300
+.It
+CompUSA no-name 10/100 PCI Ethernet NIC
+.It
+Corega FEther CB-TXD
+.It
+Corega FEtherII CB-TXD
+.It
+D-Link DFE-520TX (rev. C1)
+.It
+D-Link DFE-528TX
+.It
+D-Link DFE-530TX+
+.It
+D-Link DFE-538TX
+.It
+D-Link DFE-690TXD
+.It
+Edimax EP-4103DL CardBus
+.It
+Encore ENL832-TX 10/100 M PCI
+.It
+Farallon NetLINE 10/100 PCI
+.It
+Genius GF100TXR
+.It
+GigaFast Ethernet EE100-AXP
+.It
+KTX-9130TX 10/100 Fast Ethernet
+.It
+LevelOne FPC-0106TX
+.It
+Longshine LCS-8038TX-R
+.It
+NDC Communications NE100TX-E
+.It
+Netronix Inc.\& EA-1210 NetEther 10/100
+.It
+Nortel Networks 10/100BaseTX
+.It
+OvisLink LEF-8129TX
+.It
+OvisLink LEF-8139TX
+.It
+Peppercon AG ROL-F
+.It
+Planex FNW-3603-TX
+.It
+Planex FNW-3800-TX
+.It
+SMC EZ Card 10/100 PCI 1211-TX
+.It
+SOHO (PRAGMATIC) UE-1211C
+.El
+.Sh LOADER TUNABLES
+.Bl -tag -width indent
+.It Va dev.rl.%unit.prefer_iomap
+This tunable controls which register mapping should be used on the
+specified device.
+A non-zero value enables I/O space register mapping.
+For controllers that have no I/O space register mapping this tunable
+should be set to 0 to use memory space register mapping.
+The default value is 1 to use I/O space register mapping.
+.It Va dev.rl.%unit.twister_enable
+Non-zero value enables the long cable tuning on the specified device.
+Disabled by default.
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "rl%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "rl%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "rl%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.It "rl%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.It "rl%d: no memory for tx list"
+The driver failed to allocate an mbuf for the transmitter ring when
+allocating a pad buffer or collapsing an mbuf chain into a cluster.
+.It "rl%d: chip is in D3 power state -- setting to D0"
+This message applies only to adapters which support power
+management.
+Some operating systems place the controller in low power
+mode when shutting down, and some PCI BIOSes fail to bring the chip
+out of this state before configuring it.
+The controller loses all of
+its PCI configuration in the D3 state, so if the BIOS does not set
+it back to full power mode in time, it will not be able to configure it
+correctly.
+The driver tries to detect this condition and bring
+the adapter back to the D0 (full power) state, but this may not be
+enough to return the driver to a fully operational condition.
+If
+you see this message at boot time and the driver fails to attach
+the device as a network interface, you will have to perform second
+warm boot to have the device properly configured.
+.Pp
+Note that this condition only occurs when warm booting from another
+operating system.
+If you power down your system prior to booting
+.Fx ,
+the card should be configured correctly.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr ifconfig 8
+.Rs
+.%B The RealTek 8129, 8139 and 8139C+ datasheets
+.%U http://www.realtek.com.tw
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ctr.columbia.edu .
+.Sh BUGS
+Since outbound packets must be longword aligned, the transmit
+routine has to copy an unaligned packet into an mbuf cluster buffer
+before transmission.
+The driver abuses the fact that the cluster buffer
+pool is allocated at system startup time in a contiguous region starting
+at a page boundary.
+Since cluster buffers are 2048 bytes, they are
+longword aligned by definition.
+The driver probably should not be
+depending on this characteristic.
+.Pp
+The RealTek data sheets are of especially poor quality,
+and there is a lot of information missing
+particularly concerning the receiver operation.
+One particularly
+important fact that the data sheets fail to mention relates to the
+way in which the chip fills in the receive buffer.
+When an interrupt
+is posted to signal that a frame has been received, it is possible that
+another frame might be in the process of being copied into the receive
+buffer while the driver is busy handling the first one.
+If the driver
+manages to finish processing the first frame before the chip is done
+DMAing the rest of the next frame, the driver may attempt to process
+the next frame in the buffer before the chip has had a chance to finish
+DMAing all of it.
+.Pp
+The driver can check for an incomplete frame by inspecting the frame
+length in the header preceding the actual packet data: an incomplete
+frame will have the magic length of 0xFFF0.
+When the driver encounters
+this value, it knows that it has finished processing all currently
+available packets.
+Neither this magic value nor its significance are
+documented anywhere in the RealTek data sheets.
diff --git a/share/man/man4/rndtest.4 b/share/man/man4/rndtest.4
new file mode 100644
index 0000000..67448d8
--- /dev/null
+++ b/share/man/man4/rndtest.4
@@ -0,0 +1,72 @@
+.\"-
+.\" Copyright (c) 2003 Sam Leffler, Errno Consulting
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 11, 2003
+.Dt RNDTEST 4
+.Os
+.Sh NAME
+.Nm rndtest
+.Nd FIPS 140-2 random number generator test monitor
+.Sh SYNOPSIS
+.Cd "device rndtest"
+.Sh DESCRIPTION
+The
+.Nm
+driver
+.Dq "hooks up"
+to hardware crypto devices to monitor the
+entropy data passed to the
+.Xr random 4
+subsystem.
+This data is periodically tested for FIPS 140-2 compliance and
+statistics are collected.
+If the harvested entropy fails any of the FIPS test suite, then
+it is discarded and testing is continuously applied until
+.Dq "good data"
+is received from the device.
+Failures are optionally reported on the console.
+.Sh SEE ALSO
+.Xr crypto 4 ,
+.Xr hifn 4 ,
+.Xr random 4 ,
+.Xr safe 4 ,
+.Xr ubsec 4 ,
+.Xr crypto 9
+.Sh HISTORY
+The idea for this and the original code came from
+.An "Jason L. Wright" .
+The
+.Nm
+device driver first appeared in
+.Fx 5.0 .
+.Sh BUGS
+Crypto device drivers must be compiled specially to make use of this driver;
+this should not be necessary.
+This feature might better be integrated into the
+.Xr random 4
+subsystem where it can be applied to devices that claim to supply
+.Dq "pure entropy" .
diff --git a/share/man/man4/route.4 b/share/man/man4/route.4
new file mode 100644
index 0000000..f20e90d
--- /dev/null
+++ b/share/man/man4/route.4
@@ -0,0 +1,329 @@
+.\" Copyright (c) 1990, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" From: @(#)route.4 8.6 (Berkeley) 4/19/94
+.\" $FreeBSD$
+.\"
+.Dd November 4, 2004
+.Dt ROUTE 4
+.Os
+.Sh NAME
+.Nm route
+.Nd kernel packet forwarding database
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/time.h
+.In sys/socket.h
+.In net/if.h
+.In net/route.h
+.Ft int
+.Fn socket PF_ROUTE SOCK_RAW "int family"
+.Sh DESCRIPTION
+.Fx
+provides some packet routing facilities.
+The kernel maintains a routing information database, which
+is used in selecting the appropriate network interface when
+transmitting packets.
+.Pp
+A user process (or possibly multiple co-operating processes)
+maintains this database by sending messages over a special kind
+of socket.
+This supplants fixed size
+.Xr ioctl 2 Ns 's
+used in earlier releases.
+Routing table changes may only be carried out by the super user.
+.Pp
+The operating system may spontaneously emit routing messages in response
+to external events, such as receipt of a re-direct, or failure to
+locate a suitable route for a request.
+The message types are described in greater detail below.
+.Pp
+Routing database entries come in two flavors: for a specific
+host, or for all hosts on a generic subnetwork (as specified
+by a bit mask and value under the mask.
+The effect of wildcard or default route may be achieved by using
+a mask of all zeros, and there may be hierarchical routes.
+.Pp
+When the system is booted and addresses are assigned
+to the network interfaces, each protocol family
+installs a routing table entry for each interface when it is ready for traffic.
+Normally the protocol specifies the route
+through each interface as a
+.Dq direct
+connection to the destination host
+or network.
+If the route is direct, the transport layer of
+a protocol family usually requests the packet be sent to the
+same host specified in the packet.
+Otherwise, the interface
+is requested to address the packet to the gateway listed in the routing entry
+(i.e., the packet is forwarded).
+.Pp
+When routing a packet,
+the kernel will attempt to find
+the most specific route matching the destination.
+(If there are two different mask and value-under-the-mask pairs
+that match, the more specific is the one with more bits in the mask.
+A route to a host is regarded as being supplied with a mask of
+as many ones as there are bits in the destination).
+If no entry is found, the destination is declared to be unreachable,
+and a routing-miss message is generated if there are any
+listeners on the routing control socket described below.
+.Pp
+A wildcard routing entry is specified with a zero
+destination address value, and a mask of all zeroes.
+Wildcard routes will be used
+when the system fails to find other routes matching the
+destination.
+The combination of wildcard
+routes and routing redirects can provide an economical
+mechanism for routing traffic.
+.Pp
+One opens the channel for passing routing control messages
+by using the socket call shown in the synopsis above:
+.Pp
+The
+.Fa family
+parameter may be
+.Dv AF_UNSPEC
+which will provide
+routing information for all address families, or can be restricted
+to a specific address family by specifying which one is desired.
+There can be more than one routing socket open per system.
+.Pp
+Messages are formed by a header followed by a small
+number of sockaddrs (now variable length particularly
+in the
+.Tn ISO
+case), interpreted by position, and delimited
+by the new length entry in the sockaddr.
+An example of a message with four addresses might be an
+.Tn ISO
+redirect:
+Destination, Netmask, Gateway, and Author of the redirect.
+The interpretation of which address are present is given by a
+bit mask within the header, and the sequence is least significant
+to most significant bit within the vector.
+.Pp
+Any messages sent to the kernel are returned, and copies are sent
+to all interested listeners.
+The kernel will provide the process
+ID for the sender, and the sender may use an additional sequence
+field to distinguish between outstanding messages.
+However, message replies may be lost when kernel buffers are exhausted.
+.Pp
+The kernel may reject certain messages, and will indicate this
+by filling in the
+.Ar rtm_errno
+field.
+The routing code returns
+.Er EEXIST
+if
+requested to duplicate an existing entry,
+.Er ESRCH
+if
+requested to delete a non-existent entry,
+or
+.Er ENOBUFS
+if insufficient resources were available
+to install a new route.
+In the current implementation, all routing processes run locally,
+and the values for
+.Ar rtm_errno
+are available through the normal
+.Em errno
+mechanism, even if the routing reply message is lost.
+.Pp
+A process may avoid the expense of reading replies to
+its own messages by issuing a
+.Xr setsockopt 2
+call indicating that the
+.Dv SO_USELOOPBACK
+option
+at the
+.Dv SOL_SOCKET
+level is to be turned off.
+A process may ignore all messages from the routing socket
+by doing a
+.Xr shutdown 2
+system call for further input.
+.Pp
+If a route is in use when it is deleted,
+the routing entry will be marked down and removed from the routing table,
+but the resources associated with it will not
+be reclaimed until all references to it are released.
+User processes can obtain information about the routing
+entry to a specific destination by using a
+.Dv RTM_GET
+message, or by calling
+.Xr sysctl 3 .
+.Pp
+Messages include:
+.Bd -literal
+#define RTM_ADD 0x1 /* Add Route */
+#define RTM_DELETE 0x2 /* Delete Route */
+#define RTM_CHANGE 0x3 /* Change Metrics, Flags, or Gateway */
+#define RTM_GET 0x4 /* Report Information */
+#define RTM_LOSING 0x5 /* Kernel Suspects Partitioning */
+#define RTM_REDIRECT 0x6 /* Told to use different route */
+#define RTM_MISS 0x7 /* Lookup failed on this address */
+#define RTM_LOCK 0x8 /* fix specified metrics */
+#define RTM_RESOLVE 0xb /* request to resolve dst to LL addr - unused */
+#define RTM_NEWADDR 0xc /* address being added to iface */
+#define RTM_DELADDR 0xd /* address being removed from iface */
+#define RTM_IFINFO 0xe /* iface going up/down etc. */
+#define RTM_NEWMADDR 0xf /* mcast group membership being added to if */
+#define RTM_DELMADDR 0x10 /* mcast group membership being deleted */
+#define RTM_IFANNOUNCE 0x11 /* iface arrival/departure */
+#define RTM_IEEE80211 0x12 /* IEEE80211 wireless event */
+.Ed
+.Pp
+A message header consists of one of the following:
+.Bd -literal
+struct rt_msghdr {
+ u_short rtm_msglen; /* to skip over non-understood messages */
+ u_char rtm_version; /* future binary compatibility */
+ u_char rtm_type; /* message type */
+ u_short rtm_index; /* index for associated ifp */
+ int rtm_flags; /* flags, incl. kern & message, e.g. DONE */
+ int rtm_addrs; /* bitmask identifying sockaddrs in msg */
+ pid_t rtm_pid; /* identify sender */
+ int rtm_seq; /* for sender to identify action */
+ int rtm_errno; /* why failed */
+ int rtm_fmask; /* bitmask used in RTM_CHANGE message */
+ u_long rtm_inits; /* which metrics we are initializing */
+ struct rt_metrics rtm_rmx; /* metrics themselves */
+};
+
+struct if_msghdr {
+ u_short ifm_msglen; /* to skip over non-understood messages */
+ u_char ifm_version; /* future binary compatibility */
+ u_char ifm_type; /* message type */
+ int ifm_addrs; /* like rtm_addrs */
+ int ifm_flags; /* value of if_flags */
+ u_short ifm_index; /* index for associated ifp */
+ struct if_data ifm_data; /* statistics and other data about if */
+};
+
+struct ifa_msghdr {
+ u_short ifam_msglen; /* to skip over non-understood messages */
+ u_char ifam_version; /* future binary compatibility */
+ u_char ifam_type; /* message type */
+ int ifam_addrs; /* like rtm_addrs */
+ int ifam_flags; /* value of ifa_flags */
+ u_short ifam_index; /* index for associated ifp */
+ int ifam_metric; /* value of ifa_metric */
+};
+
+struct ifma_msghdr {
+ u_short ifmam_msglen; /* to skip over non-understood messages */
+ u_char ifmam_version; /* future binary compatibility */
+ u_char ifmam_type; /* message type */
+ int ifmam_addrs; /* like rtm_addrs */
+ int ifmam_flags; /* value of ifa_flags */
+ u_short ifmam_index; /* index for associated ifp */
+};
+
+struct if_announcemsghdr {
+ u_short ifan_msglen; /* to skip over non-understood messages */
+ u_char ifan_version; /* future binary compatibility */
+ u_char ifan_type; /* message type */
+ u_short ifan_index; /* index for associated ifp */
+ char ifan_name[IFNAMSIZ]; /* if name, e.g. "en0" */
+ u_short ifan_what; /* what type of announcement */
+};
+.Ed
+.Pp
+The
+.Dv RTM_IFINFO
+message uses a
+.Ar if_msghdr
+header, the
+.Dv RTM_NEWADDR
+and
+.Dv RTM_DELADDR
+messages use a
+.Ar ifa_msghdr
+header, the
+.Dv RTM_NEWMADDR
+and
+.Dv RTM_DELMADDR
+messages use a
+.Vt ifma_msghdr
+header, the
+.Dv RTM_IFANNOUNCE
+message uses a
+.Vt if_announcemsghdr
+header,
+and all other messages use the
+.Ar rt_msghdr
+header.
+.Pp
+The
+.Dq Li "struct rt_metrics"
+and the flag bits are as defined in
+.Xr rtentry 9 .
+.Pp
+Specifiers for metric values in rmx_locks and rtm_inits are:
+.Bd -literal
+#define RTV_MTU 0x1 /* init or lock _mtu */
+#define RTV_HOPCOUNT 0x2 /* init or lock _hopcount */
+#define RTV_EXPIRE 0x4 /* init or lock _expire */
+#define RTV_RPIPE 0x8 /* init or lock _recvpipe */
+#define RTV_SPIPE 0x10 /* init or lock _sendpipe */
+#define RTV_SSTHRESH 0x20 /* init or lock _ssthresh */
+#define RTV_RTT 0x40 /* init or lock _rtt */
+#define RTV_RTTVAR 0x80 /* init or lock _rttvar */
+#define RTV_WEIGHT 0x100 /* init or lock _weight */
+.Ed
+.Pp
+Specifiers for which addresses are present in the messages are:
+.Bd -literal
+#define RTA_DST 0x1 /* destination sockaddr present */
+#define RTA_GATEWAY 0x2 /* gateway sockaddr present */
+#define RTA_NETMASK 0x4 /* netmask sockaddr present */
+#define RTA_GENMASK 0x8 /* cloning mask sockaddr present - unused */
+#define RTA_IFP 0x10 /* interface name sockaddr present */
+#define RTA_IFA 0x20 /* interface addr sockaddr present */
+#define RTA_AUTHOR 0x40 /* sockaddr for author of redirect */
+#define RTA_BRD 0x80 /* for NEWADDR, broadcast or p-p dest addr */
+.Ed
+.Sh SEE ALSO
+.Xr sysctl 3 ,
+.Xr route 8 ,
+.Xr rtentry 9
+.Pp
+The constants for the
+.Va rtm_flags
+field are documented in the manual page for the
+.Xr route 8
+utility.
+.Sh HISTORY
+A
+.Dv PF_ROUTE
+protocol family first appeared in
+.Bx 4.3 reno .
diff --git a/share/man/man4/rp.4 b/share/man/man4/rp.4
new file mode 100644
index 0000000..a894f12
--- /dev/null
+++ b/share/man/man4/rp.4
@@ -0,0 +1,195 @@
+.\" Copyright (c) 1995 Comtrol, Inc.
+.\" All rights reserved.
+.\"
+.\" $FreeBSD$
+.Dd November 15, 1995
+.Dt RP 4
+.Os
+.Sh NAME
+.Nm rp
+.Nd "driver for Comtrol RocketPort Intelligent Serial Port Cards"
+.Sh SYNOPSIS
+.Cd "device rp"
+.Pp
+For ISA cards, you must specify the port address in
+.Pa /boot/device.hints :
+.Cd hint.rp.0.at="isa"
+.Cd hint.rp.0.port="0x100"
+.Sh DESCRIPTION
+This driver provides a kernel device driver for the
+.Tn RocketPort
+and
+.Tn RocketPort RA
+serial boards.
+These boards provide 8, 16, or 32 high-speed serial ports
+while requiring only 68 bytes of I/O space for all 8, 16,
+or 32 ports, and do not require an interrupt channel.
+This driver supports up to four
+.Tn RocketPort
+or
+.Tn RocketPort RA
+boards in one machine simultaneously.
+If you are using four 32 port
+.Tn RocketPort
+boards, you can put as many as 128 intelligent serial ports
+on your system.
+.Pp
+The
+.Nm
+driver supports the following speeds: 50, 75, 110, 134, 150,
+200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 7200,
+14400, 57600, 76800, 115200, and 230400.
+(You must use
+.Xr termios 4 ,
+rather than the old style ioctl interface to use non-traditional
+speeds.)
+.Pp
+An open on the
+.Nm
+driver will block until carrier is present, unless
+.Dv O_NONBLOCK
+or
+.Dv CLOCAL
+is set.
+.Sh HARDWARE CONFIGURATION
+The first
+.Tn RocketPort
+or
+.Tn RocketPort RA
+card requires a 68-byte contiguous block of I/O addresses,
+starting at one of the following:
+0x100h, 0x140h, 0x180h, 0x200h, 0x240h, 0x280h, 0x300h, 0x340h,
+0x380h.
+The second, third, and fourth
+.Tn RocketPort
+cards require only a
+64-byte contiguous block of I/O addresses, starting at one of the
+above address ranges.
+The I/O address range used by any of the
+.Tn RocketPort
+cards must not conflict with any other cards in the system,
+including other
+.Tn RocketPort
+cards.
+The starting range of the I/O ports used by each card
+must match with the I/O address specified in
+.Pa /boot/device.hints .
+.Pp
+Since the first
+.Tn RocketPort
+uses 68 I/O addresses, if the first card is
+set to use an I/O block starting at 0x100,
+it will occupy the I/O ports between 0x100 and 0x143.
+This means that the second, third, or fourth
+.Tn RocketPort
+board may not use the block of addresses starting at 0x140,
+since the first three I/O addresses of that range
+are used by the first board.
+This is an important point to keep in mind.
+.Pp
+If you have two ISA cards, one installed at 0x100 and the
+second installed at 0x180, then you should add the following to
+.Pa /boot/device.hints :
+.Pp
+.Dl hint.rp.0.at="isa"
+.Dl hint.rp.0.port="0x100"
+.Dl hint.rp.1.at="isa"
+.Dl hint.rp.1.port="0x180"
+.Pp
+The configuration of the
+.Tn RocketPort
+cards is done via the set of 8 DIP switches,
+labeled SW1 on the
+.Tn RocketPort
+card:
+.Bd -literal -offset indent
++-------------------------------+
+| 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
++-------+-------+---------------+
+| Unused| Card | I/O Port Block|
++-------------------------------+
+.Ed
+.Pp
+DIP switches 7 and 8 are unused, and must be left on.
+.Pp
+DIP switches 6 and 5 identify the card number of each
+.Tn RocketPort
+card.
+The first card installed in the system must have its DIP switches set
+as card number one; the second card installed in the system must have
+its DIP switches set as card number two; and so on.
+As shipped from
+the factory, DIP switches 6 and 5 are both on by default, indicating
+that this is the first card installed on the system:
+.Bd -literal -offset indent
+DIP Switches
+6 5
+===================
+On On First Card
+On Off Second Card
+Off On Third Card
+Off Off Fourth Card
+.Ed
+.Pp
+DIP switches 4, 3, 2, and 1 indicate the I/O address range used by the
+first
+.Tn RocketPort
+card.
+If there are more than one
+.Tn RocketPort
+cards installed in a system,
+the second, third and fourth
+.Tn RocketPort
+cards must
+also be set to the I/O address range used by the first
+.Tn RocketPort
+card;
+all cards must have these DIP switches set identically
+for proper operation.
+As shipped from the factory, DIP switch 4 is on,
+and switches 3, 2, and 1 are off by default,
+indicating an I/O address range used by the first
+card which starts at 0x180 and extends to 0x1C3.
+.Bd -literal -offset indent
+DIP Switches I/O Address Range
+4 3 2 1 Used by the First Card
+=====================================
+On Off On Off 100-143
+On Off Off On 140-183
+On Off Off Off 180-1C3
+Off On On Off 200-243
+Off On Off On 240-283
+Off On Off Off 280-2C3
+Off Off On Off 300-343
+Off Off Off On 340-383
+Off Off Off Off 380-3C3
+.Ed
+.Sh FILES
+.Bl -tag -width ".Pa /dev/ttyR[0-4][0-9a-f]"
+.It Pa /dev/ttyR[0-4][0-9a-f]
+.El
+.Sh AUTHORS
+.An Theodore Ts'o Aq tytso@mit.edu
+.Pp
+This driver was written under contract for Comtrol Corporation.
+For dealer, distributor and other information regarding Comtrol
+.Tn RocketPort ,
+contact Comtrol Corporation at (800) 926-6876 or send email to
+.Aq info@comtrol.com .
+To report bugs for this driver, please send email to
+.Aq bug-bsdi-rocketport@comtrol.com .
+.Sh BUGS
+If incoming software flow control is enabled on a 486 or Pentium
+machine, and the flow control is very heavily exercised, on rare occasions
+a character will get dropped.
+This problem does not occur on a 386, and
+it is not currently known whether the bug is in the
+.Nm
+driver
+or in the
+.Bsx
+tty layer.
+.\" (Although my bet is that it's in the higher-level tty layer;
+.\" given the bugs I found while writing this driver, it's clear
+.\" the BSD software flow control code has not been tested very much
+.\" at all! -- TYT)
diff --git a/share/man/man4/rsu.4 b/share/man/man4/rsu.4
new file mode 100644
index 0000000..e26e358
--- /dev/null
+++ b/share/man/man4/rsu.4
@@ -0,0 +1,181 @@
+.\" $OpenBSD: rsu.4,v 1.11 2013/02/14 07:40:42 jmc Exp $
+.\" $FreeBSD$
+.\"
+.\" Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd May 3, 2014
+.Dt RSU 4
+.Os
+.Sh NAME
+.Nm rsu
+.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device rsu"
+.Cd "device wlan"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time,
+place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_rsu_load="YES"
+.Ed
+.Pp
+After you have read the license in
+.Pa /usr/share/doc/legal/realtek
+you will want to add the following lines to
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+legal.realtek.license_ack=1
+rsu-rtl8712fw_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports USB 2.0 wireless network devices based on Realtek
+RTL8188SU, RTL8191SU and RTL8192SU chipsets.
+.Pp
+The RTL8188SU is a highly integrated 802.11n adapter that combines
+a MAC, a 1T1R capable baseband and an RF in a single chip.
+It operates in the 2GHz spectrum only.
+.Pp
+The RTL8191SU is a highly integrated multiple-in, single-out (MISO)
+802.11n adapter that combines a MAC, a 1T2R capable baseband and an
+RF in a single chip.
+It operates in the 2GHz spectrum only.
+.Pp
+The RTL8192SU is a highly integrated multiple-in, multiple-out (MIMO)
+802.11n adapter that combines a MAC, a 2T2R capable baseband and an
+RF in a single chip.
+It operates in the 2GHz spectrum only.
+.Pp
+These are the modes the
+.Nm
+driver can operate in:
+.Bl -tag -width "IBSS-masterXX"
+.It BSS mode
+Also known as
+.Em infrastructure
+mode, this is used when associating with an access point, through
+which all traffic passes.
+This mode is the default.
+.El
+.Pp
+The
+.Nm
+driver can be configured to use
+Wired Equivalent Privacy (WEP) or
+Wi-Fi Protected Access (WPA-PSK and WPA2-PSK).
+WPA is the de facto encryption standard for wireless networks.
+It is strongly recommended that WEP
+not be used as the sole mechanism
+to secure wireless communication,
+due to serious weaknesses in it.
+.Pp
+The
+.Nm
+driver can be configured at runtime with
+.Xr ifconfig 8 .
+.Sh FILES
+The driver needs at least version 1.2 of the following firmware file,
+which is loaded when an interface is attached:
+.Pp
+.Bl -tag -width Ds -offset indent -compact
+.It Pa /boot/kernel/rsu-rtl8712fw.ko
+.El
+.Sh HARDWARE
+The
+.Nm
+driver provices support for Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n
+wireless network adapters, including:
+.Pp
+.Bl -tag -width Ds -offset indent -compact
+.It ASUS USB-N10
+.It Belkin F7D1101 v1
+.It D-Link DWA-131 A1
+.It EDUP EP-MS150N(W)
+.It Hercules HWGUn-54
+.It Hercules HWNUm-300
+.It Planex GW-USNano
+.It Sitecom WL-349 v1
+.It Sitecom WL-353
+.It Sweex LW154
+.It TRENDnet TEW-648UB
+.It TRENDnet TEW-649UB
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev rsu0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev rsu0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev rsu0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "%s: failed load firmware of file rsu-rtl8712fw"
+For some reason, the driver was unable to read the microcode file from the
+filesystem.
+The file might be missing or corrupted.
+.It "device timeout"
+A frame dispatched to the hardware for transmission did not complete in time.
+The driver will reset the hardware.
+This should not happen.
+.El
+.Sh SEE ALSO
+.Xr intro 1 ,
+.Xr usb 4 ,
+.Xr netintro 4 ,
+.Xr rsufw 4 ,
+.Xr wlan 4 ,
+.Xr arp 8 ,
+.Xr hostapd 8 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 4.9 and
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Damien Bergamini Aq damien@openbsd.org
+and ported by
+.An Rui Paulo Aq rpaulo@freebsd.org .
+.Sh CAVEATS
+The
+.Nm
+driver does not support any of the 802.11n capabilities offered by the
+adapters.
diff --git a/share/man/man4/rsufw.4 b/share/man/man4/rsufw.4
new file mode 100644
index 0000000..a50e094
--- /dev/null
+++ b/share/man/man4/rsufw.4
@@ -0,0 +1,46 @@
+.\" $FreeBSD$
+.\" Copyright (c) 2013 Idwer Vollering <vidwer@gmail.com>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd July 21, 2013
+.Dt RSUFW 4
+.Os
+.Sh NAME
+.Nm rsufw
+.Nd "Firmware Module for Realtek driver"
+.Sh SYNOPSIS
+To compile this module into the kernel, place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device rsufw"
+.Ed
+.Pp
+This will include the firmware image, RTL8712, inside the kernel.
+.Xr rsu 4
+will load the image into the chip.
+.Pp
+Alternatively, to load the firmware images as a module at boot time, place
+the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+rsu-rtl8712fw_load="YES"
+.Ed
+.Sh DESCRIPTION
+This module provides the firmware for the Realtek RTL8188SU and
+RTL8192SU chip based USB WiFi adapters.
+Please read Realtek's license,
+.Pa /usr/share/license/realtek .
+.Sh SEE ALSO
+.Xr rsu 4 ,
+.Xr firmware 9
diff --git a/share/man/man4/rue.4 b/share/man/man4/rue.4
new file mode 100644
index 0000000..06f91e8
--- /dev/null
+++ b/share/man/man4/rue.4
@@ -0,0 +1,154 @@
+.\"
+.\" Copyright (c) 2001-2003, Shunsuke Akiyama <akiyama@FreeBSD.org>.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 23, 2011
+.Dt RUE 4
+.Os
+.Sh NAME
+.Nm rue
+.Nd "RealTek RTL8150 USB to Fast Ethernet controller driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device miibus"
+.Cd "device rue"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_rue_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB Ethernet adapters based on the RealTek
+RTL8150 USB to Fast Ethernet controller chip.
+.Pp
+The RTL8150 contains an integrated Fast Ethernet MAC, which supports
+both 10 and 100Mbps speeds in either full or half duplex.
+Although designed to interface with
+100Mbps peripheral, the existing USB standard specifies a maximum
+transfer speed of 12Mbps.
+Users should therefore not expect to actually
+achieve 100Mbps speeds with this device.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable auto selection of the media type and options.
+The user can manually override
+the auto selected mode by adding media options to the
+.Pa /etc/rc.conf
+file.
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+The
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports RealTek RTL8150 based USB Ethernet
+adapters including:
+.Pp
+.Bl -bullet -compact
+.It
+Buffalo (Melco Inc.) LUA-KTX
+.It
+Green House GH-USB100B
+.It
+LinkSys USB100M
+.It
+Billionton 10/100 FastEthernet USBKR2
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "rue%d: watchdog timeout"
+A packet was queued for transmission and a transmit command was
+issued, however the device failed to acknowledge the transmission
+before a timeout expired.
+.It "rue%d: rx list init failed"
+The driver failed to allocate an mbuf for the transmitter ring.
+.It "rue%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Rs
+.%T "RealTek RTL8150 data sheet"
+.%U http://pdf.seekdatasheet.com/2008714/200807142333305235.pdf
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.1 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Shunsuke Akiyama Aq akiyama@FreeBSD.org .
diff --git a/share/man/man4/rum.4 b/share/man/man4/rum.4
new file mode 100644
index 0000000..6e45689
--- /dev/null
+++ b/share/man/man4/rum.4
@@ -0,0 +1,187 @@
+.\"
+.\" Copyright (c) 2005-2007
+.\" Damien Bergamini <damien.bergamini@free.fr>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 13, 2008
+.Dt RUM 4
+.Os
+.Sh NAME
+.Nm rum
+.Nd Ralink Technology USB IEEE 802.11a/b/g wireless network device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device rum"
+.Cd "device wlan"
+.Cd "device wlan_amrr"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_rum_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports USB 2.0 and PCI Express Mini Card wireless adapters
+based on the Ralink RT2501USB and RT2601USB chipsets.
+.Pp
+Ralink PCI Express Mini Card adapters show up as normal USB 2.0
+devices and are thus handled by the
+.Nm
+driver.
+.Pp
+The RT2501USB chipset is the second generation of 802.11a/b/g adapters from
+Ralink.
+It consists of two integrated chips, an RT2571W MAC/BBP and an RT2528 or
+RT5226 radio transceiver.
+.Pp
+The RT2601USB chipset consists of two integrated chips, an RT2671
+MAC/BBP and an RT2527 or RT5225 radio transceiver.
+This chipset uses the MIMO (multiple-input multiple-output) technology
+with multiple antennas to extend the operating range of the adapter
+and to achieve higher throughput.
+.Pp
+.Nm
+supports
+.Cm station ,
+.Cm adhoc ,
+.Cm hostap ,
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports USB 2.0 wireless
+adapters based on the Ralink RT2501USB and RT2601USB chipsets,
+including:
+.Pp
+.Bl -column -compact "Atlantis Land A02-PCM-W54" "Bus"
+.It Em Card Ta Em Bus
+.It "3Com Aolynk WUB320g" Ta USB
+.It "Abocom WUG2700 Ta" Ta USB
+.It "Airlink101 AWLL5025" Ta USB
+.It "ASUS WL-167g ver 2" Ta USB
+.It "Belkin F5D7050 ver 3" Ta USB
+.It "Belkin F5D9050 ver 3" Ta USB
+.It "Buffalo WLI-U2-SG54HP" Ta USB
+.It "Buffalo WLI-U2-SG54HG" Ta USB
+.It "Buffalo WLI-U2-G54HP" Ta USB
+.It "Buffalo WLI-UC-G" Ta USB
+.It "CNet CWD-854 ver F" Ta USB
+.It "Conceptronic C54RU ver 2" Ta USB
+.It "Corega CG-WLUSB2GO" Ta USB
+.It "D-Link DWA-110" Ta USB
+.It "D-Link DWA-111" Ta USB
+.It "D-Link DWL-G122 rev C1" Ta USB
+.It "D-Link WUA-1340" Ta USB
+.It "Digitus DN-7003GR" Ta USB
+.It "Edimax EW-7318USG" Ta USB
+.It "Gigabyte GN-WB01GS" Ta USB
+.It "Gigabyte GN-WI05GS" Ta USB
+.It "Hawking HWUG1" Ta USB
+.It "Hawking HWU54DM" Ta USB
+.It "Hercules HWGUSB2-54-LB" Ta USB
+.It "Hercules HWGUSB2-54V2-AP" Ta USB
+.It "LevelOne WNC-0301USB v3" Ta USB
+.It "Linksys WUSB54G rev C" Ta USB
+.It "Linksys WUSB54GR" Ta USB
+.It "Planex GW-US54HP" Ta USB
+.It "Planex GW-US54Mini2" Ta USB
+.It "Planex GW-USMM" Ta USB
+.It "Senao NUB-3701" Ta USB
+.It "Sitecom WL-113 ver 2" Ta USB
+.It "Sitecom WL-172" Ta USB
+.It "Sweex LW053" Ta USB
+.It "TP-LINK TL-WN321G" Ta USB
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev rum0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev rum0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev rum0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Pp
+Join a specific BSS network with 128-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev rum0 wlanmode adhoc ssid my_net \e
+ wepmode on wepkey 0x01020304050607080910111213 weptxkey 1
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "rum%d: could not load 8051 microcode"
+An error occurred while attempting to upload the microcode to the onboard 8051
+microcontroller unit.
+The driver will reset the hardware.
+This should not happen.
+.El
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr netintro 4 ,
+.Xr usb 4 ,
+.Xr wlan 4 ,
+.Xr wlan_amrr 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr wlan_xauth 4 ,
+.Xr ifconfig 8 ,
+.Xr hostapd 8 ,
+.Xr wpa_supplicant 8 .
+.Rs
+.%T "Ralink Technology"
+.%U http://www.ralinktech.com/
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 4.0 .
+.Sh AUTHORS
+The original
+.Nm
+driver was written by
+.An Niall O'Higgins Aq niallo@openbsd.org
+and
+.An Damien Bergamini Aq damien@openbsd.org .
+.Sh BUGS
+Host AP mode doesn't support client power save.
+Clients using power save mode will experience
+packet loss (disabling power saving on the client will fix this).
diff --git a/share/man/man4/run.4 b/share/man/man4/run.4
new file mode 100644
index 0000000..f86a296
--- /dev/null
+++ b/share/man/man4/run.4
@@ -0,0 +1,252 @@
+.\" $OpenBSD: run.4,v 1.22 2009/11/23 06:16:32 jmc Exp $
+.\"
+.\" Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 3, 2014
+.Dt RUN 4
+.Os
+.Sh NAME
+.Nm run
+.Nd Ralink Technology USB IEEE 802.11a/g/n wireless network device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device run"
+.Cd "device wlan"
+.Cd "device wlan_amrr"
+.Ed
+.Pp
+Firmware is also needed, and provided by:
+.Bd -ragged -offset indent
+.Cd "device runfw"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_run_load="YES"
+runfw_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports USB 2.0 wireless adapters based on the Ralink RT2700U,
+RT2800U, RT3000U and RT3900E chipsets.
+.Pp
+The RT2700U chipset consists of two integrated chips, an RT2770 MAC/BBP and
+an RT2720 (1T2R) or RT2750 (dual-band 1T2R) radio transceiver.
+.Pp
+The RT2800U chipset consists of two integrated chips, an RT2870 MAC/BBP and
+an RT2820 (2T3R) or RT2850 (dual-band 2T3R) radio transceiver.
+.Pp
+The RT3000U is a single-chip solution based on an RT3070 MAC/BBP and
+an RT3020 (1T1R), RT3021 (1T2R) or RT3022 (2T2R) single-band radio
+transceiver.
+.Pp
+The RT3900E is a single-chip USB 2.0 802.11n solution.
+The MAC/Baseband Processor can be an RT3593, RT5390, RT5392 or an RT5592.
+The radio can be an RT3053, RT5370, RT5372 or an RT5572.
+The RT3053 chip operates in the 2GHz and 5GHz spectra and supports up to
+3 transmit paths and 3 receiver paths (3T3R).
+The RT5370 chip operates in the 2GHz spectrum and supports 1 transmit path
+and 1 receiver path (1T1R).
+The RT5372 chip operates in the 2GHz spectrum and supports up to 2 transmit
+paths and 2 receiver paths (2T2R).
+The RT5572 chip operates in the 2GHz and 5GHz spectra and supports up to
+2 transmit paths and 2 receiver paths (2T2R).
+.Pp
+These are the modes the
+.Nm
+driver can operate in:
+.Bl -tag -width "IBSS-masterXX"
+.It BSS mode
+Also known as
+.Em infrastructure
+mode, this is used when associating with an access point, through
+which all traffic passes.
+This mode is the default.
+.It Host AP mode
+In this mode the driver acts as an access point (base station)
+for other cards.
+.It monitor mode
+In this mode the driver is able to receive packets without
+associating with an access point.
+This disables the internal receive filter and enables the card to
+capture packets from networks which it wouldn't normally have access to,
+or to scan for access points.
+.El
+.Pp
+The
+.Nm
+driver can be configured to use
+Wired Equivalent Privacy (WEP) or
+Wi-Fi Protected Access (WPA-PSK and WPA2-PSK).
+WPA is the de facto encryption standard for wireless networks.
+It is strongly recommended that WEP
+not be used as the sole mechanism
+to secure wireless communication,
+due to serious weaknesses in it.
+The
+.Nm
+driver offloads both encryption and decryption of data frames to the
+hardware for the WEP40, WEP104, TKIP(+MIC) and CCMP ciphers.
+.Pp
+The
+.Nm
+driver can be configured at runtime with
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports the following wireless adapters:
+.Pp
+.Bl -tag -width Ds -offset indent -compact
+.It Airlink101 AWLL6090
+.It ASUS USB-N11
+.It ASUS USB-N13 ver. A1
+.It ASUS USB-N66
+.It ASUS WL-160N
+.It Belkin F5D8051 ver 3000
+.It Belkin F5D8053
+.It Belkin F5D8055
+.It Belkin F6D4050 ver 1
+.It Belkin F9L1103
+.It Buffalo WLI-UC-AG300N
+.It Buffalo WLI-UC-G300N
+.It Buffalo WLI-UC-G301N
+.It Buffalo WLI-UC-GN
+.It Buffalo WLI-UC-GNM
+.It Buffalo WLI-UC-GNM2
+.It Corega CG-WLUSB2GNL
+.It Corega CG-WLUSB2GNR
+.It Corega CG-WLUSB300AGN
+.It Corega CG-WLUSB300GNM
+.It D-Link DWA-130 rev B1
+.It D-Link DWA-140 rev B1, B2, B3, \&D1
+.It D-Link DWA-160 rev B2
+.It D-Link DWA-162
+.It DrayTek Vigor N61
+.It Edimax EW-7711UAn
+.It Edimax EW-7711UTn
+.It Edimax EW-7717Un
+.It Edimax EW-7718Un
+.It Edimax EW-7733UnD
+.It Gigabyte GN-WB30N
+.It Gigabyte GN-WB31N
+.It Gigabyte GN-WB32L
+.It Hawking HWDN1
+.It Hawking HWUN1
+.It Hawking HWUN2
+.It Hercules HWNU-300
+.It Linksys WUSB54GC v3
+.It Linksys WUSB600N
+.It Logitec LAN-W150N/U2
+.It Mvix Nubbin MS-811N
+.It Planex GW-USMicroN
+.It Planex GW-US300MiniS
+.It Sitecom WL-182
+.It Sitecom WL-188
+.It Sitecom WL-301
+.It Sitecom WL-302
+.It Sitecom WL-315
+.It SMC SMCWUSBS-N2
+.It Sweex LW303
+.It Sweex LW313
+.It TP-LINK TL-WDN3200
+.It TP-LINK TL-WN727N v3
+.It Unex DNUR-81
+.It Unex DNUR-82
+.It ZyXEL NWD2705
+.It ZyXEL NWD210N
+.It ZyXEL NWD270N
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev run0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev run0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev run0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Pp
+Join a specific BSS network with 128-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev run0 wlanmode adhoc ssid my_net \e
+ wepmode on wepkey 0x01020304050607080910111213 weptxkey 1
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "run%d: faild load firmware of file runfw"
+For some reason, the driver was unable to read the microcode file from the
+filesystem.
+The file might be missing or corrupted.
+.It "run%d: could not load 8051 microcode"
+An error occurred while attempting to upload the microcode to the onboard 8051
+microcontroller unit.
+.It "run%d: device timeout"
+A frame dispatched to the hardware for transmission did not complete in time.
+The driver will reset the hardware.
+This should not happen.
+.El
+.Sh SEE ALSO
+.Xr runfw 4 ,
+.Xr intro 4 ,
+.Xr netintro 4 ,
+.Xr usb 4 ,
+.Xr wlan 4 ,
+.Xr wlan_amrr 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr wlan_xauth 4 ,
+.Xr ifconfig 8 ,
+.Xr hostapd 8 ,
+.Xr wpa_supplicant 8
+.Pp
+Ralink Technology:
+.Pa http://www.ralinktech.com/
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 4.5 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Damien Bergamini Aq damien@openbsd.org .
+.Sh CAVEATS
+The
+.Nm
+driver does not support any of the 802.11n capabilities offered by the
+RT2800, RT3000 and RT3900 chipsets.
diff --git a/share/man/man4/runfw.4 b/share/man/man4/runfw.4
new file mode 100644
index 0000000..127a044
--- /dev/null
+++ b/share/man/man4/runfw.4
@@ -0,0 +1,50 @@
+.\" Copyright (c) 2010 Akinori Furukoshi <moonlightakkiy@yahoo.ca>
+.\" Copyright (c) 2010 Warren Block <wblock@wonkity.com>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 11, 2013
+.Dt RUNFW 4
+.Os
+.Sh NAME
+.Nm runfw
+.Nd "Firmware Module for Ralink driver"
+.Sh SYNOPSIS
+To compile this module into the kernel, place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device runfw"
+.Ed
+.Pp
+This will include two firmware images, RT2870 and RT3071, inside the kernel.
+.Xr run 4
+will load the appropriate image into the chip.
+.Pp
+Alternatively, to load the firmware images as a module at boot time, place
+the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+runfw_load="YES"
+.Ed
+.Sh DESCRIPTION
+This module provides firmware sets for the Ralink RT2700U,
+RT2800U, RT3000U and RT3900E chip based USB WiFi adapters.
+Please read Ralink's license, src/sys/contrib/dev/run/LICENSE.
+.Sh SEE ALSO
+.Xr run 4 ,
+.Xr firmware 9
diff --git a/share/man/man4/sa.4 b/share/man/man4/sa.4
new file mode 100644
index 0000000..aa72f68
--- /dev/null
+++ b/share/man/man4/sa.4
@@ -0,0 +1,311 @@
+.\" Copyright (c) 1996
+.\" Julian Elischer <julian@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 23, 2013
+.Dt SA 4
+.Os
+.Sh NAME
+.Nm sa
+.Nd SCSI Sequential Access device driver
+.Sh SYNOPSIS
+.Cd device sa
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for all
+.Tn SCSI
+devices of the sequential access class that are attached to the system
+through a supported
+.Tn SCSI
+Host Adapter.
+The sequential access class includes tape and other linear access devices.
+.Pp
+A
+.Tn SCSI
+Host
+adapter must also be separately configured into the system
+before a
+.Tn SCSI
+sequential access device can be configured.
+.Sh MOUNT SESSIONS
+The
+.Nm
+driver is based around the concept of a
+.Dq Em mount session ,
+which is defined as the period between the time that a tape is
+mounted, and the time when it is unmounted.
+Any parameters set during
+a mount session remain in effect for the remainder of the session or
+until replaced.
+The tape can be unmounted, bringing the session to a
+close in several ways.
+These include:
+.Bl -enum
+.It
+Closing a `rewind device',
+referred to as sub-mode 00 below.
+An example is
+.Pa /dev/sa0 .
+.It
+Using the MTOFFL
+.Xr ioctl 2
+command, reachable through the
+.Sq Cm offline
+command of
+.Xr mt 1 .
+.El
+.Pp
+It should be noted that tape devices are exclusive open devices, except in
+the case where a control mode device is opened.
+In the latter case, exclusive
+access is only sought when needed (e.g., to set parameters).
+.Sh SUB-MODES
+Bits 0 and 1 of the minor number are interpreted as
+.Sq sub-modes .
+The sub-modes differ in the action taken when the device is closed:
+.Bl -tag -width XXXX
+.It 00
+A close will rewind the device; if the tape has been
+written, then a file mark will be written before the rewind is requested.
+The device is unmounted.
+.It 01
+A close will leave the tape mounted.
+If the tape was written to, a file mark will be written.
+No other head positioning takes place.
+Any further reads or writes will occur directly after the
+last read, or the written file mark.
+.It 10
+A close will rewind the device.
+If the tape has been
+written, then a file mark will be written before the rewind is requested.
+On completion of the rewind an unload command will be issued.
+The device is unmounted.
+.El
+.Sh BLOCKING MODES
+.Tn SCSI
+tapes may run in either
+.Sq Em variable
+or
+.Sq Em fixed
+block-size modes.
+Most
+.Tn QIC Ns -type
+devices run in fixed block-size mode, where most nine-track tapes and
+many new cartridge formats allow variable block-size.
+The difference between the two is as follows:
+.Bl -inset
+.It Variable block-size:
+Each write made to the device results in a single logical record
+written to the tape.
+One can never read or write
+.Em part
+of a record from tape (though you may request a larger block and read
+a smaller record); nor can one read multiple blocks.
+Data from a single write is therefore read by a single read.
+The block size used
+may be any value supported by the device, the
+.Tn SCSI
+adapter and the system (usually between 1 byte and 64 Kbytes,
+sometimes more).
+.Pp
+When reading a variable record/block from the tape, the head is
+logically considered to be immediately after the last item read,
+and before the next item after that.
+If the next item is a file mark,
+but it was never read, then the next
+process to read will immediately hit the file mark and receive an end-of-file notification.
+.It Fixed block-size:
+Data written by the user is passed to the tape as a succession of
+fixed size blocks.
+It may be contiguous in memory, but it is
+considered to be a series of independent blocks.
+One may never write
+an amount of data that is not an exact multiple of the blocksize.
+One may read and write the same data as a different set of records.
+In other words, blocks that were written together may be read separately,
+and vice-versa.
+.Pp
+If one requests more blocks than remain in the file, the drive will
+encounter the file mark.
+As there is some data to return (unless
+there were no records before the file mark), the read will succeed,
+returning that data.
+The next read will return immediately with a value
+of 0.
+(As above, if the file mark is never read, it remains for the next
+process to read if in no-rewind mode.)
+.El
+.Sh BLOCK SIZES
+By default, the driver will NOT accept reads or writes to a tape device that
+are larger than may be written to or read from the mounted tape using a single
+write or read request.
+Because of this, the application author may have confidence that his wishes
+are respected in terms of the block size written to tape.
+For example, if the user tries to write a 256KB block to the tape, but the
+controller can handle no more than 128KB, the write will fail.
+The previous
+.Fx
+behavior, prior to
+.Fx
+10.0,
+was to break up large reads or writes into smaller blocks when going to the
+tape.
+The problem with that behavior, though, is that it hides the actual on-tape
+block size from the application writer, at least in variable block mode.
+.Pp
+If the user would like his large reads and writes broken up into separate
+pieces, he may set the following loader tunables.
+Note that these tunables WILL GO AWAY in
+.Fx 11.0 .
+They are provided for transition purposes only.
+.Bl -tag -width 12
+.It kern.cam.sa.allow_io_split
+.Pp
+This variable, when set to 1, will configure all
+.Nm
+devices to split large buffers into smaller pieces when needed.
+.It kern.cam.sa.%d.allow_io_split
+.Pp
+This variable, when set to 1, will configure the given
+.Nm
+unit to split large buffers into multiple pieces.
+This will override the global setting, if it exists.
+.El
+.Pp
+There are several
+.Xr sysctl 8
+variables available to view block handling parameters:
+.Bl -tag -width 12
+.It kern.cam.sa.%d.allow_io_split
+.Pp
+This variable allows the user to see, but not modify, the current I/O split
+setting.
+The user is not permitted to modify this setting so that there is no chance
+of behavior changing for the application while a tape is mounted.
+.It kern.cam.sa.%d.maxio
+.Pp
+This variable shows the maximum I/O size in bytes that is allowed by the
+combination of kernel tuning parameters (MAXPHYS, DFLTPHYS) and the
+capabilities of the controller that is attached to the tape drive.
+Applications may look at this value for a guide on how large an I/O may be
+permitted, but should keep in mind that the actual maximum may be
+restricted further by the tape drive via the
+.Tn SCSI
+READ BLOCK LIMITS command.
+.It kern.cam.sa.%d.cpi_maxio
+.Pp
+This variable shows the maximum I/O size supported by the controller, in
+bytes, that is reported via the CAM Path Inquiry CCB (XPT_PATH_INQ).
+If this is 0, that means that the controller has not reported a maximum I/O
+size.
+.El
+.Sh FILE MARK HANDLING
+The handling of file marks on write is automatic.
+If the user has
+written to the tape, and has not done a read since the last write,
+then a file mark will be written to the tape when the device is
+closed.
+If a rewind is requested after a write, then the driver
+assumes that the last file on the tape has been written, and ensures
+that there are two file marks written to the tape.
+The exception to
+this is that there seems to be a standard (which we follow, but do not
+understand why) that certain types of tape do not actually write two
+file marks to tape, but when read, report a `phantom' file mark when the
+last file is read.
+These devices include the QIC family of devices.
+(It might be that this set of devices is the same set as that of fixed
+block devices.
+This has not been determined yet, and they are treated
+as separate behaviors by the driver at this time.)
+.Sh IOCTLS
+The
+.Nm
+driver supports all of the ioctls of
+.Xr mtio 4 .
+.Sh FILES
+.Bl -tag -width /dev/[n][e]sa[0-9] -compact
+.It Pa /dev/[n][e]sa[0-9]
+general form:
+.It Pa /dev/sa0
+Rewind on close
+.It Pa /dev/nsa0
+No rewind on close
+.It Pa /dev/esa0
+Eject on close (if capable)
+.It Pa /dev/sa0.ctl
+Control mode device (to examine state while another program is
+accessing the device, e.g.).
+.El
+.Sh DIAGNOSTICS
+None.
+.Sh SEE ALSO
+.Xr cam 4 ,
+.Xr mt 1
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written for the
+.Tn CAM
+.Tn SCSI
+subsystem by
+.An Justin T. Gibbs
+and
+.An Kenneth Merry .
+Many ideas were gleaned from the
+.Nm st
+device driver written and ported from
+.Tn Mach
+2.5
+by
+.An Julian Elischer .
+.Pp
+The current owner of record is
+.An Matthew Jacob
+who has suffered too many
+years of breaking tape drivers.
+.Sh BUGS
+This driver lacks many of the hacks required to deal with older devices.
+Many older
+.Tn SCSI-1
+devices may not work properly with this driver yet.
+.Pp
+Additionally, certain
+tapes (QIC tapes mostly) that were written under
+.Fx
+2.X
+are not automatically read correctly with this driver: you may need to
+explicitly set variable block mode or set to the blocksize that works best
+for your device in order to read tapes written under
+.Fx
+2.X.
+.Pp
+Fine grained density and compression mode support that is bound to specific
+device names needs to be added.
+.Pp
+Support for fast indexing by use of partitions is missing.
diff --git a/share/man/man4/safe.4 b/share/man/man4/safe.4
new file mode 100644
index 0000000..5cb085f
--- /dev/null
+++ b/share/man/man4/safe.4
@@ -0,0 +1,129 @@
+.\"-
+.\" Copyright (c) 2003 Sam Leffler, Errno Consulting
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"/
+.Dd April 1, 2006
+.Dt SAFE 4
+.Os
+.Sh NAME
+.Nm safe
+.Nd SafeNet crypto accelerator
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device crypto"
+.Cd "device cryptodev"
+.Cd "device safe"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+safe_load="YES"
+.Ed
+.Pp
+.Nm sysctl Va hw.safe.debug
+.Nm sysctl Va hw.safe.dump
+.Nm sysctl Va hw.safe.rnginterval
+.Nm sysctl Va hw.safe.rngbufsize
+.Nm sysctl Va hw.safe.rngmaxalarm
+.Sh DESCRIPTION
+The
+.Nm
+driver supports cards containing SafeNet crypto accelerator chips.
+.Pp
+The
+.Nm
+driver registers itself to accelerate DES, Triple-DES, AES, MD5-HMAC,
+SHA1-HMAC, and NULL operations for
+.Xr ipsec 4
+and
+.Xr crypto 4 .
+.Pp
+On all models, the driver registers itself to provide random data to the
+.Xr random 4
+subsystem.
+Periodically the driver will poll the hardware RNG and retrieve
+data for use by the system.
+If the driver detects that the hardware RNG is resonating with any local
+signal, it will reset the oscillators that generate random data.
+Three
+.Xr sysctl 8
+settings control this procedure:
+.Va hw.safe.rnginterval
+specifies the time, in seconds, between polling operations,
+.Va hw.safe.rngbufsize
+specifies the number of 32-bit words to retrieve on each poll,
+and
+.Va hw.safe.rngmaxalarm
+specifies the threshold for resetting the oscillators.
+.Pp
+When the driver is compiled with
+.Dv SAFE_DEBUG
+defined, two
+.Xr sysctl 8
+variables are provided for debugging purposes:
+.Va hw.safe.debug
+can be set to a non-zero value to enable debugging messages to be sent
+to the console for each cryptographic operation,
+.Va hw.safe.dump
+is a write-only variable that can be used to force driver state to be sent
+to the console.
+Set this variable to
+.Dq Li ring
+to dump the current state of the descriptor ring,
+to
+.Dq Li dma
+to dump the hardware DMA registers,
+or
+to
+.Dq Li int
+to dump the hardware interrupt registers.
+.Sh HARDWARE
+The
+.Nm
+driver supports cards containing any of the following chips:
+.Bl -tag -width "SafeNet 1141" -offset indent
+.It SafeNet 1141
+The original chipset.
+Supports DES, Triple-DES, AES, MD5, and SHA-1
+symmetric crypto operations, RNG, public key operations, and full IPsec
+packet processing.
+.It SafeNet 1741
+A faster version of the 1141.
+.El
+.Sh SEE ALSO
+.Xr crypt 3 ,
+.Xr crypto 4 ,
+.Xr intro 4 ,
+.Xr ipsec 4 ,
+.Xr random 4 ,
+.Xr crypto 9
+.Sh BUGS
+Public key support is not implemented.
diff --git a/share/man/man4/sbp.4 b/share/man/man4/sbp.4
new file mode 100644
index 0000000..eeddd5d
--- /dev/null
+++ b/share/man/man4/sbp.4
@@ -0,0 +1,97 @@
+.\" Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the acknowledgement as bellow:
+.\"
+.\" This product includes software developed by K. Kobayashi
+.\"
+.\" 4. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 8, 2012
+.Dt SBP 4
+.Os
+.Sh NAME
+.Nm sbp
+.Nd Serial Bus Protocol 2 (SBP-2) Mass Storage Devices driver
+.Sh SYNOPSIS
+.Cd "kldload firewire"
+.Cd "kldload cam"
+.Cd "kldload sbp"
+.Pp
+or
+.Pp
+.Cd "device sbp"
+.Cd "device firewire"
+.Cd "device scbus"
+.Cd "device da"
+.Cd "device cd"
+.Cd "device pass"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for SBP-2 devices that attach to the FireWire
+(IEEE 1394) port.
+It should work with SBP-2 devices which the CAM layer supports, for example,
+HDDs, CDROM drives and DVD drives.
+.Pp
+Some users familiar with
+.Xr umass 4
+might wonder why the device is not detached at the CAM layer when the device
+is unplugged.
+It is detached only if the device has not been plugged again
+during several bus resets.
+This is for preventing to detach an active file system
+even when the device cannot be probed correctly for some reason after a bus reset
+or when the device is temporary disconnected because the user changes the bus
+topology.
+If you want to force to detach the device, run
+.Dq Nm fwcontrol Fl r
+several times or set hw.firewire.hold_count=0 by
+.Xr sysctl 8 .
+.Pp
+Some (broken) HDDs do not work well with tagged queuing.
+If you have problems with such drives, try
+.Dq Nm camcontrol [device id] tags -N 1
+to disable tagged queuing.
+.Sh SEE ALSO
+.Xr cam 4 ,
+.Xr firewire 4 ,
+.Xr camcontrol 8 ,
+.Xr fwcontrol 8 ,
+.Xr kldload 8 ,
+.Xr sysctl 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Katsushi Kobayashi
+and
+.An Hidetoshi Shimokawa .
+.Pp
+This manual page was written by
+.An Katsushi Kobayashi .
diff --git a/share/man/man4/sbp_targ.4 b/share/man/man4/sbp_targ.4
new file mode 100644
index 0000000..9a81a99
--- /dev/null
+++ b/share/man/man4/sbp_targ.4
@@ -0,0 +1,98 @@
+.\" Copyright (c) 2003 Hidetoshi Shimokawa
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the acknowledgement as bellow:
+.\"
+.\" This product includes software developed by H. Shimokawa
+.\"
+.\" 4. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 7, 2003
+.Dt SBP_TARG 4
+.Os
+.Sh NAME
+.Nm sbp_targ
+.Nd Serial Bus Protocol 2 (SBP-2) Target Mode devices driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sbp_targ"
+.Cd "device firewire"
+.Cd "device scbus"
+.Cd "device targ"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+firewire_load="YES"
+cam_load="YES"
+sbp_targ_load"YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for SBP-2 target mode.
+This driver is supposed to work with
+.Xr cam 4 ,
+.Xr targ 4
+and
+.Xr firewire 4 .
+You also need to use
+.Xr scsi_target 8 ,
+which can be found in
+.Pa /usr/share/examples/scsi_target ,
+to provide actual devices.
+.Sh EXAMPLES
+.Bd -literal -offset indent
+# mdconfig -a -t malloc -s 10m
+md0
+# scsi_target 0:0:0 /dev/md0
+(Assuming sbp_targ0 on scbus0)
+.Ed
+.Sh SEE ALSO
+.Xr cam 4 ,
+.Xr firewire 4 ,
+.Xr targ 4 ,
+.Xr camcontrol 8 ,
+.Xr fwcontrol 8 ,
+.Xr kldload 8 ,
+.Xr scsi_target 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Hidetoshi Shimokawa .
+.Sh BUGS
+This driver is
+.Ud
+It does not work correctly in multi-initiator environments
+or after the bus topology has been changed.
diff --git a/share/man/man4/scc.4 b/share/man/man4/scc.4
new file mode 100644
index 0000000..b08b3f8
--- /dev/null
+++ b/share/man/man4/scc.4
@@ -0,0 +1,75 @@
+.\"
+.\" Copyright (c) 2006 Marcel Moolenaar
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 29, 2006
+.Dt SCC 4
+.Os
+.\"
+.Sh NAME
+.Nm scc
+.Nd driver for Serial Communications Controllers (SCC) devices
+.\"
+.Sh SYNOPSIS
+.Cd "device scc"
+.Cd "device uart"
+.\"
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for various classes of SCCs.
+It is an umbrella driver that delegates control of each independent
+communication channel to subordinate drivers.
+These subordinate drivers, like
+.Xr uart 4 ,
+take care of the details of the communication itself.
+.\"
+.Sh HARDWARE
+The
+.Nm
+driver supports the following classes of SCCs:
+.Pp
+.Bl -bullet -compact
+.It
+SAB82532: Siemens SAB 82532 based serial communications controllers.
+.It
+Z8530: Zilog 8530 based serial communications controllers.
+.El
+.\"
+.Sh SEE ALSO
+.Xr puc 4 ,
+.Xr uart 4
+.\"
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 7.0 .
+.Sh AUTHORS
+The
+.Nm
+driver and this manual page were written by
+.An Marcel Moolenaar Aq marcel@xcllnt.net .
diff --git a/share/man/man4/scd.4 b/share/man/man4/scd.4
new file mode 100644
index 0000000..dbbb18f
--- /dev/null
+++ b/share/man/man4/scd.4
@@ -0,0 +1,74 @@
+.\"
+.\" Copyright (c) 1995 Jordan K. Hubbard
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 17, 2008
+.Dt SCD 4
+.Os
+.Sh NAME
+.Nm scd
+.Nd Sony CDU31/33 CD-ROM driver
+.Sh SYNOPSIS
+.Cd "device scd"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.scd.0.at="isa"
+.Cd hint.scd.0.port="0x230"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides a data interface to the Sony CDU31 and CDU33A CD-ROM
+drives.
+The drive must be hooked to a Sony proprietary interface
+card or a compatible clone.
+.Sh FILES
+.Bl -tag -width /dev/[r]scd0a -compact
+.It Pa /dev/[r]scd0a
+accesses
+.Bx
+partition on the disc.
+Normally, there is only
+one file system on a CDROM disc.
+.It Pa /dev/[r]scd0c
+accesses the raw device.
+.El
+.Sh SEE ALSO
+.Pa /sys/dev/scd/scd.c
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 2.0.5 .
+.Sh AUTHORS
+.An -nosplit
+The driver was written by
+.An Mikael Hybsch
+with code contributed by
+.An Holger Veit
+and
+.An Brian Moore .
diff --git a/share/man/man4/sched_4bsd.4 b/share/man/man4/sched_4bsd.4
new file mode 100644
index 0000000..a02c40e
--- /dev/null
+++ b/share/man/man4/sched_4bsd.4
@@ -0,0 +1,74 @@
+.\" Copyright (c) 2005 Robert N. M. Watson
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 21, 2008
+.Dt SCHED_4BSD 4
+.Os
+.Sh NAME
+.Nm sched_4bsd
+.Nd "4.4BSD scheduler"
+.Sh SYNOPSIS
+.Cd "options SCHED_4BSD"
+.Sh DESCRIPTION
+The
+.Nm
+scheduler
+is the traditional system scheduler, providing both high throughput and solid
+interactive response in the presence of load.
+.Pp
+The following sysctls are relevant to the operation of
+.Nm :
+.Bl -tag -width indent
+.It Va kern.sched.name
+This read-only sysctl reports the name of the active scheduler.
+.It Va kern.sched.quantum
+This read-write sysctl reports or sets the length of the quantum (in
+micro-seconds) granted to a thread.
+.It Va kern.sched.ipiwakeup.enabled
+This read-write sysctl sets whether or not the scheduler will generate an
+inter-processor interrupt (IPI) to an idle CPU when a thread is woken up.
+Otherwise, idle CPUs will wait until the next clock tick before looking for
+new work.
+.It Va kern.sched.preemption
+This read-only sysctl reports whether or not the kernel is configured to
+support preemption, which reduces the latency to run lower priority threads
+on wakeup.
+.El
+.Pp
+Some sysctls will be available only on systems supporting SMP.
+.Sh SEE ALSO
+.Xr sched_ule 4 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+scheduler has been present, in various forms, since the inception of
+.Bx .
+.Sh BUGS
+While a highly robust and time-tested scheduler,
+.Nm
+lacks specific knowledge of how to schedule advantageously in non-symmetric
+processor configurations, such as hyper-threading.
diff --git a/share/man/man4/sched_ule.4 b/share/man/man4/sched_ule.4
new file mode 100644
index 0000000..42dee4d
--- /dev/null
+++ b/share/man/man4/sched_ule.4
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2005 Robert N. M. Watson
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 10, 2012
+.Dt SCHED_ULE 4
+.Os
+.Sh NAME
+.Nm sched_ule
+.Nd ULE scheduler
+.Sh SYNOPSIS
+.Cd "options SCHED_ULE"
+.Sh DESCRIPTION
+The
+.Nm
+scheduler
+provides a number of advanced scheduler
+features not present in
+.Xr sched_4bsd 4 ,
+the traditional system scheduler.
+These features address SMP and interactivity and include:
+.Pp
+.Bl -bullet -compact -offset indent
+.It
+Thread CPU affinity.
+.It
+CPU topology awareness, including for hyper-threading.
+.It
+Per-CPU run queues.
+.It
+Interactivity heuristics that detect interactive applications and schedules
+them preferentially under high load.
+.El
+.Pp
+The following sysctls are relevant to the operation of
+.Nm :
+.Bl -tag -width indent
+.It Va kern.sched.name
+This read-only sysctl reports the name of the active scheduler.
+.It Va kern.sched.quantum
+This read-write sysctl reports or sets the length of the quantum (in
+micro-seconds) granted to a thread.
+.El
+.Sh SEE ALSO
+.Xr sched_4bsd 4 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+scheduler first appeared in
+.Fx 5.1 .
+.Sh AUTHORS
+.An Jeff Roberson
+.Aq jeff@FreeBSD.org
diff --git a/share/man/man4/screen.4 b/share/man/man4/screen.4
new file mode 100644
index 0000000..0b6ac2d
--- /dev/null
+++ b/share/man/man4/screen.4
@@ -0,0 +1,241 @@
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 6, 2000
+.Dt SCREEN 4
+.Os
+.Sh NAME
+.Nm screen
+.Nd pc display interface
+.Sh DESCRIPTION
+Access to the
+.Em virtual consoles
+are obtained through the device files
+.Pa /dev/ttyv0
+-
+.Pa /dev/ttyvb .
+Each of these files correspond to a separate
+virtual console.
+All virtual console devices can be open at once, but only one is
+active at a time.
+The active virtual console "owns" the keyboard and
+display screen.
+.Pp
+Output to a virtual console that not currently is on the display is
+saved in a buffer that holds a "screenfull" (normally 25) lines.
+Any output written to
+.Pa /dev/console
+(the original console device) is echoed to
+.Pa /dev/ttyv0 .
+.Pp
+To switch between the virtual consoles one uses the sequence
+.Em ALT+Fn ,
+which means hold down ALT and press one of the function keys.
+The
+virtual console with the same number as the function key is then
+selected as the current virtual console, and given exclusive use of
+the keyboard and display.
+This switch sequence can be changed via
+the keyboard mapping ioctl call (see
+.Xr keyboard 4 ) .
+.Pp
+The console allows entering values that are not physically
+present on the keyboard via a special keysequence.
+To use this facility press and hold down ALT,
+then enter a decimal number from 0-255 via the numerical keypad, then
+release ALT.
+The entered value is then used as the ASCII value for one
+character.
+This way it is possible to enter any ASCII value.
+The console driver also includes a history function.
+It is activated by
+pressing the scroll-lock key.
+This holds the display, and enables the cursor
+arrows for scrolling up and down through the last scrolled out lines.
+.Pp
+The console understands a subset of the ANSI x3.64 character
+sequences.
+For compatibility with the old pccons, the PC3 character
+sequences are also supported.
+.Bd -literal
+ANSI Seq Function Termcap entry
+======= ======= ===================================== ==============
+
+-- E7 Save cursor position sc
+
+-- E8 Restore saved cursor position rc
+
+-- Ec Reset rs
+
+-- EM move cursor up 1 line, --
+ scroll if at top
+
+CUU E[nA move cursor up n lines up/UP (ku)
+
+CUD E[nB move cursor down n lines do/DO (kd)
+
+CUF E[nC move cursor right n characters nd/RI (kr)
+
+CUB E[nD move cursor left n characters --/LE (kl)
+
+HPA E[n` move cursor to character position n ch
+
+HPR E[na move cursor right n characters --
+
+VPA E[nd move cursor to line n cv
+
+VPR E[ne move cursor down n lines --
+
+CPL E[nF move cursor to start of line, -- (@7)
+ n lines up
+
+CNL E[nE move cursor to start of line, nw
+ n lines down
+
+CUP E[y;xH Move cursor to x, y cm
+
+HVP E[y;xf Move cursor to x, y --
+
+CBT E[nZ Move cursor back n tab stops bt (kB)
+
+IL E[nL Insert n blank lines al/AL
+
+ICH E[n@ Insert n blank characters ic/IC
+
+DL E[nM Delete n lines dl/DL
+
+DCH E[nP Delete n characters dc/DC
+
+ED E[nJ Erase part or all of display: cd
+ n=0 from cursor to end of display,
+ n=1 from begin of display to cursor,
+ n=2 entire display.
+
+EL E[nK Erase part or all of line: ce
+ n=0 from cursor to end of line,
+ n=1 from begin of line to cursor,
+ n=2 entire line.
+
+ECH E[nX Erase n characters ec
+
+SU E[nS Scroll display n lines up (forward) sf/SF
+
+SD E[nT Scroll display n lines down (reverse) sr/SR
+
+
+SGR E[nm Set character attributes: --
+ n= 0 normal attribute (all off)
+ n= 1 bold (highlight)
+ n= 4 underscore (if supported by HW)
+ n= 5 blink (if supported by HW)
+ n= 7 reverse
+ n= 22 remove bold
+ n= 24 remove underscore
+ n= 25 remove blink
+ n= 27 remove reverse
+ n= 3X set ANSI foreground color
+ (see table)
+ n= 4X set ANSI background color
+ (see table)
+
+ X=0 black X=1 red
+ X=2 green X=3 brown
+ X=4 blue X=5 magenta
+ X=6 cyan X=7 light grey
+ X=9 reset to the normal color
+
+-- E[s Save cursor position sc
+
+-- E[u Restore saved cursor position rc
+
+-- E[x Reset normal colors and attributes --
+ to their default values
+
+-- E[nz Switch to virtual console n --
+
+-- E[1;nx Set normal ANSI background color --
+ to n (see table)
+
+-- E[2;nx Set normal ANSI foreground color --
+ to n (see table)
+
+-- E[3;nx Set normal video attribute directly --
+ to n (n from 0 to 255)
+
+-- E[5;nx Set normal ANSI reverse background --
+ color to n (see table)
+
+-- E[6;nx Set normal ANSI reverse foreground --
+ color to n (see table)
+
+ n= 0 black n= 8 dark grey
+ n= 1 red n= 9 light red
+ n= 2 green n=10 light green
+ n= 3 brown n=11 yellow
+ n= 4 blue n=12 light blue
+ n= 5 magenta n=13 light magenta
+ n= 6 cyan n=14 light cyan
+ n= 7 light grey n=15 white
+
+-- E[7;nx Set normal reverse video attribute --
+ directly to n (n from 0 to 255)
+
+-- E[=p;dB Set bell pitch (p) and duration (d), --
+ pitch is in units of 840 nS,
+ duration is units of 0,1 S.
+
+-- E[=tC Set global cursor type (see table) --
+
+ t=0 normal non-blinking
+ t=1 normal blinking
+ t=2 custom non-blinking
+ t=3 custom blinking
+ t=4 reset cursor (resets custom
+ cursor shape and sets current
+ cursor type to 0)
+ t=5 hide cursor
+
+-- E[=s;eC Set custom cursor shape, where --
+ s is the starting and e is the ending
+ scanlines of the cursor.
+
+-- E[=s;e;dC --
+ Same as above, except d specifies the
+ direction. If 0, scanlines are counted
+ from the top to the bottom. If 1, from
+ the bottom to the top.
+
+-- E[=tS Set local cursor type (see table) --
+
+ t=0 normal (global) ve
+ t=1 invisible vi
+ t=2 very visible vs
+
+-- E[=nA Set the border color to n --
+ (see table) (if supported by HW)
+
+-- E[=nF Set normal foreground color to n --
+ (see table)
+
+-- E[=nG Set normal background color to n --
+ (see table)
+
+-- E[=nH Set normal reverse foreground color --
+ to n (see table)
+
+-- E[=nI Set normal reverse background color --
+ to n (see table)
+
+ n= 0 black n= 8 dark grey
+ n= 1 blue n= 9 light blue
+ n= 2 green n=10 light green
+ n= 3 cyan n=11 light cyan
+ n= 4 red n=12 light red
+ n= 5 magenta n=13 light magenta
+ n= 6 brown n=14 yellow
+ n= 7 light grey n=15 white
+
+note: the first E in the sequences stands for ESC (0x1b)
+.Ed
+.Sh AUTHORS
+.An S\(/oren Schmidt Aq sos@FreeBSD.org
diff --git a/share/man/man4/scsi.4 b/share/man/man4/scsi.4
new file mode 100644
index 0000000..8684307
--- /dev/null
+++ b/share/man/man4/scsi.4
@@ -0,0 +1,354 @@
+.\" Copyright (c) 1996
+.\" Julian Elischer <julian@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.Dd June 7, 2012
+.Dt CAM 4
+.Os
+.Sh NAME
+.Nm CAM
+.Nd Common Access Method SCSI/ATA subsystem
+.Sh SYNOPSIS
+.Cd "device scbus"
+.Cd "device ada"
+.Cd "device cd"
+.Cd "device ch"
+.Cd "device da"
+.Cd "device pass"
+.Cd "device pt"
+.Cd "device sa"
+.Cd "options CAMDEBUG"
+.Cd "options CAM_DEBUG_BUS=-1"
+.Cd "options CAM_DEBUG_TARGET=-1"
+.Cd "options CAM_DEBUG_LUN=-1"
+.Cd "options CAM_DEBUG_COMPILE=CAM_DEBUG_INFO|CAM_DEBUG_CDB|CAM_DEBUG_PROBE"
+.Cd "options CAM_DEBUG_FLAGS=CAM_DEBUG_INFO|CAM_DEBUG_CDB"
+.Cd "options CAM_MAX_HIGHPOWER=4"
+.Cd "options SCSI_NO_SENSE_STRINGS"
+.Cd "options SCSI_NO_OP_STRINGS"
+.Cd "options SCSI_DELAY=8000"
+.Sh DESCRIPTION
+The
+.Nm
+subsystem provides a uniform and modular system for the implementation
+of drivers to control various
+.Tn SCSI
+and
+.Tn ATA
+devices, and to utilize different
+.Tn SCSI
+and
+.Tn ATA
+host adapters through host adapter drivers.
+When the system probes busses, it attaches any devices it finds to the
+appropriate drivers.
+The
+.Xr pass 4
+driver, if it is configured in the kernel, will attach to all devices.
+.Sh KERNEL CONFIGURATION
+There are a number of generic kernel configuration options for the
+.Nm
+subsystem:
+.Bl -tag -width SCSI_NO_SENSE_STRINGS
+.It Dv CAMDEBUG
+This option compiles in all the
+.Nm
+debugging printf code.
+This will not actually
+cause any debugging information to be printed out when included by itself.
+See below for details.
+.It Dv "CAM_MAX_HIGHPOWER=4"
+This sets the maximum allowable number of concurrent "high power" commands.
+A "high power" command is a command that takes more electrical power than
+most to complete.
+An example of this is the
+.Tn SCSI
+START UNIT command.
+Starting a disk often takes significantly more electrical power than normal
+operation.
+This option allows the
+user to specify how many concurrent high power commands may be outstanding
+without overloading the power supply on his computer.
+.It Dv SCSI_NO_SENSE_STRINGS
+This eliminates text descriptions of each
+.Tn SCSI
+Additional Sense Code and Additional Sense Code Qualifier pair.
+Since this
+is a fairly large text database, eliminating it reduces the size of the
+kernel somewhat.
+This is primarily necessary for boot floppies and other
+low disk space or low memory space environments.
+In most cases, though,
+this should be enabled, since it speeds the interpretation of
+.Tn SCSI
+error messages.
+Do not let the "kernel bloat" zealots get to you -- leave
+the sense descriptions in your kernel!
+.It Dv SCSI_NO_OP_STRINGS
+This disables text descriptions of each
+.Tn SCSI
+opcode.
+This option, like the sense string option above, is primarily
+useful for environments like a boot floppy where kernel size is critical.
+Enabling this option for normal use is not recommended, since it slows
+debugging of
+.Tn SCSI
+problems.
+.It Dv SCSI_DELAY=8000
+This is the
+.Tn SCSI
+"bus settle delay."
+In
+.Nm ,
+it is specified in
+.Em milliseconds ,
+not seconds like the old
+.Tn SCSI
+layer used to do.
+When the kernel boots, it sends a bus reset to each
+.Tn SCSI
+bus to tell each device to reset itself to a default set of transfer
+negotiations and other settings.
+Most
+.Tn SCSI
+devices need some amount of time to recover from a bus reset.
+Newer disks
+may need as little as 100ms, while old, slow devices may need much longer.
+If the
+.Dv SCSI_DELAY
+is not specified, it defaults to 2 seconds.
+The minimum allowable value for
+.Dv SCSI_DELAY
+is "100", or 100ms.
+One special case is that if the
+.Dv SCSI_DELAY
+is set to 0, that will be taken to mean the "lowest possible value."
+In that case, the
+.Dv SCSI_DELAY
+will be reset to 100ms.
+.El
+.Pp
+All devices and busses support dynamic allocation so that
+an upper number of devices and controllers does not need to be configured;
+.Cd "device da"
+will suffice for any number of disk drivers.
+.Pp
+The devices are either
+.Em wired
+so they appear as a particular device unit or
+.Em counted
+so that they appear as the next available unused unit.
+.Pp
+Units are wired down by setting kernel environment hints.
+This is usually done either interactively from the
+.Xr loader 8 ,
+or automatically via the
+.Pa /boot/device.hints
+file.
+The basic syntax is:
+.Bd -literal -offset indent
+hint.device.unit.property="value"
+.Ed
+.Pp
+Individual
+.Nm
+bus numbers can be wired down to specific controllers with
+a config line similar to the following:
+.Bd -literal -offset indent
+hint.scbus.0.at="ahd1"
+.Ed
+.Pp
+This assigns
+.Nm
+bus number 0 to the
+.Em ahd1
+driver instance.
+For controllers supporting more than one bus, a particular bus can be assigned
+as follows:
+.Bd -literal -offset indent
+hint.scbus.0.at="ahc1"
+hint.scbus.0.bus="1"
+.Ed
+.Pp
+This assigns
+.Nm
+bus 0 to the bus 1 instance on
+.Em ahc1 .
+Peripheral drivers can be wired to a specific bus, target, and lun as so:
+.Bd -literal -offset indent
+hint.da.0.at="scbus0"
+hint.da.0.target="0"
+hint.da.0.unit="0"
+.Ed
+.Pp
+This assigns
+.Em da0
+to target 0, unit (lun) 0 of scbus 0.
+Omitting the target or unit hints will instruct
+.Nm
+to treat them as wildcards
+and use the first respective counted instances.
+These examples can be combined together to allow a peripheral device to be
+wired to any particular controller, bus, target, and/or unit instance.
+.Pp
+When you have a mixture of wired down and counted devices then the
+counting begins with the first non-wired down unit for a particular
+type.
+That is, if you have a disk wired down as
+.Em "device da1" ,
+then the first non-wired disk shall come on line as
+.Em da2 .
+.Sh ADAPTERS
+The system allows common device drivers to work through many different
+types of adapters.
+The adapters take requests from the upper layers and do
+all IO between the
+.Tn SCSI
+or
+.Tn ATA
+bus and the system.
+The maximum size of a transfer is governed by the
+adapter.
+Most adapters can transfer 64KB in a single operation, however
+many can transfer larger amounts.
+.Sh TARGET MODE
+Some adapters support
+.Em target mode
+in which the system is capable of operating as a device, responding to
+operations initiated by another system.
+Target mode is supported for
+some adapters, but is not yet complete for this version of the
+.Nm
+.Tn SCSI
+subsystem.
+.Sh FILES
+see other
+.Nm
+device entries.
+.Sh DIAGNOSTICS
+An XPT_DEBUG CCB can be used to enable various amounts of tracing information
+on any specific bus/device from the list of options compiled into the kernel.
+There are currently seven debugging flags that may be compiled in and used:
+.Bl -tag -width CAM_DEBUG_SUBTRACE
+.It Dv CAM_DEBUG_INFO
+This flag enables general informational printfs for the device
+or devices in question.
+.It Dv CAM_DEBUG_TRACE
+This flag enables function-level command flow tracing.
+i.e.\&
+kernel printfs will happen at the entrance and exit of various functions.
+.It Dv CAM_DEBUG_SUBTRACE
+This flag enables debugging output internal to various functions.
+.It Dv CAM_DEBUG_CDB
+This flag will cause the kernel to print out all
+.Tn ATA
+and
+.Tn SCSI
+commands sent to a particular device or devices.
+.It Dv CAM_DEBUG_XPT
+This flag will enable command scheduler tracing.
+.It Dv CAM_DEBUG_PERIPH
+This flag will enable peripheral drivers messages.
+.It Dv CAM_DEBUG_PROBE
+This flag will enable devices probe process tracing.
+.El
+.Pp
+Some of these flags, most notably
+.Dv CAM_DEBUG_TRACE
+and
+.Dv CAM_DEBUG_SUBTRACE ,
+will produce kernel printfs in EXTREME numbers.
+.Pp
+Users can enable debugging from their kernel config file, by using
+the following kernel config options:
+.Bl -tag -width CAM_DEBUG_COMPILE
+.It Dv CAMDEBUG
+This builds into the kernel all possible
+.Nm
+debugging.
+.It Dv CAM_DEBUG_COMPILE
+This allows to specify support for which debugging flags described above
+should be built into the kernel.
+Flags may be ORed together if the user wishes to
+see printfs for multiple debugging levels.
+.It Dv CAM_DEBUG_FLAGS
+This allows to set the various debugging flags from a kernel config file.
+.It Dv CAM_DEBUG_BUS
+Specify a bus to debug.
+To debug all busses, set this to -1.
+.It Dv CAM_DEBUG_TARGET
+Specify a target to debug.
+To debug all targets, set this to -1.
+.It Dv CAM_DEBUG_LUN
+Specify a lun to debug.
+To debug all luns, set this to -1.
+.El
+.Pp
+Users may also enable debugging on the fly by using the
+.Xr camcontrol 8
+utility, if wanted options built into the kernel.
+See
+.Xr camcontrol 8
+for details.
+.Sh SEE ALSO
+.Xr ada 4 ,
+.Xr aha 4 ,
+.Xr ahb 4 ,
+.Xr ahc 4 ,
+.Xr ahci 4 ,
+.Xr ata 4 ,
+.Xr bt 4 ,
+.Xr cd 4 ,
+.Xr ch 4 ,
+.Xr da 4 ,
+.Xr pass 4 ,
+.Xr pt 4 ,
+.Xr sa 4 ,
+.Xr xpt 4 ,
+.Xr camcontrol 8
+.Sh HISTORY
+The
+.Nm
+.Tn SCSI
+subsystem first appeared in
+.Fx 3.0 .
+The
+.Nm
+ATA support was added in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+.Tn SCSI
+subsystem was written by
+.An Justin Gibbs
+and
+.An Kenneth Merry .
+The
+.Nm
+.Tn ATA
+support was added by
+.An Alexander Motin Aq mav@FreeBSD.org .
diff --git a/share/man/man4/sctp.4 b/share/man/man4/sctp.4
new file mode 100644
index 0000000..880e808
--- /dev/null
+++ b/share/man/man4/sctp.4
@@ -0,0 +1,421 @@
+.\" Copyright (c) 2006, Randall Stewart.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2006
+.Dt SCTP 4
+.Os
+.Sh NAME
+.Nm sctp
+.Nd Internet Stream Control Transmission Protocol
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In netinet/sctp.h
+.Ft int
+.Fn socket AF_INET SOCK_STREAM IPPROTO_SCTP
+.Ft int
+.Fn socket AF_INET SOCK_SEQPACKET IPPROTO_SCTP
+.Sh DESCRIPTION
+The
+.Tn SCTP
+protocol provides reliable, flow-controlled, two-way
+transmission of data.
+It is a message oriented protocol and can
+support the
+.Dv SOCK_STREAM
+and
+.Dv SOCK_SEQPACKET
+abstractions.
+.Tn SCTP
+uses the standard
+Internet address format and, in addition, provides a per-host
+collection of
+.Dq "port addresses" .
+Thus, each address is composed of an Internet address specifying
+the host and network, with a specific
+.Tn SCTP
+port on the host identifying the peer entity.
+.Pp
+There are two models of programming in SCTP.
+The first uses the
+.Dv SOCK_STREAM
+abstraction.
+In this abstraction sockets utilizing the
+.Tn SCTP
+protocol are either
+.Dq active
+or
+.Dq passive .
+Active sockets initiate connections to passive
+sockets.
+By default,
+.Tn SCTP
+sockets are created active; to create a
+passive socket, the
+.Xr listen 2
+system call must be used after binding the socket with the
+.Xr bind 2
+or
+.Xr sctp_bindx 3
+system calls.
+Only passive sockets may use the
+.Xr accept 2
+call to accept incoming connections.
+Only active sockets may use the
+.Xr connect 2
+call to initiate connections.
+.Pp
+The other abstraction
+.Dv SOCK_SEQPACKET
+provides a
+.Dq connectionless
+mode of operation in that the user may send to an address
+(using any of the valid send calls that carry a
+socket address) and an association will be setup
+implicitly by the underlying
+.Tn SCTP
+transport stack.
+This abstraction is the only one capable of sending data on the
+third leg of the four-way handshake.
+A user must still call
+.Xr listen 2
+to allow the socket to accept connections.
+Calling
+.Xr listen 2
+however does not restrict the user from still initiating
+implicit connections to other peers.
+.Pp
+The
+.Tn SCTP
+protocol directly supports multi-homing.
+So when binding a socket with the
+.Dq wildcard
+address
+.Dv INADDR_ANY ,
+the
+.Tn SCTP
+stack will inform the peer about all of the local addresses
+that are deemed in scope of the peer.
+The peer will then possibly have multiple paths to reach the local host.
+.Pp
+The
+.Tn SCTP
+transport protocol is also multi-streamed.
+Multi-streaming refers to the ability to send sub-ordered flows of
+messages.
+A user performs this by specifying a specific stream in one of the
+extended send calls such as the
+.Xr sctp_send 3
+function call.
+Sending messages on different streams will allow parallel delivery
+of data i.e., a message loss in stream 1 will not block the delivery
+of messages sent in stream 2.
+.Pp
+The
+.Tn SCTP
+transport protocol also provides a unordered service as well.
+The unordered service allows a message to be sent and delivered
+with no regard to the ordering of any other message.
+.Ss Extensions
+The FreeBSD implementation of
+.Tn SCTP
+also supports the following extensions:
+.Bl -hang -width indent
+.It "sctp partial reliability"
+This extension allows one to have message be skipped and
+not delivered based on some user specified parameters.
+.It "sctp dynamic addressing"
+This extension allows addresses to be added and deleted
+dynamically from an existing association.
+.It "sctp authentication"
+This extension allows the user to authenticate specific
+peer chunks (including data) to validate that the peer
+who sent the message is in fact the peer who setup the
+association.
+A shared key option is also provided for
+so that two stacks can pre-share keys.
+.It "packet drop"
+Some routers support a special satellite protocol that
+will report losses due to corruption.
+This allows retransmissions without subsequent loss in bandwidth
+utilization.
+.It "stream reset"
+This extension allows a user on either side to reset the
+stream sequence numbers used by any or all streams.
+.El
+.Pp
+.Tn SCTP
+supports a number of socket options which can be set with
+.Xr setsockopt 2
+and tested with
+.Xr getsockopt 2
+or
+.Xr sctp_opt_info 3 :
+.Bl -tag -width ".Dv SCTP_SET_PEER_PRIMARY_ADDR"
+.It Dv SCTP_NODELAY
+Under most circumstances,
+.Tn SCTP
+sends data when it is presented; when outstanding data has not
+yet been acknowledged, it gathers small amounts of output to be
+sent in a single packet once an acknowledgement is received.
+For some clients, such as window systems that send a stream of
+mouse events which receive no replies, this packetization may
+cause significant delays.
+The boolean option
+.Dv SCTP_NODELAY
+defeats this algorithm.
+.It Dv SCTP_RTOINFO
+This option returns specific information about an associations
+.Dq "Retransmission Time Out" .
+It can also be used to change the default values.
+.It Dv SCTP_ASSOCINFO
+This option returns specific information about the requested
+association.
+.It Dv SCTP_INITMSG
+This option allows you to get or set the default sending
+parameters when an association is implicitly setup.
+It allows you to change such things as the maximum number of
+streams allowed inbound and the number of streams requested
+of the peer.
+.It Dv SCTP_AUTOCLOSE
+For the one-to-many model
+.Dv ( SOCK_SEQPACKET )
+associations are setup implicitly.
+This option allows the user to specify a default number of idle
+seconds to allow the association be maintained.
+After the idle timer (where no user message have been sent or have
+been received from the peer) the association will be gracefully
+closed.
+The default for this value is 0, or unlimited (i.e., no automatic
+close).
+.It Dv SCTP_SET_PEER_PRIMARY_ADDR
+The dynamic address extension allows a peer to also request a
+particular address of its be made into the primary address.
+This option allows the caller to make such a request to a peer.
+Note that if the peer does not also support the dynamic address
+extension, this call will fail.
+Note the caller must provide a valid local address that the peer has
+been told about during association setup or dynamically.
+.It Dv SCTP_PRIMARY_ADDR
+This option allows the setting of the primary address
+that the caller wishes to send to.
+The caller provides the address of a peer that is to be made primary.
+.It Dv SCTP_ADAPTATION_LAYER
+The dynamic address extension also allows a user to
+pass a 32 bit opaque value upon association setup.
+This option allows a user to set or get this value.
+.It Dv SCTP_DISABLE_FRAGMENTS
+By default
+.Tn SCTP
+will fragment user messages into multiple pieces that
+will fit on the network and then later, upon reception, reassemble
+the pieces into a single user message.
+If this option is enabled instead, any send that exceeds the path
+maximum transfer unit (P-MTU) will fail and the message will NOT be
+sent.
+.It Dv SCTP_PEER_ADDR_PARAMS
+This option will allow a user to set or get specific
+peer address parameters.
+.It Dv SCTP_DEFAULT_SEND_PARAM
+When a user does not use one of the extended send
+calls (e.g.,
+.Xr sctp_sendmsg 3 )
+a set of default values apply to each send.
+These values include things like the stream number to send
+to as well as the per-protocol id.
+This option lets a caller both get and set these values.
+If the user changes these default values, then these new values will
+be used as the default whenever no information is provided by the
+sender (i.e., the non-extended API is used).
+.It Dv SCTP_EVENTS
+.Tn SCTP
+has non-data events that it can communicate
+to its application.
+By default these are all disabled since they arrive in the data path
+with a special flag
+.Dv MSG_NOTIFICATION
+set upon the received message.
+This option lets a caller
+both get what events are current being received
+as well as set different events that they may be interested
+in receiving.
+.It Dv SCTP_I_WANT_MAPPED_V4_ADDR
+.Tn SCTP
+supports both IPV4 and IPV6.
+An association may span both IPV4 and IPV6 addresses since
+.Tn SCTP
+is multi-homed.
+By default, when opening an IPV6 socket, when
+data arrives on the socket from a peer's
+V4 address the V4 address will be presented with an address family
+of AF_INET.
+If this is undesirable, then this option
+can be enabled which will then convert all V4 addresses
+into mapped V6 representations.
+.It Dv SCTP_MAXSEG
+By default
+.Tn SCTP
+chooses its message fragmentation point
+based upon the smallest P-MTU of the peer.
+This option lets the caller set it to a smaller value.
+Note that while the user can change this value, if the P-MTU
+is smaller than the value set by the user, then the P-MTU
+value will override any user setting.
+.It Dv SCTP_DELAYED_ACK_TIME
+This option lets the user both set and get the
+delayed ack time (in milliseconds) that
+.Tn SCTP
+is using.
+The default is 200 milliseconds.
+.It Dv SCTP_PARTIAL_DELIVERY_POINT
+.Tn SCTP
+at times may need to start delivery of a
+very large message before the entire message has
+arrived.
+By default SCTP waits until the incoming
+message is larger than one fourth of the receive
+buffer.
+This option allows the stacks value
+to be overridden with a smaller value.
+.It Dv SCTP_FRAGMENT_INTERLEAVE
+.Tn SCTP
+at times will start partial delivery (as mentioned above).
+In the normal case successive reads will continue to return
+the rest of the message, blocking if needed, until all of
+that message is read.
+However this means other messages may have arrived and be ready
+for delivery and be blocked behind the message being partially
+delivered.
+If this option is enabled, when a partial delivery
+message has no more data to be received, then a subsequent
+read may return a different message that is ready for delivery.
+By default this option is off since the user must be using the
+extended API's to be able to tell the difference between
+messages (via the stream and stream sequence number).
+.It Dv SCTP_AUTH_CHUNK
+By default only the dynamic addressing chunks are
+authenticated.
+This option lets a user request an
+additional chunk be authenticated as well.
+Note that successive calls to this option will work and continue
+to add more chunks that require authentication.
+Note that this option only effects future associations and
+not existing ones.
+.It Dv SCTP_AUTH_KEY
+This option allows a user to specify a shared
+key that can be later used to authenticate
+a peer.
+.It Dv SCTP_HMAC_IDENT
+This option will let you get or set the list of
+HMAC algorithms used to authenticate peers.
+Note that the HMAC values are in priority order where
+the first HMAC identifier is the most preferred
+and the last is the least preferred.
+.It Dv SCTP_AUTH_ACTIVE_KEY
+This option allows you to make a key active for
+the generation of authentication information.
+Note that the peer must have the same key or else the
+data will be discarded.
+.It Dv SCTP_AUTH_DELETE_KEY
+This option allows you to delete an old key.
+.It Dv SCTP_USE_EXT_RECVINFO
+The sockets api document allows an extended
+send/receive information structure to be used.
+The extended structure includes additional fields
+related to the next message to be received (after the
+current receive completes) if such information is known.
+By default the system will not pass this information.
+This option allows the user to request this information.
+.It Dv SCTP_AUTO_ASCONF
+By default when bound to all address and the system administrator has
+enables automatic dynamic addresses, the
+.Tn SCTP
+stack will automatically generate address changes into add and
+delete requests to any peers by setting this option to
+true.
+This option allows an endpoint to disable that behavior.
+.It Dv SCTP_MAXBURST
+By default
+.Tn SCTP
+implements micro-burst control so that as the congestion window
+opens up no large burst of packets can be generated.
+The default burst limit is four.
+This option lets the user change this value.
+.It Dv SCTP_CONTEXT
+Many sctp extended calls have a context field.
+The context field is a 32 bit opaque value that will be returned in
+send failures.
+This option lets the caller set the default
+context value to use when none is provided by the user.
+.It Dv SCTP_EXPLICIT_EOR
+By default, a single send is a complete message.
+.Tn SCTP
+generates an implied record boundary.
+If this option is enabled, then all sends are part of the same message
+until the user indicates an end of record with the
+special flag
+.Dv SCTP_EOR
+passed in the sctp_sndrcvinfo flags field.
+This effectively makes all sends part of the same message
+until the user specifies differently.
+This means that a caller must NOT change the stream number until
+after the
+.Dv SCTP_EOR
+is passed to
+.Tn SCTP
+else an error will be returned.
+.It Dv SCTP_STATUS
+This option is a read only option that returns
+various status information about the specified association.
+.It Dv SCTP_GET_PEER_ADDR_INFO
+This read only option returns information about a peer
+address.
+.It Dv SCTP_PEER_AUTH_CHUNKS
+This read only option returns a list of the chunks
+the peer requires to be authenticated.
+.It Dv SCTP_LOCAL_AUTH_CHUNKS
+This read only option returns a list of the locally
+required chunks that must be authenticated.
+.It Dv SCTP_RESET_STREAMS
+This socket option is used to cause a stream sequence
+number or all stream sequence numbers to be reset.
+Note that the peer
+.Tn SCTP
+endpoint must also support the stream reset extension
+as well.
+.El
+.Sh SEE ALSO
+.Xr accept 2 ,
+.Xr bind 2 ,
+.Xr connect 2 ,
+.Xr listen 2 ,
+.Xr sctp_bindx 3 ,
+.Xr sctp_connectx 3 ,
+.Xr sctp_opt_info 3 ,
+.Xr sctp_recvmsg 3 ,
+.Xr sctp_sendmsg 3
diff --git a/share/man/man4/sdhci.4 b/share/man/man4/sdhci.4
new file mode 100644
index 0000000..6adfd81
--- /dev/null
+++ b/share/man/man4/sdhci.4
@@ -0,0 +1,88 @@
+.\"
+.\" Copyright (c) 2008 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 9, 2012
+.Dt SDHCI 4
+.Os
+.Sh NAME
+.Nm sdhci
+.Nd PCI SD Host Controller bridge driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device mmc"
+.Cd "device mmcsd"
+.Cd "device sdhci"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+mmc_load="YES"
+mmcsd_load="YES"
+sdhci_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports PCI devices with class 8 and subclass 5 according to
+SD Host Controller Specification.
+Driver supports up to six high speed 4bit MMC/SD slots per controller.
+Driver attaches mmc bus to the respective slot on card insertion and
+detaches it on card removing.
+.Sh HARDWARE
+The
+.Nm
+driver supports different specification compatible chips. The following
+chips have been verified to work:
+.Pp
+.Bl -bullet -compact
+.It
+ENE CB712
+.It
+ENE CB714
+.It
+RICOH R5C822
+.It
+RICOH R5CE823
+.It
+TI PCIXX21/XX11
+.El
+.Sh SEE ALSO
+.Xr mmc 4 ,
+.Xr mmcsd 4
+.Rs
+.%T "SD Specifications, Part 2, SD Host Controller, Simplified Specification"
+.Re
+.Sh AUTHORS
+.An Alexander Motin Aq mav@FreeBSD.org .
+.Sh BUGS
+Many of existing SD controller chips have some nonstandard requirements,
+proprietary registers and hardware bugs, requiring additional handling.
+ENE chips are handled to work fine, while some revisions of RICOH and TI
+controllers still do not see cards without some additional initialization.
diff --git a/share/man/man4/sem.4 b/share/man/man4/sem.4
new file mode 100644
index 0000000..2767dc7
--- /dev/null
+++ b/share/man/man4/sem.4
@@ -0,0 +1,81 @@
+.\" Copyright (c) 2002 Tim J. Robbins
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 7, 2014
+.Dt SEM 4
+.Os
+.Sh NAME
+.Nm sem
+.Nd POSIX semaphores
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options P1003_1B_SEMAPHORES"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+sem_load="YES"
+.Ed
+.Pp
+To load the driver as a module at run-time, run the following
+command as root:
+.Bd -ragged -offset indent
+kldload sem
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+facility provides system calls used by the standard C library
+.Pq Pa libc
+to implement
+.Tn POSIX
+semaphores.
+This facility offers support for such functions as
+.Fn sem_init
+and
+.Fn sem_wait .
+It is available both as a kernel option for static inclusion and as a
+dynamic kernel module.
+.Sh SEE ALSO
+.Xr sem_destroy 3 ,
+.Xr sem_getvalue 3 ,
+.Xr sem_init 3 ,
+.Xr sem_open 3 ,
+.Xr sem_post 3 ,
+.Xr sem_wait 3 ,
+.Xr config 8 ,
+.Xr kldload 8 ,
+.Xr kldunload 8
+.Sh HISTORY
+The
+.Nm
+facility appeared in
+.Fx 5.0 .
diff --git a/share/man/man4/send.4 b/share/man/man4/send.4
new file mode 100644
index 0000000..3f90eaf
--- /dev/null
+++ b/share/man/man4/send.4
@@ -0,0 +1,214 @@
+.\"-
+.\" Copyright (c) 2010 Ana Kukec
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 19, 2010
+.Dt SEND 4
+.Os
+.Sh NAME
+.Nm send
+.Nd "Kernel side support for Secure Neighbor Discovery (SeND)"
+.Sh SYNOPSIS
+.In sys/socket.h
+.In netinet/in.h
+.In netinet6/send.h
+.Ft int
+.Fn socket PF_INET6 SOCK_RAW IPPROTO_SEND
+.Pp
+To load the driver as a module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+send_load="YES"
+.Ed
+.Sh DESCRIPTION
+IPv6 nodes use the Neighbor Discovery Protocol (NDP) to discover other nodes
+on the link, to determine their link-layer addresses to find routers, and
+to maintain reachability information about the paths to active members.
+NDP is vulnerable to various attacks [RFC3756].
+Secure Neighbor Discovery is a set of extensions to NDP that counter threats
+to NDP [RFC3971].
+.Pp
+Kernel side support for SeND consists of a kernel module with hooks that
+divert relevant packets (Neighbor Solicitations, Neighbor Advertisements,
+Router Solicitations, Router Advertisements and Redirects) from the NDP stack,
+send them to user space on a dedicated socket and reinject them back for
+further processing.
+Hooks are triggered only if the
+.Nm
+module is loaded.
+.Pp
+The native SeND socket is similar to a raw IP socket, but with its own,
+internal pseudo-protocol (IPPROTO_SEND).
+Struct sockaddr_send is defined in
+.In netinet6/send.h .
+It defines the total length of the structure, the address family, packet's
+incoming or outgoing direction from the interface's point of view, and the
+interface index.
+.Bd -literal
+struct sockaddr_send {
+ unsigned char send_len; /* total length */
+ sa_family_t send_family; /* address family */
+ int send_direction;
+ int send_ifidx;
+ char send_zero[8];
+};
+.Ed
+.Pp
+The address family is always
+.Va AF_INET6 .
+The
+.Va send_direction
+variable denotes the direction of the packet from the interface's
+point of view and has either the value
+.Dv SND_IN
+or
+.Dv SND_OUT .
+The
+.Va send_ifidx
+variable is the interface index of the receiving or sending interface.
+The
+.Va send_zero
+variable is padding and must always be zero.
+.Pp
+In case that no user space application is connected to the send socket,
+processing continues normally as if the module was not loaded.
+.Sh INPUT HOOK
+The input hook is named after the input path of the incoming or outgoing
+NDP packets, on the way from the wire, through the nd6 stack, to user
+space.
+Relevant packets are identified by adding an mbuf_tag
+(see
+.Xr mbuf_tags 9 )
+to the
+.Xr mbuf 9 ,
+if the
+.Nm
+module is loaded.
+It is then passed on to the kernel-userland interface
+for either cryptographic protection or validation by the SeND application.
+The hook takes an argument that describes the direction of the packet, both
+in case of incoming and outgoing packets.
+.Dv SND_IN
+is the direction of the incoming packets that are usually protected
+by the SeND options and then sent to user space for cryptographic validation.
+.Dv SND_OUT
+is the outgoing direction.
+It describes both reply and locally
+originated outgoing packets that are sent to user space for the addition
+of SeND options.
+.Sh INCOMING PACKETS
+The incoming ND packet from the wire:
+.Bd -literal
+ kernelspace ( userspace
+ )
+ incoming SeND/ND packet (
+ | )
+ v ( SND_IN ) (
+ icmp6_input() -> send_input_hook ---> send socket ----+
+ : ) |
+ : # # ( |
+ normal : # # ) v
+ processing : # send.ko # ( SeND application
+ path : # # ) |
+ : # # ( |
+ v ) |
+ icmp6/nd6_??_input() <- protocol switch <--- send socket <---+
+ | structure (IPPPROTO_SEND) )
+ | ( SND_IN ) (
+ v )
+ continue normal ND processing (
+.Ed
+.Sh OUTGOING PACKETS
+Outgoing ND packet (reply or locally triggered):
+.Bd -literal
+ kernelspace ( userspace
+ )
+ nd6_na_input() (
+ +PACKET_TAG_ND_OUTGOING )
+ | )
+ | outgoing packet (
+ | | )
+ | v (
+ | icmp6_redirect_output() )
+ | nd6_ns_output() (
+ | nd6_na_output() )
+ | +PACKET_TAG_ND_OUTGOING (
+ | | )
+ | +-----------<- rip6_output() <----------)----- rtsol/rtadvd/..
+ | | +PACKET_TAG_ND_OUTGOING (
+ | v )
+ | ip6_output() (
+ | | )
+ +-------->-+ (
+ | )
+ v ( SND_OUT ) (
+ nd6_output_lle() -> send_input_hook ---> send socket ----+
+ -PACKET_TAG_ND_OUTGOING ) |
+ : # # ( |
+ normal : # # ) v
+ processing : # send.ko # ( SeND application
+ path : # # ) |
+ : # # ( |
+ v ) |
+ (*ifp->if_output)() <- protocol switch <--- send socket <---+
+ | structure (IPPPROTO_SEND) )
+ | ( SND_OUT ) (
+ v )
+ continue with normal packet output (
+.Ed
+.Sh ERRORS
+A socket operation may fail with one of the following errors returned:
+.Bl -tag -width Er
+.It Bq Er EEXIST
+Another user space SeND application is bound to the socket.
+.It Bq Er ENOBUFS
+Shortage of space to receive the incoming (SeND-protected) or outgoing
+(SeND-validated) packet from the SeND application.
+.It Bq Er ENOSYS
+A packet received from user space and passed to the NDP stack for further
+processing is neither Neighbor Solicitation, Neighbor Advertisement,
+Router Solicitation, Router Advertisement nor Redirect.
+.It Bq Er ENOENT
+Occurs if interface output routines fail to send the packet out of the
+interface.
+.El
+.Sh SEE ALSO
+.Xr recvfrom 2
+.Xr sendto 2
+.Xr socket 2
+.Xr loader.conf 5
+.Sh HISTORY
+The
+.Nm
+module first appeared in
+.Fx 9.0 .
+.Sh AUTHORS
+.An Ana Kukec Aq anchie@FreeBSD.org ,
+University of Zagreb
+.Sh BUGS
+Due to the lack of NDP locking, it is currently not possible to unload the
+.Nm
+module.
diff --git a/share/man/man4/ses.4 b/share/man/man4/ses.4
new file mode 100644
index 0000000..42ec529
--- /dev/null
+++ b/share/man/man4/ses.4
@@ -0,0 +1,134 @@
+.\" Copyright (c) 2000
+.\" Matthew Jacob <mjacob@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\"
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 29, 2000
+.Dt SES 4
+.Os
+.Sh NAME
+.Nm ses
+.Nd SCSI Environmental Services driver
+.Sh SYNOPSIS
+.Cd device ses
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for all
+.Tn SCSI
+devices of the environmental services class that are attached to the system
+through a supported
+.Tn SCSI
+Host Adapter, as well as emulated support for SAF-TE (SCSI Accessible
+Fault Tolerant Enclosures).
+The environmental services class generally are enclosure devices that
+provide environmental information such as number of power supplies (and
+state), temperature, device slots, and so on.
+.Pp
+A
+.Tn SCSI
+Host
+adapter must also be separately configured into the system
+before a
+.Tn SCSI
+Environmental Services device can be configured.
+.Sh KERNEL CONFIGURATION
+It is only necessary to explicitly configure one
+.Nm
+device; data structures are dynamically allocated as devices are found
+on the
+.Tn SCSI
+bus.
+.Pp
+A separate option,
+.Va SES_ENABLE_PASSTHROUGH ,
+may be specified to allow the
+.Nm
+driver to perform functions on devices of other classes that claim to
+also support
+.Nm
+functionality.
+.Sh IOCTLS
+The following
+.Xr ioctl 2
+calls apply to
+.Nm
+devices.
+They are defined in the header file
+.In cam/scsi/scsi_ses.h
+(\fIq.v.\fR).
+.Bl -tag -width SESIOC_GETENCSTAT
+.It Dv SESIOC_GETNOBJ
+Used to find out how many
+.Nm
+objects are driven by this particular device instance.
+.It Dv SESIOC_GETOBJMAP
+Read, from the kernel, an array of SES objects which contains
+the object identifier, which subenclosure it is in, and the
+.Nm
+type of the object.
+.It Dv SESIOC_GETENCSTAT
+Get the overall enclosure status.
+.It Dv SESIOC_SETENCSTAT
+Set the overall enclosure status.
+.It Dv SESIOC_GETOBJSTAT
+Get the status of a particular object.
+.It Dv SESIOC_SETOBJSTAT
+Set the status of a particular object.
+.It Dv SESIOC_GETTEXT
+Get the associated help text for an object (not yet implemented).
+.Nm
+devices often have descriptive text for an object which can tell
+you things like location (e.g., "left power supply").
+.It Dv SESIOC_INIT
+Initialize the enclosure.
+.El
+.Sh EXAMPLE USAGE
+The files contained in
+.In usr/share/examples/ses
+show simple mechanisms for how to use these interfaces, as well as a
+very stupid simple monitoring daemon.
+.Sh FILES
+.Bl -tag -width /dev/rsdXXXXX -compact
+.It Pa /dev/ses Ns Ar N
+The
+.Em Nth
+.Nm SES
+device.
+.El
+.Sh DIAGNOSTICS
+When the kernel is configured with
+.Tn DEBUG
+enabled, the first open to an SES device will spit out overall enclosure
+parameters to the console.
+.Sh HISTORY
+The
+.Nm
+driver was written for the
+.Tn CAM
+.Tn SCSI
+subsystem by Matthew Jacob.
+This is a functional equivalent of a similar
+driver available in Solaris, Release 7.
diff --git a/share/man/man4/sf.4 b/share/man/man4/sf.4
new file mode 100644
index 0000000..80ba44e
--- /dev/null
+++ b/share/man/man4/sf.4
@@ -0,0 +1,209 @@
+.\" Copyright (c) 1997, 1998, 1999
+.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 21, 2008
+.Dt SF 4
+.Os
+.Sh NAME
+.Nm sf
+.Nd "Adaptec AIC-6915"
+.Qq Starfire
+PCI Fast Ethernet adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device sf"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_sf_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Adaptec Duralink Fast Ethernet adapters
+based on the Adaptec AIC-6915 "Starfire" chipset.
+.Pp
+The AIC-6915 is a bus master controller with an MII interface.
+It
+supports high and low priority transmit and receive queues, TCP/IP
+checksum offload, multiple DMA descriptor formats and both polling
+and producer/consumer DMA models.
+The AIC-6915 receive filtering
+options include a 16 entry perfect filter, a 512-bit hash table
+for multicast addresses, a 512-bit hash table for priority address
+matching and VLAN filtering.
+An external MII-compliant transceiver
+is required for media interfacing.
+.Pp
+Multiport adapters consist of several AIC-6915 controllers connected
+via a PCI to PCI bridge.
+Each controller is treated as a separate
+interface by the
+.Nm
+driver.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to the
+.Pa /etc/rc.conf
+file.
+.It 10baseT/UTP
+Set 10Mbps operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.It 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It full-duplex
+Force full duplex operation
+.It half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+Adapters supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+ANA-62011 64-bit single port 10/100baseTX adapter
+.It
+ANA-62022 64-bit dual port 10/100baseTX adapter
+.It
+ANA-62044 64-bit quad port 10/100baseTX adapter
+.It
+ANA-69011 32-bit single port 10/100baseTX adapter
+.It
+ANA-62020 64-bit single port 100baseFX adapter
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width indent
+.It Va dev.sf.%d.int_mod
+Maximum amount of time to delay interrupt processing in units of
+102.4us.
+The accepted range is 0 to 31, the default value is 1 (102.4us).
+Value 0 completely disables the interrupt moderation.
+The interface does not need to be brought down and up again before
+a change takes effect.
+.It Va dev.sf.%d.stats
+Display lots of useful MAC counters maintained in the driver.
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "sf%d: couldn't map memory"
+A fatal initialization error has occurred.
+This may
+happen if the PCI BIOS not configured the device, which may be because
+the BIOS has been configured for a "Plug and Play" operating system.
+The "Plug and Play OS" setting in the BIOS should be set to "no" or
+"off" in order for PCI devices to work properly with
+.Fx .
+.It "sf%d: couldn't map ports"
+A fatal initialization error has occurred.
+This may
+happen if the PCI BIOS not configured the device, which may be because
+the BIOS has been configured for a "Plug and Play" operating system.
+The "Plug and Play OS" setting in the BIOS should be set to "no" or
+"off" in order for PCI devices to work properly with
+.Fx .
+.It "sf%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "sf%d: no memory for softc struct!"
+The driver failed to allocate memory for per-device instance information
+during initialization.
+.It "sf%d: failed to enable I/O ports/memory mapping!"
+The driver failed to initialize PCI I/O port or shared memory access.
+This might happen if the card is not in a bus-master slot.
+.It "sf%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Rs
+.%T The Adaptec AIC-6915 Programmer's Manual
+.%U http://download.adaptec.com/pdfs/user_guides/aic6915_pg.pdf
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ctr.columbia.edu .
diff --git a/share/man/man4/sfxge.4 b/share/man/man4/sfxge.4
new file mode 100644
index 0000000..5e4935d
--- /dev/null
+++ b/share/man/man4/sfxge.4
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2011 Solarflare Communications, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 8, 2012
+.Dt SFXGE 4
+.Os
+.Sh NAME
+.Nm sfxge
+.Nd "Solarflare 10Gb Ethernet adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sfxge"
+.Ed
+.Pp
+To load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+sfxge_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for 10Gb Ethernet adapters based on
+Solarflare SFC9000 family controllers.
+The driver supports jumbo
+frames, transmit/receive checksum offload, TCP Segmentation Offload
+(TSO), Large Receive Offload (LRO), VLAN checksum offload, VLAN TSO,
+and Receive Side Scaling (RSS) using MSI-X interrupts.
+.Pp
+The driver allocates 1 receive queue, transmit queue, event queue and
+IRQ per CPU up to a maximum of 64.
+IRQ affinities should be spread out using
+.Xr cpuset 1 .
+Interrupt moderation may be controlled through the sysctl
+.Va dev.sfxge.%d.int_mod
+(units are microseconds).
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+A large number of MAC, PHY and data path statistics are available
+under the sysctl
+.Va dev.sfxge.%d.stats .
+The adapter's VPD
+fields including its serial number are available under the sysctl
+.Va dev.sfxge.%d.vpd .
+.Sh HARDWARE
+The
+.Nm
+driver supports all 10Gb Ethernet adapters based on Solarflare SFC9000
+family controllers.
+.Sh SUPPORT
+For general information and support,
+go to the Solarflare support website at:
+.Pa https://support.solarflare.com .
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr cpuset 1 ,
+.Xr ifconfig 8
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Philip Paeps
+and
+.An Solarflare Communications, Inc.
diff --git a/share/man/man4/sge.4 b/share/man/man4/sge.4
new file mode 100644
index 0000000..70d839e
--- /dev/null
+++ b/share/man/man4/sge.4
@@ -0,0 +1,121 @@
+.\" Copyright (c) 2010 Pyun YongHyeon
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 16, 2011
+.Dt SGE 4
+.Os
+.Sh NAME
+.Nm sge
+.Nd Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device sge"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_sge_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for SiS190 Fast Ethernet
+controllers and SiS191 Fast/Gigabit Ethernet controllers.
+.Pp
+All LOMs supported by the
+.Nm
+driver have TCP/UDP/IP checksum offload for transmit and receive,
+TCP segmentation offload (TSO), hardware VLAN tag stripping/insertion
+features.
+Due to lack of documentation Wake On Lan (WOL), Jumbo frame and an
+interrupt moderation mechanism are not supported yet.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+.It Cm 1000baseTX
+Set 1000baseTX operation over twisted pair.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+device driver provides support for the following Ethernet controllers:
+.Pp
+.Bl -bullet -compact
+.It
+SiS190 Fast Ethernet controller
+.It
+SiS191 Fast/Gigabit Ethernet controller
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr rgephy 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver was written by
+.An Alexander Pohoyda
+.Aq alexander.pohoyda@gmx.net .
+And enhanced by
+.An Nikolay Denev
+.Aq ndenev@gmail.com .
+It first appeared in
+.Fx 8.1 .
diff --git a/share/man/man4/si.4 b/share/man/man4/si.4
new file mode 100644
index 0000000..5eb7629
--- /dev/null
+++ b/share/man/man4/si.4
@@ -0,0 +1,181 @@
+.\" $FreeBSD$
+.Dd September 16, 1995
+.Dt SI 4
+.Os
+.Sh NAME
+.Nm si
+.Nd "driver for Specialix International SI/XIO or SX intelligent serial card"
+.Sh SYNOPSIS
+.Cd "device si"
+.Pp
+For ISA host cards put the following lines in
+.Pa /boot/device.hints :
+.Cd hint.si.0.at="isa"
+.Cd hint.si.0.maddr="0xd0000"
+.Cd hint.si.0.irq="12"
+.Sh DESCRIPTION
+The Specialix SI/XIO and SX hardware makes up an 8 to 32 port RS-232 serial
+multiplexor.
+.Pp
+The system uses two components: a "Host adapter", which is plugged into
+an ISA, EISA or PCI slot and provides intelligence and buffering/processing
+capabilities, as well as an external bus in the form of a 37 pin cable.
+.Pp
+On this cable, "modules" are connected.
+The "SI" module comes in a 4 and 8 port version.
+The "XIO" and "SX" modules come only in
+8 port versions.
+.Pp
+The host adapter polls and transfers data between the modules and the rest
+of the machine.
+The Host adapter provides a 256 byte transmit and 256 byte
+receive FIFO for each of the 32 ports that it can maintain.
+.Pp
+The XIO modules can operate each of their 8 ports at 115,200 baud.
+The SI version can run at 57,600 baud.
+The SX modules can operate each of their
+8 ports at up to 921,600 baud.
+.Pp
+SX modules are only supported when connected to an SX host card.
+SI or
+XIO modules are supported on any host card.
+.Pp
+The host adapter uses a shared memory block in the traditional ISA bus
+"hole" between 0xA0000 and 0xEFFFF.
+The adapter can be configured outside
+range, but requires the memory range to be explicitly non-cached.
+The driver does not yet support this mode of operation.
+.Pp
+SX ISA Host cards have an 8/16 bit mode switch or jumper on them.
+This switch
+or jumper MUST be set for 8 bit mode.
+.Pp
+The ISA adapters can use Irq's 11, 12 or 15 (and 9 and 10 in the case of
+SX host cards).
+.Pp
+The si device driver may have some of its configuration settings changed
+at run-time with the
+.Xr sicontrol 8
+utility.
+.Pp
+The si device driver also responds to the
+.Xr comcontrol 8
+utility for configuring drain-on-close timeouts.
+.Pp
+The driver also defines 3 sysctl variables that can be manipulated:
+machdep.si_debug sets the debug level for the whole driver.
+It depends
+on the driver being compiled with SI_DEBUG.
+machdep.si_pollrate
+sets how often per second the driver polls for lost interrupts.
+machdep.si_realpoll sets whether or not the card will treat the
+poll intervals as if they were interrupts.
+.Pp
+An open on a /dev device node controlled by the si driver obeys the same
+semantics as the
+.Xr sio 4
+driver.
+It fully supports the usual semantics of the cua ports, and the
+"initial termios" and "locked termios" settings.
+In summary, an open on a
+tty port will block until DCD is raised, unless O_NONBLOCK is specified.
+CLOCAL is honored.
+An open on a cua port will always succeed, but DCD
+transitions will be honored after DCD rises for the first time.
+.Pp
+Up to four SI/XIO host cards may be controlled by the si driver.
+Due to the lack of available interrupts, only 3 ISA SI/XIO host cards can be
+used at once.
+.Pp
+The lowest 5 bits of the minor device number are used to select the port
+number on the module cluster.
+The next 2 bits select which of 4 host adapter
+cards.
+This allows a maximum of 128 ports on this driver.
+.Pp
+Bit 7 is used to differentiate a tty/dialin port (bit 7=0) and a
+cua/callout port (bit 7=1).
+.Pp
+Bit 8 through 15 (on
+.Fx )
+are unavailable as they are a shadow of the
+major device number.
+.Pp
+If bit 16 is a 1, the device node is referring to the "initial state" device.
+This "initial state" is used to prime the
+.Xr termios 4
+settings of the device when it is initially opened.
+If bit 17 is a 1, the device node is referring to the "locked state" device.
+The "locked state" is used to prevent the
+.Xr termios 4
+settings from being changed.
+.Pp
+To manipulate the initial/locked settings, the
+.Xr stty 1
+command is useful.
+When setting the "locked" variables, enabling the mode
+on the lock device will lock the termios mode, while disabling the mode will
+unlock it.
+.Sh FILES
+.Bl -tag -width /dev/si_control -compact
+.It Pa /dev/si_control
+global driver control file for
+.Xr sicontrol 8
+.It Pa /dev/ttyA*
+terminal/dialin ports
+.It Pa /dev/cuaA*
+dialout ports
+.It Pa /dev/ttyiA*
+initial termios state devices
+.It Pa /dev/ttylA*
+locked termios state devices
+.It Pa /dev/cuaiA*
+initial termios state devices for dialout ports
+.It Pa /dev/cualA*
+locked termios state devices for dialout ports
+.El
+.Sh SEE ALSO
+.Xr stty 1 ,
+.Xr sio 4 ,
+.Xr termios 4 ,
+.Xr tty 4 ,
+.Xr comcontrol 8 ,
+.Xr sicontrol 8
+.Sh HISTORY
+This driver is loosely based on driver code originating at Specialix, which
+was ported to run on BSDI by
+.An Andy Rutter Aq andy@specialix.co.uk .
+The System V driver source is/was available by ftp from
+.Sy ftp.specialix.co.uk .
+.Pp
+This driver is not supported by Specialix International.
+.Sh AUTHORS
+.An -nosplit
+.An Peter Wemm Aq peter@netplex.com.au
+obtained the code from
+.An Andy Rutter
+and ported it to
+.Fx
+and threw the man page together.
+.An Bruce Evans Aq bde@zeta.org.au
+provided a large amount of assistance during porting.
+.An Nick Sayer Aq nick@specialix.com
+wrote the EISA, PCI and SX portions.
+.Sh BUGS
+The interrupt tuning rate is not believed to be optimal at this time for
+maximum efficiency.
+.Pp
+Polled mode (a feature of standard Specialix drivers) is not implemented,
+but it can be approximated by turning on machdep.si_realpoll.
+The poll
+frequency is set by machdep.si_pollrate (in units of 1/100th of a second).
+.Pp
+The driver does not yet support baud rates higher than 115,200 on SX
+modules.
+.Pp
+Operation outside the traditional ISA "hole" is not yet supported, although it
+should work if the test is removed from the probe routine.
+.Pp
+Multiple host cards are supported although combinations of hosts on
+different bus types have not been tested - device numbering is known to
+be a problem and may lead to unexpected results.
diff --git a/share/man/man4/siba.4 b/share/man/man4/siba.4
new file mode 100644
index 0000000..288a13f
--- /dev/null
+++ b/share/man/man4/siba.4
@@ -0,0 +1,90 @@
+.\" Copyright (c) 2010 Weongyo Jeong
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 8, 2010
+.Dt SIBA 4
+.Os
+.Sh NAME
+.Nm siba
+.Nd Sonic Inc. Silicon Backplane driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device siba"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time,
+place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+siba_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports the Sonic Inc. Silicon Backplane, the interblock
+communications architecture that can be found in most Broadcom
+wireless NICs.
+.Pp
+A bus connects all of the Silicon Backplane's functional blocks.
+These functional blocks, known as cores, use the Open Core Protocol
+(OCP) interface to communicate with agents attached to the Silicon
+Backplane.
+.Pp
+Each NIC uses a chip from the same chip family.
+Each member of the family contains a different set of cores, but
+shares basic architectural features such as address space definition,
+interrupt and error architecture, and backplane register definitions.
+.Pp
+Each core can have an initiator agent that passes read and write
+requests onto the system backplane and a target agent that returns
+responses to those requests.
+Not all cores contain both an initiator and a target agent.
+Initiator agents are present in cores that contain
+host interfaces (PCI, PCMCIA), embedded processors (MIPS),
+or DMA processors associated with communications cores.
+.Pp
+All cores other than PCMCIA have a target agent.
+.Sh SEE ALSO
+.Xr bwn 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Bruce M. Simpson
+.Aq bms@FreeBSD.org
+and
+.An Weongyo Jeong
+.Aq weongyo@FreeBSD.org .
+.Sh CAVEATS
+Host mode is not supported at this moment.
diff --git a/share/man/man4/siftr.4 b/share/man/man4/siftr.4
new file mode 100644
index 0000000..ab92f77
--- /dev/null
+++ b/share/man/man4/siftr.4
@@ -0,0 +1,761 @@
+.\"
+.\" Copyright (c) 2010 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" Portions of this software were developed at the Centre for Advanced
+.\" Internet Architectures, Swinburne University of Technology, Melbourne,
+.\" Australia by Lawrence Stewart under sponsorship from the FreeBSD
+.\" Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions, and the following disclaimer,
+.\" without modification, immediately at the beginning of the file.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 12, 2010
+.Dt SIFTR 4
+.Os
+.Sh NAME
+.Nm SIFTR
+.Nd Statistical Information For TCP Research
+.Sh SYNOPSIS
+To load
+the driver
+as a module at run-time, run the following command as root:
+.Bd -literal -offset indent
+kldload siftr
+.Ed
+.Pp
+Alternatively, to load
+the driver
+as a module at boot time, add the following line into the
+.Xr loader.conf 5
+file:
+.Bd -literal -offset indent
+siftr_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+.Po
+.Em S Ns tatistical
+.Em I Ns nformation
+.Em F Ns or
+.Em T Ns CP
+.Em R Ns esearch
+.Pc
+kernel module logs a range of statistics on active TCP connections to
+a log file.
+It provides the ability to make highly granular measurements of TCP connection
+state, aimed at system administrators, developers and researchers.
+.Ss Compile-time Configuration
+The default operation of
+.Nm
+is to capture IPv4 TCP/IP packets.
+.Nm
+can be configured to support IPv4 and IPv6 by uncommenting:
+.Bd -literal -offset indent
+CFLAGS+=-DSIFTR_IPV6
+.Ed
+.Pp
+in
+.Aq sys/modules/siftr/Makefile
+and recompiling.
+.Pp
+In the IPv4-only (default) mode, standard dotted decimal notation (e.g.
+"136.186.229.95") is used to format IPv4 addresses for logging.
+In IPv6 mode, standard dotted decimal notation is used to format IPv4 addresses,
+and standard colon-separated hex notation (see RFC 4291) is used to format IPv6
+addresses for logging. Note that SIFTR uses uncompressed notation to format IPv6
+addresses.
+For example, the address "fe80::20f:feff:fea2:531b" would be logged as
+"fe80:0:0:0:20f:feff:fea2:531b".
+.Ss Run-time Configuration
+.Nm
+utilises the
+.Xr sysctl 8
+interface to export its configuration variables to user-space.
+The following variables are available:
+.Bl -tag -offset indent -width Va
+.It Va net.inet.siftr.enabled
+controls whether the module performs its
+measurements or not.
+By default, the value is set to 0, which means the module
+will not be taking any measurements.
+Having the module loaded with
+.Va net.inet.siftr.enabled
+set to 0 will have no impact on the performance of the network stack, as the
+packet filtering hooks are only inserted when
+.Va net.inet.siftr.enabled
+is set to 1.
+.El
+.Bl -tag -offset indent -width Va
+.It Va net.inet.siftr.ppl
+controls how many inbound/outbound packets for a given TCP connection will cause
+a log message to be generated for the connection.
+By default, the value is set to 1, which means the module will log a message for
+every packet of every TCP connection.
+The value can be set to any integer in the range [1,2^32], and can be changed at
+any time, even while the module is enabled.
+.El
+.Bl -tag -offset indent -width Va
+.It Va net.inet.siftr.logfile
+controls the path to the file that the module writes its log messages to.
+By default, the file /var/log/siftr.log is used.
+The path can be changed at any time, even while the module is enabled.
+.El
+.Bl -tag -offset indent -width Va
+.It Va net.inet.siftr.genhashes
+controls whether a hash is generated for each TCP packet seen by
+.Nm .
+By default, the value is set to 0, which means no hashes are generated.
+The hashes are useful to correlate which TCP packet triggered the generation of
+a particular log message, but calculating them adds additional computational
+overhead into the fast path.
+.El
+.Ss Log Format
+A typical
+.Nm
+log file will contain 3 different types of log message.
+All messages are written in plain ASCII text.
+.Pp
+Note: The
+.Qq \e
+present in the example log messages in this section indicates a
+line continuation and is not part of the actual log message.
+.Pp
+The first type of log message is written to the file when the module is
+enabled and starts collecting data from the running kernel. The text below
+shows an example module enable log. The fields are tab delimited key-value
+pairs which describe some basic information about the system.
+.Bd -literal -offset indent
+enable_time_secs=1238556193 enable_time_usecs=462104 \\
+siftrver=1.2.2 hz=1000 tcp_rtt_scale=32 \\
+sysname=FreeBSD sysver=604000 ipmode=4
+.Ed
+.Pp
+Field descriptions are as follows:
+.Bl -tag -offset indent -width Va
+.It Va enable_time_secs
+time at which the module was enabled, in seconds since the UNIX epoch.
+.El
+.Bl -tag -offset indent -width Va
+.It Va enable_time_usecs
+time at which the module was enabled, in microseconds since enable_time_secs.
+.El
+.Bl -tag -offset indent -width Va
+.It Va siftrver
+version of
+.Nm .
+.El
+.Bl -tag -offset indent -width Va
+.It Va hz
+tick rate of the kernel in ticks per second.
+.El
+.Bl -tag -offset indent -width Va
+.It Va tcp_rtt_scale
+smoothed RTT estimate scaling factor.
+.El
+.Bl -tag -offset indent -width Va
+.It Va sysname
+operating system name.
+.El
+.Bl -tag -offset indent -width Va
+.It Va sysver
+operating system version.
+.El
+.Bl -tag -offset indent -width Va
+.It Va ipmode
+IP mode as defined at compile time.
+An ipmode of "4" means IPv6 is not supported and IP addresses are logged in
+regular dotted quad format.
+An ipmode of "6" means IPv6 is supported, and IP addresses are logged in dotted
+quad or hex format, as described in the
+.Qq Compile-time Configuration
+subsection.
+.El
+.Pp
+The second type of log message is written to the file when a data log message
+is generated.
+The text below shows an example data log triggered by an IPv4
+TCP/IP packet.
+The data is CSV formatted.
+.Bd -literal -offset indent
+o,0xbec491a5,1238556193.463551,172.16.7.28,22,172.16.2.5,55931, \\
+1073725440,172312,6144,66560,66608,8,1,4,1448,936,1,996,255, \\
+33304,208,66608,0,208,0
+.Ed
+.Pp
+Field descriptions are as follows:
+.Bl -tag -offset indent -width Va
+.It Va 1
+Direction of packet that triggered the log message.
+Either
+.Qq i
+for in, or
+.Qq o
+for out.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 2
+Hash of the packet that triggered the log message.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 3
+Time at which the packet that triggered the log message was processed by
+the
+.Xr pfil 9
+hook function, in seconds and microseconds since the UNIX epoch.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 4
+The IPv4 or IPv6 address of the local host, in dotted quad (IPv4 packet)
+or colon-separated hex (IPv6 packet) notation.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 5
+The TCP port that the local host is communicating via.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 6
+The IPv4 or IPv6 address of the foreign host, in dotted quad (IPv4 packet)
+or colon-separated hex (IPv6 packet) notation.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 7
+The TCP port that the foreign host is communicating via.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 8
+The slow start threshold for the flow, in bytes.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 9
+The current congestion window for the flow, in bytes.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 10
+The current bandwidth-controlled window for the flow, in bytes.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 11
+The current sending window for the flow, in bytes.
+The post scaled value is reported, except during the initial handshake (first
+few packets), during which time the unscaled value is reported.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 12
+The current receive window for the flow, in bytes.
+The post scaled value is always reported.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 13
+The current window scaling factor for the sending window.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 14
+The current window scaling factor for the receiving window.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 15
+The current state of the TCP finite state machine, as defined
+in
+.Aq Pa netinet/tcp_fsm.h .
+.El
+.Bl -tag -offset indent -width Va
+.It Va 16
+The maximum segment size for the flow, in bytes.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 17
+The current smoothed RTT estimate for the flow, in units of TCP_RTT_SCALE * HZ,
+where TCP_RTT_SCALE is a define found in tcp_var.h, and HZ is the kernel's tick
+timer.
+Divide by TCP_RTT_SCALE * HZ to get the RTT in secs. TCP_RTT_SCALE and HZ are
+reported in the enable log message.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 18
+SACK enabled indicator. 1 if SACK enabled, 0 otherwise.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 19
+The current state of the TCP flags for the flow.
+See
+.Aq Pa netinet/tcp_var.h
+for information about the various flags.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 20
+The current retransmission timeout length for the flow, in units of HZ, where HZ
+is the kernel's tick timer.
+Divide by HZ to get the timeout length in seconds. HZ is reported in the
+enable log message.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 21
+The current size of the socket send buffer in bytes.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 22
+The current number of bytes in the socket send buffer.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 23
+The current size of the socket receive buffer in bytes.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 24
+The current number of bytes in the socket receive buffer.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 25
+The current number of unacknowledged bytes in-flight.
+Bytes acknowledged via SACK are not excluded from this count.
+.El
+.Bl -tag -offset indent -width Va
+.It Va 26
+The current number of segments in the reassembly queue.
+.El
+.Pp
+The third type of log message is written to the file when the module is disabled
+and ceases collecting data from the running kernel.
+The text below shows an example module disable log.
+The fields are tab delimited key-value pairs which provide statistics about
+operations since the module was most recently enabled.
+.Bd -literal -offset indent
+disable_time_secs=1238556197 disable_time_usecs=933607 \\
+num_inbound_tcp_pkts=356 num_outbound_tcp_pkts=627 \\
+total_tcp_pkts=983 num_inbound_skipped_pkts_malloc=0 \\
+num_outbound_skipped_pkts_malloc=0 num_inbound_skipped_pkts_mtx=0 \\
+num_outbound_skipped_pkts_mtx=0 num_inbound_skipped_pkts_tcb=0 \\
+num_outbound_skipped_pkts_tcb=0 num_inbound_skipped_pkts_icb=0 \\
+num_outbound_skipped_pkts_icb=0 total_skipped_tcp_pkts=0 \\
+flow_list=172.16.7.28;22-172.16.2.5;55931,
+.Ed
+.Pp
+Field descriptions are as follows:
+.Bl -tag -offset indent -width Va
+.It Va disable_time_secs
+Time at which the module was disabled, in seconds since the UNIX epoch.
+.El
+.Bl -tag -offset indent -width Va
+.It Va disable_time_usecs
+Time at which the module was disabled, in microseconds since disable_time_secs.
+.El
+.Bl -tag -offset indent -width Va
+.It Va num_inbound_tcp_pkts
+Number of TCP packets that traversed up the network stack.
+This only includes inbound TCP packets during the periods when
+.Nm
+was enabled.
+.El
+.Bl -tag -offset indent -width Va
+.It Va num_outbound_tcp_pkts
+Number of TCP packets that traversed down the network stack.
+This only includes outbound TCP packets during the periods when
+.Nm
+was enabled.
+.El
+.Bl -tag -offset indent -width Va
+.It Va total_tcp_pkts
+The summation of num_inbound_tcp_pkts and num_outbound_tcp_pkts.
+.El
+.Bl -tag -offset indent -width Va
+.It Va num_inbound_skipped_pkts_malloc
+Number of inbound packets that were not processed because of failed malloc() calls.
+.El
+.Bl -tag -offset indent -width Va
+.It Va num_outbound_skipped_pkts_malloc
+Number of outbound packets that were not processed because of failed malloc() calls.
+.El
+.Bl -tag -offset indent -width Va
+.It Va num_inbound_skipped_pkts_mtx
+Number of inbound packets that were not processed because of failure to add the
+packet to the packet processing queue.
+.El
+.Bl -tag -offset indent -width Va
+.It Va num_outbound_skipped_pkts_mtx
+Number of outbound packets that were not processed because of failure to add the
+packet to the packet processing queue.
+.El
+.Bl -tag -offset indent -width Va
+.It Va num_inbound_skipped_pkts_tcb
+Number of inbound packets that were not processed because of failure to find the
+TCP control block associated with the packet.
+.El
+.Bl -tag -offset indent -width Va
+.It Va num_outbound_skipped_pkts_tcb
+Number of outbound packets that were not processed because of failure to find
+the TCP control block associated with the packet.
+.El
+.Bl -tag -offset indent -width Va
+.It Va num_inbound_skipped_pkts_icb
+Number of inbound packets that were not processed because of failure to find the
+IP control block associated with the packet.
+.El
+.Bl -tag -offset indent -width Va
+.It Va num_outbound_skipped_pkts_icb
+Number of outbound packets that were not processed because of failure to find
+the IP control block associated with the packet.
+.El
+.Bl -tag -offset indent -width Va
+.It Va total_skipped_tcp_pkts
+The summation of all skipped packet counters.
+.El
+.Bl -tag -offset indent -width Va
+.It Va flow_list
+A CSV list of TCP flows that triggered data log messages to be generated since
+the module was loaded.
+Each flow entry in the CSV list is
+formatted as
+.Qq local_ip;local_port-foreign_ip;foreign_port .
+If there are no entries in the list (i.e., no data log messages were generated),
+the value will be blank.
+If there is at least one entry in the list, a trailing comma will always be
+present.
+.El
+.Pp
+The total number of data log messages found in the log file for a module
+enable/disable cycle should equate to total_tcp_pkts - total_skipped_tcp_pkts.
+.Sh IMPLEMENTATION NOTES
+.Nm
+hooks into the network stack using the
+.Xr pfil 9
+interface.
+In its current incarnation, it hooks into the AF_INET/AF_INET6 (IPv4/IPv6)
+.Xr pfil 9
+filtering points, which means it sees packets at the IP layer of the network
+stack.
+This means that TCP packets inbound to the stack are intercepted before
+they have been processed by the TCP layer.
+Packets outbound from the stack are intercepted after they have been processed
+by the TCP layer.
+.Pp
+The diagram below illustrates how
+.Nm
+inserts itself into the stack.
+.Bd -literal -offset indent
+----------------------------------
+ Upper Layers
+----------------------------------
+ ^ |
+ | |
+ | |
+ | v
+ TCP in TCP out
+----------------------------------
+ ^ |
+ |________ _________|
+ | |
+ | v
+ ---------
+ | SIFTR |
+ ---------
+ ^ |
+ ________| |__________
+ | |
+ | v
+IPv{4/6} in IPv{4/6} out
+----------------------------------
+ ^ |
+ | |
+ | v
+Layer 2 in Layer 2 out
+----------------------------------
+ Physical Layer
+----------------------------------
+.Ed
+.Pp
+.Nm
+uses the
+.Xr alq 9
+interface to manage writing data to disk.
+.Pp
+At first glance, you might mistakenly think that
+.Nm
+extracts information from
+individual TCP packets.
+This is not the case.
+.Nm
+uses TCP packet events (inbound and outbound) for each TCP flow originating from
+the system to trigger a dump of the state of the TCP control block for that
+flow.
+With the PPL set to 1, we are in effect sampling each TCP flow's control block
+state as frequently as flow packets enter/leave the system.
+For example, setting PPL to 2 halves the sampling rate i.e., every second flow
+packet (inbound OR outbound) causes a dump of the control block state.
+.Pp
+The distinction between interrogating individual packets versus interrogating the
+control block is important, because
+.Nm
+does not remove the need for packet capturing tools like
+.Xr tcpdump 1 .
+.Nm
+allows you to correlate and observe the cause-and-affect relationship between
+what you see on the wire (captured using a tool like
+.Xr tcpdump 1 Ns )
+and changes in the TCP control block corresponding to the flow of interest.
+It is therefore useful to use
+.Nm
+and a tool like
+.Xr tcpdump 1
+to gather the necessary data to piece together the complete picture.
+Use of either tool on its own will not be able to provide all of the necessary
+data.
+.Pp
+As a result of needing to interrogate the TCP control block, certain packets
+during the lifecycle of a connection are unable to trigger a
+.Nm
+log message.
+The initial handshake takes place without the existence of a control block and
+the final ACK is exchanged when the connection is in the TIMEWAIT state.
+.Pp
+.Nm
+was designed to minimise the delay introduced to packets traversing the network
+stack.
+This design called for a highly optimised and minimal hook function that
+extracted the minimal details necessary whilst holding the packet up, and
+passing these details to another thread for actual processing and logging.
+.Pp
+This multithreaded design does introduce some contention issues when accessing
+the data structure shared between the threads of operation.
+When the hook function tries to place details in the structure, it must first
+acquire an exclusive lock.
+Likewise, when the processing thread tries to read details from the structure,
+it must also acquire an exclusive lock to do so.
+If one thread holds the lock, the other must wait before it can obtain it.
+This does introduce some additional bounded delay into the kernel's packet
+processing code path.
+.Pp
+In some cases (e.g., low memory, connection termination), TCP packets that enter
+the
+.Nm
+.Xr pfil 9
+hook function will not trigger a log message to be generated.
+.Nm
+refers to this outcome as a
+.Qq skipped packet .
+Note that
+.Nm
+always ensures that packets are allowed to continue through the stack, even if
+they could not successfully trigger a data log message.
+.Nm
+will therefore not introduce any packet loss for TCP/IP packets traversing the
+network stack.
+.Ss Important Behaviours
+The behaviour of a log file path change whilst the module is enabled is as
+follows:
+.Bl -enum
+.It
+Attempt to open the new file path for writing.
+If this fails, the path change will fail and the existing path will continue to
+be used.
+.It
+Assuming the new path is valid and opened successfully:
+.Bl -dash
+.It
+Flush all pending log messages to the old file path.
+.It
+Close the old file path.
+.It
+Switch the active log file pointer to point at the new file path.
+.It
+Commence logging to the new file.
+.El
+.El
+.Pp
+During the time between the flush of pending log messages to the old file and
+commencing logging to the new file, new log messages will still be generated and
+buffered.
+As soon as the new file path is ready for writing, the accumulated log messages
+will be written out to the file.
+.Sh EXAMPLES
+To enable the module's operations, run the following command as root:
+sysctl net.inet.siftr.enabled=1
+.Pp
+To change the granularity of log messages such that 1 log message is
+generated for every 10 TCP packets per connection, run the following
+command as root:
+sysctl net.inet.siftr.ppl=10
+.Pp
+To change the log file location to /tmp/siftr.log, run the following
+command as root:
+sysctl net.inet.siftr.logfile=/tmp/siftr.log
+.Sh SEE ALSO
+.Xr tcpdump 1 ,
+.Xr tcp 4 ,
+.Xr sysctl 8 ,
+.Xr alq 9 ,
+.Xr pfil 9
+.Sh ACKNOWLEDGEMENTS
+Development of this software was made possible in part by grants from the
+Cisco University Research Program Fund at Community Foundation Silicon Valley,
+and the FreeBSD Foundation.
+.Sh HISTORY
+.Nm
+first appeared in
+.Fx 7.4
+and
+.Fx 8.2 .
+.Pp
+.Nm
+was first released in 2007 by Lawrence Stewart and James Healy whilst working on
+the NewTCP research project at Swinburne University of Technology's Centre for
+Advanced Internet Architectures, Melbourne, Australia, which was made possible
+in part by a grant from the Cisco University Research Program Fund at Community
+Foundation Silicon Valley.
+More details are available at:
+.Pp
+http://caia.swin.edu.au/urp/newtcp/
+.Pp
+Work on
+.Nm
+v1.2.x was sponsored by the FreeBSD Foundation as part of
+the
+.Qq Enhancing the FreeBSD TCP Implementation
+project 2008-2009.
+More details are available at:
+.Pp
+http://www.freebsdfoundation.org/
+.Pp
+http://caia.swin.edu.au/freebsd/etcp09/
+.Sh AUTHORS
+.An -nosplit
+.Nm
+was written by
+.An Lawrence Stewart Aq lstewart@FreeBSD.org
+and
+.An James Healy Aq jimmy@deefa.com .
+.Pp
+This manual page was written by
+.An Lawrence Stewart Aq lstewart@FreeBSD.org .
+.Sh BUGS
+Current known limitations and any relevant workarounds are outlined below:
+.Bl -dash
+.It
+The internal queue used to pass information between the threads of operation is
+currently unbounded.
+This allows
+.Nm
+to cope with bursty network traffic, but sustained high packet-per-second
+traffic can cause exhaustion of kernel memory if the processing thread cannot
+keep up with the packet rate.
+.It
+If using
+.Nm
+on a machine that is also running other modules utilising the
+.Xr pfil 9
+framework e.g.
+.Xr dummynet 4 ,
+.Xr ipfw 8 ,
+.Xr pf 4 Ns ,
+the order in which you load the modules is important.
+You should kldload the other modules first, as this will ensure TCP packets
+undergo any necessary manipulations before
+.Nm
+.Qq sees
+and processes them.
+.It
+There is a known, harmless lock order reversal warning between the
+.Xr pfil 9
+mutex and tcbinfo TCP lock reported by
+.Xr witness 4
+when
+.Nm
+is enabled in a kernel compiled with
+.Xr witness 4
+support.
+.It
+There is no way to filter which TCP flows you wish to capture data for.
+Post processing is required to separate out data belonging to particular flows
+of interest.
+.It
+The module does not detect deletion of the log file path.
+New log messages will simply be lost if the log file being used by
+.Nm
+is deleted whilst the module is set to use the file.
+Switching to a new log file using the
+.Em net.inet.siftr.logfile
+variable will create the new file and allow log messages to begin being written
+to disk again.
+The new log file path must differ from the path to the deleted file.
+.It
+The hash table used within the code is sized to hold 65536 flows. This is not a
+hard limit, because chaining is used to handle collisions within the hash table
+structure.
+However, we suspect (based on analogies with other hash table performance data)
+that the hash table look up performance (and therefore the module's packet
+processing performance) will degrade in an exponential manner as the number of
+unique flows handled in a module enable/disable cycle approaches and surpasses
+65536.
+.It
+There is no garbage collection performed on the flow hash table.
+The only way currently to flush it is to disable
+.Nm .
+.It
+The PPL variable applies to packets that make it into the processing thread,
+not total packets received in the hook function.
+Packets are skipped before the PPL variable is applied, which means there may be
+a slight discrepancy in the triggering of log messages.
+For example, if PPL was set to 10, and the 8th packet since the last log message
+is skipped, the 11th packet will actually trigger the log message to be
+generated.
+This is discussed in greater depth in CAIA technical report 070824A.
+.It
+At the time of writing, there was no simple way to hook into the TCP layer
+to intercept packets.
+.Nm Ap s
+use of IP layer hook points means all IP
+traffic will be processed by the
+.Nm
+.Xr pfil 9
+hook function, which introduces minor, but nonetheless unnecessary packet delay
+and processing overhead on the system for non-TCP packets as well.
+Hooking in at the IP layer is also not ideal from the data gathering point of
+view.
+Packets traversing up the stack will be intercepted and cause a log message
+generation BEFORE they have been processed by the TCP layer, which means we
+cannot observe the cause-and-affect relationship between inbound events and the
+corresponding TCP control block as precisely as could be.
+Ideally,
+.Nm
+should intercept packets after they have been processed by the TCP layer i.e.
+intercept packets coming up the stack after they have been processed by
+tcp_input(), and intercept packets coming down the stack after they have been
+processed by tcp_output().
+The current code still gives satisfactory granularity though, as inbound events
+tend to trigger outbound events, allowing the cause-and-effect to be observed
+indirectly by capturing the state on outbound events as well.
+.It
+The
+.Qq inflight bytes
+value logged by
+.Nm
+does not take into account bytes that have been
+.No SACK Ap ed
+by the receiving host.
+.It
+Packet hash generation does not currently work for IPv6 based TCP packets.
+.It
+Compressed notation is not used for IPv6 address representation.
+This consumes more bytes than is necessary in log output.
+.El
diff --git a/share/man/man4/siis.4 b/share/man/man4/siis.4
new file mode 100644
index 0000000..366c3cc
--- /dev/null
+++ b/share/man/man4/siis.4
@@ -0,0 +1,141 @@
+.\" Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 8, 2011
+.Dt SIIS 4
+.Os
+.Sh NAME
+.Nm siis
+.Nd SiliconImage Serial ATA Host Controller driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device scbus"
+.Cd "device siis"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+siis_load="YES"
+.Ed
+.Pp
+The following tunables are settable from the
+.Xr loader 8 :
+.Bl -ohang
+.It Va hint.siis. Ns Ar X Ns Va .msi
+controls Message Signaled Interrupts (MSI) usage by the specified controller.
+.It Va hint.siisch. Ns Ar X Ns Va .pm_level
+controls SATA interface Power Management for the specified channel,
+allowing some power to be saved at the cost of additional command
+latency.
+Possible values:
+.Bl -tag -width 2n -offset indent
+.It 0
+interface Power Management is disabled (default);
+.It 1
+device is allowed to initiate PM state change, host is passive.
+.El
+.Pp
+Note that interface Power Management is not compatible with
+device presence detection.
+A manual bus reset is needed on device hot-plug.
+.It Va hint.siisch. Ns Ar X Ns Va .sata_rev
+setting to nonzero value limits maximum SATA revision (speed).
+Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps.
+.El
+.Sh DESCRIPTION
+This driver provides the
+.Xr CAM 4
+subsystem with native access to the
+.Tn SATA
+ports of controller.
+Each SATA port is represented to CAM as a separate bus with 16 targets.
+Most of the bus-management details are handled by the SATA-specific
+transport of CAM.
+Connected ATA disks are handled by the ATA protocol disk peripheral driver
+.Xr ada 4 .
+ATAPI devices are handled by the SCSI protocol peripheral drivers
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr sa 4 ,
+etc.
+.Pp
+Driver features include support for Serial ATA and ATAPI devices,
+Port Multipliers (including FIS-based switching), hardware command queues
+(31 command per port), Native Command Queuing, SATA interface Power Management,
+device hot-plug and Message Signaled Interrupts.
+.Pp
+The activity LEDs of the adapters supported by the
+.Nm
+driver can be controlled via the
+.Xr led 4
+API for localization or status reporting purposes.
+.Pp
+Same hardware is also supported by the atasiliconimage driver from
+.Xr ata 4
+subsystem.
+If both drivers are loaded at the same time, this one will be
+given precedence as the more functional of the two.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following controller chips:
+.Pp
+.Bl -bullet -compact
+.It
+SiI3124 (PCI-X 133MHz/64bit, 4 ports)
+.It
+SiI3131 (PCIe 1.0 x1, 1 port)
+.It
+SiI3132 (PCIe 1.0 x1, 2 ports)
+.It
+SiI3531 (PCIe 1.0 x1, 1 port)
+.El
+.Sh FILES
+.Bl -tag -width /dev/led/siisch*
+.It Pa /dev/led/siisch*
+identification LED device nodes
+.El
+.Sh SEE ALSO
+.Xr ada 4 ,
+.Xr ata 4 ,
+.Xr cam 4 ,
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr led 4 ,
+.Xr sa 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An Alexander Motin Aq mav@FreeBSD.org .
diff --git a/share/man/man4/simplebus.4 b/share/man/man4/simplebus.4
new file mode 100644
index 0000000..6834b38
--- /dev/null
+++ b/share/man/man4/simplebus.4
@@ -0,0 +1,82 @@
+.\"
+.\" Copyright (c) 2010 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" This software was developed by Semihalf under sponsorship from
+.\" the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 12, 2010
+.Dt SIMPLEBUS 4
+.Os
+.Sh NAME
+.Nm simplebus
+.Nd ePAPR simple-bus driver
+.Sh SYNOPSIS
+.Cd "options FDT"
+.Sh DESCRIPTION
+This bus driver is dedicated for the
+.Pa simple-bus
+node of a flattened device tree compliant with the
+.Pa ePAPR
+specification.
+.Pp
+The
+.Nm
+entity does not represent any physical element by itself, it is rather an
+umbrella node grouping integrated on-chip peripherals like interrupt
+controller, connectivity controllers, accelerating engines and so on.
+.Pp
+The driver is generic and common for all flattened device tree nodes claiming
+.Pa simple-bus
+compatibility. It iterates over direct descendants of the
+.Pa simple-bus
+node, instantiates newbus children and assigns resources to them, based on the
+configuration data retrieved from the nodes properties in
+.Xr fdt 4 .
+.Pp
+Note the
+.Nm
+does not manage device resources and passes through any requests to the
+.Xr fdtbus 4
+layer.
+.Sh SEE ALSO
+.Xr fdt 4 ,
+.Xr fdtbus 4 ,
+.Xr openfirm 4
+.Sh STANDARDS
+Power.org Standard for Embedded Power Architecture Platform Requirements
+.Pq Vt ePAPR .
+.Sh HISTORY
+The
+.Nm
+support first appeared in
+.Fx 9.0 .
+.Sh AUTHORS
+The
+.Nm
+support was developed by Semihalf under sponsorship from the FreeBSD
+Foundation. This manual page was written by
+.An Rafal Jaworowski .
diff --git a/share/man/man4/sio.4 b/share/man/man4/sio.4
new file mode 100644
index 0000000..9987eee
--- /dev/null
+++ b/share/man/man4/sio.4
@@ -0,0 +1,410 @@
+.\" Copyright (c) 1990, 1991 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" the Systems Programming Group of the University of Utah Computer
+.\" Science Department.
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" from: @(#)dca.4 5.2 (Berkeley) 3/27/91
+.\" from: com.4,v 1.1 1993/08/06 11:19:07 cgd Exp
+.\" $FreeBSD$
+.\"
+.Dd August 30, 2006
+.Dt SIO 4
+.Os
+.Sh NAME
+.Nm sio
+.Nd "fast interrupt driven asynchronous serial communications interface"
+.Sh SYNOPSIS
+For standard ISA ports:
+.Bd -ragged -offset indent -compact
+.Cd "device sio"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.sio.0.at="isa"
+.Cd hint.sio.0.port="0x3f8"
+.Cd hint.sio.0.flags="0x10"
+.Cd hint.sio.0.irq="4"
+.Cd hint.sio.1.at="isa"
+.Cd hint.sio.1.port="0x2f8"
+.Cd hint.sio.1.flags="0x0"
+.Cd hint.sio.1.irq="3"
+.Ed
+.Pp
+For AST compatible multiport cards with 4 ports:
+.Bd -ragged -offset indent -compact
+.Cd "options COM_MULTIPORT"
+.Cd "device sio"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.sio.4.at="isa"
+.Cd hint.sio.4.port="0x2a0"
+.Cd hint.sio.4.flags="0x701"
+.Cd hint.sio.5.at="isa"
+.Cd hint.sio.5.port="0x2a8"
+.Cd hint.sio.5.flags="0x701"
+.Cd hint.sio.6.at="isa"
+.Cd hint.sio.6.port="0x2b0"
+.Cd hint.sio.6.flags="0x701"
+.Cd hint.sio.7.at="isa"
+.Cd hint.sio.7.port="0x2b8"
+.Cd hint.sio.7.flags="0x701"
+.Cd hint.sio.7.irq="12"
+.Ed
+.Pp
+For Boca Board compatible multiport cards with 8 ports:
+.Bd -ragged -offset indent -compact
+.Cd "options COM_MULTIPORT"
+.Cd "device sio"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.sio.4.at="isa"
+.Cd hint.sio.4.port="0x100"
+.Cd hint.sio.4.flags="0xb05"
+.Cd "..."
+.Cd hint.sio.11.at="isa"
+.Cd hint.sio.11.port="0x138"
+.Cd hint.sio.11.flags="0xb05"
+.Cd hint.sio.11.irq="12"
+.Ed
+.Pp
+For Netmos Nm9845 multiport cards with 6 ports:
+.Bd -ragged -offset indent -compact
+.Cd "options COM_MULTIPORT"
+.Cd "device sio"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.sio.4.at="isa"
+.Cd hint.sio.4.port="0xb000"
+.Cd hint.sio.4.flags="0x901"
+.Cd hint.sio.5.at="isa"
+.Cd hint.sio.5.port="0xb400"
+.Cd hint.sio.5.flags="0x901"
+.Cd hint.sio.6.at="isa"
+.Cd hint.sio.6.port="0xb800"
+.Cd hint.sio.6.flags="0x901"
+.Cd hint.sio.7.at="isa"
+.Cd hint.sio.7.port="0xbc00"
+.Cd hint.sio.7.flags="0x901"
+.Cd hint.sio.8.at="isa"
+.Cd hint.sio.8.port="0xc000"
+.Cd hint.sio.8.flags="0x901"
+.Cd hint.sio.9.at="isa"
+.Cd hint.sio.9.port="0xac00"
+.Cd hint.sio.9.flags="0x901"
+.Cd hint.sio.9.irq="12"
+.Ed
+.Pp
+For Hayes ESP cards:
+.Bd -ragged -offset indent -compact
+.Cd "options COM_ESP"
+.Cd "device sio"
+.Cd "..."
+.Ed
+.Pp
+For single port PCI and PCCARD cards:
+.Bd -ragged -offset indent -compact
+.Cd "device sio"
+.Pp
+No lines are required in
+.Pa /boot/device.hints
+for these cards.
+.Ed
+.Pp
+For dual port PCI cards that share an interrupt:
+.Bd -ragged -offset indent -compact
+.Cd "device sio"
+.Cd "options COM_MULTIPORT"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.sio.2.flags="0x201"
+.Cd hint.sio.3.flags="0x201"
+.Ed
+.Pp
+Meaning of
+.Ar flags :
+.Bl -tag -offset indent -compact -width 0x000000
+.It 0x00001
+shared IRQs
+.It 0x00002
+disable FIFO
+.It 0x00004
+no AST/4 compatible IRQ control register
+.It 0x00008
+recover sooner from lost output interrupts
+.It 0x00010
+device is potential system console
+.It 0x00020
+device is forced to become system console
+.It 0x00040
+device is reserved for low-level IO (e.g.\& for remote kernel debugging)
+.It 0x00080
+use this port for remote kernel debugging
+.It 0x0 Ns Em ?? Ns 00
+minor number of master port
+.It 0x10000
+PPS timestamping on CTS instead of DCD
+.It 0x20000
+device is assumed to use a 16650A-type (extended FIFO) chip
+.El
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for NS8250-, NS16450-, NS16550 and NS16550A-based
+.Tn EIA
+.Tn RS-232C
+.Pf ( Tn CCITT
+.Tn V.24 )
+communications interfaces.
+The NS8250 and NS16450 have single character
+buffers, the NS16550A has 16 character FIFO input and output buffers.
+.Pp
+Input and output for each line may set to one of following baud rates;
+50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2400, 4800, 9600,
+19200, 28800, 38400, 57600, or 115200.
+Your hardware may limit your baud rate choices.
+.Pp
+The driver supports `multiport' cards.
+Multiport cards are those that have one or more groups of ports
+that share an Interrupt Request (IRQ) line per group.
+Shared IRQs on different cards are not supported.
+Frequently 4 ports share 1 IRQ; some 8 port cards have 2 groups of 4 ports,
+thus using 2 IRQs.
+Some cards allow the first 2 serial ports to have separate IRQs per port
+(as per DOS PC standard).
+.Pp
+Some cards have an IRQ control register for each group.
+Some cards require special initialization related to such registers.
+Only AST/4 compatible IRQ control registers are supported.
+Some cards have an IRQ status register for each group.
+The driver does not require or use such registers yet.
+To work, the control and status registers for a group, if any,
+must be mapped to the scratch register (register 7)
+of a port in the group.
+Such a port is called a
+.Em master
+port.
+.Pp
+The driver supports controller based PCI modems.
+The 3Com FaxModem PCI and the Advantec 56k Voice Messaging PCI
+FaxModem are the only cards supported.
+WinModems, softmodems, hfc modems and any other modems that are not
+controller based are not supported.
+.Pp
+The
+.Em flags
+keyword may be used on each
+.Em device sio
+line in the kernel configuration file
+to disable the FIFO on 16550A UARTs
+(see the synopsis).
+Disabling the FIFO should rarely be necessary.
+.Pp
+The
+.Em flags
+keyword
+.Em must
+be used for all ports that are part of an IRQ sharing group.
+One bit specifies IRQ sharing; another bit specifies whether the port does
+.Em not
+require AST/4 compatible initialization.
+The minor number of the device corresponding a master port
+for the group is encoded as a bitfield in the high byte.
+The same master port must be specified for all ports in a group.
+.Pp
+The
+.Em irq
+specification must be given for master ports
+and for ports that are not part of an IRQ sharing group,
+and not for other ports.
+.Pp
+In the synopsis,
+.Em flags 0x701
+means that the 8th port (sio7) is the master
+port, and that the port is on a multiport card with shared IRQs
+and an AST/4 compatible IRQ control register.
+.Pp
+.Em flags 0xb05
+means that the 12th port (sio11) is the master
+port, and that the port is on a multiport card with shared IRQs
+and no special IRQ control register.
+.Pp
+Which port is the master port depends on the card type.
+Consult the hardware documentation of your card.
+Since IRQ status registers are never used,
+and IRQ control registers are only used for AST/4 compatible cards,
+and some cards map the control/status registers to all ports in a group,
+any port in a group will sometimes do for the master port.
+Choose a port containing an IRQ status register for forwards compatibility,
+and the highest possible port for consistency.
+.Pp
+Serial ports controlled by the
+.Nm
+driver can be used for both `callin' and `callout'.
+For each port there is a callin device and a callout device.
+The minor number of the callout device is 128 higher
+than that of the corresponding callin port.
+The callin device is general purpose.
+Processes opening it normally wait for carrier
+and for the callout device to become inactive.
+The callout device is used to steal the port from
+processes waiting for carrier on the callin device.
+Processes opening it do not wait for carrier
+and put any processes waiting for carrier on the callin device into
+a deeper sleep so that they do not conflict with the callout session.
+The callout device is abused for handling programs that are supposed
+to work on general ports and need to open the port without waiting
+but are too stupid to do so.
+.Pp
+The
+.Nm
+driver also supports an initial-state and a lock-state control
+device for each of the callin and the callout "data" devices.
+The termios settings of a data device are copied
+from those of the corresponding initial-state device
+on first opens and are not inherited from previous opens.
+Use
+.Xr stty 1
+in the normal way on the initial-state devices to program
+initial termios states suitable for your setup.
+.Pp
+The lock termios state acts as flags to disable changing
+the termios state.
+E.g., to lock a flag variable such as CRTSCTS, use
+.Em stty crtscts
+on the lock-state device.
+Speeds and special characters
+may be locked by setting the corresponding value in the lock-state
+device to any nonzero value.
+E.g., to lock a speed to 115200, use
+.Dq Li stty 115200
+on the initial-state device and
+.Dq Li stty 1
+on the lock-state device.
+.Pp
+Correct programs talking to correctly wired external devices
+work with almost arbitrary initial states and almost no locking,
+but other setups may benefit from changing some of the default
+initial state and locking the state.
+In particular, the initial states for non (POSIX) standard flags
+should be set to suit the devices attached and may need to be
+locked to prevent buggy programs from changing them.
+E.g., CRTSCTS should be locked on for devices that support
+RTS/CTS handshaking at all times and off for devices that do not
+support it at all.
+CLOCAL should be locked on for devices that do not support carrier.
+HUPCL may be locked off if you do not
+want to hang up for some reason.
+In general, very bad things happen
+if something is locked to the wrong state, and things should not
+be locked for devices that support more than one setting.
+The CLOCAL flag on callin ports should be locked off for logins
+to avoid certain security holes, but this needs to be done by
+getty if the callin port is used for anything else.
+.Sh FILES
+.Bl -tag -width /dev/ttyd?.init -compact
+.It Pa /dev/ttyd?
+for callin ports
+.It Pa /dev/ttyd?.init
+.It Pa /dev/ttyd?.lock
+corresponding callin initial-state and lock-state devices
+.Pp
+.It Pa /dev/cuad?
+for callout ports
+.It Pa /dev/cuad?.init
+.It Pa /dev/cuad?.lock
+corresponding callout initial-state and lock-state devices
+.El
+.Pp
+.Bl -tag -width /etc/rc.d/serial -compact
+.It Pa /etc/rc.d/serial
+examples of setting the initial-state and lock-state devices
+.El
+.Pp
+The device numbers are made from the set [0-9a-v] so that more than
+10 ports can be supported.
+.Sh DIAGNOSTICS
+.Bl -diag
+.It sio%d: silo overflow.
+Problem in the interrupt handler.
+.El
+.Bl -diag
+.It sio%d: interrupt-level buffer overflow.
+Problem in the bottom half of the driver.
+.El
+.Bl -diag
+.It sio%d: tty-level buffer overflow.
+Problem in the application.
+Input has arrived faster than the given module could process it
+and some has been lost.
+.El
+.\" .Bl -diag
+.\" .It sio%d: reduced fifo trigger level to %d.
+.\" Attempting to avoid further silo overflows.
+.\" .El
+.Sh SEE ALSO
+.Xr stty 1 ,
+.Xr termios 4 ,
+.Xr tty 4 ,
+.Xr comcontrol 8
+.Sh HISTORY
+The
+.Nm
+driver is derived from the
+.Tn HP9000/300
+.Xr dca 4
+driver and is
+.Ud
+.Sh BUGS
+Data loss may occur at very high baud rates on slow systems,
+or with too many ports on any system,
+or on heavily loaded systems when crtscts cannot be used.
+The use of NS16550A's reduces system load and helps to avoid data loss.
+.Pp
+Stay away from plain NS16550's.
+These are early implementations of the chip with non-functional FIFO hardware.
+.Pp
+The constants which define the locations
+of the various serial ports are holdovers from
+.Tn DOS .
+As shown, hex addresses can be and for clarity probably should be used instead.
+.Pp
+Note that on the AST/4 the card's dipswitches should
+.Em not
+be set to use interrupt sharing.
+AST/4-like interrupt sharing is only used when
+.Em multiple
+AST/4 cards are installed in the same system.
+The
+.Nm
+driver does not support more than 1 AST/4 on one IRQ.
+.Pp
+The examples in the synopsis are too vendor-specific.
diff --git a/share/man/man4/sis.4 b/share/man/man4/sis.4
new file mode 100644
index 0000000..414f0d8
--- /dev/null
+++ b/share/man/man4/sis.4
@@ -0,0 +1,226 @@
+.\" Copyright (c) 1997, 1998, 1999
+.\" Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 2, 2010
+.Dt SIS 4
+.Os
+.Sh NAME
+.Nm sis
+.Nd "SiS 900, SiS 7016 and NS DP83815/DP83816 Fast Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device sis"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_sis_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Ethernet adapters and embedded
+controllers based on the Silicon Integrated Systems SiS 900
+and SiS 7016 Fast Ethernet controller chips.
+.Pp
+This driver also supports
+adapters based on the National Semiconductor DP83815 (MacPhyter) and DP83816
+PCI Ethernet controller chip.
+.Pp
+The SiS 900 is a 100Mbps Ethernet MAC and MII-compliant transceiver
+in a single package.
+It uses a bus master DMA and a scatter/gather
+descriptor scheme.
+The SiS 7016 is similar to the SiS 900 except
+that it has no internal PHY, requiring instead an external transceiver
+to be attached to its MII interface.
+The SiS 900 and SiS 7016 both have a 128-bit multicast hash filter
+and a single perfect filter entry for the station address.
+.Pp
+The NS DP83815 is also a 100Mbps Ethernet MAC with integrated PHY.
+The NatSemi chip and the SiS 900 share many of the same features and
+a fairly similar programming interface, hence both chips are supported
+by the same driver.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width 10baseTXUTP
+.It autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It 10baseT/UTP
+Set 10Mbps operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Sq full-duplex
+or
+.Sq half-duplex
+modes.
+.It 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Sq full-duplex
+or
+.Sq half-duplex
+modes.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width full-duplex
+.It full-duplex
+Force full duplex operation.
+.It half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Silicon Integrated Systems SiS 900 and SiS 7016 based
+Fast Ethernet adapters and embedded controllers, as well as Fast Ethernet
+adapters based on the National Semiconductor DP83815 (MacPhyter) and DP83816
+chips.
+Supported adapters include:
+.Pp
+.Bl -bullet -compact
+.It
+@Nifty FNECHARD IFC USUP-TX
+.It
+MELCO LGY-PCI-TXC
+.It
+Netgear FA311-TX (DP83815)
+.It
+Netgear FA312-TX (DP83815)
+.It
+SiS 630, 635, and 735 motherboard chipsets
+.It
+Soekris Engineering net45xx, net48xx, lan1621, and lan1641
+.El
+.Sh SYSCTL VARIABLES
+The following variable is available as both
+.Xr sysctl 8
+variable and
+.Xr loader 8
+tunable:
+.Bl -tag -width indent
+.It Va dev.sis.%unit.manual_pad
+This variable controls how to pad short frames for DP83815/DP83816
+controllers on the specified device.
+DP83815/DP83816 controllers are known to pad 0xFF for short frames
+which is violation of RFC 1042.
+Set this variable to a non-zero value to let driver manually pad
+each short frame with zeros at the cost of extra CPU cycles.
+The default value is 0 to let hardware perform automatic padding.
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "sis%d: couldn't map ports/memory"
+A fatal initialization error has occurred.
+.It "sis%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "sis%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (e.g.\& a cable fault).
+.It "sis%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.It "sis%d: no memory for tx list"
+The driver failed to allocate an mbuf for the transmitter ring when
+allocating a pad buffer or collapsing an mbuf chain into a cluster.
+.It "sis%d: chip is in D3 power state -- setting to D0"
+This message applies only to adapters which support power
+management.
+Some operating systems place the controller in low power
+mode when shutting down, and some PCI BIOSes fail to bring the chip
+out of this state before configuring it.
+The controller loses all of
+its PCI configuration in the D3 state, so if the BIOS does not set
+it back to full power mode in time, it will not be able to configure it
+correctly.
+The driver tries to detect this condition and bring
+the adapter back to the D0 (full power) state, but this may not be
+enough to return the driver to a fully operational condition.
+If
+you see this message at boot time and the driver fails to attach
+the device as a network interface, you will have to perform a
+warm boot to have the device properly configured.
+.Pp
+Note that this condition only occurs when warm booting from another
+operating system.
+If you power down your system prior to booting
+.Fx ,
+the card should be configured correctly.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Rs
+.%T SiS 900 and SiS 7016 datasheets
+.%U http://www.sis.com.tw
+.Re
+.Rs
+.%T NatSemi DP83815 datasheet
+.%U http://www.national.com
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ee.columbia.edu .
diff --git a/share/man/man4/sk.4 b/share/man/man4/sk.4
new file mode 100644
index 0000000..18e53a9
--- /dev/null
+++ b/share/man/man4/sk.4
@@ -0,0 +1,241 @@
+.\" Copyright (c) 1997, 1998, 1999
+.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 29, 2012
+.Dt SK 4
+.Os
+.Sh NAME
+.Nm sk
+.Nd "SysKonnect SK-984x and SK-982x PCI Gigabit Ethernet adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device sk"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_sk_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the SysKonnect SK-984x and SK-982x series PCI
+Gigabit Ethernet adapters.
+.Pp
+The SysKonnect adapters consist of two main components: the XaQti Corp.
+XMAC II gigabit MAC and the SysKonnect GEnesis controller ASIC.
+The
+XMAC provides the gigabit MAC and PHY support while the GEnesis
+provides an interface to the PCI bus, DMA support, packet buffering
+and arbitration.
+The GEnesis can control up to two XMACs simultaneously,
+allowing dual-port NIC configurations.
+.Pp
+The SK-982x 1000baseT adapters also include a Broadcom BCM5400 1000baseTX
+PHY which is used in place of the XMAC's internal PHY.
+The Broadcom PHY is connected to the XMAC via its GMII port.
+.Pp
+The
+.Nm
+driver configures dual port SysKonnect adapters such that each XMAC
+is treated as a separate logical network interface.
+Both ports can
+operate independently of each other and can be connected to separate
+networks.
+The SysKonnect driver software currently only uses the
+second port on dual port adapters for failover purposes: if the link
+on the primary port fails, the SysKonnect driver will automatically
+switch traffic onto the second port.
+.Pp
+Also supported is the Marvell Semiconductor 88E100* gigabit PHY.
+.Pp
+The XaQti XMAC II supports full and half duplex operation with
+autonegotiation.
+The XMAC also supports unlimited frame sizes.
+Support for jumbo frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit jumbo frames.
+Using jumbo frames can greatly improve performance for certain tasks,
+such as file transfers and data streaming.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to the
+.Pa /etc/rc.conf
+file.
+.It 1000baseTX
+Set 1000baseTX operation over twisted pair.
+This is only available
+for SK-982x series adapters with 1000baseT ports.
+Both
+.Ar full-duplex
+and
+.Ar half-duplex
+modes are supported.
+.It 1000baseSX
+Set 1000Mbps (Gigabit Ethernet) operation.
+Both
+.Ar full-duplex
+and
+.Ar half-duplex
+modes are supported.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It full-duplex
+Force full duplex operation.
+.It half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+Adapters supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+3Com 3C940 single port, 1000baseT adapter
+.It
+3Com 3C2000-T single port, 1000baseT adapter
+.It
+Belkin F5D5005 single port, 1000baseT adapter
+.It
+D-Link DGE-530T single port, 1000baseT adapter
+.It
+Linksys (revision 2) single port, 1000baseT adapter
+.It
+SK-9521 SK-NET GE-T single port, 1000baseT adapter
+.It
+SK-9821 SK-NET GE-T single port, 1000baseT adapter
+.It
+SK-9822 SK-NET GE-T dual port, 1000baseT adapter
+.It
+SK-9841 SK-NET GE-LX single port, single mode fiber adapter
+.It
+SK-9842 SK-NET GE-LX dual port, single mode fiber adapter
+.It
+SK-9843 SK-NET GE-SX single port, multimode fiber adapter
+.It
+SK-9844 SK-NET GE-SX dual port, multimode fiber adapter
+.It
+SMC 9452TX single port, 1000baseT adapter
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width xxxxxx
+.It Va hw.skc.jumbo_disable
+Disable jumbo frame support.
+Systems with less memory can set it to a non-zero value to save memory.
+The default value is 0.
+.El
+.Sh SYSCTL VARIABLES
+The following variable is available as both
+.Xr sysctl 8
+variable and
+.Xr loader 8
+tunable:
+.Bl -tag -width xxxxxx
+.It Va dev.skc.%d.int_mod
+This variable controls interrupt moderation.
+The accepted range is 10 to 10000.
+The default value is 100 microseconds.
+The interface has to be brought down and up again before a change takes effect.
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "sk%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "sk%d: couldn't map ports"
+A fatal initialization error has occurred.
+.It "sk%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "sk%d: no memory for softc struct!"
+The driver failed to allocate memory for per-device instance information
+during initialization.
+.It "sk%d: failed to enable memory mapping!"
+The driver failed to initialize PCI shared memory mapping.
+This might
+happen if the card is not in a bus-master slot.
+.It "sk%d: no memory for jumbo buffers!"
+The driver failed to allocate memory for jumbo frames during
+initialization.
+.It "sk%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Rs
+.%T XaQti XMAC II datasheet
+.%U http://people.freebsd.org/~wpaul/SysKonnect/xmacii_datasheet_rev_c_9-29.pdf
+.Re
+.Rs
+.%T SysKonnect GEnesis programming manual
+.%U http://www.syskonnect.com
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ctr.columbia.edu .
diff --git a/share/man/man4/smb.4 b/share/man/man4/smb.4
new file mode 100644
index 0000000..afe4605
--- /dev/null
+++ b/share/man/man4/smb.4
@@ -0,0 +1,204 @@
+.\" Copyright (c) 1998, Nicolas Souchu
+.\" Copyright (c) 2004, Joerg Wunsch
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 6, 2009
+.Dt SMB 4
+.Os
+.Sh NAME
+.Nm smb
+.Nd SMB generic I/O device driver
+.Sh SYNOPSIS
+.Cd "device smb"
+.Sh DESCRIPTION
+The
+.Em smb
+character device driver provides generic i/o to any
+.Xr smbus 4
+instance.
+In order to control SMB devices, use
+.Pa /dev/smb?
+with the ioctls described below.
+Any of these ioctl commands takes a pointer to
+.Vt struct smbcmd
+as its argument.
+.Bd -literal
+#include <sys/types.h>
+
+struct smbcmd {
+ char cmd;
+ int count;
+ u_char slave;
+ union {
+ char byte;
+ short word;
+
+ char *byte_ptr;
+ short *word_ptr;
+
+ struct {
+ short sdata;
+ short *rdata;
+ } process;
+ } data;
+};
+.Ed
+.Pp
+The
+.Fa slave
+field is always used, and provides the address of the
+SMBus slave device to talk to.
+The slave address is specified in the seven most significant bits
+.Pq i.e. Dq "left-justified" .
+The least significant bit of the slave address must be zero.
+.Pp
+.Bl -column ".Dv SMB_QUICK_WRITE" -compact
+.It Em Ioctl Ta Em Description
+.Pp
+.It Dv SMB_QUICK_WRITE Ta
+The
+.Em QuickWrite
+command just issues the device address with write intent
+to the bus, without transferring any data.
+.It Dv SMB_QUICK_READ Ta
+The
+.Em QuickRead
+command just issues the device address with read intent
+to the bus, without transferring any data.
+.It Dv SMB_SENDB Ta
+The
+.Em SendByte
+command sends the byte provided in the
+.Fa cmd
+field to the device.
+.It Dv SMB_RECVB Ta
+The
+.Em ReceiveByte
+command reads a single byte from the device which will
+be returned in the
+.Fa cmd
+field.
+.It Dv SMB_WRITEB Ta
+The
+.Em WriteByte
+command first sends the byte from the
+.Fa cmd
+field to the device, followed by the byte given in
+.Fa data.byte .
+.It Dv SMB_WRITEW Ta
+The
+.Em WriteWord
+command first sends the byte from the
+.Fa cmd
+field to the device, followed by the word given in
+.Fa data.word .
+Note that the SMBus byte-order is little-endian by definition.
+.It Dv SMB_READB Ta
+The
+.Em ReadByte
+command first sends the byte from the
+.Fa cmd
+field to the device, and then reads one byte of data from
+the device.
+The returned data will be stored in the location pointed to by
+.Fa data.byte_ptr .
+.It Dv SMB_READW Ta
+The
+.Em ReadWord
+command first sends the byte from the
+.Fa cmd
+field to the device, and then reads one word of data from
+the device.
+The returned data will be stored in the location pointed to by
+.Fa data.word_ptr .
+.It Dv SMB_PCALL Ta
+The
+.Em ProcedureCall
+command first sends the byte from the
+.Fa cmd
+field to the device, followed by the word provided in
+.Fa data.process.sdata .
+It then reads one word of data from the device, and returns it
+in the location pointed to by
+.Fa data.process.rdata .
+.It Dv SMB_BWRITE Ta
+The
+.Em BlockWrite
+command first sends the byte from the
+.Fa cmd
+field to the device, followed by
+.Fa count
+bytes of data that are taken from the buffer pointed to by
+.Fa data.byte_ptr .
+The SMBus specification mandates that no more than 32 bytes of
+data can be transferred in a single block read or write command.
+This value is available in the constant
+.Dv SMB_MAXBLOCKSIZE .
+.It Dv SMB_BREAD Ta
+The
+.Em BlockRead
+command first sends the byte from the
+.Fa cmd
+field to the device, and then reads
+.Fa count
+bytes of data that from the device.
+These data will be returned in the buffer pointed to by
+.Fa data.byte_ptr .
+.El
+.Pp
+The
+.Xr read 2
+and
+.Xr write 2
+system calls are not implemented by this driver.
+.Sh ERRORS
+The
+.Xr ioctl 2
+commands can cause the following driver-specific errors:
+.Bl -tag -width Er
+.It Bq Er ENXIO
+Device did not respond to selection.
+.It Bq Er EBUSY
+Device still in use.
+.It Bq Er ENODEV
+Operation not supported by device (not supposed to happen).
+.It Bq Er EINVAL
+General argument error.
+.It Bq Er EWOULDBLOCK
+SMBus transaction timed out.
+.El
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr smbus 4
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Nicolas Souchu .
diff --git a/share/man/man4/smbus.4 b/share/man/man4/smbus.4
new file mode 100644
index 0000000..1d23117
--- /dev/null
+++ b/share/man/man4/smbus.4
@@ -0,0 +1,80 @@
+.\" Copyright (c) 1998, Nicolas Souchu
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 10, 1998
+.Dt SMBUS 4
+.Os
+.Sh NAME
+.Nm smbus
+.Nd System Management Bus
+.Sh SYNOPSIS
+.Cd "device smbus"
+.Pp
+.Cd "device iicsmb"
+.Cd "device bktr"
+.Sh DESCRIPTION
+The
+.Em smbus
+system provides a uniform, modular and architecture-independent
+system for the implementation of drivers to control various SMB devices
+and to utilize different SMB controllers (I2C, PIIX4, Brooktree848, vm86...).
+.Sh System Management Bus
+The
+.Em System Management Bus
+is a two-wire interface through which simple power-related chips can communicate
+with rest of the system.
+It uses I2C as its backbone (see
+.Xr iicbus 4 ) .
+.Pp
+A system using SMB passes messages to and from devices instead of tripping
+individual control lines.
+.Pp
+With the SMBus, a device can provide manufacturer information, tell the
+system what its model/part number is, save its state for a suspend event,
+report different types of errors, accept control parameters, and return its
+status.
+.Pp
+The SMBus may share the same host device and physical bus as ACCESS bus
+components provided that an appropriate electrical bridge is provided
+between the internal SMB devices and external ACCESS bus devices.
+.Sh SEE ALSO
+.Xr bktr 4 ,
+.Xr iicbus 4 ,
+.Xr iicsmb 4 ,
+.Xr smb 4
+.Rs
+.%T The SMBus specification
+.%U http://www.smbus.org/specs/
+.Re
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Nicolas Souchu .
diff --git a/share/man/man4/smp.4 b/share/man/man4/smp.4
new file mode 100644
index 0000000..1dfd283
--- /dev/null
+++ b/share/man/man4/smp.4
@@ -0,0 +1,163 @@
+.\" Copyright (c) 1997
+.\" Steve Passe <fsmp@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the developer may NOT be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 7, 2008
+.Dt SMP 4
+.Os
+.Sh NAME
+.Nm SMP
+.Nd description of the FreeBSD Symmetric Multi-Processor kernel
+.Sh SYNOPSIS
+.Cd options SMP
+.Sh DESCRIPTION
+The
+.Nm
+kernel implements symmetric multi-processor support.
+.Sh COMPATIBILITY
+Support for multi-processor systems is present for all Tier-1
+architectures on
+.Fx .
+Currently, this includes amd64, i386, ia64, and sparc64.
+Support is enabled using
+.Cd options SMP .
+It is permissible to use the SMP kernel configuration on non-SMP equipped
+motherboards.
+.Sh I386 NOTES
+For i386 systems, the
+.Nm
+kernel supports motherboards that follow the Intel MP specification,
+version 1.4.
+In addition to
+.Cd options SMP ,
+i386 also requires
+.Cd device apic .
+The
+.Xr mptable 1
+command may be used to view the status of multi-processor support.
+.Pp
+The number of CPUs detected by the system is available in
+the read-only sysctl variable
+.Va hw.ncpu .
+.Pp
+.Fx
+allows specific CPUs on a multi-processor system to be disabled.
+This can be done using the
+.Va hint.lapic.X.disabled
+tunable, where X is the APIC ID of a CPU.
+Setting this tunable to 1 will result in the corresponding CPU being
+disabled.
+.Pp
+The
+.Xr sched_ule 4
+scheduler implements CPU topology detection and adjusts the scheduling
+algorithms to make better use of modern multi-core CPUs.
+The sysctl variable
+.Va kern.sched.topology_spec
+reflects the detected CPU hardware in a parsable XML format.
+The top level XML tag is <groups>, which encloses one or more <group> tags
+containing data about individual CPU groups.
+A CPU group contains CPUs that are detected to be "close" together, usually
+by being cores in a single multi-core processor.
+Attributes available in a <group> tag are "level", corresponding to the
+nesting level of the CPU group and "cache-level", corresponding to the
+level of CPU caches shared by the CPUs in the group.
+The <group> tag contains the <cpu> and <flags> tags.
+The <cpu> tag describes CPUs in the group.
+Its attributes are "count", corresponding to the number of CPUs in the
+group and "mask", corresponding to the integer binary mask in which
+each bit position set to 1 signifies a CPU belonging to the group.
+The contents (CDATA) of the <cpu> tag is the comma-delimited list
+of CPU indexes (derived from the "mask" attribute).
+The <flags> tag contains special tags (if any) describing the relation
+of the CPUs in the group.
+The possible flags are currently "HTT" and "SMT", corresponding to
+the various implementations of hardware multithreading.
+An example topology_spec output for a system consisting of
+two quad-core processors is:
+.Bd -literal
+<groups>
+ <group level="1" cache-level="0">
+ <cpu count="8" mask="0xff">0, 1, 2, 3, 4, 5, 6, 7</cpu>
+ <flags></flags>
+ <children>
+ <group level="2" cache-level="0">
+ <cpu count="4" mask="0xf">0, 1, 2, 3</cpu>
+ <flags></flags>
+ </group>
+ <group level="2" cache-level="0">
+ <cpu count="4" mask="0xf0">4, 5, 6, 7</cpu>
+ <flags></flags>
+ </group>
+ </children>
+ </group>
+</groups>
+.Ed
+.Pp
+This information is used internally by the kernel to schedule related
+tasks on CPUs that are closely grouped together.
+.Pp
+.Fx
+supports hyperthreading on Intel CPU's on the i386 and AMD64 platforms.
+Because using logical CPUs can cause performance penalties under certain loads,
+the logical CPUs can be disabled by setting the
+.Va machdep.hyperthreading_allowed
+tunable to zero.
+.Sh SEE ALSO
+.Xr cpuset 1 ,
+.Xr mptable 1 ,
+.Xr sched_4bsd 4 ,
+.Xr sched_ule 4 ,
+.Xr loader 8 ,
+.Xr sysctl 8 ,
+.Xr condvar 9 ,
+.Xr msleep 9 ,
+.Xr mtx_pool 9 ,
+.Xr mutex 9 ,
+.Xr rwlock 9 ,
+.Xr sema 9 ,
+.Xr sx 9
+.Sh HISTORY
+The
+.Nm
+kernel's early history is not (properly) recorded.
+It was developed
+in a separate CVS branch until April 26, 1997, at which point it was
+merged into 3.0-current.
+By this date 3.0-current had already been
+merged with Lite2 kernel code.
+.Pp
+.Fx 5.0
+introduced support for a host of new synchronization primitives, and
+a move towards fine-grained kernel locking rather than reliance on
+a Giant kernel lock.
+The SMPng Project relied heavily on the support of BSDi, who provided
+reference source code from the fine-grained SMP implementation found
+in
+.Bsx .
+.Pp
+.Fx 5.0
+also introduced support for SMP on the ia64 and sparc64 architectures.
+.Sh AUTHORS
+.An Steve Passe Aq fsmp@FreeBSD.org
diff --git a/share/man/man4/sn.4 b/share/man/man4/sn.4
new file mode 100644
index 0000000..00c9411
--- /dev/null
+++ b/share/man/man4/sn.4
@@ -0,0 +1,109 @@
+.\"
+.\" Copyright (c) 2000 Warner Losh
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt SN 4
+.Os
+.Sh NAME
+.Nm sn
+.Nd "Ethernet driver for SMC91Cxx based cards"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sn"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_sn_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver supports SMC91Cxx based ISA and PCMCIA cards.
+.Sh HARDWARE
+The
+.Nm
+driver supports SMC91Cxx based ISA and PCMCIA cards including:
+.Pp
+.Bl -bullet -compact
+.It
+3Com Megahertz X-Jack Ethernet PC Card XJ10BT, XJ10BC
+.It
+3Com Megahertz XJEM and CCEM series: CCEM3288C, CCEM3288T, CCEM3336,
+CEM3336C, CCEM3336T, XJEM1144C, XJEM1144T, XJEM3288C, XJEM3288T, XJEM3336
+.It
+Farallon EtherMac PC Card 595a
+.It
+Motorola Mariner Ethernet/Modem PC Card
+.It
+Ositech Seven of Diamonds Ethernet PC Card
+.It
+Ositech Jack of Hearts Ethernet/Modem PC Card
+.It
+Psion Gold Card Netglobal Ethernet PC Card
+.It
+Psion Gold Card Netglobal 10/100 Fast Ethernet PC Card
+.It
+Psion Gold Card Netglobal 56k+10Mb Ethernet PC Card
+.It
+SMC EZEther PC Card (8020BT)
+.It
+SMC EZEther PC Card (8020T)
+.El
+.Pp
+The
+.Nm
+driver supports the SMC 91C90, SMC 91C92, SMC 91C94, SMC 91C95, SMC 91C96,
+SMC91C100 and SMC 91C100FD chips from SMC.
+.Pp
+The Farallon EtherWave and EtherMac card came in two varieties.
+The
+.Xr ep 4
+driver supports the 595 and 895 cards.
+These cards have the blue arrow on the front along with a 3Com logo.
+The Farallon 595a cards, which have a red arrow on the front,
+are also called EtherWave and EtherMac.
+They are supported by the
+.Nm
+driver.
+.Sh SEE ALSO
+.Xr ed 4 ,
+.Xr ep 4 ,
+.Xr ie 4 ,
+.Xr intro 4 ,
+.Xr ng_ether 4 ,
+.Xr vx 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Fx 4.0 .
diff --git a/share/man/man4/snd_ad1816.4 b/share/man/man4/snd_ad1816.4
new file mode 100644
index 0000000..3d2cb0c
--- /dev/null
+++ b/share/man/man4/snd_ad1816.4
@@ -0,0 +1,81 @@
+.\" Copyright (c) 2004 Atte Peltomaki
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2005
+.Dt SND_AD1816 4
+.Os
+.Sh NAME
+.Nm snd_ad1816
+.Nd "Analog Devices AD1816 ISA bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_ad1816"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_ad1816_load="YES"
+.Ed
+.Pp
+Non-PnP cards require the following lines in
+.Xr device.hints 5 :
+.Bd -literal -offset indent
+hint.pcm.0.at="isa"
+hint.pcm.0.irq="10"
+hint.pcm.0.drq="1"
+hint.pcm.0.flags="0x0"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to the AD1816 sound card.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+Analog Devices AD1816
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+.An "Cameron Grant" Aq cg@FreeBSD.org
+.An "Luigi Rizzo" Aq luigi@FreeBSD.org
+.An "Hannu Savolainen"
diff --git a/share/man/man4/snd_als4000.4 b/share/man/man4/snd_als4000.4
new file mode 100644
index 0000000..a13779a
--- /dev/null
+++ b/share/man/man4/snd_als4000.4
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2004 Atte Peltomaki
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2005
+.Dt SND_ALS4000 4
+.Os
+.Sh NAME
+.Nm snd_als4000
+.Nd "Avance Logic ALS4000 PCI bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_als4000"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_als4000_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to the ALS4000 sound card.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+Avance Logic ALS4000
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.4 .
+.Sh AUTHORS
+.An "Orion Hodson" Aq oho@acm.org
diff --git a/share/man/man4/snd_atiixp.4 b/share/man/man4/snd_atiixp.4
new file mode 100644
index 0000000..ba02da6
--- /dev/null
+++ b/share/man/man4/snd_atiixp.4
@@ -0,0 +1,100 @@
+.\" Copyright (c) 2005 Joel Dahl
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 29, 2006
+.Dt SND_ATIIXP 4
+.Os
+.Sh NAME
+.Nm snd_atiixp
+.Nd "ATI IXP bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_atiixp"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_atiixp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver,
+.Xr sound 4 ,
+to attach to ATI IXP audio devices.
+This driver supports 16bit playback and recording, and 32bit native playback
+and recording.
+.Ss Runtime Configuration
+The following
+.Xr sysctl 8
+variables are available in addition to those available to all
+.Xr sound 4
+devices:
+.Bl -tag -width ".Va dev.pcm.%d.polling" -offset indent
+.It Va dev.pcm.%d.polling
+Experimental polling mode, where the driver operates by querying the device
+state on each tick using
+.Xr callout 9 .
+Polling is disabled by default.
+Do not enable it unless you are facing weird interrupt problems or if the
+device cannot generate interrupts at all.
+.El
+.Sh HARDWARE
+The
+.Nm
+driver supports the following audio chipsets:
+.Pp
+.Bl -bullet -compact
+.It
+ATI IXP 200
+.It
+ATI IXP 300
+.It
+ATI IXP 400
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 6.1 .
+.Sh AUTHORS
+This manual page was written by
+.An Joel Dahl Aq joel@FreeBSD.org .
+.Sh BUGS
+The
+.Nm
+driver
+does not support S/PDIF, but implementing it should be fairly easy if the
+right hardware is available.
+.Pp
+32bit native recording is broken on some hardware.
diff --git a/share/man/man4/snd_cmi.4 b/share/man/man4/snd_cmi.4
new file mode 100644
index 0000000..d6dc088
--- /dev/null
+++ b/share/man/man4/snd_cmi.4
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2004 Atte Peltomaki
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2005
+.Dt SND_CMI 4
+.Os
+.Sh NAME
+.Nm snd_cmi
+.Nd "CMedia CMI8338/CMI8738 PCI bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_cmi"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_cmi_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to the CMedia CMI8338/CMI8738 audio cards.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+CMedia CMI8338A
+.It
+CMedia CMI8338B
+.It
+CMedia CMI8738
+.It
+CMedia CMI8738B
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.3 .
+.Sh AUTHORS
+.An "Orion Hodson" Aq O.Hodson@cs.ucl.ac.uk
diff --git a/share/man/man4/snd_cs4281.4 b/share/man/man4/snd_cs4281.4
new file mode 100644
index 0000000..2b94174
--- /dev/null
+++ b/share/man/man4/snd_cs4281.4
@@ -0,0 +1,70 @@
+.\" Copyright (c) 2004 Atte Peltomaki
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2005
+.Dt SND_CS4281 4
+.Os
+.Sh NAME
+.Nm snd_cs4281
+.Nd "Crystal Semiconductor CS4281 PCI bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_cs4281"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_cs4281_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to the CS4281 sound card.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+Crystal Semiconductor CS4281
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.3 .
+.Sh AUTHORS
+.An "Orion Hodson" Aq O.Hodson@cs.ucl.ac.uk
diff --git a/share/man/man4/snd_csa.4 b/share/man/man4/snd_csa.4
new file mode 100644
index 0000000..36a6857
--- /dev/null
+++ b/share/man/man4/snd_csa.4
@@ -0,0 +1,98 @@
+.\"
+.\" Copyright (c) 1999 Seigo Tanimura
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2005
+.Dt SND_CSA 4
+.Os
+.Sh NAME
+.Nm snd_csa
+.Nd Crystal Semiconductor CS461x/462x/4280 PCI bridge device driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_csa"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_csa_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to Crystal Semiconductor CS461x/462x/4280 based sound cards.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+Crystal Semiconductor CS4280
+.It
+Crystal Semiconductor CS4610
+.It
+Crystal Semiconductor CS4611
+.It
+Crystal Semiconductor CS4614
+.It
+Crystal Semiconductor CS4615
+.It
+Crystal Semiconductor CS4622
+.It
+Crystal Semiconductor CS4624
+.It
+Crystal Semiconductor CS4630
+.It
+Genius Soundmaker 128 Value
+.It
+Hercules Game Theatre XP
+.It
+Turtle Beach Santa Cruz
+.El
+.Pp
+Some onboard CS4610 chips are accompanied by the CS423x ISA codec
+instead of the CS4297 AC97 codec.
+Such configurations are not
+supported by the
+.Nm
+driver yet.
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Seigo Tanimura Aq tanimura@r.dl.itc.u-tokyo.ac.jp
diff --git a/share/man/man4/snd_ds1.4 b/share/man/man4/snd_ds1.4
new file mode 100644
index 0000000..d691924
--- /dev/null
+++ b/share/man/man4/snd_ds1.4
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2004 Atte Peltomaki
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2005
+.Dt SND_DS1 4
+.Os
+.Sh NAME
+.Nm snd_ds1
+.Nd "Yamaha DS-1 PCI bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_ds1"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_ds1_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to the Yamaha DS-1 sound card.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+Yamaha DS-1
+.It
+Yamaha DS-1E
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.1 .
+.Sh AUTHORS
+.An "Cameron Grant" Aq cg@FreeBSD.org
diff --git a/share/man/man4/snd_emu10k1.4 b/share/man/man4/snd_emu10k1.4
new file mode 100644
index 0000000..3052f12
--- /dev/null
+++ b/share/man/man4/snd_emu10k1.4
@@ -0,0 +1,82 @@
+.\" Copyright (c) 2004 Atte Peltomaki
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2005
+.Dt SND_EMU10K1 4
+.Os
+.Sh NAME
+.Nm snd_emu10k1
+.Nd "SoundBlaster Live! and Audigy PCI bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_emu10k1"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_emu10k1_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to the SoundBlaster Live!\& and Audigy audio cards.
+.Pp
+Digital output is supported by default.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+Creative SoundBlaster Live!\& (EMU10K1 Chipset)
+.It
+Creative SoundBlaster Audigy (EMU10K2 Chipset)
+.It
+Creative SoundBlaster Audigy 2 (EMU10K2 Chipset)
+.It
+Creative SoundBlaster Audigy 2 (EMU10K3 Chipset)
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.1 .
+.Sh AUTHORS
+.An "David O'Brien" Aq obrien@FreeBSD.org
+.An "Orlando Bassotto" Aq orlando.bassotto@ieo-research.it
+.An "Cameron Grant" Aq cg@FreeBSD.org
+.Sh BUGS
+Fancy features like DD5.1 output are not supported.
diff --git a/share/man/man4/snd_emu10kx.4 b/share/man/man4/snd_emu10kx.4
new file mode 100644
index 0000000..72568c3
--- /dev/null
+++ b/share/man/man4/snd_emu10kx.4
@@ -0,0 +1,296 @@
+.\"
+.\" Copyright (c) 2003-2007 Yuriy Tsibizov
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 28, 2008
+.Dt SND_EMU10KX 4
+.Os
+.Sh NAME
+.Nm snd_emu10kx
+.Nd Creative SoundBlaster Live! and Audigy sound cards device driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_emu10kx"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_emu10kx_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to Creative sound cards based on the EMU10K1, CA0100, CA0101, CA0102
+and CA0108 DSPs.
+.Pp
+The
+.Nm
+sound cards have a PCM part, which is accessible through one to five
+.Xr pcm 4
+devices (see
+.Sx MULTICHANNEL PLAYBACK
+for details), and MPU401-compatible MIDI I/O controller, which is accessible
+through the midi device.
+Wave table synthesizer support is not available.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+Creative Sound Blaster Live!\& (EMU10K1 Chipset).
+Both PCM and MIDI interfaces are available.
+.It
+Creative Sound Blaster Audigy (CA0100 and CA0101 Chipset).
+PCM and two MIDI interfaces available.
+.It
+Creative Sound Blaster Audigy 2 and Creative Sound Blaster Audigy 4 (CA0102
+Chipset).
+PCM support is limited to 48kHz/16 bit stereo (192kHz/24 bit part
+of this chipset is not supported).
+.It
+Creative Sound Blaster Audigy 2 Value (CA0108 Chipset).
+PCM support is limited
+to 48kHz/16 bit stereo (192kHz/24 bit part of this chipset is not supported).
+There is no MIDI support for this card.
+.El
+.Pp
+The
+.Nm
+driver does
+.Em not
+support the following sound cards (although they have names
+similar to some supported ones):
+.Pp
+.Bl -bullet -compact
+.It
+Creative Sound Blaster Live!\& 24-Bit, identified by
+.Fx
+as
+.Qq Li "emu10k1x Soundblaster Live! 5.1" .
+.It
+Creative Sound Blaster Audigy LS / ES, identified by
+.Fx
+as
+.Qq Li "CA0106-DAT Audigy LS" .
+.It
+All other Creative sound cards with -DAT chipsets.
+.It
+All Creative X-Fi series sound cards.
+.El
+.Sh MULTICHANNEL PLAYBACK
+By default the
+.Nm
+driver is loaded with multichannel playback capabilities enabled.
+If you do not set the
+.Dv hint.emu10kx.0.multichannel_disabled
+option in your
+.Xr loader.conf 5
+configuration file you will get up to five DSP devices, one for each
+sound card output.
+You can use additional software (like
+.Em audio/pulseaudio
+from
+.Em The Ports Collection )
+to do sound stream demultiplexing.
+Only
+.Dq FRONT
+output can play and record sound from external
+sources (like line or S/PDIF inputs).
+.Sh MULTICHANNEL RECORDING
+By default multichannel recording capabilities are not enabled when you load
+the
+.Nm
+driver.
+If you enable the
+.Dv hint.emu10kx.0.multichannel_recording
+option in
+.Xr loader.conf 5
+you will get one more DSP device that is rate-locked to 48kHz/16bit/mono.
+This is actually 48kHz/16bit/32 channels on SB Live! cards and
+48kHz/16bit/64channels on Audigy cards, but the current implementation of
+the sound subsystem does not support such an amount of PCM channels.
+This device can not be opened for read, thus confusing many applications.
+.Pp
+Within a multichannel stream, the first half (0-15 or 0-31) is a copy of all DSP
+outputs, the second half (15-30 or 32-63) is a copy of some DSP inputs.
+On Live! cards the last substream (31) is used as a sync stream and is always
+set to 0xc0de.
+Audigy cards do not need such sync data, because a stream always starts with
+substream 0.
+.Ss SB Live! substream map (in byte offsets, each substream is 2 bytes LE)
+.Bl -tag -width ".Dv +0x00..+0x1E"
+.It Dv Offset
+Substream
+.It +0x00..+0x1E
+PCM streams 0..15
+.It +0x20, +0x22
+Empty
+.It +0x24..+0x2A
+PCM inputs: front left, front right, rear left, rear right, center, sub
+.It +0x2C..+0x3C
+DSP inputs 0..8:
+.It +0x3E
+sync substream (0xc0de)
+.El
+.Ss Audigy substream map (in byte offsets, each substream is 2 bytes LE)
+.Bl -tag -width ".Dv +0x00..+0x3E"
+.It Dv Offset
+Substream
+.It +0x00..+0x3E
+PCM streams 0..31
+.It +0x40..+0x5E
+PCM inputs: front LR, rear LR, center, sub, ...
+.It +0x60..+0x7E
+DSP inputs 0..16
+.El
+.Sh OSS MIXER CONTROLS
+These are the controls available through the standard OSS programming interface.
+You can use
+.Xr mixer 8
+to change them.
+.Pp
+On EMU10K1-based cards the OSS mixer directly controls the AC97 codec.
+On newer cards the OSS mixer controls some parameters of the AC97 codec and
+some DSP-based mixer controls.
+.Bl -inset
+.It Qq vol
+mixer control for the overall sound volume.
+.It Qq pcm
+mixer control for the PCM playback volume.
+It controls only front output
+volume in multichannel mode and all output volume in single channel mode.
+.It Qq rec
+mixer control acts very differently on EMU10K1 and other cards.
+On EMU10K1 cards it controls the AC97 codec recording level.
+On non-EMU10K1 cards it controls the amount of AC97
+.Dq stereo mix
+ entering the DSP.
+AC97 recording level and AC97 recording source are fixed on CA0100, CA0101,
+CA0102 and CA0108 cards.
+The AC97 recording levels are always set to maximum and recording source is always
+.Dq Li "stereo mix" .
+.It Qq dig1
+is a CD S/PDIF (on-card) volume control
+.It Qq dig2
+is an AudigyDrive S/PDIF (Audigy series) or TOSLink (SB Live! series) volume
+control
+.It Qq dig3
+is an on-card S/PDIF volume control
+.It Qq line2
+is AudigyDrive "Line In 2" volume control
+.It Qq line3
+is AudigyDrive "AUX In 2" volume control
+.El
+.Pp
+Other OSS mixer controls control the inputs of the AC97 codec.
+.Sh PRIVATE DEVICE CONTROLS
+You can control some of EMU10Kx's operation and configuration parameters through
+.Va dev.emu10kx. Ns Aq Ar X
+sysctls.
+These
+.Xr sysctl 8
+values are temporary and should not be relied upon.
+.Sh DRIVER CONFIGURATION
+Loader tunables are used to set driver configuration.
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or they can be stored in
+.Pa /boot/loader.conf .
+These tunables cannot be changed from a machine
+.Xr sysctl 8
+entry after boot, but you can change them using
+.Xr kenv 1
+before loading the
+.Nm
+driver.
+.Bl -tag -width indent
+.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .disabled
+Disables loading a driver instance.
+.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .multichannel_disabled
+Disables multichannel playback support, when one card is represented as
+several PCM devices.
+.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .multichannel_recording
+Enables experimental multichannel recording support.
+.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .debug
+Set debug output level.
+.Bl -tag -width 2n
+.It 0
+No additional debug options enabled
+.It 1
+Enables all DSP outputs to be connected, even those
+that are known to be unused on a particular card.
+.It 2
+Additional debug messages about in-driver events will be printed.
+.It 2
+Additional debug messages will be printed when memory allocation fails.
+.El
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/emu10kx?" -compact
+.It Pa /dev/emu10kx?
+.Nm
+management interface
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 7.0 .
+.Sh AUTHORS
+.An -nosplit
+The PCM part of the driver is based on the
+.Xr snd_emu10k1 4
+SB Live!\& driver by
+.An Cameron Grant Aq cg@FreeBSD.org .
+The MIDI interface is based on the
+.Xr snd_emu10k1 4
+MIDI interface code by
+.An Mathew Kanner Aq matk@FreeBSD.org .
+The
+.Nm
+device driver and this manual page were written by
+.An Yuriy Tsibizov .
+.Sh BUGS
+The driver does not detect lost S/PDIF signals and produces noise when
+S/PDIF is not connected and S/PDIF volume is not zero.
+.Pp
+The PCM driver cannot detect the presence of Live!Drive or AudigyDrive
+breakout boxes and tries to use them (and list their connectors in the
+mixer).
+.Pp
+The MIDI driver cannot detect the presence of Live!Drive or AudigyDrive
+breakout boxes and tries to enable the IR receiver on them anyway.
diff --git a/share/man/man4/snd_envy24.4 b/share/man/man4/snd_envy24.4
new file mode 100644
index 0000000..158fbf8
--- /dev/null
+++ b/share/man/man4/snd_envy24.4
@@ -0,0 +1,84 @@
+.\" Copyright (c) 2006 Alexander Leidinger
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 1, 2014
+.Dt SND_ENVY24 4
+.Os
+.Sh NAME
+.Nm snd_envy24
+.Nd "VIA Envy24 and compatible bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_envy24"
+.Cd "device snd_spicds"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_envy24_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to VIA Envy24 (ICE1724 or VT1724 chipset) and compatible audio
+devices.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following audio devices:
+.Pp
+.Bl -bullet -compact
+.It
+M-Audio Audiophile 2496
+.It
+M-Audio Delta Dio 2496
+.It
+Terratec DMX 6fire
+.El
+Only analog playback is supported.
+Recording and other features of these cards are not supported.
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 6.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Katsurajima Naoto .
+This manual page was written by
+.An Alexander Leidinger Aq netchild@FreeBSD.org .
diff --git a/share/man/man4/snd_envy24ht.4 b/share/man/man4/snd_envy24ht.4
new file mode 100644
index 0000000..03a9cb4
--- /dev/null
+++ b/share/man/man4/snd_envy24ht.4
@@ -0,0 +1,107 @@
+.\" Copyright (c) 2006 Alexander Leidinger
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 1, 2014
+.Dt SND_ENVY24HT 4
+.Os
+.Sh NAME
+.Nm snd_envy24ht
+.Nd "VIA Envy24HT and compatible bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_envy24ht"
+.Cd "device snd_spicds"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_envy24ht_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to VIA Envy24HT (ICE1724 or VT1724 chipset) and compatible audio
+devices.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following audio devices:
+.Pp
+.Bl -bullet -compact
+.It
+Audiotrak Prodigy 7.1
+.It
+Audiotrak Prodigy 7.1 LT
+.It
+Audiotrak Prodigy 7.1 XT
+.It
+Audiotrak Prodigy HD2
+.It
+ESI Juli@
+.It
+M-Audio Audiophile 192
+.It
+M-Audio Revolution 5.1
+.It
+M-Audio Revolution 7.1
+.It
+Terratec Aureon 5.1 Sky
+.It
+Terratec Aureon 7.1 Space
+.It
+Terratec Aureon 7.1 Universe
+.It
+Terratec PHASE 22
+.It
+Terratec PHASE 28
+.El
+Only analog playback is supported.
+Recording and other features of these cards are not supported.
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 6.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Konstantin Dimitrov
+based upon the
+.Xr snd_envy24 4
+driver.
+This manual page was written by
+.An Alexander Leidinger Aq netchild@FreeBSD.org .
diff --git a/share/man/man4/snd_es137x.4 b/share/man/man4/snd_es137x.4
new file mode 100644
index 0000000..9602fce
--- /dev/null
+++ b/share/man/man4/snd_es137x.4
@@ -0,0 +1,117 @@
+.\" Copyright (c) 2004 Atte Peltomaki
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 29, 2006
+.Dt SND_ES137X 4
+.Os
+.Sh NAME
+.Nm snd_es137x
+.Nd "Ensoniq AudioPCI ES137x bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_es137x"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_es137x_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to the Ensoniq 137x audio cards.
+.Ss Runtime Configuration
+The following
+.Xr sysctl 8
+variables are available in addition to those available to all
+.Xr sound 4
+devices:
+.Bl -tag -width ".Va hw.snd.pcm%d.latency_timer" -offset indent
+.It Va hw.snd.pcm%d.latency_timer
+Controls the PCI latency timer setting.
+Increasing this value will solve most popping and crackling issues
+(especially on VIA motherboards).
+.It Va hw.snd.pcm%d.spdif_enabled
+Enables S/PDIF output on the primary playback channel.
+This
+.Xr sysctl 8
+variable is available only if the device is known to support S/PDIF output.
+.It Va dev.pcm.%d.polling
+Experimental polling mode, where the driver operates by querying the device
+state on each tick using
+.Xr callout 9 .
+Polling is disabled by default.
+Do not enable it unless you are facing weird interrupt problems or if the
+device cannot generate interrupts at all.
+.El
+.Sh HARDWARE
+The
+.Nm
+driver supports the following sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+Creative CT5880-A
+.It
+Creative CT5880-C
+.It
+Creative CT5880-D
+.It
+Creative CT5880-E
+.It
+Creative SB AudioPCI CT4730
+.It
+Ensoniq AudioPCI ES1370
+.It
+Ensoniq AudioPCI ES1371-A
+.It
+Ensoniq AudioPCI ES1371-B
+.It
+Ensoniq AudioPCI ES1373-A
+.It
+Ensoniq AudioPCI ES1373-B
+.It
+Ensoniq AudioPCI ES1373-8
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+.An "Russell Cattelan" Aq cattelan@thebarn.com
+.An "Cameron Grant" Aq cg@FreeBSD.org
+.An "Joachim Kuebart"
+.An "Jonathan Noack" Aq noackjr@alumni.rice.edu
diff --git a/share/man/man4/snd_ess.4 b/share/man/man4/snd_ess.4
new file mode 100644
index 0000000..bd0d6d7
--- /dev/null
+++ b/share/man/man4/snd_ess.4
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2004 Atte Peltomaki
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2005
+.Dt SND_ESS 4
+.Os
+.Sh NAME
+.Nm snd_ess
+.Nd "Ensoniq ESS ISA PnP/non-PnP bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_ess"
+.Cd "device snd_sbc"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_ess_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to the ESS ISA sound cards.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+Ensoniq ESS ISA PnP/non-PnP
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.1 .
+.Sh AUTHORS
+.An "Cameron Grant" Aq cg@FreeBSD.org
+.An "Luigi Rizzo" Aq luigi@FreeBSD.org
diff --git a/share/man/man4/snd_fm801.4 b/share/man/man4/snd_fm801.4
new file mode 100644
index 0000000..0e66504
--- /dev/null
+++ b/share/man/man4/snd_fm801.4
@@ -0,0 +1,78 @@
+.\" Copyright (c) 2005 Joel Dahl
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 1, 2005
+.Dt SND_FM801 4
+.Os
+.Sh NAME
+.Nm snd_fm801
+.Nd "Forte Media FM801 bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_fm801"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_fm801_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver,
+.Xr sound 4 ,
+to attach audio devices based on the Forte Media FM801 chipset.
+This is a common chipset found in various parts used by OEM manufacturers.
+.Sh HARDWARE
+The
+.Nm
+driver supports audio devices based on the following chipset:
+.Pp
+.Bl -bullet -compact
+.It
+Forte Media FM801
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.2 .
+.Sh AUTHORS
+This manual page was written by
+.An Joel Dahl Aq joel@FreeBSD.org .
+.Sh BUGS
+The Forte Media FM801 chipset is a sort of PCI bridge, not an actual
+sound controller, making it possible to have soundless support.
+One problem is that both chipsets, with and without sound support, use the
+same PCI ID.
+This makes it impossible to determine which one is installed.
diff --git a/share/man/man4/snd_gusc.4 b/share/man/man4/snd_gusc.4
new file mode 100644
index 0000000..99df540
--- /dev/null
+++ b/share/man/man4/snd_gusc.4
@@ -0,0 +1,97 @@
+.\"
+.\" Copyright (c) 1999 Seigo Tanimura
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2005
+.Dt SND_GUSC 4
+.Os
+.Sh NAME
+.Nm snd_gusc
+.Nd Gravis UltraSound ISA bridge device driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_gusc"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_gusc_load="YES"
+.Ed
+.Pp
+Non-PnP cards require the following lines in
+.Xr device.hints 5 :
+.Bd -literal -offset indent
+hint.gusc.0.at="isa"
+hint.gusc.0.port="0x220"
+hint.gusc.0.irq="5"
+hint.gusc.0.drq="1"
+hint.gusc.0.flags="0x13"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to Gravis UltraSound sound cards.
+.Pp
+The value of flags specifies the secondary DMA channel.
+If the secondary
+DMA channel is C, set the flags to (C | 0x10).
+For a sound card without the
+secondary DMA channel, the flags should be set to zero.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+Gravis UltraSound MAX
+.It
+Gravis UltraSound PnP
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It xxx: gus pcm not attached, out of memory
+There are not enough memory to drive the device.
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Ville-Pertti Keinonen Aq will@iki.fi
+.An Seigo Tanimura Aq tanimura@r.dl.itc.u-tokyo.ac.jp
+.Sh BUGS
+Recording pcm sound data is not supported yet.
diff --git a/share/man/man4/snd_hda.4 b/share/man/man4/snd_hda.4
new file mode 100644
index 0000000..91e599d
--- /dev/null
+++ b/share/man/man4/snd_hda.4
@@ -0,0 +1,635 @@
+.\" Copyright (c) 2006-2008 Joel Dahl <joel@FreeBSD.org>
+.\" Copyright (c) 2008 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 25, 2012
+.Dt SND_HDA 4
+.Os
+.Sh NAME
+.Nm snd_hda
+.Nd "Intel High Definition Audio bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_hda"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_hda_load="YES"
+.Ed
+.Sh DESCRIPTION
+The High Definition (HD) Audio specification was developed by Intel as the
+logical successor of the old AC'97 specification and has several advantages,
+such as higher bandwidth which allows more channels and more detailed formats,
+support for several logical audio devices, and general purpose DMA channels.
+.Pp
+The
+.Nm
+driver includes HDA bus controller driver (hdac), HDA codec driver (hdacc)
+and HDA codecs audio functions bridge driver (hdaa) that allows
+the generic audio driver,
+.Xr sound 4 ,
+to be used with this hardware.
+Only audio functions are supported by
+.Nm .
+Modem and other possible functions are not implemented.
+.Pp
+The
+.Nm
+driver supports hardware that conforms with revision 1.0 of the Intel High
+Definition Audio specification and tries to behave much like the Microsoft
+Universal Audio Architecture (UAA) draft (revision 0.7b) for handling audio
+devices.
+.Pp
+According to HDA and UAA specifications, depending on the number of HDA buses
+and codecs present in system, their audio capabilities and BIOS provided
+configuration, the
+.Nm
+driver often provides several PCM audio devices.
+For example, one device for main rear 7.1 output and inputs, one device
+for independent headset connectors at front and one device for SPDIF or
+HDMI audio input/output.
+The assignment of audio inputs and outputs may be tuned with
+.Xr device.hints 5
+or
+.Xr sysctl 8 .
+The driver's verbose boot messages provide a lot of information about
+the operation of the driver and present audio setup.
+.Pp
+The default audio device may be tuned by setting the
+.Ar hw.snd.default_unit
+sysctl, as described in
+.Xr sound 4 ,
+or explicitly specified in application settings.
+.Ss Boot-time Configuration
+The following variables are available at boot-time through the
+.Xr device.hints 5
+file:
+.Bl -tag -width ".Va hint.hdac.%d.config"-offset indent
+.It Va hint.hdac.%d.config
+Configures a range of possible controller options.
+Possible values are:
+.Dq Li 64bit ,
+.Dq Li dmapos ,
+.Dq Li msi .
+An option prefixed with
+.Dq Li no ,
+such as
+.Dq Li nomsi ,
+will do the opposite and takes precedence.
+Options can be separated by whitespace and commas.
+.It Va hint.hdac.%d.msi
+Controls MSI (Message Signaled Interrupts) support.
+.It Va hint.hdac.%d.cad%d.nid%d.config
+Same as
+.Va hint.hdaa.%d.nid%d.config
+.It Va hint.hdaa.%d.config
+Configures a range of possible audio function options.
+Possible values are:
+.Dq Li eapdinv ,
+.Dq Li ivref ,
+.Dq Li ivref50 ,
+.Dq Li ivref80 ,
+.Dq Li ivref100 ,
+.Dq Li fixedrate ,
+.Dq Li forcestereo ,
+.Dq Li ovref ,
+.Dq Li ovref50 ,
+.Dq Li ovref80 ,
+.Dq Li ovref100 ,
+.Dq Li senseinv ,
+.Dq Li softpcmvol ,
+and
+.Dq Li vref .
+An option prefixed with
+.Dq Li no ,
+such as
+.Dq Li nofixedrate ,
+will do the opposite and takes precedence.
+Options can be separated by whitespace and commas.
+.Pp
+The
+.Dq Li eapdinv
+option inverts External Amplifier Power Down signal.
+The
+.Dq Li fixedrate
+denies all sampling rates except 48KHz.
+The
+.Dq Li forcestereo
+denies mono playback/recording.
+The
+.Dq Li senseinv
+option inverts jack sensing logic.
+The
+.Dq Li ivref Ns Ar X
+and
+.Dq Li ovref Ns Ar X
+options control the voltage used to power external microphones.
+.It Va hint.hdaa.%d.gpio_config
+Overrides audio function GPIO pins configuration set by BIOS.
+May be specified as a set of space-separated
+.Dq Ar num Ns = Ns Ar value
+pairs, where
+.Ar num
+is GPIO line number, and
+.Ar value
+is one of:
+.Dq Li keep ,
+.Dq Li set ,
+.Dq Li clear ,
+.Dq Li disable
+and
+.Dq Li input .
+.Pp
+.Dq Li GPIO Ns s
+are a codec's General Purpose I/O pins which system integrators sometimes
+use to control external muters, amplifiers and so on.
+If you have no sound, or sound volume is not adequate, you may have to
+experiment a bit with the GPIO setup to find the optimal setup for your
+system.
+.It Va hint.hdaa.%d.nid%d.config
+Overrides audio function pin configuration set by BIOS.
+May be specified as a 32-bit hexadecimal value with a leading
+.Dq 0x ,
+or as a set of space-separated
+.Dq Ar option Ns = Ns Ar value
+pairs.
+.It Va hint.pcm.%d.rec.autosrc
+Controls automatic recording source feature:
+.Bl -tag -width 2n -compact
+.It 0
+disabled,
+.It 1
+once on attach,
+.It 2
+enabled.
+.El
+When enabled, driver will automatically set recording source of the mixer to
+connected input using jack presence detection statuses.
+.El
+.Pp
+Pin configuration is the UAA driver's main source of information about codec
+usage.
+This information is usually provided by the codec manufacturer and tuned
+by system integrators for specific system requirements.
+The
+.Nm
+driver allows users to override it to fix integrator mistakes or to use the
+available codec in alternative ways (for example to get stereo output and 2
+inputs instead of a single 5.1 output).
+.Pp
+The following options are supported:
+.Bl -tag -width ".Va device=" -offset indent
+.It Va as
+Association number.
+Associations are used to group individual pins to form a complex multi-pin
+device.
+For example, to group 4 connectors for 7.1 input/output, or to treat several
+input connectors as sources for the same input device.
+Association numbers can be specified as numeric values from 0 to 15.
+A value of 0 means disabled pin.
+A value of 15 is a set of independent unassociated pins.
+Each association includes only pins of the same direction (in/out) and is
+detected atomically (all pins or none).
+A separate PCM audio device is created for every pair of input and
+output associations.
+.It Va seq
+Sequence number.
+A unique, per-association number used to order pins inside the
+particular association.
+Sequence numbers can be specified as numeric values from 0 to 15.
+.Pp
+The sequence number 15 has a special meaning for output associations.
+Output pins with this number and device type
+.Dq Ar Headphones
+will duplicate (with automatic mute if jack detection is supported) the
+first pin in that association.
+.Pp
+The sequence numbers 14 and 15 has a special meaning for input associations.
+Their presence in association defines it as multiplexed or mixed respectively.
+If none of them are present and there are more than one pin in association,
+the association will provide multichannel input.
+.Pp
+For multichannel input/output associations sequence numbers encode
+channel pairs positions:
+0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side.
+Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro;
+(0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4) - 7.1.
+.It Va device
+Device type.
+Can be specified as a number from 0 to 15 or as a name:
+.Dq Li Line-out ,
+.Dq Li Speaker ,
+.Dq Li Headphones,
+.Dq Li CD ,
+.Dq Li SPDIF-out ,
+.Dq Li Digital-out ,
+.Dq Li Modem-line ,
+.Dq Li Modem-handset ,
+.Dq Li Line-in ,
+.Dq Li AUX ,
+.Dq Li Mic ,
+.Dq Li Telephony ,
+.Dq Li SPDIF-in ,
+.Dq Li Digital-in ,
+.Dq Li Res.E ,
+or
+.Dq Li Other .
+The device type also describes the pin direction (in/out).
+For example,
+.Dq Li CD
+always means an input pin, while
+.Dq Li Headphones
+always means an output.
+.It Va conn
+Connection type.
+Can be specified as a number from 0 to 3.
+The connection type can also be specified as one of the special names
+.Dq Li Jack ,
+.Dq Li None ,
+.Dq Li Fixed ,
+or
+.Dq Li Both .
+Pins with a connection type of
+.Dq Li None
+are disabled.
+.It Va ctype
+Connector physical type.
+Can be specified as a number from 0 to 15.
+This is a reference only value.
+It is ignored by the
+.Nm
+driver.
+.It Va color
+Connector color.
+Can be specified as a number from 0 to 15 or as one of the names
+.Dq Li Unknown ,
+.Dq Li Black ,
+.Dq Li Grey ,
+.Dq Li Blue ,
+.Dq Li Green ,
+.Dq Li Red ,
+.Dq Li Orange ,
+.Dq Li Yellow ,
+.Dq Li Purple ,
+.Dq Li Pink ,
+.Dq Li Res.A ,
+.Dq Li Res.B ,
+.Dq Li Res.C ,
+.Dq Li Res.D ,
+.Dq Li White ,
+or
+.Dq Li Other .
+This is a reference only value.
+It is ignored by the
+.Nm
+driver.
+.It Va loc
+Connector physical location.
+Can be specified as a number from 0 to 63.
+This is a reference only value.
+It is ignored by the
+.Nm
+driver.
+.It Va misc
+Misc bits.
+Can be specified as a number from 0 to 15.
+Bit 0 has a special meaning. When set it means that jack detection is
+not implemented in hardware.
+.El
+.Ss Runtime Configuration
+The following
+.Xr sysctl 8
+variables are available in addition to those available to all
+.Xr sound 4
+devices:
+.Bl -tag -width ".Va dev.hdaa.%d.nid%d_original" -offset indent
+.It Va dev.hdac.%d.pindump
+Setting this to a non-zero value dumps the current pin configuration, main
+capabilities and jack sense status of all audio functions on the controller
+to console and syslog.
+.It Va dev.hdac.%d.polling
+Enables polling mode.
+In this mode the driver operates by querying the device state on timer
+ticks using
+.Xr callout 9
+instead of interrupts.
+Polling is disabled by default.
+Do not enable it unless you are facing weird interrupt problems or if the
+device cannot generate interrupts at all.
+.It Va dev.hdaa.%d.config
+Run-time equivalent of the
+.Va hint.hdaa.%d.config
+tunable.
+.It Va dev.hdaa.%d.gpi_state
+Current state of GPI lines.
+.It Va dev.hdaa.%d.gpio_state
+Current state of GPIO lines.
+.It Va dev.hdaa.%d.gpio_config
+Run-time equivalent of the
+.Va hint.hdaa.%d.gpio.config
+tunable.
+.It Va dev.hdaa.%d.gpo_state
+Current state of GPO lines.
+.It Va dev.hdaa.%d.nid%d_config
+Run-time equivalent of the
+.Va hint.hdaa.%d.nid%d.config
+tunable.
+.It Va dev.hdaa.%d.nid%d_original
+Original pin configuration written by BIOS.
+.It Va dev.hdaa.%d.reconfig
+Setting this to a non-zero value makes driver to destroy existing pcm devices
+and process new pins configuration set via
+.Va dev.hdaa.%d.nid%d_config .
+.It Va dev.pcm.%d.play.32bit , dev.pcm.%d.rec.32bit
+HDA controller uses 32bit representation for all samples of more then 16 bits.
+These variables allow to specify how many bits of these 32 should be
+used by CODEC.
+Depending on codec capabilities, possible values are 20, 24 and 32 bit.
+The default value is 24.
+.It Va dev.pcm.%d.rec.autosrc
+Run-time equivalent of the
+.Va hint.pcm.%d.rec.autosrc
+tunable.
+.El
+.Sh EXAMPLES
+Taking HP Compaq DX2300 with Realtek ALC888 HDA codec for example.
+This system has two audio connectors on a front side, three audio connectors
+on a rear side and one internal speaker.
+According to verbose driver output and the codec datasheet,
+this codec has five stereo DACs and two stereo ADCs, all of them are routable to
+any codec pin (external connector).
+All codec pins are reversible (could be configured either as input or output).
+.Pp
+So high codec uniformity and flexibility allow driver to configure it in many
+different ways, depending on requested pins usage described by pins configuration.
+The driver reports such default pin configuration when verbose messages enabled:
+.Bd -literal
+hdaa0: nid 0x as seq device conn jack loc color misc
+hdaa0: 20 01014020 2 0 Line-out Jack 1/8 Rear Green 0
+hdaa0: 21 99130110 1 0 Speaker Fixed ATAPI Onboard Unknown 1
+hdaa0: 22 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
+hdaa0: 23 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
+hdaa0: 24 01a19830 3 0 Mic Jack 1/8 Rear Pink 8
+hdaa0: 25 02a1983f 3 15 Mic Jack 1/8 Front Pink 8
+hdaa0: 26 01813031 3 1 Line-in Jack 1/8 Rear Blue 0
+hdaa0: 27 0221401f 1 15 Headphones Jack 1/8 Front Green 0
+hdaa0: 28 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
+hdaa0: 30 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
+hdaa0: 31 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
+.Ed
+.Pp
+Here we can see, that the nodes with ID (nid) 25 and 27 are front panel
+connectors (Jack, Front), nids 20, 24 and 26 are rear panel connectors
+(Jack, Rear) and nid 21 is a built-in speaker (Fixed, Onboard).
+Pins with nids 22, 23, 28, 30 and 31 will be disabled by driver due to "None"
+connectivity. So the pin count and description matches to connectors that
+we have.
+.Pp
+Using association (as) and sequence (seq) fields values pins are grouped into
+3 associations:
+.Bd -literal
+hdaa0: Association 0 (1) out:
+hdaa0: Pin nid=21 seq=0
+hdaa0: Pin nid=27 seq=15
+hdaa0: Association 1 (2) out:
+hdaa0: Pin nid=20 seq=0
+hdaa0: Association 2 (3) in:
+hdaa0: Pin nid=24 seq=0
+hdaa0: Pin nid=26 seq=1
+hdaa0: Pin nid=25 seq=15
+.Ed
+.Pp
+Each
+.Xr pcm 4
+device uses two associations: one for playback and one for recording.
+Associations processed and assigned to
+.Xr pcm 4
+devices in increasing numerical order.
+In this case association #0 (1) will become
+.Li pcm0
+device playback, using the internal speakers and
+.Ar Headphones
+jack with speaker automute on the headphones jack connection.
+Association #1 (2) will become
+.Li pcm1
+playback, using the
+.Ar Line-out
+jack.
+Association #2 (3) will become
+.Li pcm0
+recording, using the external microphones and the
+.Ar Line-in
+jack.
+.Pp
+The
+.Nm
+driver provides extensive verbose messages to diagnose its operation
+logic and describe its current codec configuration.
+.Pp
+Using
+.Xr device.hints 5
+it is possible to modify the configuration of the existing pins,
+allowing a broad range of different audio setups.
+Here are a few examples of some setups possible for this particular
+hardware:
+.Ss Example 1
+Setting the
+.Xr device.hints 5
+options
+.Bd -literal
+hint.hdac.0.cad0.nid20.config="as=1"
+hint.hdac.0.cad0.nid21.config="as=2"
+.Ed
+.Pp
+will swap line-out and speaker functions.
+So the
+.Li pcm0
+device will play to the line-out and headphones jacks. Line-out will
+be muted on the headphones jack connection.
+Recording on
+.Li pcm0
+will go from two external microphones and line-in jacks.
+.Li pcm1
+playback will go to the internal speaker.
+.Ss Example 2
+Setting the
+.Xr device.hints 5
+options
+.Bd -literal
+hint.hdac.0.cad0.nid20.config="as=1 seq=15 device=Headphones"
+hint.hdac.0.cad0.nid27.config="as=2 seq=0"
+hint.hdac.0.cad0.nid25.config="as=4 seq=0"
+.Ed
+.Pp
+will split the headphones and one of the microphones to a separate device.
+The
+.Li pcm0
+device will play to the internal speaker and to the line-out jack, with
+speaker automute on the line-out jack connection.
+Recording on
+.Li pcm0
+will use input from one external microphone and the line-in jacks.
+The
+.Li pcm1
+device will be completely dedicated to a headset (headphones and mic)
+connected to the front connectors.
+.Ss Example 3
+Setting the
+.Xr device.hints 5
+options
+.Bd -literal
+hint.hdac.0.cad0.nid20.config="as=1 seq=0"
+hint.hdac.0.cad0.nid26.config="as=2 seq=0"
+hint.hdac.0.cad0.nid27.config="as=3 seq=0"
+hint.hdac.0.cad0.nid25.config="as=4 seq=0"
+hint.hdac.0.cad0.nid24.config="as=5 seq=0 device=Line-out"
+hint.hdac.0.cad0.nid21.config="as=6 seq=0"
+.Ed
+.Pp
+will give 4 independent devices:
+.Li pcm0
+.Pq line-out and line-in ,
+.Li pcm1
+.Pq headphones and mic ,
+.Li pcm2
+.Pq additional line-out via retasked rear mic jack ,
+and
+.Li pcm3
+.Pq internal speaker .
+.Ss Example 4
+Setting the
+.Xr device.hints 5
+options
+.Bd -literal
+hint.hdac.0.cad0.nid20.config="as=1 seq=0"
+hint.hdac.0.cad0.nid24.config="as=1 seq=1 device=Line-out"
+hint.hdac.0.cad0.nid26.config="as=1 seq=2 device=Line-out"
+hint.hdac.0.cad0.nid21.config="as=2 seq=0"
+.Ed
+.Pp
+will give 2 devices:
+.Li pcm0
+for 5.1 playback via 3 rear connectors (line-out and retasked
+mic and line-in) and headset (headphones and mic) at front connectors.
+.Li pcm1
+for internal speaker playback.
+On headphones connection rear connectors will be muted.
+.Sh MIXER CONTROLS
+Depending on codec configuration, these controls and signal sources could be
+reported to
+.Xr sound 4 :
+.Bl -tag -width ".Va speaker" -offset indent
+.It Va vol
+overall output level (volume)
+.It Va rec
+overall recording level
+.It Va igain
+input-to-output monitoring loopback level
+.It Va ogain
+external amplifier control
+.It Va pcm
+PCM playback
+.It Va mix
+input mix
+.It Va mic
+first external or second internal microphone input
+.It Va monitor
+first internal or second external microphone input
+.It Va line , Va line1 , Va line2, Va line3
+analog (line) inputs
+.It Va dig1 , Va dig2 , Va dig3
+digital (S/PDIF, HDMI or DisplayPort) inputs
+.It Va cd
+CD input
+.It Va speaker
+PC speaker input
+.It Va phin , Va phout , Va radio . Va video
+other random inputs
+.El
+.Pp
+Controls have different precision. Some could be just an on/off triggers.
+Most of controls use logarithmic scale.
+.Sh HARDWARE
+The
+.Nm
+driver supports controllers having PCI class 4 (multimedia) and
+subclass 3 (HDA), compatible with Intel HDA specification.
+.Pp
+The
+.Nm
+driver supports more than two hundred different controllers and CODECs.
+There is no sense to list all of them here, as in most cases specific CODEC
+configuration and wiring are more important then type of the CODEC itself.
+.Sh SEE ALSO
+.Xr sound 4 ,
+.Xr snd_ich 4 ,
+.Xr device.hints 5 ,
+.Xr loader.conf 5 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 6.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Stephane E. Potvin Aq sepotvin@videotron.ca ,
+.An Ariff Abdullah Aq ariff@FreeBSD.org
+and
+.An Alexander Motin Aq mav@FreeBSD.org .
+This manual page was written by
+.An Joel Dahl Aq joel@FreeBSD.org ,
+.An Alexander Motin Aq mav@FreeBSD.org
+and
+.An Giorgos Keramidas Aq keramida@FreeBSD.org .
+.Sh BUGS
+Some Hardware/OEM vendors tend to screw up BIOS settings or use custom
+unusual CODEC wiring that create problems to the driver.
+This may result in missing pcm devices, or a state where the
+.Nm
+driver seems to attach and work, but no sound is played.
+Some cases can be solved by tuning
+.Pa loader.conf
+variables.
+But before trying to fix problem that way, make sure that there really is
+a problem and that the PCM audio device in use really corresponds to the
+expected audio connector.
+.Pp
+Some vendors use non-standardized General Purpose I/O (GPIO) pins of the codec
+to control external amplifiers.
+In some cases setting a combination of GPIO bits may be needed to make
+sound work on a specific device.
+.Pp
+HDMI and DisplayPort audio may also require support from video driver.
diff --git a/share/man/man4/snd_hdspe.4 b/share/man/man4/snd_hdspe.4
new file mode 100644
index 0000000..676b945
--- /dev/null
+++ b/share/man/man4/snd_hdspe.4
@@ -0,0 +1,76 @@
+.\" Copyright (c) 2012 Ruslan Bukin <br@bsdpad.com>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 13, 2012
+.Dt SND_HDSPE 4
+.Os
+.Sh NAME
+.Nm snd_hdspe
+.Nd "RME HDSPe bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_hdspe"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_hdspe_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to RME HDSPe audio devices.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following audio devices:
+.Pp
+.Bl -bullet -compact
+.It
+RME HDSPe AIO
+.It
+RME HDSPe RayDAT
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Ruslan Bukin <br@bsdpad.com> .
diff --git a/share/man/man4/snd_ich.4 b/share/man/man4/snd_ich.4
new file mode 100644
index 0000000..c4359c8
--- /dev/null
+++ b/share/man/man4/snd_ich.4
@@ -0,0 +1,111 @@
+.\" Copyright (c) 2004 Jorge Mario G. Mazo
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 6, 2009
+.Dt SND_ICH 4
+.Os
+.Sh NAME
+.Nm snd_ich
+.Nd "Intel ICH AC'97 and compatible bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_ich"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_ich_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to Intel ICH AC'97 and compatible audio devices.
+.Pp
+Some later chips, like ICH6/ICH7, depending on wiring can instead implement
+newer Intel HD Audio specification, which is supported by
+.Xr snd_hda 4
+driver.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following audio devices:
+.Pp
+.Bl -bullet -compact
+.It
+AMD 768
+.It
+AMD 8111
+.It
+Intel 443MX
+.It
+Intel ICH
+.It
+Intel ICH revision 1
+.It
+Intel ICH2
+.It
+Intel ICH3
+.It
+Intel ICH4
+.It
+Intel ICH5
+.It
+Intel ICH6
+.It
+Intel ICH7
+.It
+NVIDIA nForce
+.It
+NVIDIA nForce2
+.It
+NVIDIA nForce2 400
+.It
+NVIDIA nForce3
+.It
+NVIDIA nForce3 250
+.It
+NVIDIA nForce4
+.It
+SiS 7012
+.El
+.Sh SEE ALSO
+.Xr sound 4 ,
+.Xr snd_hda 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.2 .
+.Sh AUTHORS
+This manual page was written by
+.An Jorge Mario G. Mazo Aq jgutie11@eafit.edu.co .
diff --git a/share/man/man4/snd_maestro.4 b/share/man/man4/snd_maestro.4
new file mode 100644
index 0000000..d630a33
--- /dev/null
+++ b/share/man/man4/snd_maestro.4
@@ -0,0 +1,78 @@
+.\" Copyright (c) 2004 Jorge Mario G. Mazo
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2005
+.Dt SND_MAESTRO 4
+.Os
+.Sh NAME
+.Nm snd_maestro
+.Nd "ESS Maestro bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_maestro"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_maestro_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to ESS Maestro based sound chips.
+This chipset is very popular in notebook computers, but it is
+also very used in a wide selection of cheap OEM sound cards.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following PCI sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+ESS Technology Maestro-1
+.It
+ESS Technology Maestro-2
+.It
+ESS Technology Maestro-2E
+.El
+.Sh SEE ALSO
+.Xr snd_maestro3 4 ,
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.2 .
+.Sh AUTHORS
+This manual page was written by
+.An Jorge Mario G. Mazo Aq jgutie11@eafit.edu.co .
diff --git a/share/man/man4/snd_maestro3.4 b/share/man/man4/snd_maestro3.4
new file mode 100644
index 0000000..4fadd04
--- /dev/null
+++ b/share/man/man4/snd_maestro3.4
@@ -0,0 +1,94 @@
+.\" Copyright (c) 2001 Scott Long
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 15, 2005
+.Dt SND_MAESTRO3 4
+.Os
+.Sh NAME
+.Nm snd_maestro3
+.Nd "ESS Maestro3/Allegro-1 bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_maestro3"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_maestro3_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the ESS Maestro3 and Allegro-1 sound chips
+under the PCM framework.
+These chips are mostly found in laptop computers and feature an AC97 mixer,
+a multi-channel sample rate converter that can mix up to four digital audio
+streams in hardware, recording support, and external volume control buttons.
+.Pp
+The firmware for the sound processor is licensed under the GNU Public
+License, and thus this driver is not included in the default
+.Pa GENERIC
+kernel.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following audio devices:
+.Pp
+.Bl -bullet -compact
+.It
+ESS Technology Allegro-1
+.It
+ESS Technology Maestro3
+.El
+.Sh DIAGNOSTICS
+The hardware volume control buttons can be connected to two different pin
+sets (GPIO or GD) on the chip, depending on the manufacturer.
+The driver has no way of determining this configuration, so a hint may be
+used to override the default guess.
+The default setting for hardware volume control assumes that GD pins
+are wired to control the hardware volume.
+For systems that have the GPIO pins wired to the hardware volume control
+buttons, add the line
+.Dq Li hint.pcm.0.hwvol_config="0"
+to the file
+.Pa /boot/device.hints
+to override the default setting.
+.Sh SEE ALSO
+.Xr sound 4 ,
+.Xr loader.conf 5
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.3 .
+.Sh AUTHORS
+.An Scott Long Aq scottl@FreeBSD.org
+.An Darrel Anderson Aq anderson@cs.duke.edu
diff --git a/share/man/man4/snd_mss.4 b/share/man/man4/snd_mss.4
new file mode 100644
index 0000000..76ef183
--- /dev/null
+++ b/share/man/man4/snd_mss.4
@@ -0,0 +1,116 @@
+.\" Copyright (c) 2005 Joel Dahl
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 1, 2005
+.Dt SND_MSS 4
+.Os
+.Sh NAME
+.Nm snd_mss
+.Nd "Microsoft Sound System ISA PnP/non-PnP bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_mss"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_mss_load="YES"
+.Ed
+.Pp
+Non-PnP cards require the following lines in
+.Xr device.hints 5 :
+.Bd -literal -offset indent
+hint.pcm.0.at="isa"
+hint.pcm.0.irq="10"
+hint.pcm.0.drq="1"
+hint.pcm.0.flags="0x0"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver,
+.Xr sound 4 ,
+to attach to the supported audio devices.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following audio devices:
+.Pp
+.Bl -bullet -compact
+.It
+AD1845
+.It
+AD1848
+.It
+Aztech 2320
+.It
+CMedia CMI8330
+.It
+Crystal Semiconductor CS4231
+.It
+Crystal Semiconductor CS4232
+.It
+Crystal Semiconductor CS4234
+.It
+Crystal Semiconductor CS4235
+.It
+Crystal Semiconductor CS4236
+.It
+Crystal Semiconductor CS4237
+.It
+ENSONIQ SoundscapeVIVO ENS4081
+.It
+NeoMagic 256AV (non-AC97)
+.It
+OPTi 924
+.It
+OPTi 925
+.It
+OPTi 930
+.It
+OPTi 931
+.It
+OPTi 933
+.It
+Yamaha OPL-SA2
+.It
+Yamaha OPL-SA3
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 2.2.6 .
+.Sh AUTHORS
+This manual page was written by
+.An Joel Dahl Aq joel@FreeBSD.org .
diff --git a/share/man/man4/snd_neomagic.4 b/share/man/man4/snd_neomagic.4
new file mode 100644
index 0000000..430220c
--- /dev/null
+++ b/share/man/man4/snd_neomagic.4
@@ -0,0 +1,74 @@
+.\" Copyright (c) 2005 Joel Dahl
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 1, 2005
+.Dt SND_NEOMAGIC 4
+.Os
+.Sh NAME
+.Nm snd_neomagic
+.Nd "NeoMagic 256AV/ZX bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_neomagic"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_neomagic_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver,
+.Xr sound 4 ,
+to attach to the NeoMagic 256AV/ZX audio devices.
+These chips are mostly found in laptop computers.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following audio devices:
+.Pp
+.Bl -bullet -compact
+.It
+NeoMagic 256AV
+.It
+NeoMagic 256ZX
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+This manual page was written by
+.An Joel Dahl Aq joel@FreeBSD.org .
diff --git a/share/man/man4/snd_sbc.4 b/share/man/man4/snd_sbc.4
new file mode 100644
index 0000000..8b53c8e
--- /dev/null
+++ b/share/man/man4/snd_sbc.4
@@ -0,0 +1,132 @@
+.\"
+.\" Copyright (c) 1999 Seigo Tanimura
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 17, 2007
+.Dt SND_SBC 4
+.Os
+.Sh NAME
+.Nm snd_sbc ,
+.Nm snd_sb16 ,
+.Nm snd_sb8
+.Nd Creative Sound Blaster ISA and compatible bridge device driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_sbc"
+.Cd "device snd_sb16"
+.Cd "device snd_sb8"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_sbc_load="YES"
+snd_sb16_load="YES"
+snd_sb8_load="YES"
+.Ed
+.Pp
+Non-PnP cards require the following lines in
+.Xr device.hints 5 :
+.Bd -literal -offset indent
+hint.sbc.0.at="isa"
+hint.sbc.0.port="0x220"
+hint.sbc.0.irq="5"
+hint.sbc.0.drq="1"
+hint.sbc.0.flags="0x15"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to Creative Sound Blaster ISA (mostly SB16 or SB8, known as
+SoundBlaster Pro) compatible audio cards.
+.Pp
+The value of flags specifies the secondary DMA channel.
+If the secondary
+DMA channel is C, set the flags to (C | 0x10).
+For a sound card without the
+secondary DMA channel, the flags should be set to zero.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+Avance Asound 110
+.It
+Avance Logic ALS100+
+.It
+Avance Logic ALS120
+.It
+Creative SB16
+.It
+Creative SB32
+.It
+Creative AWE64
+.It
+Creative AWE64 Gold
+.It
+Creative ViBRA16C
+.It
+Creative ViBRA16X
+.It
+ESS ES1681
+.It
+ESS ES1688
+.It
+ESS ES1868
+.It
+ESS ES1869
+.It
+ESS ES1878
+.It
+ESS ES1879
+.It
+ESS ES1888
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It sb_dspwr(XX) timed out.
+A command to the DSP has timed out.
+Check the I/O port configuration.
+.It bad irq XX (5/7/9/10 valid)
+The IRQ given to the driver is not valid.
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+.An Seigo Tanimura Aq tanimura@r.dl.itc.u-tokyo.ac.jp
diff --git a/share/man/man4/snd_solo.4 b/share/man/man4/snd_solo.4
new file mode 100644
index 0000000..55e12fc
--- /dev/null
+++ b/share/man/man4/snd_solo.4
@@ -0,0 +1,66 @@
+.\" Copyright (c) 2004 Atte Peltomaki
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 28, 2005
+.Dt SND_SOLO 4
+.Os
+.Sh NAME
+.Nm snd_solo
+.Nd "ESS Solo-1/1E PCI bridge device driver"
+.Sh SYNOPSIS
+.Cd "device sound"
+.Cd "device snd_solo"
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver
+.Xr sound 4
+to attach to the ESS Solo-1x PCI cards.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following sound cards:
+.Pp
+.Bl -bullet -compact
+.It
+ESS Solo-1 (ES1938 Chipset)
+.It
+ESS Solo-1E (ES1946 Chipset)
+.El
+.Pp
+Note that older ESS ISA cards with ES18xx chipset are supported via
+.Xr snd_ess 4
+and/or
+.Xr snd_sbc 4 .
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.1 .
+.Sh AUTHORS
+.An "Cameron Grant" Aq cg@FreeBSD.org
diff --git a/share/man/man4/snd_spicds.4 b/share/man/man4/snd_spicds.4
new file mode 100644
index 0000000..7b95b86
--- /dev/null
+++ b/share/man/man4/snd_spicds.4
@@ -0,0 +1,89 @@
+.\" Copyright (c) 2006 Alexander Leidinger
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 28, 2007
+.Dt SND_SPICDS 4
+.Os
+.Sh NAME
+.Nm snd_spicds
+.Nd "I2S SPI audio codec driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device snd_spicds"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_spicds_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+I2S codec driver is used by several sound drivers for soundcards which use
+the supported codec chips.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following codecs:
+.Pp
+.Bl -bullet -compact
+.It
+AK4358
+.It
+AK4381
+.It
+AK4396
+.It
+AK4524
+.It
+AK4528
+.It
+WM8770
+.El
+.Sh SEE ALSO
+.Xr snd_envy24 4 ,
+.Xr snd_envy24ht 4 ,
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 6.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Konstantin Dimitrov
+based upon the
+.Xr snd_envy24 4
+driver.
+This manual page was written by
+.An Alexander Leidinger Aq netchild@FreeBSD.org .
diff --git a/share/man/man4/snd_t4dwave.4 b/share/man/man4/snd_t4dwave.4
new file mode 100644
index 0000000..ef91665
--- /dev/null
+++ b/share/man/man4/snd_t4dwave.4
@@ -0,0 +1,77 @@
+.\" Copyright (c) 2005 Joel Dahl
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 1, 2005
+.Dt SND_T4DWAVE 4
+.Os
+.Sh NAME
+.Nm snd_t4dwave
+.Nd "Trident 4DWave bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_t4dwave"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_t4dwave_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver,
+.Xr sound 4 ,
+to attach to Trident 4DWave audio devices.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following audio devices:
+.Pp
+.Bl -bullet -compact
+.It
+Acer Labs M5451
+.It
+SIS 7018
+.It
+Trident 4DWave DX
+.It
+Trident 4DWave NX
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+This manual page was written by
+.An Joel Dahl Aq joel@FreeBSD.org .
diff --git a/share/man/man4/snd_uaudio.4 b/share/man/man4/snd_uaudio.4
new file mode 100644
index 0000000..b045851
--- /dev/null
+++ b/share/man/man4/snd_uaudio.4
@@ -0,0 +1,102 @@
+.\" $NetBSD: uaudio.4,v 1.15 2002/02/12 19:53:57 jdolecek Exp $
+.\"
+.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 24, 2011
+.Dt SND_UAUDIO 4
+.Os
+.Sh NAME
+.Nm snd_uaudio
+.Nd USB audio and MIDI device driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device usb"
+.Cd "device snd_uaudio"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_uaudio_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for
+.Tn USB
+audio class devices and
+.Tn USB
+MIDI class devices.
+.Pp
+A
+.Tn USB
+audio device consists of a number of components:
+input terminals (e.g.\& USB digital input), output terminals (e.g.\&
+speakers), and a number of units in between (e.g.\& volume control).
+.Pp
+Refer to the
+.Ql USB Audio Class Specification
+for more information.
+.Sh SEE ALSO
+.Xr sound 4 ,
+.Xr usb 4
+.Rs
+.%T "USB Audio Class Specifications"
+.%U http://www.usb.org/developers/devclass_docs/
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 4.7 .
+.Sh AUTHORS
+This manual page was adopted from
+.Nx 1.6
+and modified for
+.Fx
+by
+.An Hiten Pandya Aq hmp@FreeBSD.org .
+.Sh BUGS
+The
+.Tn PCM
+framework in
+.Fx ,
+as of this writing, does not handle device un-registrations in a properly
+abstracted manner, i.e., a detach request is refused by the
+.Tn PCM
+framework if the device is in use.
+It is necessary to allow the device un-registration to complete
+successfully, otherwise the
+.Tn PCM
+layer will panic.
diff --git a/share/man/man4/snd_via8233.4 b/share/man/man4/snd_via8233.4
new file mode 100644
index 0000000..377fbd3
--- /dev/null
+++ b/share/man/man4/snd_via8233.4
@@ -0,0 +1,105 @@
+.\" Copyright (c) 2005 Joel Dahl
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 29, 2006
+.Dt SND_VIA8233 4
+.Os
+.Sh NAME
+.Nm snd_via8233
+.Nd "VIA Technologies VT8233 bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_via8233"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_via8233_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver,
+.Xr sound 4 ,
+to attach to the VIA VT8233 audio devices.
+These audio chipsets are integrated in the southbridge on many VIA based
+motherboards.
+.Ss Runtime Configuration
+The following
+.Xr sysctl 8
+variables are available in addition to those available to all
+.Xr sound 4
+devices:
+.Bl -tag -width ".Va dev.pcm.%d.polling" -offset indent
+.It Va dev.pcm.%d.polling
+Experimental polling mode, where the driver operates by querying the device
+state on each tick using
+.Xr callout 9 .
+Polling is disabled by default.
+Do not enable it unless you are facing weird interrupt problems or if the
+device cannot generate interrupts at all.
+.El
+.Sh HARDWARE
+The
+.Nm
+driver supports the following audio chipsets:
+.Pp
+.Bl -bullet -compact
+.It
+VIA VT8233
+.It
+VIA VT8233A
+.It
+VIA VT8233C
+.It
+VIA VT8235
+.It
+VIA VT8237
+.It
+VIA VT8251
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.7 .
+.Sh AUTHORS
+This manual page was written by
+.An Joel Dahl Aq joel@FreeBSD.org .
+.Sh BUGS
+The
+.Nm
+driver
+does not support S/PDIF.
+There is partial support in the code, so implementing it should be fairly
+easy if the right hardware is available.
diff --git a/share/man/man4/snd_via82c686.4 b/share/man/man4/snd_via82c686.4
new file mode 100644
index 0000000..183684e
--- /dev/null
+++ b/share/man/man4/snd_via82c686.4
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2005 Joel Dahl
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 1, 2005
+.Dt SND_VIA82C686 4
+.Os
+.Sh NAME
+.Nm snd_via82c686
+.Nd "VIA Technologies 82C686A bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_via82c686"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_via82c686_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver,
+.Xr sound 4 ,
+to attach audio devices based on the VIA 82C686A chipset.
+.Sh HARDWARE
+The
+.Nm
+driver supports audio devices based on the following chipset:
+.Pp
+.Bl -bullet -compact
+.It
+VIA 82C686A
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.2 .
+.Sh AUTHORS
+This manual page was written by
+.An Joel Dahl Aq joel@FreeBSD.org .
diff --git a/share/man/man4/snd_vibes.4 b/share/man/man4/snd_vibes.4
new file mode 100644
index 0000000..716a65c
--- /dev/null
+++ b/share/man/man4/snd_vibes.4
@@ -0,0 +1,71 @@
+.\" Copyright (c) 2005 Joel Dahl
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 1, 2005
+.Dt SND_VIBES 4
+.Os
+.Sh NAME
+.Nm snd_vibes
+.Nd "S3 SonicVibes bridge device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device sound"
+.Cd "device snd_vibes"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the
+following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+snd_vibes_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+bridge driver allows the generic audio driver,
+.Xr sound 4 ,
+to attach audio devices based on the S3 SonicVibes chipset.
+.Sh HARDWARE
+The
+.Nm
+driver supports audio devices based on the following chipset:
+.Pp
+.Bl -bullet -compact
+.It
+S3 SonicVibes
+.El
+.Sh SEE ALSO
+.Xr sound 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.4 .
+.Sh AUTHORS
+This manual page was written by
+.An Joel Dahl Aq joel@FreeBSD.org .
diff --git a/share/man/man4/snp.4 b/share/man/man4/snp.4
new file mode 100644
index 0000000..2545164
--- /dev/null
+++ b/share/man/man4/snp.4
@@ -0,0 +1,99 @@
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 5, 2008
+.Dt SNP 4
+.Os
+.Sh NAME
+.Nm snp
+.Nd tty snoop interface
+.Sh SYNOPSIS
+.In sys/snoop.h
+.Ft int
+.Fn ioctl fd SNPSTTY &dev
+.Ft int
+.Fn ioctl fd SNPGTTY &dev
+.Ft int
+.Fn ioctl fd FIONREAD &result
+.Sh DESCRIPTION
+.Pa /dev/snp
+is a snoop device which allows users to attach to any tty
+and watch activities on it.
+The kernel must be compiled with
+.Cd "device snp" ,
+or the
+.Nm
+module must be loaded,
+for these devices to be available.
+.Pp
+To associate a given
+.Nm
+device with a tty to be observed, open the
+.Nm
+device and a tty device, and then issue the
+.Dv SNPSTTY
+ioctl on
+.Nm
+device.
+The argument passed to the
+.Xr ioctl 2
+is the address of a variable of type
+.Vt int ,
+holding the file descriptor of a tty device.
+To detach the
+.Nm
+device from a tty use a pointer to a value of
+\-1.
+.Pp
+The
+.Dv SNPGTTY
+ioctl returns information about the current tty attached to
+the open
+.Nm
+device.
+.Pp
+The
+.Dv FIONREAD
+ioctl returns a positive value equal to the number of characters
+in a read buffer.
+Special values defined are:
+.Bl -tag -width ".Dv SNP_TTYCLOSE"
+.It Dv SNP_OFLOW
+device overflow occurred, device detached.
+.It Dv SNP_TTYCLOSE
+tty not attached.
+.It Dv SNP_DETACH
+.Nm
+device has been detached by user or tty device has been closed
+and detached.
+.El
+.Sh SEE ALSO
+.Xr pty 4 ,
+.Xr sio 4 ,
+.Xr kldload 8 ,
+.Xr watch 8
+.Sh HISTORY
+The
+.Nm
+device first appeared in
+.Fx 2.1 .
+In
+.Fx 8.0
+the
+.Nm
+driver was rewritten to work with the replaced TTY subsystem.
+.Sh AUTHORS
+The author of the current implementation is
+.An Ed Schouten Aq ed@FreeBSD.org .
+Previous versions of
+.Nm
+were based on code written by
+.An Ugen J.S. Antsilevich Aq ugen@NetVision.net.il .
+.Sh BUGS
+This version of
+.Nm
+does not return proper error codes when calling
+.Dv FIONREAD .
+It also does not allow
+.Dv SNPSTTY
+to detach itself from the TTY.
diff --git a/share/man/man4/spic.4 b/share/man/man4/spic.4
new file mode 100644
index 0000000..a398007
--- /dev/null
+++ b/share/man/man4/spic.4
@@ -0,0 +1,61 @@
+.\"
+.\" Copyright (c) 2002 Will Andrews
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 20, 2002
+.Dt SPIC 4
+.Os
+.Sh NAME
+.Nm spic
+.Nd Sony Programmable I/O Controller device driver
+.Sh SYNOPSIS
+.Cd "device spic"
+.Sh DESCRIPTION
+The
+.Nm
+driver allows using
+.Xr moused 8
+to drive the Sony Vaio Jogdial device found on several Sony Vaio models.
+It works by mapping the forward, backwards, up, and down inputs to
+.Dq l ,
+.Dq r ,
+.Dq u ,
+and
+.Dq d ,
+respectively.
+From that a program reading the Jogdial can decide what to do.
+Some actions might include scrolling, mimicking mouse buttons, launching
+applications, or other useful things.
+.Sh SEE ALSO
+.Xr moused 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.6 .
+.Sh AUTHORS
+.An Nick Sayer Aq nsayer@FreeBSD.org
+.An Will Andrews Aq will@FreeBSD.org
diff --git a/share/man/man4/spkr.4 b/share/man/man4/spkr.4
new file mode 100644
index 0000000..1f39a1ee
--- /dev/null
+++ b/share/man/man4/spkr.4
@@ -0,0 +1,249 @@
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 10, 2005
+.Dt SPKR 4
+.Os
+.Sh NAME
+.Nm speaker ,
+.Nm spkr
+.Nd console speaker device driver
+.Sh SYNOPSIS
+.Cd device speaker
+.In dev/speaker/speaker.h
+.Sh DESCRIPTION
+The speaker device driver allows applications to control the PC console
+speaker on an
+.Tn IBM-PC Ns --compatible
+machine running
+.Fx .
+.Pp
+Only one process may have this device open at any given time;
+.Xr open 2
+and
+.Xr close 2
+are used to lock and relinquish it.
+An attempt to open when
+another process has the device locked will return -1 with an
+.Er EBUSY
+error
+indication.
+Writes to the device are interpreted as `play strings' in a
+simple ASCII melody notation.
+An
+.Xr ioctl 2
+request
+for tone generation at arbitrary
+frequencies is also supported.
+.Pp
+Sound-generation does not monopolize the processor; in fact, the driver
+spends most of its time sleeping while the PC hardware is emitting
+tones.
+Other processes may emit beeps while the driver is running.
+.Pp
+Applications may call
+.Xr ioctl 2
+on a speaker file descriptor to control the
+speaker driver directly; definitions for the
+.Xr ioctl 2
+interface are in
+.In dev/speaker/speaker.h .
+The
+.Li tone_t
+structure used in these calls has two fields,
+specifying a frequency (in Hz) and a duration (in 1/100ths of a second).
+A frequency of zero is interpreted as a rest.
+.Pp
+At present there are two such
+.Xr ioctl 2
+calls.
+.Dv SPKRTONE
+accepts a pointer to a
+single tone structure as third argument and plays it.
+.Dv SPKRTUNE
+accepts a
+pointer to the first of an array of tone structures and plays them in
+continuous sequence; this array must be terminated by a final member with
+a zero duration.
+.Pp
+The play-string language is modeled on the PLAY statement conventions of
+.Tn IBM
+Advanced BASIC 2.0.
+The
+.Li MB ,
+.Li MF ,
+and
+.Li X
+primitives of PLAY are not
+useful in a timesharing environment and are omitted.
+The `octave-tracking'
+feature and the slur mark are new.
+.Pp
+There are 84 accessible notes numbered 1-84 in 7 octaves, each running from
+C to B, numbered 0-6; the scale is equal-tempered A440 and octave 3 starts
+with middle C.
+By default, the play function emits half-second notes with the
+last 1/16th second being `rest time'.
+.Pp
+Play strings are interpreted left to right as a series of play command groups;
+letter case is ignored.
+Play command groups are as follows:
+.Bl -tag -width CDEFGABxx
+.It Li CDEFGAB
+Letters A through G cause the corresponding note to be played in the
+current octave.
+A note letter may optionally be followed by an
+.Dq Em "accidental sign" ,
+one of # + or -; the first two of these cause it to be sharped one
+half-tone, the last causes it to be flatted one half-tone.
+It may
+also be followed by a time value number and by sustain dots (see
+below).
+Time values are interpreted as for the L command below.
+.It Ns Li O Sy n
+If
+.Sy n
+is numeric, this sets the current octave.
+.Sy n
+may also be one of
+.Li L
+or
+.Li N
+to enable or disable octave-tracking (it is disabled by default).
+When octave-tracking is on, interpretation of a pair of letter notes
+will change octaves if necessary in order to make the smallest
+possible jump between notes.
+Thus ``olbc'' will be played as
+``olb>c'', and ``olcb'' as ``olc<b''.
+Octave locking is disabled for
+one letter note following >, < and O[0123456].
+(The octave-locking
+feature is not supported in
+.Tn IBM
+BASIC.)
+.It Li >
+Bump the current octave up one.
+.It Li <
+Drop the current octave down one.
+.It Ns Li N Sy n
+Play note
+.Sy n ,
+.Sy n
+being 1 to 84 or 0 for a rest of current time value.
+May be followed by sustain dots.
+.It Ns Li L Sy n
+Sets the current time value for notes.
+The default is
+.Li L4 ,
+quarter or crotchet notes.
+The lowest possible value is 1; values up
+to 64 are accepted.
+.Li L1
+sets whole notes,
+.Li L2
+sets half notes,
+.Li L4
+sets quarter notes, etc.
+.It Ns Li P Sy n
+Pause (rest), with
+.Sy n
+interpreted as for
+.Li L Sy n .
+May be followed by
+sustain dots.
+May also be written
+.Li ~ .
+.It Ns Li T Sy n
+Sets the number of quarter notes per minute; default is 120.
+Musical
+names for common tempi are:
+.Bd -literal -offset indent
+ Tempo Beats Per Minute
+very slow Larghissimo
+ Largo 40-60
+ Larghetto 60-66
+ Grave
+ Lento
+ Adagio 66-76
+slow Adagietto
+ Andante 76-108
+medium Andantino
+ Moderato 108-120
+fast Allegretto
+ Allegro 120-168
+ Vivace
+ Veloce
+ Presto 168-208
+very fast Prestissimo
+.Ed
+.It Li M[LNS]
+Set articulation.
+.Li MN
+.Li ( N
+for normal) is the default; the last 1/8th of
+the note's value is rest time.
+You can set
+.Li ML
+for legato (no rest space) or
+.Li MS
+for staccato (1/4 rest space).
+.El
+.Pp
+Notes (that is,
+.Li CDEFGAB
+or
+.Li N
+command character groups) may be followed by
+sustain dots.
+Each dot causes the note's value to be lengthened by one-half
+for each one.
+Thus, a note dotted once is held for 3/2 of its undotted value;
+dotted twice, it is held 9/4, and three times would give 27/8.
+.Pp
+A note and its sustain dots may also be followed by a slur mark (underscore).
+This causes the normal micro-rest after the note to be filled in, slurring it
+to the next one.
+(The slur feature is not supported in
+.Tn IBM
+BASIC.)
+.Pp
+Whitespace in play strings is simply skipped and may be used to separate
+melody sections.
+.Sh FILES
+.Bl -tag -width /dev/speakerxx
+.It Pa /dev/speaker
+speaker device file
+.El
+.Sh SEE ALSO
+.Xr spkrtest 8
+.Sh HISTORY
+The
+.Nm
+device appeared in
+.Fx 1.0 .
+.Sh AUTHORS
+.An Eric S. Raymond Aq esr@snark.thyrsus.com
+June 1990
+.Sh "PORTED BY"
+.An Andrew A. Chernov Aq ache@astral.msk.su
+.Sh BUGS
+Due to roundoff in the pitch tables and slop in the tone-generation and timer
+hardware (neither of which was designed for precision), neither pitch accuracy
+nor timings will be mathematically exact.
+There is no volume control.
+.Pp
+The action of two or more sustain dots does not reflect standard musical
+notation, in which each dot adds half the value of the previous dot
+modifier, not half the value of the note as modified.
+Thus, a note dotted
+once is held for 3/2 of its undotted value; dotted twice, it is held 7/4,
+and three times would give 15/8.
+The multiply-by-3/2 interpretation,
+however, is specified in the
+.Tn IBM
+BASIC manual and has been retained for
+compatibility.
+.Pp
+In play strings which are very long (longer than your system's physical I/O
+blocks) note suffixes or numbers may occasionally be parsed incorrectly due
+to crossing a block boundary.
diff --git a/share/man/man4/splash.4 b/share/man/man4/splash.4
new file mode 100644
index 0000000..2a9a297
--- /dev/null
+++ b/share/man/man4/splash.4
@@ -0,0 +1,292 @@
+.\"
+.\" Copyright (c) 1999
+.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 29, 2010
+.Dt SPLASH 4
+.Os
+.Sh NAME
+.Nm splash
+.Nd splash screen / screen saver interface
+.Sh SYNOPSIS
+.Cd "device splash"
+.Sh DESCRIPTION
+The
+.Nm
+pseudo device driver adds support for the splash screen and screen
+savers to the kernel.
+This driver is required if the splash bitmap image is to be loaded or
+any screen saver is to be used.
+.Ss Splash screen
+You can load and display an arbitrary bitmap image file as a welcome banner
+on the screen when the system is about to start.
+This image will remain on the screen
+during kernel initialization process
+until the login prompt appears on the screen
+or until a screen saver is loaded and initialized.
+The image will also disappear if you hit any key,
+although this may not work immediately
+if the kernel is still probing devices.
+.Pp
+If you specify the
+.Fl c
+or
+.Fl v
+boot option when loading the kernel, the splash image will not appear.
+However, it
+is still loaded and can be used as a screen saver later: see below.
+.Pp
+In order to display the bitmap, the bitmap file itself and the
+matching splash image decoder module must be loaded by the boot loader.
+Currently the following decoder modules are available:
+.Pp
+.Bl -tag -width splash_decoder -compact
+.It Pa splash_bmp.ko
+W*ndows BMP file decoder.
+While the BMP file format allows images of various color depths, this
+decoder currently only handles 256 color bitmaps.
+Bitmaps of other color depths will not be displayed.
+.It Pa splash_pcx.ko
+ZSoft PCX decoder.
+This decoder currently only supports version 5 8-bpp single-plane
+images.
+.It Pa splash_txt.ko
+TheDraw binary ASCII drawing file decoder.
+Displays a text-mode 80x25 ASCII drawing, such as that produced by
+the Binary save format in TheDraw.
+This format consists of a sequence
+of two byte pairs representing the 80x25 display, where the first byte
+is the ASCII character to draw and the second byte indicates the
+colors/attributes to use when drawing the character.
+.El
+.Pp
+The
+.Sx EXAMPLES
+section illustrates how to set up the splash screen.
+.Pp
+If the standard VGA video mode is used,
+the size of the bitmap must be 320x200 or less.
+If you enable the VESA mode support in the kernel,
+either by statically linking the VESA module or by loading the VESA module
+(see
+.Xr vga 4 ) ,
+you can load bitmaps up to a resolution of 1024x768, depending on the VESA
+BIOS and the amount of video memory on the video card.
+.Ss Screen saver
+The screen saver will activate when the system is considered idle: i.e.\&
+when the user has not typed a key or moved the mouse for a specified period
+of time.
+As the screen saver is an optional module,
+it must be explicitly loaded into memory.
+Currently the following screen saver modules are available:
+.Pp
+.Bl -tag -width splash_module.ko -compact
+.It Pa blank_saver.ko
+This screen saver simply blanks the screen.
+.It Pa beastie_saver.ko
+Animated graphical
+.Bx
+Daemon.
+.It Pa daemon_saver.ko
+Animated
+.Bx
+Daemon screen saver.
+.It Pa dragon_saver.ko
+Draws a random dragon curve.
+.It Pa fade_saver.ko
+The screen will gradually fade away.
+.It Pa fire_saver.ko
+A fire which becomes higher as load increases.
+.It Pa green_saver.ko
+The screen will be blanked, similar to
+.Pa blank_saver.ko .
+If the monitor and the video card's BIOS support it
+the screen will also be powered off.
+.It Pa logo_saver.ko
+Animated graphical
+.Fx
+logo.
+.It Pa rain_saver.ko
+Draws a shower on the screen.
+.It Pa snake_saver.ko
+Draws a snake of string.
+.It Pa star_saver.ko
+Twinkling stars.
+.It Pa warp_saver.ko
+Streaking stars.
+.El
+.Pp
+Screen saver modules can be loaded using
+.Xr kldload 8 :
+.Pp
+.Dl kldload logo_saver
+.Pp
+The timeout value in seconds can be specified as follows:
+.Pp
+.Dl vidcontrol -t N
+.Pp
+Alternatively, you can set the
+.Ar saver
+variable in the
+.Pa /etc/rc.conf
+to the screen saver of your choice and
+the timeout value to the
+.Ar blanktime
+variable so that the screen saver is automatically loaded
+and the timeout value is set when the system starts.
+.Pp
+The screen saver may be instantly activated by hitting the
+.Ar saver
+key: the defaults are
+.Em Shift-Pause
+on the AT enhanced keyboard and
+.Em Shift-Ctrl-NumLock/Pause
+on the AT 84 keyboard.
+You can change the
+.Ar saver
+key by modifying the keymap
+(see
+.Xr kbdcontrol 1 ,
+.Xr keymap 5 ) ,
+and assign the
+.Ar saver
+function to a key of your preference.
+.Pp
+The screen saver will not run if the screen is not in text mode.
+.Ss Splash screen as a screen saver
+If you load a splash image but do not load a screen saver,
+you can continue using the splash module as a screen saver.
+The screen blanking interval can be specified as described in the
+.Sx Screen saver
+section above.
+.\".Sh DRIVER CONFIGURATION
+.Sh FILES
+.Bl -tag -width /boot/kernel/splash_xxxx.ko -compact
+.It Pa /boot/defaults/loader.conf
+boot loader configuration defaults
+.It Pa /etc/rc.conf
+system configuration information
+.It Pa /boot/kernel/splash_*.ko
+splash image decoder modules
+.It Pa /boot/kernel/*_saver.ko
+screen saver modules
+.It Pa /boot/kernel/vesa.ko
+the VESA support module
+.El
+.Sh EXAMPLES
+In order to load the splash screen or the screen saver, you must
+have the following line in the kernel configuration file.
+.Pp
+.Dl device splash
+.Pp
+Next, edit
+.Pa /boot/loader.conf
+(see
+.Xr loader.conf 5 )
+and include the following lines:
+.Bd -literal -offset indent
+splash_bmp_load="YES"
+bitmap_load="YES"
+bitmap_name="/boot/chuck.bmp"
+.Ed
+.Pp
+In the above example, the file
+.Pa /boot/chuck.bmp
+is loaded.
+In the following example, the VESA module
+is loaded so that a bitmap file which cannot be displayed in standard
+VGA modes may be shown using one of the VESA video modes.
+.Bd -literal -offset indent
+splash_pcx_load="YES"
+vesa_load="YES"
+bitmap_load="YES"
+bitmap_name="/boot/chuck.pcx"
+.Ed
+.Pp
+If the VESA support is statically linked to the kernel, it is not
+necessary to load the VESA module.
+Just load the bitmap file and the splash decoder module as in the
+first example above.
+.Pp
+To load a binary ASCII drawing and display this while booting, include the
+following into your
+.Pa /boot/loader.conf :
+.Bd -literal -offset indent
+splash_txt_load="YES"
+bitmap_load="YES"
+bitmap_name="/boot/splash.bin"
+.Ed
+.\".Sh DIAGNOSTICS
+.Sh SEE ALSO
+.Xr vidcontrol 1 ,
+.Xr syscons 4 ,
+.Xr vga 4 ,
+.Xr loader.conf 5 ,
+.Xr rc.conf 5 ,
+.Xr kldload 8 ,
+.Xr kldunload 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 3.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver and this manual page were written by
+.An Kazutaka Yokota Aq yokota@FreeBSD.org .
+The
+.Pa splash_bmp
+module was written by
+.An Michael Smith Aq msmith@FreeBSD.org
+and
+.An Kazutaka Yokota .
+The
+.Pa splash_pcx
+module was written by
+.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org
+based on the
+.Pa splash_bmp
+code.
+The
+.Pa splash_txt
+module was written by
+.An Antony Mawer Aq antony@mawer.org
+based on the
+.Pa splash_bmp
+code, with some additional inspiration from the
+.Pa daemon_saver
+code.
+.Sh CAVEATS
+Both the splash screen and the screen saver work with
+.Xr syscons 4
+only.
+.Sh BUGS
+If you load a screen saver while another screen saver has already
+been loaded, the first screen saver will not be automatically unloaded
+and will remain in memory, wasting kernel memory space.
diff --git a/share/man/man4/sppp.4 b/share/man/man4/sppp.4
new file mode 100644
index 0000000..519120f
--- /dev/null
+++ b/share/man/man4/sppp.4
@@ -0,0 +1,240 @@
+.\"
+.\" Copyright (c) 1997, 2001 Joerg Wunsch
+.\"
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 25, 2008
+.Dt SPPP 4
+.Os
+.Sh NAME
+.Nm sppp
+.Nd point to point protocol network layer for synchronous lines
+.Sh SYNOPSIS
+.Cd "device sppp"
+.Sh DESCRIPTION
+The
+.Nm
+network layer implements the state machine and the Link Control
+Protocol (LCP) of the
+.Em point to point protocol (PPP)
+as described in RFC 1661.
+Note that this layer does not provide
+network interfaces of its own, it is rather intended to be layered on
+top of drivers providing a synchronous point-to-point connection that
+wish to run a PPP stack over it.
+The corresponding network interfaces
+have to be provided by these hardware drivers.
+.Pp
+The
+.Nm
+layer provides three basic modes of operation.
+The default mode,
+with no special flags to be set, is to create the PPP connection
+(administrative
+.Em Open
+event to the LCP layer) as soon as the interface is taken up with the
+.Xr ifconfig 8
+command.
+Taking the interface down again will terminate the LCP layer
+and thus all other layers on top.
+The link will also terminate itself as
+soon as no Network Control Protocol (NCP) is open anymore, indicating
+that the lower layers are no longer needed.
+.Pp
+Setting the link-level flag
+.Em link0
+with
+.Xr ifconfig 8
+will cause the respective network interface to go into
+.Em passive
+mode.
+This means, the administrative
+.Em Open
+event to the LCP layer will be delayed until after the lower layers
+signals an
+.Em Up
+event (rise of
+.Dq carrier ) .
+This can be used by lower layers to support
+a dialin connection where the physical layer is not available
+immediately at startup, but only after some external event arrives.
+Receipt of a
+.Em Down
+event from the lower layer will not take the interface completely down
+in this case.
+.Pp
+Finally, setting the flag
+.Em link1
+will cause the interface to operate in
+.Em dial-on-demand
+mode.
+This is also only useful if the lower layer supports the notion
+of a carrier.
+Upon configuring the
+respective interface, it will delay the administrative
+.Em Open
+event to the LCP layer until either an outbound network packet
+arrives, or until the lower layer signals an
+.Em Up
+event, indicating an inbound connection.
+As with passive mode, receipt
+of a
+.Em Down
+event (loss of carrier) will not automatically take the interface down,
+thus it remains available for further connections.
+.Pp
+The
+.Nm
+layer supports the
+.Em debug
+interface flag that can be set with
+.Xr ifconfig 8 .
+If this flag is set, the various control protocol packets being
+exchanged as well as the option negotiation between both ends of the
+link will be logged at level
+.Dv LOG_DEBUG .
+This can be helpful to examine configuration problems during the first
+attempts to set up a new configuration.
+Without this flag being set,
+only the major phase transitions will be logged at level
+.Dv LOG_INFO .
+.Pp
+It is possible to leave the local interface IP address open for
+negotiation by setting it to 0.0.0.0.
+This requires that the remote
+peer can correctly supply a value for it based on the identity of the
+caller, or on the remote address supplied by this side.
+Due to the
+way the IPCP option negotiation works, this address is being supplied
+late during the negotiation, which might cause the remote peer to make
+wrong assumptions.
+.Pp
+In a similar spirit the remote address can be set to the magical
+value
+.Li 0.0.0. Ns Em *
+which means that we do not care what address the remote
+side will use, as long as it is not 0.0.0.0.
+This is useful if your ISP has several dial-in
+servers.
+You can of course
+.Nm route Cm add Ar something_or_other 0.0.0. Ns Em *
+and it will do exactly what you would want it to.
+.Pp
+The PAP and CHAP authentication protocols as described in RFC 1334,
+and RFC 1994 resp., are also implemented.
+Their parameters are being
+controlled by the
+.Xr spppcontrol 8
+utility.
+.Pp
+VJ header compression is implemented, and enabled by default.
+It can be
+disabled using
+.Xr spppcontrol 8 .
+.Sh DIAGNOSTICS
+.Bl -diag
+.It <ifname><ifnum>: <proto> illegal <event> in state <statename>
+An event happened that should not happen for the current state
+the respective control protocol is in.
+See RFC 1661 for a description
+of the state automaton.
+.It <ifname><ifnum>: loopback
+The state automaton detected a line loopback (that is, it was talking
+with itself).
+The interface will be temporarily disabled.
+.It <ifname><ifnum>: up
+The LCP layer is running again, after a line loopback had previously
+been detected.
+.It <ifname><ifnum>: down
+The keepalive facility detected the line being unresponsive.
+Keepalive must be explicitly requested by the lower layers in order to
+take place.
+.El
+.Sh SEE ALSO
+.Xr inet 4 ,
+.Xr intro 4 ,
+.Xr ppp 4 ,
+.Xr ifconfig 8 ,
+.Xr spppcontrol 8
+.Rs
+.%A W. Simpson, Editor
+.%T "The Point-to-Point Protocol (PPP)"
+.%O RFC 1661
+.Re
+.Rs
+.%A G. McGregor
+.%T "The PPP Internet Protocol Control Protocol (IPCP)"
+.%O RFC 1332
+.Re
+.Rs
+.%A B. Lloyd
+.%A W. Simpson
+.%T "PPP Authentication Protocols"
+.%O RFC 1334
+.Re
+.Rs
+.%A W. Simpson
+.%T "PPP Challenge Handshake Authentication Protocol (CHAP)"
+.%O RFC 1994
+.Re
+.Sh AUTHORS
+.An -nosplit
+The original implementation of
+.Nm
+was written in 1994 at Cronyx Ltd., Moscow by
+.An Serge Vakulenko Aq vak@cronyx.ru .
+.An J\(:org Wunsch
+.Aq joerg_wunsch@uriah.heep.sax.de
+rewrote a large part in 1997 in order
+to fully implement the state machine as described in RFC 1661, so it
+could also be used for dialup lines.
+He also wrote this man page.
+Serge later on wrote a basic implementation for PAP and CHAP, which
+served as the base for the current implementation, done again by
+.An J\(:org Wunsch .
+.Sh BUGS
+Many.
+.Pp
+Currently, only the
+.Em IPCP
+control protocol and
+.Xr ip 4
+network protocol is supported.
+More NCPs should be implemented, as well as other control protocols
+for authentication and link quality reporting.
+.Pp
+Negotiation loop avoidance is not fully implemented.
+If the negotiation
+does not converge, this can cause an endless loop.
+.Pp
+The various parameters that should be adjustable per RFC 1661 are
+currently hard-coded into the kernel, and should be made accessible
+through
+.Xr spppcontrol 8 .
+.Pp
+.Em Passive
+mode has not been tested extensively.
+.Pp
+Link-level compression protocols should be supported.
diff --git a/share/man/man4/ste.4 b/share/man/man4/ste.4
new file mode 100644
index 0000000..22982b1
--- /dev/null
+++ b/share/man/man4/ste.4
@@ -0,0 +1,204 @@
+.\" Copyright (c) 1997, 1998, 1999
+.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 24, 2009
+.Dt STE 4
+.Os
+.Sh NAME
+.Nm ste
+.Nd "Sundance Technologies ST201 Fast Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device ste"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ste_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Ethernet adapters and embedded
+controllers based on the Sundance Technologies ST201 PCI Fast
+Ethernet controller chip.
+.Pp
+The Sundance ST201 uses bus master DMA and is designed to be a
+3Com Etherlink XL workalike.
+It uses the same DMA descriptor
+structure and is very similar in operation, however its register
+layout is different.
+The ST201 has a 64-bit multicast hash filter
+and a single perfect filter entry for the station address.
+It supports both 10 and 100Mbps speeds in either full or half duplex
+using an MII transceiver.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to the
+.Pa /etc/rc.conf
+file.
+.It 10baseT/UTP
+Set 10Mbps operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.It 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It full-duplex
+Force full duplex operation.
+.It half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Sundance Technologies ST201 based Fast Ethernet
+adapters and embedded controllers including:
+.Pp
+.Bl -bullet -compact
+.It
+D-Link DFE-530TXS
+.It
+D-Link DFE-550TX
+.It
+D-Link DFE-580TX
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width "xxxxxx"
+.It Va dev.ste.%d.int_rx_mod
+Maximum number of time to delay RX interrupts.
+The valid range is 0 to 209712 in units of 1us, the default is
+150 (150us).
+The value 0 effectively disables the RX interrupt moderation.
+The resolution of timer is about 3.2us so finer tuning than
+3.2us wouldn't be available.
+The interface does not need to be brought down and up again before
+a change takes effect.
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ste%d: couldn't map ports/memory"
+A fatal initialization error has occurred.
+.It "ste%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "ste%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.It "ste%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.It "ste%d: no memory for tx list"
+The driver failed to allocate an mbuf for the transmitter ring when
+allocating a pad buffer or collapsing an mbuf chain into a cluster.
+.It "ste%d: chip is in D3 power state -- setting to D0"
+This message applies only to adapters which support power
+management.
+Some operating systems place the controller in low power
+mode when shutting down, and some PCI BIOSes fail to bring the chip
+out of this state before configuring it.
+The controller loses all of
+its PCI configuration in the D3 state, so if the BIOS does not set
+it back to full power mode in time, it will not be able to configure it
+correctly.
+The driver tries to detect this condition and bring
+the adapter back to the D0 (full power) state, but this may not be
+enough to return the driver to a fully operational condition.
+If
+you see this message at boot time and the driver fails to attach
+the device as a network interface, you will have to perform a second
+warm boot to have the device properly configured.
+.Pp
+Note that this condition only occurs when warm booting from another
+operating system.
+If you power down your system prior to booting
+.Fx ,
+the card should be configured correctly.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Rs
+.%T Sundance ST201 data sheet
+.%U http://www.sundanceti.com
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ee.columbia.edu .
diff --git a/share/man/man4/stf.4 b/share/man/man4/stf.4
new file mode 100644
index 0000000..5e210df
--- /dev/null
+++ b/share/man/man4/stf.4
@@ -0,0 +1,283 @@
+.\" $KAME: stf.4,v 1.35 2001/05/02 06:24:49 itojun Exp $
+.\"
+.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the project nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 28, 2012
+.Dt STF 4
+.Os
+.Sh NAME
+.Nm stf
+.Nd
+.Tn 6to4
+tunnel interface
+.Sh SYNOPSIS
+.Cd "device stf"
+.Sh DESCRIPTION
+The
+.Nm
+interface supports
+.Dq 6to4
+IPv6 in IPv4 encapsulation.
+It can tunnel IPv6 traffic over IPv4, as specified in
+.Li RFC3056 .
+.Pp
+For ordinary nodes in 6to4 site, you do not need
+.Nm
+interface.
+The
+.Nm
+interface is necessary for site border router
+(called
+.Dq 6to4 router
+in the specification).
+.Pp
+Each
+.Nm
+interface is created at runtime using interface cloning.
+This is
+most easily done with the
+.Xr ifconfig 8
+.Cm create
+command or using the
+.Va cloned_interfaces
+variable in
+.Xr rc.conf 5 .
+.Pp
+Due to the way 6to4 protocol is specified,
+.Nm
+interface requires certain configuration to work properly.
+Single
+(no more than 1)
+valid 6to4 address needs to be configured to the interface.
+.Dq A valid 6to4 address
+is an address which has the following properties.
+If any of the following properties are not satisfied,
+.Nm
+raises runtime error on packet transmission.
+Read the specification for more details.
+.Bl -bullet
+.It
+matches
+.Li 2002:xxyy:zzuu::/48
+where
+.Li xxyy:zzuu
+is a hexadecimal notation of an IPv4 address for the node.
+IPv4 address can be taken from any of interfaces your node has.
+Since the specification forbids the use of IPv4 private address,
+the address needs to be a global IPv4 address.
+.It
+Subnet identifier portion
+(48th to 63rd bit)
+and interface identifier portion
+(lower 64 bits)
+are properly filled to avoid address collisions.
+.El
+.Pp
+If you would like the node to behave as a relay router,
+the prefix length for the IPv6 interface address needs to be 16 so that
+the node would consider any 6to4 destination as
+.Dq on-link .
+If you would like to restrict 6to4 peers to be inside certain IPv4 prefix,
+you may want to configure IPv6 prefix length as
+.Dq 16 + IPv4 prefix length .
+.Nm
+interface will check the IPv4 source address on packets,
+if the IPv6 prefix length is larger than 16.
+.Pp
+.Nm
+can be configured to be ECN friendly.
+This can be configured by
+.Dv IFF_LINK1 .
+See
+.Xr gif 4
+for details.
+.Pp
+Please note that 6to4 specification is written as
+.Dq accept tunnelled packet from everyone
+tunnelling device.
+By enabling
+.Nm
+device, you are making it much easier for malicious parties to inject
+fabricated IPv6 packet to your node.
+Also, malicious party can inject an IPv6 packet with fabricated source address
+to make your node generate improper tunnelled packet.
+Administrators must take caution when enabling the interface.
+To prevent possible attacks,
+.Nm
+interface filters out the following packets.
+Note that the checks are no way complete:
+.Bl -bullet
+.It
+Packets with IPv4 unspecified address as outer IPv4 source/destination
+.Pq Li 0.0.0.0/8
+.It
+Packets with loopback address as outer IPv4 source/destination
+.Pq Li 127.0.0.0/8
+.It
+Packets with IPv4 multicast address as outer IPv4 source/destination
+.Pq Li 224.0.0.0/4
+.It
+Packets with limited broadcast address as outer IPv4 source/destination
+.Pq Li 255.0.0.0/8
+.It
+Packets with private address as outer IPv4 source/destination
+.Pq Li 10.0.0.0/8 , 172.16.0.0/12 , 192.168.0.0/16
+.It
+Packets with subnet broadcast address as outer IPv4 source/destination.
+The check is made against subnet broadcast addresses for
+all of the directly connected subnets.
+.It
+Packets that does not pass ingress filtering.
+Outer IPv4 source address must meet the IPv4 topology on the routing table.
+Ingress filter can be turned off by
+.Dv IFF_LINK2
+bit.
+.It
+The same set of rules are applied against the IPv4 address embedded into
+inner IPv6 address, if the IPv6 address matches 6to4 prefix.
+.El
+.Pp
+It is recommended to filter/audit
+incoming IPv4 packet with IP protocol number 41, as necessary.
+It is also recommended to filter/audit encapsulated IPv6 packets as well.
+You may also want to run normal ingress filter against inner IPv6 address
+to avoid spoofing.
+.Pp
+By setting the
+.Dv IFF_LINK0
+flag on the
+.Nm
+interface, it is possible to disable the input path,
+making the direct attacks from the outside impossible.
+Note, however, there are other security risks exist.
+If you wish to use the configuration,
+you must not advertise your 6to4 address to others.
+.\"
+.Sh SYSCTL VARIABLES
+The following
+.Xr sysctl 8
+variables can be used to control the behavior of the
+.Nm stf .
+The default value is shown next to each variable.
+.Bl -tag -width indent
+.It Va net.link.stf.permit_rfc1918 : No 0
+The RFC3056 requires the use of globally unique 32-bit IPv4
+addresses. This sysctl variable controls the behaviour of this
+requirement. When it set to not 0,
+.Nm stf
+allows the use of private IPv4 addresses described in the RFC1918.
+This may be useful for an Intranet environment or when some mechanisms
+of network address translation (NAT) are used.
+.El
+.Sh EXAMPLES
+Note that
+.Li 8504:0506
+is equal to
+.Li 133.4.5.6 ,
+written in hexadecimals.
+.Bd -literal
+# ifconfig ne0 inet 133.4.5.6 netmask 0xffffff00
+# ifconfig stf0 inet6 2002:8504:0506:0000:a00:5aff:fe38:6f86 \\
+ prefixlen 16 alias
+.Ed
+.Pp
+The following configuration accepts packets from IPv4 source
+.Li 9.1.0.0/16
+only.
+It emits 6to4 packet only for IPv6 destination 2002:0901::/32
+(IPv4 destination will match
+.Li 9.1.0.0/16 ) .
+.Bd -literal
+# ifconfig ne0 inet 9.1.2.3 netmask 0xffff0000
+# ifconfig stf0 inet6 2002:0901:0203:0000:a00:5aff:fe38:6f86 \\
+ prefixlen 32 alias
+.Ed
+.Pp
+The following configuration uses the
+.Nm
+interface as an output-only device.
+You need to have alternative IPv6 connectivity
+(other than 6to4)
+to use this configuration.
+For outbound traffic, you can reach other 6to4 networks efficiently via
+.Nm stf .
+For inbound traffic, you will not receive any 6to4-tunneled packets
+(less security drawbacks).
+Be careful not to advertise your 6to4 prefix to others
+.Pq Li 2002:8504:0506::/48 ,
+and not to use your 6to4 prefix as a source.
+.Bd -literal
+# ifconfig ne0 inet 133.4.5.6 netmask 0xffffff00
+# ifconfig stf0 inet6 2002:8504:0506:0000:a00:5aff:fe38:6f86 \\
+ prefixlen 16 alias deprecated link0
+# route add -inet6 2002:: -prefixlen 16 ::1
+# route change -inet6 2002:: -prefixlen 16 ::1 -ifp stf0
+.Ed
+.\"
+.Sh SEE ALSO
+.Xr gif 4 ,
+.Xr inet 4 ,
+.Xr inet6 4
+.Pp
+.Pa http://www.ipv6day.org/action.php?n=En.IPv6day
+.Rs
+.%A Brian Carpenter
+.%A Keith Moore
+.%T "Connection of IPv6 Domains via IPv4 Clouds"
+.%D February 2001
+.%R RFC
+.%N 3056
+.Re
+.Rs
+.%A Jun-ichiro itojun Hagino
+.%T "Possible abuse against IPv6 transition technologies"
+.%D July 2000
+.%N draft-itojun-ipv6-transition-abuse-01.txt
+.%O work in progress
+.Re
+.\"
+.Sh HISTORY
+The
+.Nm
+device first appeared in WIDE/KAME IPv6 stack.
+.\"
+.Sh BUGS
+No more than one
+.Nm
+interface is allowed for a node,
+and no more than one IPv6 interface address is allowed for an
+.Nm
+interface.
+It is to avoid source address selection conflicts
+between IPv6 layer and IPv4 layer,
+and to cope with ingress filtering rule on the other side.
+This is a feature to make
+.Nm
+work right for all occasions.
diff --git a/share/man/man4/stg.4 b/share/man/man4/stg.4
new file mode 100644
index 0000000..1d088b0
--- /dev/null
+++ b/share/man/man4/stg.4
@@ -0,0 +1,110 @@
+.\"
+.\" Copyright (c) 2003 Bob Bishop
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 8, 2004
+.Dt STG 4
+.Os
+.Sh NAME
+.Nm stg
+.Nd driver for Future Domain based SCSI controllers
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device stg"
+.Pp
+For one or more ISA cards:
+.Cd "device isa"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.stg.0.at="isa"
+.Pp
+For one or more PCI cards:
+.Cd "device pci"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+stg_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for ISA, PCCARD and PCI controllers based on
+Future Domain SCSI controller chips including the TMC-16C30, 16C50 and 32C60.
+.Sh HARDWARE
+Controllers supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+Adaptec 2920/A
+.It
+Future Domain SCSI2GO
+.It
+Future Domain TMC-18XX/3260
+.It
+IBM SCSI PCMCIA Card
+.It
+ICM PSC-2401 SCSI
+.It
+MELCO IFC-SC
+.It
+RATOC REX-5536, REX-5536AM, REX-5536M, REX-9836A
+.El
+.Pp
+Note that the Adaptec 2920C is supported by the
+.Xr ahc 4
+driver.
+.Sh SEE ALSO
+.Xr ahc 4 ,
+.Xr cd 4 ,
+.Xr ch 4 ,
+.Xr da 4 ,
+.Xr intro 4 ,
+.Xr sa 4 ,
+.Xr scsi 4
+.Sh HISTORY
+The
+.Nm
+device driver has been developed for
+.Nx Ns / Ns Tn pc98
+and ported for
+.Fx .
+It first appeared in
+.Fx 2.2
+with PAO and merged in
+.Fx 4.2 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Naofumi HONDA .
diff --git a/share/man/man4/stge.4 b/share/man/man4/stge.4
new file mode 100644
index 0000000..bfcaab0
--- /dev/null
+++ b/share/man/man4/stge.4
@@ -0,0 +1,202 @@
+.\" $NetBSD: stge.4,v 1.7 2003/02/14 15:20:20 grant Exp $
+.\"
+.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Jason R. Thorpe.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 23, 2010
+.Dt STGE 4
+.Os
+.Sh NAME
+.Nm stge
+.Nd Sundance/Tamarack TC9021 Gigabit Ethernet adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device stge"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_stge_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for various NICs based on the
+Sundance/Tamarack TC9021 Gigabit Ethernet controller chip.
+.Pp
+The Sundance/Tamarack TC9021 is found on the D-Link DGE-550T
+and the Antares Microsystems Gigabit Ethernet board.
+It uses an external PHY or an external 10-bit interface.
+.Pp
+All NICs supported by the
+.Nm
+driver have TCP/UDP/IP checksum offload for both receive and
+transmit, hardware VLAN tag stripping/insertion features, and
+receive interrupt moderation mechanism as well as a 64-bit
+multicast hash filter.
+The Sundance/Tamarack TC9021 supports TBI (ten bit interface)
+and GMII transceivers, which means it can be used with either
+copper or 1000baseX fiber applications.
+.Pp
+The Sundance/Tamarack TC9021 also supports jumbo frames, which can be
+configured via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit jumbo frames.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 1000baseTX
+Set 1000baseTX operation over twisted pair.
+The Sundance/Tamarack supports 1000Mbps in
+.Cm autoselect
+mode only.
+.\" .It Cm 1000baseSX
+.\" Set 1000Mbps (Gigabit Ethernet) operation.
+.\" Both
+.\" .Cm full-duplex
+.\" and
+.\" .Cm half-duplex
+.\" modes are supported.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver provides support for various NICs based on the Sundance/Tamarack
+TC9021 based Gigabit Ethernet controller chips, including:
+.Pp
+.Bl -bullet -compact
+.It
+Antares Microsystems Gigabit Ethernet
+.It
+ASUS NX1101 Gigabit Ethernet
+.It
+D-Link DL-4000 Gigabit Ethernet
+.It
+IC Plus IP1000A Gigabit Ethernet
+.It
+Sundance ST-2021 Gigabit Ethernet
+.It
+Sundance ST-2023 Gigabit Ethernet
+.It
+Sundance TC9021 Gigabit Ethernet
+.It
+Tamarack TC9021 Gigabit Ethernet
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width indent
+.It Va dev.stge.%d.rxint_nframe
+Number of frames between RxDMAComplete interrupts.
+The accepted range is 1 to 255, default value is 8 frames.
+The interface has to be brought down and up again before a change takes effect.
+.It Va dev.stge.%d.rxint_dmawait
+Maximum amount of time to wait in 1us increments before issuing
+an Rx interrupt if the number of frames received is less than
+.Va rxint_nframe .
+The accepted range is 0 to 4194, default value is 30 microseconds.
+The interface has to be brought down and up again before a change takes effect.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver was ported from
+.Nx
+and first appeared in
+.Fx 6.2 .
+The
+.Nx
+version was written by
+.An Jason R. Thorpe
+.Aq thorpej@NetBSD.org .
+.Sh AUTHORS
+The
+.Nm
+driver was ported by
+.An Pyun YongHyeon
+.Aq yongari@FreeBSD.org .
diff --git a/share/man/man4/sym.4 b/share/man/man4/sym.4
new file mode 100644
index 0000000..205fe86
--- /dev/null
+++ b/share/man/man4/sym.4
@@ -0,0 +1,382 @@
+.\"
+.\" Device driver optimized for the Symbios/LSI 53C896/53C895A/53C1010
+.\" PCI SCSI controllers.
+.\"
+.\" Copyright (C) 1999-2000 Gerard Roudier <groudier@club-internet.fr>
+.\"
+.\" This driver also supports the following Symbios/LSI PCI SCSI chips:
+.\" 53C810A, 53C825A, 53C860, 53C875, 53C876, 53C885, 53C895,
+.\" 53C810, 53C815, 53C825 and the 53C1510D is 53C8XX mode.
+.\"
+.\"
+.\" This driver for FreeBSD-CAM is derived from the Linux sym53c8xx driver.
+.\" Copyright (C) 1998-1999 Gerard Roudier
+.\"
+.\" The sym53c8xx driver is derived from the ncr53c8xx driver that had been
+.\" a port of the FreeBSD ncr driver to Linux-1.2.13.
+.\"
+.\" The original ncr driver has been written for 386bsd and FreeBSD by
+.\" Wolfgang Stanglmeier <wolf@cologne.de>
+.\" Stefan Esser <se@mi.Uni-Koeln.de>
+.\" Copyright (C) 1994 Wolfgang Stanglmeier
+.\"
+.\" The initialization code, and part of the code that addresses
+.\" FreeBSD-CAM services is based on the aic7xxx driver for FreeBSD-CAM
+.\" written by Justin T. Gibbs.
+.\"
+.\" Other major contributions:
+.\"
+.\" NVRAM detection and reading.
+.\" Copyright (C) 1997 Richard Waltham <dormouse@farsrobt.demon.co.uk>
+.\"
+.\" ----------------------------------------------------------------------------
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 19, 2004
+.Dt SYM 4
+.Os
+.Sh NAME
+.Nm sym
+.Nd NCR/Symbios/LSI Logic 53C8XX PCI SCSI host adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device scbus"
+.Cd "device sym"
+.Pp
+To disable PCI parity checking (needed for broken bridges):
+.Cd "options SYM_SETUP_PCI_PARITY=<boolean>"
+.Pp
+To control driver probing against HVD buses:
+.Cd "options SYM_SETUP_SCSI_DIFF=<bit combination>"
+.Pp
+To control chip attachment balancing between the ncr driver and this driver:
+.Cd "options SYM_SETUP_LP_PROBE_MAP=<bit combination>"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+sym_load="YES"
+.Ed
+.Sh DESCRIPTION
+This driver provides support for the Symbios/LSI Logic 53C8XX
+PCI SCSI controllers.
+.Pp
+Driver features include support for wide SCSI busses and fast10, fast20,
+fast40 and fast80-dt synchronous data transfers depending on controller
+capabilities.
+It also provides generic SCSI features such as tagged command
+queueing and auto-request sense.
+This driver is configured by default
+for a maximum of 446 outstanding commands per bus, 8 LUNs per target
+and 64 tagged tasks per LUN.
+These numbers are not so much limited by design
+as they are considered reasonable values for current SCSI technology.
+These values can be increased by changing appropriate
+constants in driver header files (not recommended).
+.Pp
+This driver supports the entire Symbios 53C8XX family of PCI SCSI
+controllers.
+It also offers the advantage of architectural improvements available
+only with newer chips.
+.Pp
+.Nm
+notably handles phase mismatch from SCRIPTS for the 53C896, 53C895A,
+and 53C1010 cores.
+As a result, it guarantees that no more than 1 interrupt
+per IO completion is delivered to the CPU, and that the SCRIPTS processor
+is never stalled waiting for CPU attention in normal situations.
+.Pp
+.Nm
+also uses LOAD/STORE SCRIPTS instructions for chips that support it.
+Only the early 810, 815 and 825 NCR chips do not support LOAD/STORE.
+Use of LOAD/STORE instead of MEMORY MOVE allows SCRIPTS to access IO
+registers internal to the chip (no external PCI cycles).
+As a result, the driver guarantees that no PCI self-mastering will occur
+for chips that support LOAD/STORE.
+.Pp
+LOAD/STORE instructions are also faster than MEMORY MOVE because
+they do not involve the chip DMA FIFO and are coded on 2 DWORDs
+instead of 3.
+.Pp
+For the early NCR 810, 815 and 825 chips, the driver uses a separate
+SCRIPTS set that uses MEMORY MOVE instructions for data movements.
+This is because LOAD/STORE are not supported by these chips.
+.Pp
+HVD/LVD capable controllers (895, 895A, 896, and 897) report
+the actual bus mode in the STEST4 chip IO registers.
+This feature
+allows the driver to safely probe against bus mode and to set up the chip
+accordingly.
+By default the driver only supports HVD for these chips.
+For other chips that can support HVD but not LVD, the driver has to probe
+implementation dependent registers (GPIO) in order to detect HVD bus mode.
+Only HVD implementations that conform with Symbios Logic recommendations can
+be detected by the driver.
+When the
+.Ar SYM_SETUP_SCSI_DIFF
+kernel option is assigned
+a value of 1, the driver will also probe against HVD for 825a, 875, 876 and
+885 chips, assuming Symbios Logic compatible implementation of HVD.
+.Pp
+When the
+.Ar SYM_SETUP_PCI_PARITY
+is assigned a value of 0, the
+driver will not enable PCI parity checking for 53C8XX devices.
+PCI parity
+checking should not be an option for PCI SCSI controllers, but some
+systems have been reported to fail using 53C8XX chips, due to spurious or
+permanent PCI parity errors detected.
+This option is supplied for
+convenience but it is neither recommended nor supported.
+.Pp
+The generic
+.Xr ncr 4
+driver also supports SYM53C8XX based PCI SCSI controllers,
+except for the SYM53C1010, which is only supported by the
+.Nm
+driver.
+.Pp
+By default, when both the
+.Xr ncr 4
+and
+.Nm
+drivers are configured, the
+.Nm
+driver takes precedence over the
+.Xr ncr 4
+driver.
+The user can indicate a balancing of chip types between the two drivers
+by defining the
+.Ar SYM_SETUP_LP_PROBE_MAP
+kernel configuration option as follows:
+.Bl -column "0x40"
+.It Em "Bit Devices to be attached by ncr instead"
+.It "0x01 53C810a, 53C860"
+.It "0x02 53C825a, 53C875, 53C876, 53C885, 53C895"
+.It "0x04 53C895a, 53C896, 53C897, 53C1510d"
+.It "0x40 53C810, 53C815, 53C825"
+.El
+.Pp
+For example, if
+.Ar SYM_SETUP_LP_PROBE_MAP
+is supplied with the value 0x41, the
+.Xr ncr 4
+driver will attach to 53C810, 53C815, 53C825, 53C810a, and 53C860 based
+controllers,
+and the
+.Nm
+driver will attach to all other 53C8XX based controllers.
+.Pp
+When only the
+.Nm
+driver is configured, the
+.Ar SYM_SETUP_LP_PROBE_MAP
+option has no effect.
+Thus, in this case, the
+.Nm
+driver will attach all 53C8XX based controllers present in the system.
+.Pp
+This driver offers other options
+that are not currently exported to the user.
+They are defined and documented in the
+.Pa sym_conf.h
+driver file.
+Changing these options is not recommended unless absolutely necessary.
+Some of these
+options are planned to be exported through
+.Xr sysctl 3
+or an equivalent mechanism
+in a future driver releases and therefore,
+no compatibility is guaranteed.
+.Pp
+At initialization, the driver tries to detect and read user settings from
+controller NVRAM.
+The Symbios/Logic NVRAM layout and the Tekram NVRAM
+layout are currently supported.
+If the reading of the NVRAM succeeds, the
+following settings are taken into account and reported to CAM:
+.Bl -column "SCSI parity checking" "Symbios"
+.It Em "Host settings Symbios Tekram"
+.It "SCSI parity checking Y N"
+.It "Host SCSI ident Y Y"
+.It "Verbose messages Y N"
+.It "Scan targets hi-lo Y N"
+.It "Avoid SCSI bus reset Y N"
+.El
+.Bl -column "Synchronous period" "Symbios"
+.It Em "Device settings Symbios Tekram"
+.It "Synchronous period Y Y"
+.It "SCSI bus width Y Y"
+.It "Queue tag enable Y Y"
+.It "Number of tags NA Y"
+.It "Disconnect enable Y Y"
+.It "Scan at boot time Y N"
+.It "Scan LUN Y N"
+.El
+.Pp
+Devices that are configured as disabled for 'scan' in the NVRAM are not
+reported to CAM at system start-up.
+They can be discovered later using
+the
+.Ql camcontrol rescan
+command.
+.Pp
+The table below summarizes the main features and capabilities of the
+NCR/Symbios/LSI Logic 53C8XX family of PCI SCSI controllers.
+.Bl -column sym53c1510d "80MHz" "Width" "SRAM" "PCI64"
+.It Em "Chip Sync Width SRAM PCI64 Supported"
+.It "sym53c810 10MHz 8Bit N N Y"
+.It "sym53c810a 10MHz 8Bit N N Y"
+.It "sym53c815 10MHz 8Bit N N Y"
+.It "sym53c825 10MHz 16Bit N N Y"
+.It "sym53c825a 10MHz 16Bit 4KB N Y"
+.It "sym53c860 20MHz 8Bit N N Y"
+.It "sym53c875 20MHz 16Bit 4KB N Y"
+.It "sym53c876 20MHz 16Bit 4KB N Y"
+.It "sym53c885 20MHz 16Bit 4KB N Y"
+.It "sym53c895 40MHz 16Bit 4KB N Y"
+.It "sym53c895A 40MHz 16Bit 8KB N Y"
+.It "sym53c896 40MHz 16Bit 8KB Y Y"
+.It "sym53c897 40MHz 16Bit 8KB Y Y"
+.It "sym53c1510D 40MHz 16Bit 4KB Y Y"
+.It "sym53c1010 80MHz 16Bit 8KB Y Y"
+.El
+.Sh HARDWARE
+The
+.Nm
+driver provides support for the following Symbios/LSI Logic PCI SCSI
+controllers:
+.Pp
+.Bl -bullet -compact
+.It
+.Tn 53C810
+.It
+.Tn 53C810A
+.It
+.Tn 53C815
+.It
+.Tn 53C825
+.It
+.Tn 53C825A
+.It
+.Tn 53C860
+.It
+.Tn 53C875
+.It
+.Tn 53C876
+.It
+.Tn 53C895
+.It
+.Tn 53C895A
+.It
+.Tn 53C896
+.It
+.Tn 53C897
+.It
+.Tn 53C1000
+.It
+.Tn 53C1000R
+.It
+.Tn 53C1010-33
+.It
+.Tn 53C1010-66
+.It
+.Tn 53C1510D
+.El
+.Pp
+The SCSI controllers supported by
+.Nm
+can be either embedded on a motherboard, or on
+one of the following add-on boards:
+.Pp
+.Bl -bullet -compact
+.It
+ASUS SC-200, SC-896
+.It
+Data Technology DTC3130 (all variants)
+.It
+DawiControl DC2976UW
+.It
+Diamond FirePort (all)
+.It
+I-O DATA SC-UPCI (PC-98)
+.It
+Logitec LHA-521UA (PC-98)
+.It
+NCR cards (all)
+.It
+Symbios cards (all)
+.It
+Tekram DC390W, 390U, 390F, 390U2B, 390U2W, 390U3D, and 390U3W
+.It
+Tyan S1365
+.El
+.Sh MISC
+The DEC KZPCA-AA is a rebadged SYM8952U.
+.Sh SEE ALSO
+.Xr cd 4 ,
+.Xr da 4 ,
+.Xr ncr 4 ,
+.Xr sa 4 ,
+.Xr scsi 4 ,
+.Xr camcontrol 8
+.Sh HISTORY
+The
+.Nm
+driver appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Gerard Roudier
+and is derived from the
+Linux sym53c8xx driver from the same author.
+The sym53c8xx driver is derived from the ncr53c8xx driver,
+which was ported from the
+.Fx
+.Xr ncr 4
+driver to Linux-1.2.13.
+The original
+.Xr ncr 4
+driver was written for
+.Bx 386
+and
+.Fx
+by
+.An Wolfgang Stanglmeier
+and
+.An Stefan Esser .
+.Sh BUGS
+No known bugs.
diff --git a/share/man/man4/syncache.4 b/share/man/man4/syncache.4
new file mode 100644
index 0000000..45dcf2c
--- /dev/null
+++ b/share/man/man4/syncache.4
@@ -0,0 +1,215 @@
+.\"
+.\" syncache - TCP SYN caching to handle SYN flood DoS.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 22, 2008
+.Dt SYNCACHE 4
+.Os
+.Sh NAME
+.Nm syncache , syncookies
+.Nd
+.Xr sysctl 8
+MIBs for controlling TCP SYN caching
+.Sh SYNOPSIS
+.Bl -item -compact
+.It
+.Nm sysctl Cm net.inet.tcp.syncookies
+.It
+.Nm sysctl Cm net.inet.tcp.syncookies_only
+.El
+.Pp
+.Bl -item -compact
+.It
+.Nm sysctl Cm net.inet.tcp.syncache.hashsize
+.It
+.Nm sysctl Cm net.inet.tcp.syncache.bucketlimit
+.It
+.Nm sysctl Cm net.inet.tcp.syncache.cachelimit
+.It
+.Nm sysctl Cm net.inet.tcp.syncache.rexmtlimit
+.It
+.Nm sysctl Cm net.inet.tcp.syncache.count
+.El
+.Sh DESCRIPTION
+The
+.Nm
+.Xr sysctl 8
+MIB is used to control the TCP SYN caching in the system, which
+is intended to handle SYN flood Denial of Service attacks.
+.Pp
+When a TCP SYN segment is received on a port corresponding to a listen
+socket, an entry is made in the
+.Nm ,
+and a SYN,ACK segment is
+returned to the peer.
+The
+.Nm
+entry holds the TCP options from the initial SYN,
+enough state to perform a SYN,ACK retransmission, and takes up less
+space than a TCP control block endpoint.
+An incoming segment which contains an ACK for the SYN,ACK
+and matches a
+.Nm
+entry will cause the system to create a TCP control block
+with the options stored in the
+.Nm
+entry, which is then released.
+.Pp
+The
+.Nm
+protects the system from SYN flood DoS attacks by minimizing
+the amount of state kept on the server, and by limiting the overall size
+of the
+.Nm .
+.Pp
+.Nm Syncookies
+provides a way to virtually expand the size of the
+.Nm
+by keeping state regarding the initial SYN in the network.
+Enabling
+.Nm syncookies
+sends a cryptographic value in the SYN,ACK reply to
+the client machine, which is then returned in the client's ACK.
+If the corresponding entry is not found in the
+.Nm ,
+but the value
+passes specific security checks, the connection will be accepted.
+This is only used if the
+.Nm
+is unable to handle the volume of
+incoming connections, and a prior entry has been evicted from the cache.
+.Pp
+.Nm Syncookies
+have a certain number of disadvantages that a paranoid
+administrator may wish to take note of.
+Since the TCP options from the initial SYN are not saved, they are not
+applied to the connection, precluding use of features like window scale,
+timestamps, or exact MSS sizing.
+As the returning ACK establishes the connection, it may be possible for
+an attacker to ACK flood a machine in an attempt to create a connection.
+While steps have been taken to mitigate this risk, this may provide a way
+to bypass firewalls which filter incoming segments with the SYN bit set.
+.Pp
+To disable the
+.Nm syncache
+and run only with
+.Nm syncookies ,
+set
+.Va net.inet.tcp.syncookies_only
+to 1.
+.Pp
+The
+.Nm
+implements a number of variables in
+the
+.Va net.inet.tcp.syncache
+branch of the
+.Xr sysctl 3
+MIB.
+Several of these may be tuned by setting the corresponding
+variable in the
+.Xr loader 8 .
+.Bl -tag -width ".Va bucketlimit"
+.It Va hashsize
+Size of the
+.Nm
+hash table, must be a power of 2.
+Read-only, tunable via
+.Xr loader 8 .
+.It Va bucketlimit
+Limit on the number of entries permitted in each bucket of the hash table.
+This should be left at a low value to minimize search time.
+Read-only, tunable via
+.Xr loader 8 .
+.It Va cachelimit
+Limit on the total number of entries in the
+.Nm .
+Defaults to
+.Va ( hashsize No \(mu Va bucketlimit ) ,
+may be set lower to minimize memory
+consumption.
+Read-only, tunable via
+.Xr loader 8 .
+.It Va rexmtlimit
+Maximum number of times a SYN,ACK is retransmitted before being discarded.
+The default of 3 retransmits corresponds to a 45 second timeout, this value
+may be increased depending on the RTT to client machines.
+Tunable via
+.Xr sysctl 3 .
+.It Va count
+Number of entries present in the
+.Nm
+(read-only).
+.El
+.Pp
+Statistics on the performance of the
+.Nm
+may be obtained via
+.Xr netstat 1 ,
+which provides the following counts:
+.Bl -tag -width ".Li cookies received"
+.It Li "syncache entries added"
+Entries successfully inserted in the
+.Nm .
+.It Li retransmitted
+SYN,ACK retransmissions due to a timeout expiring.
+.It Li dupsyn
+Incoming SYN segment matching an existing entry.
+.It Li dropped
+SYNs dropped because SYN,ACK could not be sent.
+.It Li completed
+Successfully completed connections.
+.It Li "bucket overflow"
+Entries dropped for exceeding per-bucket size.
+.It Li "cache overflow"
+Entries dropped for exceeding overall cache size.
+.It Li reset
+RST segment received.
+.It Li stale
+Entries dropped due to maximum retransmissions or listen socket disappearance.
+.It Li aborted
+New socket allocation failures.
+.It Li badack
+Entries dropped due to bad ACK reply.
+.It Li unreach
+Entries dropped due to ICMP unreachable messages.
+.It Li "zone failures"
+Failures to allocate new
+.Nm
+entry.
+.It Li "cookies received"
+Connections created from segment containing ACK.
+.El
+.Sh SEE ALSO
+.Xr netstat 1 ,
+.Xr tcp 4 ,
+.Xr loader 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The existing
+.Nm
+implementation
+first appeared in
+.Fx 4.5 .
+The original concept of a
+.Nm
+originally appeared in
+.Bsx ,
+and was later modified by
+.Nx ,
+then further extended here.
+.Sh AUTHORS
+The
+.Nm
+code and manual page were written by
+.An Jonathan Lemon Aq jlemon@FreeBSD.org .
diff --git a/share/man/man4/syncer.4 b/share/man/man4/syncer.4
new file mode 100644
index 0000000..30b38e4
--- /dev/null
+++ b/share/man/man4/syncer.4
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2000 Sheldon Hearn <sheldonh@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 14, 2000
+.Dt SYNCER 4
+.Os
+.Sh NAME
+.Nm syncer
+.Nd file system synchronizer kernel process
+.Sh SYNOPSIS
+.Nm
+.Sh DESCRIPTION
+The
+.Nm
+kernel process helps protect the integrity of disk volumes
+by flushing volatile cached file system data to disk.
+.Pp
+The kernel places all
+.Xr vnode 9 Ns 's
+in a number of queues.
+The
+.Nm
+process works through the queues
+in a round-robin fashion,
+usually processing one queue per second.
+For each
+.Xr vnode 9
+on that queue,
+the
+.Nm
+process forces a write out to disk of its dirty buffers.
+.Pp
+The usual delay between the time buffers are dirtied
+and the time they are synced
+is controlled by the following
+.Xr sysctl 8
+tunable variables:
+.Bl -column "filedelayXXXX" "DefaultXX" "DescriptionXX"
+.It Em Variable Ta Em Default Ta Em Description
+.It Va kern.filedelay Ta 30 Ta "time to delay syncing files"
+.It Va kern.dirdelay Ta 29 Ta "time to delay syncing directories"
+.It Va kern.metadelay Ta 28 Ta "time to delay syncing metadata"
+.El
+.Sh SEE ALSO
+.Xr sync 2 ,
+.Xr fsck 8 ,
+.Xr sync 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+process is a descendant of the
+.Sq update
+command, which appeared in
+.At v6 ,
+and was usually started by
+.Pa /etc/rc
+when the system went multi-user.
+A kernel initiated
+.Sq update
+process first appeared in
+.Fx 2.0 .
+.Sh BUGS
+It is possible on some systems that a
+.Xr sync 2
+occurring simultaneously with a crash may cause
+file system damage.
+See
+.Xr fsck 8 .
diff --git a/share/man/man4/syscons.4 b/share/man/man4/syscons.4
new file mode 100644
index 0000000..d9400c9
--- /dev/null
+++ b/share/man/man4/syscons.4
@@ -0,0 +1,565 @@
+.\"
+.\" Copyright (c) 1999
+.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd September 11, 2009
+.Dt SYSCONS 4
+.Os
+.Sh NAME
+.Nm syscons ,
+.Nm sc
+.Nd the console driver
+.Sh SYNOPSIS
+.Cd "options MAXCONS=N"
+.Cd "options SC_ALT_MOUSE_IMAGE"
+.Cd "options SC_CUT_SEPCHARS=_characters_"
+.Cd "options SC_CUT_SPACES2TABS"
+.Cd "options SC_DISABLE_KDBKEY"
+.Cd "options SC_DISABLE_REBOOT"
+.Cd "options SC_HISTORY_SIZE=N"
+.Cd "options SC_MOUSE_CHAR=C"
+.Cd "options SC_NO_CUTPASTE"
+.Cd "options SC_NO_FONT_LOADING"
+.Cd "options SC_NO_HISTORY"
+.Cd "options SC_NO_PALETTE_LOADING"
+.Cd "options SC_NO_SUSPEND_VTYSWITCH"
+.Cd "options SC_NO_SYSMOUSE"
+.Cd "options SC_PIXEL_MODE"
+.Cd "options SC_TWOBUTTON_MOUSE"
+.Cd "options SC_NORM_ATTR=_attribute_"
+.Cd "options SC_NORM_REV_ATTR=_attribute_"
+.Cd "options SC_KERNEL_CONS_ATTR=_attribute_"
+.Cd "options SC_KERNEL_CONS_REV_ATTR=_attribute_"
+.Cd "options SC_DFLT_FONT"
+.Cd "makeoptions SC_DFLT_FONT=_font_name_"
+.Cd "device sc"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.sc.0.at="isa"
+.Cd hint.sc.0.vesa_mode=0x103
+.Sh DESCRIPTION
+The
+.Nm
+driver provides multiple virtual terminals.
+It resembles the SCO color console driver.
+.Pp
+The
+.Nm
+driver is implemented on top of the keyboard driver
+.Pq Xr atkbd 4
+and the video card driver
+.Pq Xr vga 4
+and so requires both of them to be configured in the system.
+.Pp
+There can be only one
+.Nm
+device defined in the system.
+.Ss Virtual Terminals
+The
+.Nm
+driver provides multiple virtual terminals which appear as if they were
+separate terminals.
+One virtual terminal is considered current and exclusively
+occupies the screen and the keyboard; the other virtual terminals
+are placed in the background.
+.Pp
+In order to use virtual terminals, they must be individually
+marked ``on'' in
+.Pa /etc/ttys
+so that
+.Xr getty 8
+will recognize them to be active and run
+.Xr login 1
+to let the user log in to the system.
+By default, only the first eight virtual terminals are activated in
+.Pa /etc/ttys .
+.Pp
+You press the
+.Dv Alt
+key and a switch key to switch between
+virtual terminals.
+The following table summarizes the correspondence between the switch
+key and the virtual terminal.
+.Bd -literal -offset indent
+Alt-F1 ttyv0 Alt-F7 ttyv6 Shift-Alt-F1 ttyva
+Alt-F2 ttyv1 Alt-F8 ttyv7 Shift-Alt-F2 ttyvb
+Alt-F3 ttyv2 Alt-F9 ttyv8 Shift-Alt-F3 ttyvc
+Alt-F4 ttyv3 Alt-F10 ttyv9 Shift-Alt-F4 ttyvd
+Alt-F5 ttyv4 Alt-F11 ttyva Shift-Alt-F5 ttyve
+Alt-F6 ttyv5 Alt-F12 ttyvb Shift-Alt-F6 ttyvf
+.Ed
+.Pp
+You can also use the ``nscr'' key (usually the
+.Dv PrintScreen
+key on the AT Enhanced keyboard) to cycle available virtual terminals.
+.Pp
+The default number of available virtual terminals is 16.
+This can be changed with the kernel configuration option
+.Dv MAXCONS
+(see below).
+.Pp
+Note that the X server usually requires a virtual terminal for display
+purposes, so at least one terminal must be left unused by
+.Xr getty 8
+so that it can be used by the X server.
+.Ss Key Definitions and Function Key Strings
+The
+.Nm
+driver, in conjunction with the keyboard driver, allows the user
+to change key definitions and function key strings.
+The
+.Xr kbdcontrol 1
+command will load a key definition file (known as ``keymap'' file),
+dump the current keymap, and assign a string to a function key.
+See
+.Xr keyboard 4
+and
+.Xr kbdmap 5
+for the keymap file.
+.Pp
+You may want to set the
+.Ar keymap
+variable in
+.Pa /etc/rc.conf.local
+to the desired keymap file so that it will be automatically loaded
+when the system starts up.
+.Ss Software Font
+For most modern video cards, e.g., VGA, the
+.Nm
+driver and the video card driver allow the user to change
+the font used on the screen.
+The
+.Xr vidcontrol 1
+command can be used to load a font file from
+.Pa /usr/share/syscons/fonts .
+.Pp
+The font comes in various sizes: 8x8, 8x14 and 8x16.
+The 8x16 font is typically used for the VGA card in the
+80-column-by-25-line mode.
+Other video modes may require different font sizes.
+It is better to always load all three sizes of the same font.
+.Pp
+You may set
+.Ar font8x8 ,
+.Ar font8x14
+and
+.Ar font8x16
+variables in
+.Pa /etc/rc.conf
+to the desired font files so that they will be automatically loaded
+when the system starts up.
+.Pp
+Optionally you can specify a particular font file as the default.
+See the
+.Dv SC_DFLT_FONT
+option below.
+.Ss Screen Map
+If your video card does not support software fonts, you may still be able
+to achieve a similar effect by re-mapping the font built into your video card.
+Use
+.Xr vidcontrol 1
+to load a screen map file which defines the mapping between character codes.
+.Ss Mouse Support and Copy-and-Paste
+You can use your mouse to copy text on the screen and paste it as if
+it was typed by hand.
+You must be running the mouse daemon
+.Xr moused 8
+and enable the mouse cursor in the virtual terminal via
+.Xr vidcontrol 1 .
+.Pp
+Pressing mouse button 1 (usually the left button) will start selection.
+Releasing button 1 will end the selection process.
+The selected text will be marked by inverting foreground and
+background colors.
+You can press button 3 (usually the right button) to extend
+the selected region.
+The selected text is placed in the copy buffer and can be pasted
+at the cursor position by pressing button 2 (usually the
+middle button) as many times as you like.
+.Pp
+If your mouse has only two buttons, you may want to use the
+.Dv SC_TWOBUTTON_MOUSE
+option below to make the right button to paste the text.
+Alternatively you can make the mouse daemon
+emulate the middle button.
+See the man page for
+.Xr moused 8
+for more details.
+.Ss Back Scrolling
+The
+.Nm
+driver allows the user to browse the output which has ``scrolled off''
+the top of the screen.
+.Pp
+Press the ``slock'' key (usually
+.Dv ScrllLock
+/
+.Dv Scroll Lock
+or
+.Dv Pause
+on many keyboards) and the terminal is
+in the ``scrollback'' mode.
+It is indicated by the
+.Dv Scroll Lock
+LED.
+Use the arrow keys, the
+.Dv Page Up/Down
+keys and the
+.Dv Home/End
+keys to scroll buffered terminal output.
+Press the ``slock'' key again to get back to the normal terminal mode.
+.Pp
+The size of the scrollback buffer can be set by the
+.Dv SC_HISTORY_SIZE
+option described below.
+.Ss Screen Saver
+The
+.Nm
+driver can be made to put up the screen saver if the current
+virtual terminal is idle, that is, the user is not typing
+on the keyboard nor moving the mouse.
+See
+.Xr splash 4
+and
+.Xr vidcontrol 1
+for more details.
+.Sh DRIVER CONFIGURATION
+.Ss Kernel Configuration Options
+The following kernel configuration options control the
+.Nm
+driver.
+.Bl -tag -width MOUSE
+.It Dv MAXCONS=N
+This option sets the number of virtual terminals to
+.Fa N .
+The default value is 16.
+.It Dv SC_ALT_MOUSE_IMAGE
+This option selects the alternative way of displaying the mouse cursor
+in the virtual terminal.
+It may be expensive for some video cards to draw the arrow-shaped
+cursor, and you may want to try this option.
+However, the appearance of the alternative mouse cursor may not be
+very appealing.
+Note that if you use the
+.Dv SC_NO_FONT_LOADING
+option then you must also use this option if you wish to be able to use
+the mouse.
+.It Dv SC_CUT_SEPCHARS=_characters_
+This options specifies characters that will be looked for when the
+driver searches for words boundaries when doing cut operation.
+By default, its value is
+.Qq Li \ex20
+\(em a space character.
+.It Dv SC_CUT_SPACES2TABS
+This options instructs the driver to convert leading spaces into tabs
+when copying data into cut buffer.
+This might be useful to preserve
+indentation when copying tab-indented text.
+.It Dv SC_DISABLE_KDBKEY
+This option disables the ``debug'' key combination (by default, it is
+.Dv Alt-Esc ,
+or
+.Dv Ctl-PrintScreen ) .
+It will prevent users from
+entering the kernel debugger (KDB) by pressing the key combination.
+KDB will still be invoked when the kernel panics or hits a break point
+if it is included in the kernel.
+If this option is not defined, this behavior may be controlled at runtime
+by the
+.Xr sysctl 8
+variable
+.Va hw.syscons.kbd_debug .
+.It Dv SC_DISABLE_REBOOT
+This option disables the ``reboot'' key (by default, it is
+.Dv Ctl-Alt-Del ) ,
+so that the casual user may not accidentally reboot the system.
+If this option is not defined, this behavior may be controlled at runtime
+by the
+.Xr sysctl 8
+variable
+.Va hw.syscons.kbd_reboot .
+.It Dv SC_HISTORY_SIZE=N
+Sets the size of back scroll buffer to
+.Fa N
+lines.
+The default value is 100.
+.It Dv SC_MOUSE_CHAR=C
+Unless the
+.Dv SC_ALT_MOUSE_IMAGE
+option above is specified, the
+.Nm
+driver reserves four consecutive character codes in order to display the
+mouse cursor in the virtual terminals in some systems.
+This option specifies the first character code to
+.Fa C
+to be used for this purpose.
+The default value is 0xd0.
+A good candidate is 0x03.
+.It Dv SC_PIXEL_MODE
+Adds support for pixel (raster) mode console.
+This mode is useful on some laptop computers, but less so on
+most other systems, and it adds substantial amount of code to syscons.
+If this option is NOT defined, you can reduce the kernel size a lot.
+See the
+.Dv VESAMODE
+flag below.
+.It Dv SC_TWOBUTTON_MOUSE
+If you have a two button mouse, you may want to add this option
+to use the right button of the mouse to paste text.
+See
+.Sx Mouse Support and Copy-and-Paste
+above.
+.It Dv SC_NORM_ATTR=_attribute_
+.It Dv SC_NORM_REV_ATTR=_attribute_
+.It Dv SC_KERNEL_CONS_ATTR=_attribute_
+.It Dv SC_KERNEL_CONS_REV_ATTR=_attribute_
+These options will set the default colors.
+Available colors are defined in
+.In machine/pc/display.h .
+See
+.Sx EXAMPLES
+below.
+.It Dv SC_DFLT_FONT
+This option will specify the default font.
+Available fonts are: iso, iso2, koi8-r, koi8-u, cp437, cp850, cp865,
+cp866 and cp866u.
+16-line, 14-line and 8-line font data will be compiled in.
+Without this option, the
+.Nm
+driver will use whatever font is already loaded in the video card,
+unless you explicitly load a software font at startup.
+See
+.Sx EXAMPLES
+below.
+.It Dv SC_NO_SUSPEND_VTYSWITCH
+This option, which is also available as
+.Xr loader 8
+tunable and
+.Xr sysctl 8
+variable
+.Va hw.syscons.sc_no_suspend_vtswitch ,
+disables switching between virtual terminals (graphics <-> text) during
+suspend/resume (ACPI and APM).
+Use this option if your system is freezing
+when you are running X and trying to suspend.
+.El
+.Pp
+The following options will remove some features from the
+.Nm
+driver and save kernel memory.
+.Bl -tag -width MOUSE
+.It Dv SC_NO_CUTPASTE
+This option disables ``copy and paste'' operation in virtual
+terminals.
+.It Dv SC_NO_FONT_LOADING
+The
+.Nm
+driver can load software fonts on some video cards.
+This option removes this feature.
+Note that if you still wish to use
+the mouse with this option then you must also use the
+.Dv SC_ALT_MOUSE_IMAGE
+option.
+.It Dv SC_NO_HISTORY
+This option disables back-scrolling in virtual terminals.
+.\".It Dv SC_NO_PALETTE_LOADING
+.It Dv SC_NO_SYSMOUSE
+This option removes mouse support in the
+.Nm
+driver.
+The mouse daemon
+.Xr moused 8
+will fail if this option is defined.
+This option implies the
+.Dv SC_NO_CUTPASTE
+option too.
+.El
+.Ss Driver Flags
+The following driver flags can be used to control the
+.Nm
+driver.
+They can be set either in
+.Pa /boot/device.hints ,
+or else at the loader prompt (see
+.Xr loader 8 ) .
+.Bl -tag -width bit_0
+.\".It bit 0 (VISUAL_BELL)
+.\"Uses the ``visual'' bell.
+.\"The screen will blink instead of generating audible sound.
+.\".It bit 1,2 (CURSOR_TYPE)
+.\"This option specifies the cursor appearance.
+.\"Possible values are:
+.\".Bl -tag -width TYPE -compact
+.\".It Dv 0
+.\"normal block cursor
+.\".It Dv 2
+.\"blinking block cursor
+.\".It Dv 4
+.\"underline cursor
+.\".It Dv 6
+.\"blinking underline (aka destructive) cursor
+.\".El
+.\".It bit 6 (QUIET_BELL)
+.\"This option suppresses the bell, whether audible or visual,
+.\"if it is rung in a background virtual terminal.
+.It 0x0080 (VESAMODE)
+This option puts the video card in the VESA mode specified by
+.Pa /boot/device.hints
+variable
+.Va vesa_mode
+during kernel initialization.
+Note that in order for this flag to work, the kernel must be
+compiled with the
+.Dv SC_PIXEL_MODE
+option explained above.
+A list of the available mode can be obtained via
+.Xr vidcontrol 1 .
+.\"Note also that the ``copy-and-paste'' function is not currently supported
+.\"in this mode and the mouse pointer will not be displayed.
+.It 0x0100 (AUTODETECT_KBD)
+This option instructs the syscons driver to periodically scan
+for a keyboard device if it is not currently attached to one.
+Otherwise, the driver only probes for a keyboard once during bootup.
+.El
+.Sh FILES
+.Bl -tag -width /usr/share/syscons/xxxxyyyyzzz -compact
+.It Pa /dev/console
+.It Pa /dev/consolectl
+.It Pa /dev/ttyv?
+virtual terminals
+.It Pa /etc/ttys
+terminal initialization information
+.It Pa /usr/share/syscons/fonts/*
+font files
+.It Pa /usr/share/syscons/keymaps/*
+key map files
+.It Pa /usr/share/syscons/scrmaps/*
+screen map files
+.El
+.Sh EXAMPLES
+As the
+.Nm
+driver requires the keyboard driver and the video card driver,
+the kernel configuration file should contain the following lines.
+.Bd -literal -offset indent
+device atkbdc
+device atkbd
+device vga
+device sc
+device splash
+.Ed
+.Pp
+You also need the following lines in
+.Pa /boot/device.hints
+for these drivers.
+.Bd -literal -offset indent
+hint.atkbdc.0.at="isa"
+hint.atkbdc.0.port="0x060"
+hint.atkbd.0.at="atkbdc"
+hint.atkbd.0.irq="1"
+hint.vga.0.at="isa"
+hint.sc.0.at="isa"
+.Ed
+.Pp
+If you do not intend to load the splash image or use the screen saver,
+the last line is not necessary, and can be omitted.
+.Pp
+Note that the keyboard controller driver
+.Nm atkbdc
+is required by the keyboard driver
+.Nm atkbd .
+.Pp
+The following lines will set the default colors.
+The normal text will be green on black background.
+The reversed text will be yellow on green background.
+Note that you cannot put any white space inside the quoted string,
+because of the current implementation of
+.Xr config 8 .
+.Pp
+.Dl "options SC_NORM_ATTR=(FG_GREEN|BG_BLACK)"
+.Dl "options SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN)"
+.Pp
+The following lines will set the default colors of the kernel message.
+The kernel message will be printed bright red on black background.
+The reversed message will be black on red background.
+.Pp
+.Dl "options SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK)"
+.Dl "options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED)"
+.Pp
+The following example adds the font files
+.Pa cp850-8x16.fnt ,
+.Pa cp850-8x14.font
+and
+.Pa cp850-8x8.font
+to the kernel.
+.Pp
+.Dl "options SC_DFLT_FONT"
+.Dl "makeoptions SC_DFLT_FONT=cp850"
+.Dl "device sc"
+.\".Sh DIAGNOSTICS
+.Sh SEE ALSO
+.Xr kbdcontrol 1 ,
+.Xr login 1 ,
+.Xr vidcontrol 1 ,
+.Xr atkbd 4 ,
+.Xr atkbdc 4 ,
+.Xr keyboard 4 ,
+.Xr screen 4 ,
+.Xr splash 4 ,
+.Xr ukbd 4 ,
+.Xr vga 4 ,
+.Xr kbdmap 5 ,
+.Xr rc.conf 5 ,
+.Xr ttys 5 ,
+.Xr config 8 ,
+.Xr getty 8 ,
+.Xr kldload 8 ,
+.Xr moused 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 1.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An S\(/oren Schmidt Aq sos@FreeBSD.org .
+This manual page was written by
+.An Kazutaka Yokota Aq yokota@FreeBSD.org .
+.Sh CAVEATS
+The amount of data that is possible to insert from the cut buffer is limited
+by the
+.Brq Dv MAX_INPUT ,
+a system limit on the number of bytes that may be stored in the terminal
+input queue - usually 1024 bytes
+(see
+.Xr termios 4 ) .
+.Sh BUGS
+This manual page is incomplete and urgently needs revision.
diff --git a/share/man/man4/sysmouse.4 b/share/man/man4/sysmouse.4
new file mode 100644
index 0000000..f93fa8e
--- /dev/null
+++ b/share/man/man4/sysmouse.4
@@ -0,0 +1,472 @@
+.\" Copyright 1997 John-Mark Gurney. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY John-Mark Gurney AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 25, 2014
+.Dt SYSMOUSE 4
+.Os
+.Sh NAME
+.Nm sysmouse
+.\" .Nd supplies mouse data from syscons for other applications
+.Nd virtualized mouse driver
+.Sh SYNOPSIS
+.In sys/mouse.h
+.In sys/consio.h
+.Sh DESCRIPTION
+The console driver, in conjunction with the mouse daemon
+.Xr moused 8 ,
+supplies mouse data to the user process in the standardized way via the
+.Nm
+driver.
+This arrangement makes it possible for the console and the user process
+(such as the
+.Tn X\ Window System )
+to share the mouse.
+.Pp
+The user process which wants to utilize mouse operation simply opens
+.Pa /dev/sysmouse
+with a
+.Xr open 2
+call and reads
+mouse data from the device via
+.Xr read 2 .
+Make sure that
+.Xr moused 8
+is running, otherwise the user process will not see any data coming from
+the mouse.
+.Pp
+.Ss Operation Levels
+The
+.Nm
+driver has two levels of operation.
+The current operation level can be referred to and changed via ioctl calls.
+.Pp
+The level zero, the basic level, is the lowest level at which the driver
+offers the basic service to user programs.
+The
+.Nm
+driver
+provides horizontal and vertical movement of the mouse
+and state of up to three buttons in the
+.Tn MouseSystems
+format as follows.
+.Pp
+.Bl -tag -width Byte_1 -compact
+.It Byte 1
+.Bl -tag -width bit_7 -compact
+.It bit 7
+Always one.
+.It bit 6..3
+Always zero.
+.It bit 2
+Left button status; cleared if pressed, otherwise set.
+.It bit 1
+Middle button status; cleared if pressed, otherwise set.
+Always one,
+if the device does not have the middle button.
+.It bit 0
+Right button status; cleared if pressed, otherwise set.
+.El
+.It Byte 2
+The first half of horizontal movement count in two's complement;
+\-128 through 127.
+.It Byte 3
+The first half of vertical movement count in two's complement;
+\-128 through 127.
+.It Byte 4
+The second half of the horizontal movement count in two's complement;
+\-128 through 127.
+To obtain the full horizontal movement count, add
+the byte 2 and 4.
+.It Byte 5
+The second half of the vertical movement count in two's complement;
+\-128 through 127.
+To obtain the full vertical movement count, add
+the byte 3 and 5.
+.El
+.Pp
+At the level one, the extended level, mouse data is encoded
+in the standard format
+.Dv MOUSE_PROTO_SYSMOUSE
+as defined in
+.Xr mouse 4 .
+.\" .Ss Acceleration
+.\" The
+.\" .Nm
+.\" driver can somewhat `accelerate' the movement of the pointing device.
+.\" The faster you move the device, the further the pointer
+.\" travels on the screen.
+.\" The driver has an internal variable which governs the effect of
+.\" the acceleration. Its value can be modified via the driver flag
+.\" or via an ioctl call.
+.Sh IOCTLS
+This section describes two classes of
+.Xr ioctl 2
+commands:
+commands for the
+.Nm
+driver itself, and commands for the console and the console control drivers.
+.Ss Sysmouse Ioctls
+There are a few commands for mouse drivers.
+General description of the commands is given in
+.Xr mouse 4 .
+Following are the features specific to the
+.Nm
+driver.
+.Pp
+.Bl -tag -width MOUSE -compact
+.It Dv MOUSE_GETLEVEL Ar int *level
+.It Dv MOUSE_SETLEVEL Ar int *level
+These commands manipulate the operation level of the mouse driver.
+.Pp
+.It Dv MOUSE_GETHWINFO Ar mousehw_t *hw
+Returns the hardware information of the attached device in the following
+structure.
+Only the
+.Va iftype
+field is guaranteed to be filled with the correct value in the current
+version of the
+.Nm
+driver.
+.Bd -literal
+typedef struct mousehw {
+ int buttons; /* number of buttons */
+ int iftype; /* I/F type */
+ int type; /* mouse/track ball/pad... */
+ int model; /* I/F dependent model ID */
+ int hwid; /* I/F dependent hardware ID */
+} mousehw_t;
+.Ed
+.Pp
+The
+.Va buttons
+field holds the number of buttons detected by the driver.
+.Pp
+The
+.Va iftype
+is always
+.Dv MOUSE_IF_SYSMOUSE .
+.Pp
+The
+.Va type
+tells the device type:
+.Dv MOUSE_MOUSE ,
+.Dv MOUSE_TRACKBALL ,
+.Dv MOUSE_STICK ,
+.Dv MOUSE_PAD ,
+or
+.Dv MOUSE_UNKNOWN .
+.Pp
+The
+.Va model
+is always
+.Dv MOUSE_MODEL_GENERIC
+at the operation level 0.
+It may be
+.Dv MOUSE_MODEL_GENERIC
+or one of
+.Dv MOUSE_MODEL_XXX
+constants at higher operation levels.
+.Pp
+The
+.Va hwid
+is always zero.
+.Pp
+.It Dv MOUSE_GETMODE Ar mousemode_t *mode
+The command gets the current operation parameters of the mouse
+driver.
+.Bd -literal
+typedef struct mousemode {
+ int protocol; /* MOUSE_PROTO_XXX */
+ int rate; /* report rate (per sec) */
+ int resolution; /* MOUSE_RES_XXX, -1 if unknown */
+ int accelfactor; /* acceleration factor */
+ int level; /* driver operation level */
+ int packetsize; /* the length of the data packet */
+ unsigned char syncmask[2]; /* sync. bits */
+} mousemode_t;
+.Ed
+.Pp
+The
+.Va protocol
+field tells the format in which the device status is returned
+when the mouse data is read by the user program.
+It is
+.Dv MOUSE_PROTO_MSC
+at the operation level zero.
+.Dv MOUSE_PROTO_SYSMOUSE
+at the operation level one.
+.Pp
+The
+.Va rate
+is always set to \-1.
+.Pp
+The
+.Va resolution
+is always set to \-1.
+.Pp
+The
+.Va accelfactor
+is always 0.
+.Pp
+The
+.Va packetsize
+field specifies the length of the data packet.
+It depends on the
+operation level.
+.Pp
+.Bl -tag -width level_0__ -compact
+.It Em level 0
+5 bytes
+.It Em level 1
+8 bytes
+.El
+.Pp
+The array
+.Va syncmask
+holds a bit mask and pattern to detect the first byte of the
+data packet.
+.Va syncmask[0]
+is the bit mask to be ANDed with a byte.
+If the result is equal to
+.Va syncmask[1] ,
+the byte is likely to be the first byte of the data packet.
+Note that this method of detecting the first byte is not 100% reliable;
+thus, it should be taken only as an advisory measure.
+.Pp
+.It Dv MOUSE_SETMODE Ar mousemode_t *mode
+The command changes the current operation parameters of the mouse driver
+as specified in
+.Ar mode .
+Only
+.Va level
+may be modifiable.
+Setting values in the other field does not generate
+error and has no effect.
+.\" .Pp
+.\" .It Dv MOUSE_GETVARS Ar mousevar_t *vars
+.\" .It Dv MOUSE_SETVARS Ar mousevar_t *vars
+.\" These commands are not supported by the
+.\" .Nm
+.\" driver.
+.Pp
+.It Dv MOUSE_READDATA Ar mousedata_t *data
+.It Dv MOUSE_READSTATE Ar mousedata_t *state
+These commands are not supported by the
+.Nm
+driver.
+.Pp
+.It Dv MOUSE_GETSTATUS Ar mousestatus_t *status
+The command returns the current state of buttons and
+movement counts in the structure as defined in
+.Xr mouse 4 .
+.El
+.Ss Console and Consolectl Ioctls
+The user process issues console
+.Fn ioctl
+calls to the current virtual console in order to control
+the mouse pointer.
+The console
+.Fn ioctl
+also provides a method for the user process to receive a
+.Xr signal 3
+when a button is pressed.
+.Pp
+The mouse daemon
+.Xr moused 8
+uses
+.Fn ioctl
+calls to the console control device
+.Pa /dev/consolectl
+to inform the console of mouse actions including mouse movement
+and button status.
+.Pp
+Both classes of
+.Fn ioctl
+commands are defined as
+.Dv CONS_MOUSECTL
+which takes the following argument.
+.Bd -literal
+struct mouse_info {
+ int operation;
+ union {
+ struct mouse_data data;
+ struct mouse_mode mode;
+ struct mouse_event event;
+ } u;
+};
+.Ed
+.Pp
+.Bl -tag -width operation -compact
+.It Va operation
+This can be one of
+.Pp
+.Bl -tag -width MOUSE_MOVEABS -compact
+.It Dv MOUSE_SHOW
+Enables and displays mouse cursor.
+.It Dv MOUSE_HIDE
+Disables and hides mouse cursor.
+.It Dv MOUSE_MOVEABS
+Moves mouse cursor to position supplied in
+.Va u.data .
+.It Dv MOUSE_MOVEREL
+Adds position supplied in
+.Va u.data
+to current position.
+.It Dv MOUSE_GETINFO
+Returns current mouse position in the current virtual console
+and button status in
+.Va u.data .
+.It Dv MOUSE_MODE
+This sets the
+.Xr signal 3
+to be delivered to the current process when a button is pressed.
+The signal to be delivered is set in
+.Va u.mode .
+.El
+.Pp
+The above operations are for virtual consoles.
+The operations defined
+below are for the console control device and are used by
+.Xr moused 8
+to pass mouse data to the console driver.
+.Pp
+.Bl -tag -width MOUSE_MOVEABS -compact
+.It Dv MOUSE_ACTION
+.It Dv MOUSE_MOTION_EVENT
+These operations take the information in
+.Va u.data
+and act upon it.
+Mouse data will be sent to the
+.Nm
+driver if it is open.
+.Dv MOUSE_ACTION
+also processes button press actions and sends signal to the process if
+requested or performs cut and paste operations
+if the current console is a text interface.
+.It Dv MOUSE_BUTTON_EVENT
+.Va u.data
+specifies a button and its click count.
+The console driver will
+use this information for signal delivery if requested or
+for cut and paste operations if the console is in text mode.
+.El
+.Pp
+.Dv MOUSE_MOTION_EVENT
+and
+.Dv MOUSE_BUTTON_EVENT
+are newer interface and are designed to be used together.
+They are intended to replace functions performed by
+.Dv MOUSE_ACTION
+alone.
+.Pp
+.It Va u
+This union is one of
+.Pp
+.Bl -tag -width data -compact
+.It Va data
+.Bd -literal
+struct mouse_data {
+ int x;
+ int y;
+ int z;
+ int buttons;
+};
+.Ed
+.Pp
+.Va x , y
+and
+.Va z
+represent movement of the mouse along respective directions.
+.Va buttons
+tells the state of buttons.
+It encodes up to 31 buttons in the bit 0 though
+the bit 30.
+If a button is held down, the corresponding bit is set.
+.Pp
+.It Va mode
+.Bd -literal
+struct mouse_mode {
+ int mode;
+ int signal;
+};
+.Ed
+.Pp
+The
+.Va signal
+field specifies the signal to be delivered to the process.
+It must be
+one of the values defined in
+.In signal.h .
+The
+.Va mode
+field is currently unused.
+.Pp
+.It Va event
+.Bd -literal
+struct mouse_event {
+ int id;
+ int value;
+};
+.Ed
+.Pp
+The
+.Va id
+field specifies a button number as in
+.Va u.data.buttons .
+Only one bit/button is set.
+The
+.Va value
+field
+holds the click count: the number of times the user has clicked the button
+successively.
+.El
+.El
+.Sh FILES
+.Bl -tag -width /dev/consolectl -compact
+.It Pa /dev/consolectl
+device to control the console
+.It Pa /dev/sysmouse
+virtualized mouse driver
+.It Pa /dev/ttyv%d
+virtual consoles
+.El
+.Sh SEE ALSO
+.Xr vidcontrol 1 ,
+.Xr ioctl 2 ,
+.Xr signal 3 ,
+.Xr mouse 4 ,
+.Xr moused 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 2.2 .
+.Sh AUTHORS
+.An -nosplit
+This
+manual page was written by
+.An John-Mark Gurney Aq jmg@FreeBSD.org
+and
+.An Kazutaka Yokota Aq yokota@FreeBSD.org .
diff --git a/share/man/man4/tap.4 b/share/man/man4/tap.4
new file mode 100644
index 0000000..3bfab5b
--- /dev/null
+++ b/share/man/man4/tap.4
@@ -0,0 +1,317 @@
+.\" $FreeBSD$
+.\" Based on PR#2411
+.\"
+.Dd January 26, 2012
+.Dt TAP 4
+.Os
+.Sh NAME
+.Nm tap
+.Nd Ethernet tunnel software network interface
+.Sh SYNOPSIS
+.Cd device tap
+.Sh DESCRIPTION
+The
+.Nm
+interface is a software loopback mechanism that can be loosely
+described as the network interface analog of the
+.Xr pty 4 ,
+that is,
+.Nm
+does for network interfaces what the
+.Nm pty
+driver does for terminals.
+.Pp
+The
+.Nm
+driver, like the
+.Nm pty
+driver, provides two interfaces: an interface like the usual facility
+it is simulating
+(an Ethernet network interface in the case of
+.Nm ,
+or a terminal for
+.Nm pty ) ,
+and a character-special device
+.Dq control
+interface.
+.Pp
+The network interfaces are named
+.Dq Li tap0 ,
+.Dq Li tap1 ,
+etc., one for each control device that has been opened.
+These Ethernet network interfaces persist until
+.Pa if_tap.ko
+module is unloaded, or until removed with "ifconfig destroy" (see below).
+.Pp
+.Nm
+devices are created using interface cloning.
+This is done using the
+.Dq ifconfig tap Ns Sy N No create
+command.
+This is the preferred method of creating
+.Nm
+devices.
+The same method allows removal of interfaces.
+For this, use the
+.Dq ifconfig tap Ns Sy N No destroy
+command.
+.Pp
+If the
+.Xr sysctl 8
+variable
+.Va net.link.tap.devfs_cloning
+is non-zero, the
+.Nm
+interface
+permits opens on the special control device
+.Pa /dev/tap .
+When this device is opened,
+.Nm
+will return a handle for the lowest unused
+.Nm
+device (use
+.Xr devname 3
+to determine which).
+.Pp
+.Bf Em
+Disabling the legacy devfs cloning functionality may break existing
+applications which use
+.Nm ,
+such as
+.Tn VMware
+and
+.Xr ssh 1 .
+It therefore defaults to being enabled until further notice.
+.Ef
+.Pp
+Control devices (once successfully opened) persist until
+.Pa if_tap.ko
+is unloaded or the interface is destroyed.
+.Pp
+Each interface supports the usual Ethernet network interface
+.Xr ioctl 2 Ns s
+and thus can be used with
+.Xr ifconfig 8
+like any other Ethernet interface.
+When the system chooses to transmit
+an Ethernet frame on the network interface, the frame can be read from
+the control device
+(it appears as
+.Dq input
+there);
+writing an Ethernet frame to the control device generates an input frame on
+the network interface, as if the
+(non-existent)
+hardware had just received it.
+.Pp
+The Ethernet tunnel device, normally
+.Pa /dev/tap Ns Sy N ,
+is exclusive-open
+(it cannot be opened if it is already open)
+and is restricted to the super-user, unless the
+.Xr sysctl 8
+variable
+.Va net.link.tap.user_open
+is non-zero.
+If the
+.Xr sysctl 8
+variable
+.Va net.link.tap.up_on_open
+is non-zero, the tunnel device will be marked
+.Dq up
+when the control device is opened.
+A
+.Fn read
+call will return an error
+.Pq Er EHOSTDOWN
+if the interface is not
+.Dq ready .
+Once the interface is ready,
+.Fn read
+will return an Ethernet frame if one is available; if not, it will
+either block until one is or return
+.Er EWOULDBLOCK ,
+depending on whether non-blocking I/O has been enabled.
+If the frame
+is longer than is allowed for in the buffer passed to
+.Fn read ,
+the extra data will be silently dropped.
+.Pp
+A
+.Xr write 2
+call passes an Ethernet frame in to be
+.Dq received
+on the pseudo-interface.
+Each
+.Fn write
+call supplies exactly one frame; the frame length is taken from the
+amount of data provided to
+.Fn write .
+Writes will not block; if the frame cannot be accepted
+for a transient reason
+(e.g., no buffer space available),
+it is silently dropped; if the reason is not transient
+(e.g., frame too large),
+an error is returned.
+The following
+.Xr ioctl 2
+calls are supported
+(defined in
+.In net/if_tap.h ) :
+.Bl -tag -width VMIO_SIOCSETMACADDR
+.It Dv TAPSIFINFO
+Set network interface information (line speed, MTU and type).
+The argument should be a pointer to a
+.Va struct tapinfo .
+.It Dv TAPGIFINFO
+Retrieve network interface information (line speed, MTU and type).
+The argument should be a pointer to a
+.Va struct tapinfo .
+.It Dv TAPSDEBUG
+The argument should be a pointer to an
+.Va int ;
+this sets the internal debugging variable to that value.
+What, if
+anything, this variable controls is not documented here; see the source
+code.
+.It Dv TAPGDEBUG
+The argument should be a pointer to an
+.Va int ;
+this stores the internal debugging variable's value into it.
+.It Dv TAPGIFNAME
+Retrieve network interface name.
+The argument should be a pointer to a
+.Va struct ifreq .
+The interface name will be returned in the
+.Va ifr_name
+field.
+.It Dv FIONBIO
+Turn non-blocking I/O for reads off or on, according as the argument
+.Va int Ns 's
+value is or is not zero
+(Writes are always nonblocking).
+.It Dv FIOASYNC
+Turn asynchronous I/O for reads
+(i.e., generation of
+.Dv SIGIO
+when data is available to be read)
+off or on, according as the argument
+.Va int Ns 's
+value is or is not zero.
+.It Dv FIONREAD
+If any frames are queued to be read, store the size of the first one into the argument
+.Va int ;
+otherwise, store zero.
+.It Dv TIOCSPGRP
+Set the process group to receive
+.Dv SIGIO
+signals, when asynchronous I/O is enabled, to the argument
+.Va int
+value.
+.It Dv TIOCGPGRP
+Retrieve the process group value for
+.Dv SIGIO
+signals into the argument
+.Va int
+value.
+.It Dv SIOCGIFADDR
+Retrieve the Media Access Control
+.Pq Dv MAC
+address of the
+.Dq remote
+side.
+This command is used by the VMware port and expected to be executed on
+descriptor, associated with control device
+(usually
+.Pa /dev/vmnet Ns Sy N
+or
+.Pa /dev/tap Ns Sy N ) .
+The
+.Va buffer ,
+which is passed as the argument, is expected to have enough space to store
+the
+.Dv MAC
+address.
+At the open time both
+.Dq local
+and
+.Dq remote
+.Dv MAC
+addresses are the same, so this command could be used to retrieve the
+.Dq local
+.Dv MAC
+address.
+.It Dv SIOCSIFADDR
+Set the Media Access Control
+.Pq Dv MAC
+address of the
+.Dq remote
+side.
+This command is used by VMware port and expected to be executed on
+a descriptor, associated with control device
+(usually
+.Pa /dev/vmnet Ns Sy N ) .
+.El
+.Pp
+The control device also supports
+.Xr select 2
+for read; selecting for write is pointless, and always succeeds, since
+writes are always non-blocking.
+.Pp
+On the last close of the data device, the interface is
+brought down
+(as if with
+.Dq ifconfig tap Ns Sy N No down )
+unless the device is a
+.Em VMnet
+device.
+All queued frames are thrown away.
+If the interface is up when the data
+device is not open, output frames are thrown away rather than
+letting them pile up.
+.Pp
+The
+.Nm
+device can also be used with the VMware port as a replacement
+for the old
+.Em VMnet
+device driver.
+The driver uses the minor number
+to select between
+.Nm
+and
+.Nm vmnet
+devices.
+.Em VMnet
+minor numbers begin at
+.Va 0x800000
++
+.Va N ;
+where
+.Va N
+is a
+.Em VMnet
+unit number.
+In this case the control device is expected to be
+.Pa /dev/vmnet Ns Sy N ,
+and the network interface will be
+.Sy vmnet Ns Ar N .
+Additionally,
+.Em VMnet
+devices do not
+.Xr ifconfig 8
+themselves down when the
+control device is closed.
+Everything else is the same.
+.Pp
+In addition to the above mentioned
+.Xr ioctl 2
+calls, there is an additional one for the VMware port.
+.Bl -tag -width VMIO_SIOCSETMACADDR
+.It Dv VMIO_SIOCSIFFLAGS
+VMware
+.Dv SIOCSIFFLAGS .
+.El
+.Sh SEE ALSO
+.Xr inet 4 ,
+.Xr intro 4
diff --git a/share/man/man4/targ.4 b/share/man/man4/targ.4
new file mode 100644
index 0000000..6c61735
--- /dev/null
+++ b/share/man/man4/targ.4
@@ -0,0 +1,152 @@
+.\" Copyright (c) 2002
+.\" Nate Lawson. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Nate Lawson AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 13, 2011
+.Dt TARG 4
+.Os
+.Sh NAME
+.Nm targ
+.Nd SCSI target emulator driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device targ"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides an interface for usermode programs to emulate SCSI target
+devices.
+A sample program that emulates a disk drive (similar to
+.Xr da 4 )
+can be found in
+.Pa /usr/share/examples/scsi_target .
+.Pp
+The
+.Nm
+driver supplies the control device
+.Pa /dev/targ .
+After opening the device, the file descriptor must be bound to a
+specific bus/target/LUN and enabled to process CCBs using the
+.Dv TARGIOCENABLE
+ioctl.
+The process then uses
+.Xr write 2
+to send CCBs to the SIM and
+.Xr poll 2
+or
+.Xr kqueue 2
+to see if responses are ready.
+Pointers to completed CCBs are returned via
+.Xr read 2 .
+Any data transfers requested by the user CCBs are done via zero-copy IO.
+.Sh IOCTLS
+The following
+.Xr ioctl 2
+calls are defined in the header file
+.In cam/scsi/scsi_targetio.h .
+.Bl -tag -width ".Dv TARGIOCDISABLE"
+.It Dv TARGIOCENABLE
+.Pq Vt "struct ioc_enable_lun"
+Enable target mode on the LUN specified by the following structure:
+.Bd -literal -offset indent
+struct ioc_enable_lun {
+ path_id_t path_id;
+ target_id_t target_id;
+ lun_id_t lun_id;
+ int grp6_len;
+ int grp7_len;
+};
+.Ed
+.Pp
+The selected path (bus), target, and LUN must not already be in use or
+.Er EADDRINUSE
+is returned.
+If
+.Va grp6_len
+or
+.Va grp7_len
+are non-zero, reception of vendor-specific commands
+is enabled.
+.It Dv TARGIOCDISABLE
+Disable target mode and abort all pending CCBs.
+The CCBs may optionally be read as they complete.
+.Dv TARGIOCENABLE
+can then be called to activate a different LUN.
+Multiple disable calls have no effect.
+The
+.Xr close 2
+system call automatically disables target mode if enabled.
+.It Dv TARGIOCDEBUG
+.Pq Vt int
+Enables
+.Dv CAM_PERIPH
+debugging if the argument is non-zero, otherwise disables
+it.
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /sys/cam/scsi/scsi_target.c" -compact
+.It In cam/scsi/scsi_targetio.h
+describes the usermode interface.
+.It Pa /sys/cam/scsi/scsi_target.c
+is the driver source file.
+.It Pa /dev/targ
+is the control device.
+.El
+.Sh SEE ALSO
+.Pa /usr/share/examples/scsi_target ,
+.Xr ahc 4 ,
+.Xr isp 4 ,
+.Xr scsi 4
+.Rs
+.%T "FreeBSD Target Information"
+.%U http://www.root.org/~nate/freebsd/
+.Re
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver first appeared in
+.Fx 3.0
+and was written by
+.An Justin T. Gibbs .
+It was rewritten
+for
+.Fx 5.0
+by
+.An Nate Lawson Aq nate@root.org .
+.Sh BUGS
+Currently, only the
+.Xr ahc 4
+and
+.Xr isp 4
+drivers fully support target mode.
+.Pp
+The
+.Xr ahc 4
+driver does not support tagged queuing in target mode.
diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4
new file mode 100644
index 0000000..a95078f
--- /dev/null
+++ b/share/man/man4/tcp.4
@@ -0,0 +1,597 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California.
+.\" Copyright (c) 2010-2011 The FreeBSD Foundation
+.\" All rights reserved.
+.\"
+.\" Portions of this documentation were written at the Centre for Advanced
+.\" Internet Architectures, Swinburne University of Technology, Melbourne,
+.\" Australia by David Hayes under sponsorship from the FreeBSD Foundation.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93
+.\" $FreeBSD$
+.\"
+.Dd November 8, 2013
+.Dt TCP 4
+.Os
+.Sh NAME
+.Nm tcp
+.Nd Internet Transmission Control Protocol
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In netinet/in.h
+.In netinet/tcp.h
+.Ft int
+.Fn socket AF_INET SOCK_STREAM 0
+.Sh DESCRIPTION
+The
+.Tn TCP
+protocol provides reliable, flow-controlled, two-way
+transmission of data.
+It is a byte-stream protocol used to
+support the
+.Dv SOCK_STREAM
+abstraction.
+.Tn TCP
+uses the standard
+Internet address format and, in addition, provides a per-host
+collection of
+.Dq "port addresses" .
+Thus, each address is composed
+of an Internet address specifying the host and network,
+with a specific
+.Tn TCP
+port on the host identifying the peer entity.
+.Pp
+Sockets utilizing the
+.Tn TCP
+protocol are either
+.Dq active
+or
+.Dq passive .
+Active sockets initiate connections to passive
+sockets.
+By default,
+.Tn TCP
+sockets are created active; to create a
+passive socket, the
+.Xr listen 2
+system call must be used
+after binding the socket with the
+.Xr bind 2
+system call.
+Only passive sockets may use the
+.Xr accept 2
+call to accept incoming connections.
+Only active sockets may use the
+.Xr connect 2
+call to initiate connections.
+.Pp
+Passive sockets may
+.Dq underspecify
+their location to match
+incoming connection requests from multiple networks.
+This technique, termed
+.Dq "wildcard addressing" ,
+allows a single
+server to provide service to clients on multiple networks.
+To create a socket which listens on all networks, the Internet
+address
+.Dv INADDR_ANY
+must be bound.
+The
+.Tn TCP
+port may still be specified
+at this time; if the port is not specified, the system will assign one.
+Once a connection has been established, the socket's address is
+fixed by the peer entity's location.
+The address assigned to the
+socket is the address associated with the network interface
+through which packets are being transmitted and received.
+Normally, this address corresponds to the peer entity's network.
+.Pp
+.Tn TCP
+supports a number of socket options which can be set with
+.Xr setsockopt 2
+and tested with
+.Xr getsockopt 2 :
+.Bl -tag -width ".Dv TCP_CONGESTION"
+.It Dv TCP_INFO
+Information about a socket's underlying TCP session may be retrieved
+by passing the read-only option
+.Dv TCP_INFO
+to
+.Xr getsockopt 2 .
+It accepts a single argument: a pointer to an instance of
+.Vt "struct tcp_info" .
+.Pp
+This API is subject to change; consult the source to determine
+which fields are currently filled out by this option.
+.Fx
+specific additions include
+send window size,
+receive window size,
+and
+bandwidth-controlled window space.
+.It Dv TCP_CONGESTION
+Select or query the congestion control algorithm that TCP will use for the
+connection.
+See
+.Xr mod_cc 4
+for details.
+.It Dv TCP_KEEPINIT
+This
+.Xr setsockopt 2
+option accepts a per-socket timeout argument of
+.Vt "u_int"
+in seconds, for new, non-established
+.Tn TCP
+connections.
+For the global default in milliseconds see
+.Va keepinit
+in the
+.Sx MIB Variables
+section further down.
+.It Dv TCP_KEEPIDLE
+This
+.Xr setsockopt 2
+option accepts an argument of
+.Vt "u_int"
+for the amount of time, in seconds, that the connection must be idle
+before keepalive probes (if enabled) are sent for the connection of this
+socket.
+If set on a listening socket, the value is inherited by the newly created
+socket upon
+.Xr accept 2 .
+For the global default in milliseconds see
+.Va keepidle
+in the
+.Sx MIB Variables
+section further down.
+.It Dv TCP_KEEPINTVL
+This
+.Xr setsockopt 2
+option accepts an argument of
+.Vt "u_int"
+to set the per-socket interval, in seconds, between keepalive probes sent
+to a peer.
+If set on a listening socket, the value is inherited by the newly created
+socket upon
+.Xr accept 2 .
+For the global default in milliseconds see
+.Va keepintvl
+in the
+.Sx MIB Variables
+section further down.
+.It Dv TCP_KEEPCNT
+This
+.Xr setsockopt 2
+option accepts an argument of
+.Vt "u_int"
+and allows a per-socket tuning of the number of probes sent, with no response,
+before the connection will be dropped.
+If set on a listening socket, the value is inherited by the newly created
+socket upon
+.Xr accept 2 .
+For the global default see the
+.Va keepcnt
+in the
+.Sx MIB Variables
+section further down.
+.It Dv TCP_NODELAY
+Under most circumstances,
+.Tn TCP
+sends data when it is presented;
+when outstanding data has not yet been acknowledged, it gathers
+small amounts of output to be sent in a single packet once
+an acknowledgement is received.
+For a small number of clients, such as window systems
+that send a stream of mouse events which receive no replies,
+this packetization may cause significant delays.
+The boolean option
+.Dv TCP_NODELAY
+defeats this algorithm.
+.It Dv TCP_MAXSEG
+By default, a sender- and
+.No receiver- Ns Tn TCP
+will negotiate among themselves to determine the maximum segment size
+to be used for each connection.
+The
+.Dv TCP_MAXSEG
+option allows the user to determine the result of this negotiation,
+and to reduce it if desired.
+.It Dv TCP_NOOPT
+.Tn TCP
+usually sends a number of options in each packet, corresponding to
+various
+.Tn TCP
+extensions which are provided in this implementation.
+The boolean option
+.Dv TCP_NOOPT
+is provided to disable
+.Tn TCP
+option use on a per-connection basis.
+.It Dv TCP_NOPUSH
+By convention, the
+.No sender- Ns Tn TCP
+will set the
+.Dq push
+bit, and begin transmission immediately (if permitted) at the end of
+every user call to
+.Xr write 2
+or
+.Xr writev 2 .
+When this option is set to a non-zero value,
+.Tn TCP
+will delay sending any data at all until either the socket is closed,
+or the internal send buffer is filled.
+.It Dv TCP_MD5SIG
+This option enables the use of MD5 digests (also known as TCP-MD5)
+on writes to the specified socket.
+Outgoing traffic is digested;
+digests on incoming traffic are verified if the
+.Va net.inet.tcp.signature_verify_input
+sysctl is nonzero.
+The current default behavior for the system is to respond to a system
+advertising this option with TCP-MD5; this may change.
+.Pp
+One common use for this in a
+.Fx
+router deployment is to enable
+based routers to interwork with Cisco equipment at peering points.
+Support for this feature conforms to RFC 2385.
+Only IPv4
+.Pq Dv AF_INET
+sessions are supported.
+.Pp
+In order for this option to function correctly, it is necessary for the
+administrator to add a tcp-md5 key entry to the system's security
+associations database (SADB) using the
+.Xr setkey 8
+utility.
+This entry must have an SPI of 0x1000 and can therefore only be specified
+on a per-host basis at this time.
+.Pp
+If an SADB entry cannot be found for the destination, the outgoing traffic
+will have an invalid digest option prepended, and the following error message
+will be visible on the system console:
+.Em "tcp_signature_compute: SADB lookup failed for %d.%d.%d.%d" .
+.El
+.Pp
+The option level for the
+.Xr setsockopt 2
+call is the protocol number for
+.Tn TCP ,
+available from
+.Xr getprotobyname 3 ,
+or
+.Dv IPPROTO_TCP .
+All options are declared in
+.In netinet/tcp.h .
+.Pp
+Options at the
+.Tn IP
+transport level may be used with
+.Tn TCP ;
+see
+.Xr ip 4 .
+Incoming connection requests that are source-routed are noted,
+and the reverse source route is used in responding.
+.Pp
+The default congestion control algorithm for
+.Tn TCP
+is
+.Xr cc_newreno 4 .
+Other congestion control algorithms can be made available using the
+.Xr mod_cc 4
+framework.
+.Ss MIB Variables
+The
+.Tn TCP
+protocol implements a number of variables in the
+.Va net.inet.tcp
+branch of the
+.Xr sysctl 3
+MIB.
+.Bl -tag -width ".Va TCPCTL_DO_RFC1323"
+.It Dv TCPCTL_DO_RFC1323
+.Pq Va rfc1323
+Implement the window scaling and timestamp options of RFC 1323
+(default is true).
+.It Dv TCPCTL_MSSDFLT
+.Pq Va mssdflt
+The default value used for the maximum segment size
+.Pq Dq MSS
+when no advice to the contrary is received from MSS negotiation.
+.It Dv TCPCTL_SENDSPACE
+.Pq Va sendspace
+Maximum
+.Tn TCP
+send window.
+.It Dv TCPCTL_RECVSPACE
+.Pq Va recvspace
+Maximum
+.Tn TCP
+receive window.
+.It Va log_in_vain
+Log any connection attempts to ports where there is not a socket
+accepting connections.
+The value of 1 limits the logging to
+.Tn SYN
+(connection establishment) packets only.
+That of 2 results in any
+.Tn TCP
+packets to closed ports being logged.
+Any value unlisted above disables the logging
+(default is 0, i.e., the logging is disabled).
+.It Va msl
+The Maximum Segment Lifetime, in milliseconds, for a packet.
+.It Va keepinit
+Timeout, in milliseconds, for new, non-established
+.Tn TCP
+connections.
+The default is 75000 msec.
+.It Va keepidle
+Amount of time, in milliseconds, that the connection must be idle
+before keepalive probes (if enabled) are sent.
+The default is 7200000 msec (2 hours).
+.It Va keepintvl
+The interval, in milliseconds, between keepalive probes sent to remote
+machines, when no response is received on a
+.Va keepidle
+probe.
+The default is 75000 msec.
+.It Va keepcnt
+Number of probes sent, with no response, before a connection
+is dropped.
+The default is 8 packets.
+.It Va always_keepalive
+Assume that
+.Dv SO_KEEPALIVE
+is set on all
+.Tn TCP
+connections, the kernel will
+periodically send a packet to the remote host to verify the connection
+is still up.
+.It Va icmp_may_rst
+Certain
+.Tn ICMP
+unreachable messages may abort connections in
+.Tn SYN-SENT
+state.
+.It Va do_tcpdrain
+Flush packets in the
+.Tn TCP
+reassembly queue if the system is low on mbufs.
+.It Va blackhole
+If enabled, disable sending of RST when a connection is attempted
+to a port where there is not a socket accepting connections.
+See
+.Xr blackhole 4 .
+.It Va delayed_ack
+Delay ACK to try and piggyback it onto a data packet.
+.It Va delacktime
+Maximum amount of time, in milliseconds, before a delayed ACK is sent.
+.It Va path_mtu_discovery
+Enable Path MTU Discovery.
+.It Va tcbhashsize
+Size of the
+.Tn TCP
+control-block hash table
+(read-only).
+This may be tuned using the kernel option
+.Dv TCBHASHSIZE
+or by setting
+.Va net.inet.tcp.tcbhashsize
+in the
+.Xr loader 8 .
+.It Va pcbcount
+Number of active process control blocks
+(read-only).
+.It Va syncookies
+Determines whether or not
+.Tn SYN
+cookies should be generated for outbound
+.Tn SYN-ACK
+packets.
+.Tn SYN
+cookies are a great help during
+.Tn SYN
+flood attacks, and are enabled by default.
+(See
+.Xr syncookies 4 . )
+.It Va isn_reseed_interval
+The interval (in seconds) specifying how often the secret data used in
+RFC 1948 initial sequence number calculations should be reseeded.
+By default, this variable is set to zero, indicating that
+no reseeding will occur.
+Reseeding should not be necessary, and will break
+.Dv TIME_WAIT
+recycling for a few minutes.
+.It Va rexmit_min , rexmit_slop
+Adjust the retransmit timer calculation for
+.Tn TCP .
+The slop is
+typically added to the raw calculation to take into account
+occasional variances that the
+.Tn SRTT
+(smoothed round-trip time)
+is unable to accommodate, while the minimum specifies an
+absolute minimum.
+While a number of
+.Tn TCP
+RFCs suggest a 1
+second minimum, these RFCs tend to focus on streaming behavior,
+and fail to deal with the fact that a 1 second minimum has severe
+detrimental effects over lossy interactive connections, such
+as a 802.11b wireless link, and over very fast but lossy
+connections for those cases not covered by the fast retransmit
+code.
+For this reason, we use 200ms of slop and a near-0
+minimum, which gives us an effective minimum of 200ms (similar to
+.Tn Linux ) .
+.It Va rfc3042
+Enable the Limited Transmit algorithm as described in RFC 3042.
+It helps avoid timeouts on lossy links and also when the congestion window
+is small, as happens on short transfers.
+.It Va rfc3390
+Enable support for RFC 3390, which allows for a variable-sized
+starting congestion window on new connections, depending on the
+maximum segment size.
+This helps throughput in general, but
+particularly affects short transfers and high-bandwidth large
+propagation-delay connections.
+.It Va sack.enable
+Enable support for RFC 2018, TCP Selective Acknowledgment option,
+which allows the receiver to inform the sender about all successfully
+arrived segments, allowing the sender to retransmit the missing segments
+only.
+.It Va sack.maxholes
+Maximum number of SACK holes per connection.
+Defaults to 128.
+.It Va sack.globalmaxholes
+Maximum number of SACK holes per system, across all connections.
+Defaults to 65536.
+.It Va maxtcptw
+When a TCP connection enters the
+.Dv TIME_WAIT
+state, its associated socket structure is freed, since it is of
+negligible size and use, and a new structure is allocated to contain a
+minimal amount of information necessary for sustaining a connection in
+this state, called the compressed TCP TIME_WAIT state.
+Since this structure is smaller than a socket structure, it can save
+a significant amount of system memory.
+The
+.Va net.inet.tcp.maxtcptw
+MIB variable controls the maximum number of these structures allocated.
+By default, it is initialized to
+.Va kern.ipc.maxsockets
+/ 5.
+.It Va nolocaltimewait
+Suppress creating of compressed TCP TIME_WAIT states for connections in
+which both endpoints are local.
+.It Va fast_finwait2_recycle
+Recycle
+.Tn TCP
+.Dv FIN_WAIT_2
+connections faster when the socket is marked as
+.Dv SBS_CANTRCVMORE
+(no user process has the socket open, data received on
+the socket cannot be read).
+The timeout used here is
+.Va finwait2_timeout .
+.It Va finwait2_timeout
+Timeout to use for fast recycling of
+.Tn TCP
+.Dv FIN_WAIT_2
+connections.
+Defaults to 60 seconds.
+.It Va ecn.enable
+Enable support for TCP Explicit Congestion Notification (ECN).
+ECN allows a TCP sender to reduce the transmission rate in order to
+avoid packet drops.
+.It Va ecn.maxretries
+Number of retries (SYN or SYN/ACK retransmits) before disabling ECN on a
+specific connection. This is needed to help with connection establishment
+when a broken firewall is in the network path.
+.El
+.Sh ERRORS
+A socket operation may fail with one of the following errors returned:
+.Bl -tag -width Er
+.It Bq Er EISCONN
+when trying to establish a connection on a socket which
+already has one;
+.It Bq Er ENOBUFS
+when the system runs out of memory for
+an internal data structure;
+.It Bq Er ETIMEDOUT
+when a connection was dropped
+due to excessive retransmissions;
+.It Bq Er ECONNRESET
+when the remote peer
+forces the connection to be closed;
+.It Bq Er ECONNREFUSED
+when the remote
+peer actively refuses connection establishment (usually because
+no process is listening to the port);
+.It Bq Er EADDRINUSE
+when an attempt
+is made to create a socket with a port which has already been
+allocated;
+.It Bq Er EADDRNOTAVAIL
+when an attempt is made to create a
+socket with a network address for which no network interface
+exists;
+.It Bq Er EAFNOSUPPORT
+when an attempt is made to bind or connect a socket to a multicast
+address.
+.El
+.Sh SEE ALSO
+.Xr getsockopt 2 ,
+.Xr socket 2 ,
+.Xr sysctl 3 ,
+.Xr blackhole 4 ,
+.Xr inet 4 ,
+.Xr intro 4 ,
+.Xr ip 4 ,
+.Xr mod_cc 4 ,
+.Xr siftr 4 ,
+.Xr syncache 4 ,
+.Xr setkey 8
+.Rs
+.%A "V. Jacobson"
+.%A "R. Braden"
+.%A "D. Borman"
+.%T "TCP Extensions for High Performance"
+.%O "RFC 1323"
+.Re
+.Rs
+.%A "A. Heffernan"
+.%T "Protection of BGP Sessions via the TCP MD5 Signature Option"
+.%O "RFC 2385"
+.Re
+.Rs
+.%A "K. Ramakrishnan"
+.%A "S. Floyd"
+.%A "D. Black"
+.%T "The Addition of Explicit Congestion Notification (ECN) to IP"
+.%O "RFC 3168"
+.Re
+.Sh HISTORY
+The
+.Tn TCP
+protocol appeared in
+.Bx 4.2 .
+The RFC 1323 extensions for window scaling and timestamps were added
+in
+.Bx 4.4 .
+The
+.Dv TCP_INFO
+option was introduced in
+.Tn Linux 2.6
+and is
+.Em subject to change .
diff --git a/share/man/man4/tdfx.4 b/share/man/man4/tdfx.4
new file mode 100644
index 0000000..b785c75
--- /dev/null
+++ b/share/man/man4/tdfx.4
@@ -0,0 +1,93 @@
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 19, 2001
+.Dt TDFX 4
+.Os
+.Sh NAME
+.Nm tdfx
+.Nd Voodoo Graphics and VoodooII Memory Access GLIDE device driver
+.Sh SYNOPSIS
+.Cd device tdfx
+.Cd device tdfx_linux
+.Sh DESCRIPTION
+This driver creates an entry in
+.Pa /dev
+that allows programs (mostly
+.Em GLIDE-based software )
+to access the device memory of the Voodoo Graphics and
+VoodooII 3D accelerators created by
+.Em 3Dfx, Inc .
+This provides an interface
+for applications based on the
+.Em GLIDE API
+or that simply use the API
+provided by the linux
+.Pa /dev/3dfx
+device to use the video device.
+.Pp
+Supports all cards based on the following chipsets:
+.Pp
+.Bl -item -offset indent -compact
+.It
+.Em 3Dfx Voodoo Graphics
+.It
+.Em 3Dfx Voodoo II
+.El
+.Pp
+Specifically, the following cards should work:
+.Pp
+.Bl -item -offset indent -compact
+.It
+.Em Diamond Multimedia Monster 3D
+.It
+.Em Diamond Multimedia Monster 3D II
+.El
+.Pp
+Note that this driver does not currently have support for the Voodoo
+Banshee, Voodoo3, Voodoo5, or Voodoo6 based cards.
+It also does not currently support the Voodoo Rush.
+It also does not yet handle the SLI feature of the Voodoo II boards.
+You can only use each of them separately.
+.Pp
+By including
+.Nm tdfx_linux ,
+you can enable the linux ioctl code for this driver, where the only supported
+applications currently reside.
+.Sh FILES
+.Bl -tag -width /dev/voodoo* -compact
+.It Pa /dev/3dfx
+Symlinked to default
+.Em 3dfx
+board
+.It Pa /dev/3dfx*
+.Em Character Device
+programming interface
+.Pp
+.It Pa /dev/voodoo
+Mirrors of above interfaces
+.It Pa /dev/voodoo*
+(Some apps use
+.Pa /dev/voodoo )
+.El
+.Sh HISTORY
+The
+.Nm
+driver appeared in
+.Fx 5.0 ,
+and was originally developed for Linux kernel 2.0.x, later written for
+2.2.x and 2.4.x.
+.Sh AUTHORS
+.An -nosplit
+The driver was developed by
+.An Coleman Kane Aq cokane@micro.ti.com
+after the linux version of this driver by
+.An Darryll Straus ,
+.An John Taylor ,
+.An Jens Axboe ,
+.An Carlo Wood Aq carlo@alinoe.com
+and
+.An Joseph Kain Aq joseph@3dfx.com
+to be directly compatible with it and support the many GLIDE based games
+available for Linux and
+.Ux .
diff --git a/share/man/man4/terasic_mtl.4 b/share/man/man4/terasic_mtl.4
new file mode 100644
index 0000000..757efd1
--- /dev/null
+++ b/share/man/man4/terasic_mtl.4
@@ -0,0 +1,131 @@
+.\"-
+.\" Copyright (c) 2012 Robert N. M. Watson
+.\" All rights reserved.
+.\"
+.\" This software was developed by SRI International and the University of
+.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+.\" ("CTSRD"), as part of the DARPA CRASH research programme.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 18, 2012
+.Dt TERASIC_MTL 4
+.Os
+.Sh NAME
+.Nm terasic_mtl
+.Nd driver for the Terasic/Cambridge Multi-Touch LCD device
+.Sh SYNOPSIS
+.Cd "device terasic_mtl"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.terasic_mtl.0.at="nexus0"
+.Cd hint.terasic_mtl.0.reg_maddr=0x70400000
+.Cd hint.terasic_mtl.0.reg_msize=0x1000
+.Cd hint.terasic_mtl.0.pixel_maddr=0x70000000
+.Cd hint.terasic_mtl.0.pixel_msize=0x177000
+.Cd hint.terasic_mtl.0.text_maddr=0x70177000
+.Cd hint.terasic_mtl.0.text_msize=0x2000
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for the Terasic Multi-Touch LCD combined as
+controlled by a University of Cambridge's IP Core.
+Three device nodes are instantiated, representing various services supported
+by the device:
+.Bl -tag -width terasic_pixelX
+.It terasic_regX
+Memory-mapped register interface, including touch screen input.
+.It terasic_pixelX
+Memory-mapped pixel-oriented frame buffer.
+.It terasic_textX
+Memory-mapped text-oriented frame buffer.
+.El
+.Pp
+.Nm
+devices are also attached to the
+.Xr syscons 4
+framework, which implements a VT-compatible terminal connected to the
+.Xr tty 4
+framework.
+.Li ttyvX
+device nodes may be added to
+.Xr ttys 5
+in order to launch
+.Xr login 1
+sessions at boot.
+.Pp
+Register, text, and pixel devices may be accessed using
+.Xr read 2
+and
+.Xr write 2
+system calls, and also memory mapped using
+.Xr mmap 2 .
+.Sh SEE ALSO
+.Xr login 1 ,
+.Xr ioctl 2 ,
+.Xr mmap 2 ,
+.Xr poll 2 ,
+.Xr read 2 ,
+.Xr write 2 ,
+.Xr syscons 4 ,
+.Xr tty 4 ,
+.Xr ttys 5
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+The
+.Nm
+device driver and this manual page were
+developed by SRI International and the University of Cambridge Computer
+Laboratory under DARPA/AFRL contract
+.Pq FA8750-10-C-0237
+.Pq Do CTSRD Dc ,
+as part of the DARPA CRASH research programme.
+This device driver was written by
+.An Robert N. M. Watson .
+.Sh BUGS
+The
+.Xr syscons 4
+attachment does not support the hardware cursor feature.
+.Pp
+A more structured interface to control registers using the
+.Xr ioctl 2
+system call, would sometimes be preferable to memory mapping.
+For touch screen input, it would be highly desirable to offer a streaming
+interface whose events can be managed using
+.Xr poll 2
+and related system calls, with the kernel performing polling rather than the
+userspace application.
+.Pp
+.Nm
+supports only a
+.Li nexus
+bus attachment, which is appropriate for system-on-chip busses such as
+Altera's Avalon bus.
+If the IP core is configured off of another bus type, then additional bus
+attachments will be required.
diff --git a/share/man/man4/termios.4 b/share/man/man4/termios.4
new file mode 100644
index 0000000..6f38cf3
--- /dev/null
+++ b/share/man/man4/termios.4
@@ -0,0 +1,1583 @@
+.\" Copyright (c) 1991, 1992, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)termios.4 8.4 (Berkeley) 4/19/94
+.\" $FreeBSD$
+.\"
+.Dd December 26, 2009
+.Dt TERMIOS 4
+.Os
+.Sh NAME
+.Nm termios
+.Nd general terminal line discipline
+.Sh SYNOPSIS
+.In termios.h
+.Sh DESCRIPTION
+This describes a general terminal line discipline that is
+supported on tty asynchronous communication ports.
+.Ss Opening a Terminal Device File
+When a terminal file is opened, it normally causes the process to wait
+until a connection is established.
+For most hardware, the presence
+of a connection is indicated by the assertion of the hardware
+.Dv CARRIER
+line.
+If the termios structure associated with the terminal file has the
+.Dv CLOCAL
+flag set in the cflag, or if the
+.Dv O_NONBLOCK
+flag is set
+in the
+.Xr open 2
+call, then the open will succeed even without
+a connection being present.
+In practice, applications
+seldom open these files; they are opened by special programs, such
+as
+.Xr getty 8
+or
+.Xr rlogind 8 ,
+and become
+an application's standard input, output, and error files.
+.Ss Job Control in a Nutshell
+Every process is associated with a particular process group and session.
+The grouping is hierarchical: every member of a particular process group is a
+member of the same session.
+This structuring is used in managing groups
+of related processes for purposes of
+.\" .Gw "job control" ;
+.Em "job control" ;
+that is, the
+ability from the keyboard (or from program control) to simultaneously
+stop or restart
+a complex command (a command composed of one or more related
+processes).
+The grouping into process groups allows delivering
+of signals that stop or start the group as a whole, along with
+arbitrating which process group has access to the single controlling
+terminal.
+The grouping at a higher layer into sessions is to restrict
+the job control related signals and system calls to within processes
+resulting from a particular instance of a
+.Dq login .
+Typically, a session
+is created when a user logs in, and the login terminal is setup
+to be the controlling terminal; all processes spawned from that
+login shell are in the same session, and inherit the controlling
+terminal.
+.Pp
+A job control shell
+operating interactively (that is, reading commands from a terminal)
+normally groups related processes together by placing them into the
+same process group.
+A set of processes in the same process group
+is collectively referred to as a
+.Dq job .
+When the foreground process
+group of the terminal is the same as the process group of a particular
+job, that job is said to be in the
+.Dq foreground .
+When the process group of the terminal is different from the process group of
+a job (but is still the controlling terminal), that job is said
+to be in the
+.Dq background .
+Normally the
+shell reads a command and starts the job that implements that
+command.
+If the command is to be started in the foreground (typical), it
+sets the process group of the terminal to the process group
+of the started job, waits for the job to complete, and then
+sets the process group of the terminal back to its own process
+group (it puts itself into the foreground).
+If the job is to
+be started in the background (as denoted by the shell operator "&"),
+it never changes the process group of the terminal and does not
+wait for the job to complete (that is, it immediately attempts to read the next
+command).
+If the job is started in the foreground, the user may
+type a key (usually
+.Ql \&^Z )
+which generates the terminal stop signal
+.Pq Dv SIGTSTP
+and has the effect of stopping the entire job.
+The shell will notice that the job stopped, and will resume running after
+placing itself in the foreground.
+The shell also has commands for placing stopped jobs in the background,
+and for placing stopped or background jobs into the foreground.
+.Ss Orphaned Process Groups
+An orphaned process group is a process group that has no process
+whose parent is in a different process group, yet is in the same
+session.
+Conceptually it means a process group that does not have
+a parent that could do anything if it were to be stopped.
+For example,
+the initial login shell is typically in an orphaned process group.
+Orphaned process groups are immune to keyboard generated stop
+signals and job control signals resulting from reads or writes to the
+controlling terminal.
+.Ss The Controlling Terminal
+A terminal may belong to a process as its controlling terminal.
+Each
+process of a session that has a controlling terminal has the same
+controlling terminal.
+A terminal may be the controlling terminal for at
+most one session.
+The controlling terminal for a session is allocated by
+the session leader by issuing the
+.Dv TIOCSCTTY
+ioctl.
+A controlling terminal
+is never acquired by merely opening a terminal device file.
+When a controlling terminal becomes
+associated with a session, its foreground process group is set to
+the process group of the session leader.
+.Pp
+The controlling terminal is inherited by a child process during a
+.Xr fork 2
+function call.
+A process relinquishes its controlling terminal when it
+creates a new session with the
+.Xr setsid 2
+function; other processes
+remaining in the old session that had this terminal as their controlling
+terminal continue to have it.
+A process does not relinquish its
+controlling terminal simply by closing all of its file descriptors
+associated with the controlling terminal if other processes continue to
+have it open.
+.Pp
+When a controlling process terminates, the controlling terminal is
+disassociated from the current session, allowing it to be acquired by a
+new session leader.
+Subsequent access to the terminal by other processes
+in the earlier session will be denied, with attempts to access the
+terminal treated as if modem disconnect had been sensed.
+.Ss Terminal Access Control
+If a process is in the foreground process group of its controlling
+terminal, read operations are allowed.
+Any attempts by a process
+in a background process group to read from its controlling terminal
+causes a
+.Dv SIGTTIN
+signal to be sent to
+the process's group
+unless one of the
+following special cases apply: if the reading process is ignoring or
+blocking the
+.Dv SIGTTIN
+signal, or if the process group of the reading
+process is orphaned, the
+.Xr read 2
+returns -1 with
+.Va errno
+set to
+.Er EIO
+and no
+signal is sent.
+The default action of the
+.Dv SIGTTIN
+signal is to stop the
+process to which it is sent.
+.Pp
+If a process is in the foreground process group of its controlling
+terminal, write operations are allowed.
+Attempts by a process in a background process group to write to its
+controlling terminal will cause the process group to be sent a
+.Dv SIGTTOU
+signal unless one of the following special cases apply: if
+.Dv TOSTOP
+is not
+set, or if
+.Dv TOSTOP
+is set and the process is ignoring or blocking the
+.Dv SIGTTOU
+signal, the process is allowed to write to the terminal and the
+.Dv SIGTTOU
+signal is not sent.
+If
+.Dv TOSTOP
+is set, and the process group of
+the writing process is orphaned, and the writing process is not ignoring
+or blocking
+.Dv SIGTTOU ,
+the
+.Xr write 2
+returns -1 with
+errno set to
+.Er EIO
+and no signal is sent.
+.Pp
+Certain calls that set terminal parameters are treated in the same
+fashion as write, except that
+.Dv TOSTOP
+is ignored; that is, the effect is
+identical to that of terminal writes when
+.Dv TOSTOP
+is set.
+.Ss Input Processing and Reading Data
+A terminal device associated with a terminal device file may operate in
+full-duplex mode, so that data may arrive even while output is occurring.
+Each terminal device file has associated with it an input queue, into
+which incoming data is stored by the system before being read by a
+process.
+The system imposes a limit,
+.Pf \&{ Dv MAX_INPUT Ns \&} ,
+on the number of
+bytes that may be stored in the input queue.
+The behavior of the system
+when this limit is exceeded depends on the setting of the
+.Dv IMAXBEL
+flag in the termios
+.Fa c_iflag .
+If this flag is set, the terminal
+is sent an
+.Tn ASCII
+.Dv BEL
+character each time a character is received
+while the input queue is full.
+Otherwise, the input queue is flushed upon receiving the character.
+.Pp
+Two general kinds of input processing are available, determined by
+whether the terminal device file is in canonical mode or noncanonical
+mode.
+Additionally,
+input characters are processed according to the
+.Fa c_iflag
+and
+.Fa c_lflag
+fields.
+Such processing can include echoing, which
+in general means transmitting input characters immediately back to the
+terminal when they are received from the terminal.
+This is useful for terminals that can operate in full-duplex mode.
+.Pp
+The manner in which data is provided to a process reading from a terminal
+device file is dependent on whether the terminal device file is in
+canonical or noncanonical mode.
+.Pp
+Another dependency is whether the
+.Dv O_NONBLOCK
+flag is set by
+.Xr open 2
+or
+.Xr fcntl 2 .
+If the
+.Dv O_NONBLOCK
+flag is clear, then the read request is
+blocked until data is available or a signal has been received.
+If the
+.Dv O_NONBLOCK
+flag is set, then the read request is completed, without
+blocking, in one of three ways:
+.Bl -enum -offset indent
+.It
+If there is enough data available to satisfy the entire request,
+and the read completes successfully the number of
+bytes read is returned.
+.It
+If there is not enough data available to satisfy the entire
+request, and the read completes successfully, having read as
+much data as possible, the number of bytes read is returned.
+.It
+If there is no data available, the read returns -1, with
+errno set to
+.Er EAGAIN .
+.El
+.Pp
+When data is available depends on whether the input processing mode is
+canonical or noncanonical.
+.Ss Canonical Mode Input Processing
+In canonical mode input processing, terminal input is processed in units
+of lines.
+A line is delimited by a newline
+.Ql \&\en
+character, an end-of-file
+.Pq Dv EOF
+character, or an end-of-line
+.Pq Dv EOL
+character.
+See the
+.Sx "Special Characters"
+section for
+more information on
+.Dv EOF
+and
+.Dv EOL .
+This means that a read request will
+not return until an entire line has been typed, or a signal has been
+received.
+Also, no matter how many bytes are requested in the read call,
+at most one line is returned.
+It is not, however, necessary to
+read a whole line at once; any number of bytes, even one, may be
+requested in a read without losing information.
+.Pp
+.Pf \&{ Dv MAX_CANON Ns \&}
+is a limit on the
+number of bytes in a line.
+The behavior of the system when this limit is
+exceeded is the same as when the input queue limit
+.Pf \&{ Dv MAX_INPUT Ns \&} ,
+is exceeded.
+.Pp
+Erase and kill processing occur when either of two special characters,
+the
+.Dv ERASE
+and
+.Dv KILL
+characters (see the
+.Sx "Special Characters"
+section), is received.
+This processing affects data in the input queue that has not yet been
+delimited by a newline
+.Dv NL ,
+.Dv EOF ,
+or
+.Dv EOL
+character.
+This un-delimited
+data makes up the current line.
+The
+.Dv ERASE
+character deletes the last
+character in the current line, if there is any.
+The
+.Dv KILL
+character
+deletes all data in the current line, if there is any.
+The
+.Dv ERASE
+and
+.Dv KILL
+characters have no effect if there is no data in the current line.
+The
+.Dv ERASE
+and
+.Dv KILL
+characters themselves are not placed in the input
+queue.
+.Ss Noncanonical Mode Input Processing
+In noncanonical mode input processing, input bytes are not assembled into
+lines, and erase and kill processing does not occur.
+The values of the
+.Dv VMIN
+and
+.Dv VTIME
+members of the
+.Fa c_cc
+array are used to determine how to
+process the bytes received.
+.Pp
+.Dv MIN
+represents the minimum number of bytes that should be received when
+the
+.Xr read 2
+function successfully returns.
+.Dv TIME
+is a timer of 0.1 second
+granularity that is used to time out bursty and short term data
+transmissions.
+If
+.Dv MIN
+is greater than
+.Dv \&{ Dv MAX_INPUT Ns \&} ,
+the response to the
+request is undefined.
+The four possible values for
+.Dv MIN
+and
+.Dv TIME
+and
+their interactions are described below.
+.Ss "Case A: MIN > 0, TIME > 0"
+In this case
+.Dv TIME
+serves as an inter-byte timer and is activated after
+the first byte is received.
+Since it is an inter-byte timer, it is reset
+after a byte is received.
+The interaction between
+.Dv MIN
+and
+.Dv TIME
+is as
+follows: as soon as one byte is received, the inter-byte timer is
+started.
+If
+.Dv MIN
+bytes are received before the inter-byte timer expires
+(remember that the timer is reset upon receipt of each byte), the read is
+satisfied.
+If the timer expires before
+.Dv MIN
+bytes are received, the
+characters received to that point are returned to the user.
+Note that if
+.Dv TIME
+expires at least one byte is returned because the timer would
+not have been enabled unless a byte was received.
+In this case
+.Pf \&( Dv MIN
+> 0,
+.Dv TIME
+> 0) the read blocks until the
+.Dv MIN
+and
+.Dv TIME
+mechanisms are
+activated by the receipt of the first byte, or a signal is received.
+If data is in the buffer at the time of the
+.Fn read ,
+the result is as
+if data had been received immediately after the
+.Fn read .
+.Ss "Case B: MIN > 0, TIME = 0"
+In this case, since the value of
+.Dv TIME
+is zero, the timer plays no role
+and only
+.Dv MIN
+is significant.
+A pending read is not satisfied until
+.Dv MIN
+bytes are received (i.e., the pending read blocks until
+.Dv MIN
+bytes
+are received), or a signal is received.
+A program that uses this case to read record-based terminal
+.Dv I/O
+may block indefinitely in the read
+operation.
+.Ss "Case C: MIN = 0, TIME > 0"
+In this case, since
+.Dv MIN
+= 0,
+.Dv TIME
+no longer represents an inter-byte
+timer.
+It now serves as a read timer that is activated as soon as the
+read function is processed.
+A read is satisfied as soon as a single
+byte is received or the read timer expires.
+Note that in this case if the timer expires, no bytes are returned.
+If the timer does not
+expire, the only way the read can be satisfied is if a byte is received.
+In this case the read will not block indefinitely waiting for a byte; if
+no byte is received within
+.Dv TIME Ns *0.1
+seconds after the read is initiated,
+the read returns a value of zero, having read no data.
+If data is
+in the buffer at the time of the read, the timer is started as if
+data had been received immediately after the read.
+.Ss Case D: MIN = 0, TIME = 0
+The minimum of either the number of bytes requested or the number of
+bytes currently available is returned without waiting for more
+bytes to be input.
+If no characters are available, read returns a
+value of zero, having read no data.
+.Ss Writing Data and Output Processing
+When a process writes one or more bytes to a terminal device file, they
+are processed according to the
+.Fa c_oflag
+field (see the
+.Sx "Output Modes"
+section).
+The
+implementation may provide a buffering mechanism; as such, when a call to
+.Fn write
+completes, all of the bytes written have been scheduled for
+transmission to the device, but the transmission will not necessarily
+have been completed.
+.\" See also .Sx "6.4.2" for the effects of
+.\" .Dv O_NONBLOCK
+.\" on write.
+.Ss Special Characters
+Certain characters have special functions on input or output or both.
+These functions are summarized as follows:
+.Bl -tag -width indent
+.It Dv INTR
+Special character on input and is recognized if the
+.Dv ISIG
+flag (see the
+.Sx "Local Modes"
+section) is enabled.
+Generates a
+.Dv SIGINT
+signal which is sent to all processes in the foreground
+process group for which the terminal is the controlling
+terminal.
+If
+.Dv ISIG
+is set, the
+.Dv INTR
+character is
+discarded when processed.
+.It Dv QUIT
+Special character on input and is recognized if the
+.Dv ISIG
+flag is enabled.
+Generates a
+.Dv SIGQUIT
+signal which is
+sent to all processes in the foreground process group
+for which the terminal is the controlling terminal.
+If
+.Dv ISIG
+is set, the
+.Dv QUIT
+character is discarded when
+processed.
+.It Dv ERASE
+Special character on input and is recognized if the
+.Dv ICANON
+flag is set.
+Erases the last character in the
+current line; see
+.Sx "Canonical Mode Input Processing" .
+It does not erase beyond
+the start of a line, as delimited by an
+.Dv NL ,
+.Dv EOF ,
+or
+.Dv EOL
+character.
+If
+.Dv ICANON
+is set, the
+.Dv ERASE
+character is
+discarded when processed.
+.It Dv KILL
+Special character on input and is recognized if the
+.Dv ICANON
+flag is set.
+Deletes the entire line, as
+delimited by a
+.Dv NL ,
+.Dv EOF ,
+or
+.Dv EOL
+character.
+If
+.Dv ICANON
+is set, the
+.Dv KILL
+character is discarded when processed.
+.It Dv EOF
+Special character on input and is recognized if the
+.Dv ICANON
+flag is set.
+When received, all the bytes
+waiting to be read are immediately passed to the
+process, without waiting for a newline, and the
+.Dv EOF
+is discarded.
+Thus, if there are no bytes waiting (that is, the
+.Dv EOF
+occurred at the beginning of a line), a byte
+count of zero is returned from the
+.Fn read ,
+representing an end-of-file indication.
+If
+.Dv ICANON
+is
+set, the
+.Dv EOF
+character is discarded when processed.
+.It Dv NL
+Special character on input and is recognized if the
+.Dv ICANON
+flag is set.
+It is the line delimiter
+.Ql \&\en .
+.It Dv EOL
+Special character on input and is recognized if the
+.Dv ICANON
+flag is set.
+Is an additional line delimiter, like
+.Dv NL .
+.It Dv SUSP
+If the
+.Dv ISIG
+flag is enabled, receipt of the
+.Dv SUSP
+character causes a
+.Dv SIGTSTP
+signal to be sent to all processes in the
+foreground process group for which the terminal is the
+controlling terminal, and the
+.Dv SUSP
+character is
+discarded when processed.
+.It Dv STOP
+Special character on both input and output and is
+recognized if the
+.Dv IXON
+(output control) or
+.Dv IXOFF
+(input
+control) flag is set.
+Can be used to temporarily suspend output.
+It is useful with fast terminals to
+prevent output from disappearing before it can be read.
+If
+.Dv IXON
+is set, the
+.Dv STOP
+character is discarded when
+processed.
+.It Dv START
+Special character on both input and output and is
+recognized if the
+.Dv IXON
+(output control) or
+.Dv IXOFF
+(input
+control) flag is set.
+Can be used to resume output that has been suspended by a
+.Dv STOP
+character.
+If
+.Dv IXON
+is set, the
+.Dv START
+character is discarded when processed.
+.It Dv CR
+Special character on input and is recognized if the
+.Dv ICANON
+flag is set; it is the
+.Ql \&\er ,
+as denoted in the
+.Tn \&C
+Standard {2}.
+When
+.Dv ICANON
+and
+.Dv ICRNL
+are set and
+.Dv IGNCR
+is not set, this character is translated into a
+.Dv NL ,
+and
+has the same effect as a
+.Dv NL
+character.
+.El
+.Pp
+The following special characters are extensions defined by this
+system and are not a part of
+.St -p1003.1
+termios.
+.Bl -tag -width indent
+.It Dv EOL2
+Secondary
+.Dv EOL
+character.
+Same function as
+.Dv EOL .
+.It Dv WERASE
+Special character on input and is recognized if the
+.Dv ICANON
+flag is set.
+Erases the last word in the current line according to one of two algorithms.
+If the
+.Dv ALTWERASE
+flag is not set, first any preceding whitespace is
+erased, and then the maximal sequence of non-whitespace
+characters.
+If
+.Dv ALTWERASE
+is set, first any preceding
+whitespace is erased, and then the maximal sequence
+of alphabetic/underscores or non alphabetic/underscores.
+As a special case in this second algorithm, the first previous
+non-whitespace character is skipped in determining
+whether the preceding word is a sequence of
+alphabetic/underscores.
+This sounds confusing but turns out to be quite practical.
+.It Dv REPRINT
+Special character on input and is recognized if the
+.Dv ICANON
+flag is set.
+Causes the current input edit line to be retyped.
+.It Dv DSUSP
+Has similar actions to the
+.Dv SUSP
+character, except that
+the
+.Dv SIGTSTP
+signal is delivered when one of the processes
+in the foreground process group issues a
+.Fn read
+to the
+controlling terminal.
+.It Dv LNEXT
+Special character on input and is recognized if the
+.Dv IEXTEN
+flag is set.
+Receipt of this character causes the next character to be taken literally.
+.It Dv DISCARD
+Special character on input and is recognized if the
+.Dv IEXTEN
+flag is set.
+Receipt of this character toggles the flushing of terminal output.
+.It Dv STATUS
+Special character on input and is recognized if the
+.Dv ICANON
+flag is set.
+Receipt of this character causes a
+.Dv SIGINFO
+signal to be sent to the foreground process group of the
+terminal.
+Also, if the
+.Dv NOKERNINFO
+flag is not set, it
+causes the kernel to write a status message to the terminal
+that displays the current load average, the name of the
+command in the foreground, its process ID, the symbolic
+wait channel, the number of user and system seconds used,
+the percentage of cpu the process is getting, and the resident
+set size of the process.
+.El
+.Pp
+The
+.Dv NL
+and
+.Dv CR
+characters cannot be changed.
+The values for all the remaining characters can be set and are
+described later in the document under
+Special Control Characters.
+.Pp
+Special
+character functions associated with changeable special control characters
+can be disabled individually by setting their value to
+.Dv {_POSIX_VDISABLE} ;
+see
+.Sx "Special Control Characters" .
+.Pp
+If two or more special characters have the same value, the function
+performed when that character is received is undefined.
+.Ss Modem Disconnect
+If a modem disconnect is detected by the terminal interface for a
+controlling terminal, and if
+.Dv CLOCAL
+is not set in the
+.Fa c_cflag
+field for
+the terminal, the
+.Dv SIGHUP
+signal is sent to the controlling
+process associated with the terminal.
+Unless other arrangements have
+been made, this causes the controlling process to terminate.
+Any subsequent call to the
+.Fn read
+function returns the value zero,
+indicating end of file.
+Thus, processes that read a terminal
+file and test for end-of-file can terminate appropriately after a
+disconnect.
+.\" If the
+.\" .Er EIO
+.\" condition specified in 6.1.1.4 that applies
+.\" when the implementation supports job control also exists, it is
+.\" unspecified whether the
+.\" .Dv EOF
+.\" condition or the
+.\" .Pf [ Dv EIO
+.\" ] is returned.
+Any
+subsequent
+.Fn write
+to the terminal device returns -1, with
+.Va errno
+set to
+.Er EIO ,
+until the device is closed.
+.Sh General Terminal Interface
+.Ss Closing a Terminal Device File
+The last process to close a terminal device file causes any output
+to be sent to the device and any input to be discarded.
+Then, if
+.Dv HUPCL
+is set in the control modes, and the communications port supports a
+disconnect function, the terminal device performs a disconnect.
+.Ss Parameters That Can Be Set
+Routines that need to control certain terminal
+.Tn I/O
+characteristics
+do so by using the termios structure as defined in the header
+.In termios.h .
+This structure contains minimally four scalar elements of bit flags
+and one array of special characters.
+The scalar flag elements are named:
+.Fa c_iflag ,
+.Fa c_oflag ,
+.Fa c_cflag ,
+and
+.Fa c_lflag .
+The character array is named
+.Fa c_cc ,
+and its maximum index is
+.Dv NCCS .
+.Ss Input Modes
+Values of the
+.Fa c_iflag
+field describe the basic
+terminal input control, and are composed of
+following masks:
+.Pp
+.Bl -tag -width IMAXBEL -offset indent -compact
+.It Dv IGNBRK
+/* ignore BREAK condition */
+.It Dv BRKINT
+/* map BREAK to SIGINTR */
+.It Dv IGNPAR
+/* ignore (discard) parity errors */
+.It Dv PARMRK
+/* mark parity and framing errors */
+.It Dv INPCK
+/* enable checking of parity errors */
+.It Dv ISTRIP
+/* strip 8th bit off chars */
+.It Dv INLCR
+/* map NL into CR */
+.It Dv IGNCR
+/* ignore CR */
+.It Dv ICRNL
+/* map CR to NL (ala CRMOD) */
+.It Dv IXON
+/* enable output flow control */
+.It Dv IXOFF
+/* enable input flow control */
+.It Dv IXANY
+/* any char will restart after stop */
+.It Dv IMAXBEL
+/* ring bell on input queue full */
+.El
+.Pp
+In the context of asynchronous serial data transmission, a break
+condition is defined as a sequence of zero-valued bits that continues for
+more than the time to send one byte.
+The entire sequence of zero-valued
+bits is interpreted as a single break condition, even if it continues for
+a time equivalent to more than one byte.
+In contexts other than
+asynchronous serial data transmission the definition of a break condition
+is implementation defined.
+.Pp
+If
+.Dv IGNBRK
+is set, a break condition detected on input is ignored, that
+is, not put on the input queue and therefore not read by any process.
+If
+.Dv IGNBRK
+is not set and
+.Dv BRKINT
+is set, the break condition flushes the
+input and output queues and if the terminal is the controlling terminal
+of a foreground process group, the break condition generates a
+single
+.Dv SIGINT
+signal to that foreground process group.
+If neither
+.Dv IGNBRK
+nor
+.Dv BRKINT
+is set, a break condition is read as a single
+.Ql \&\e0 ,
+or if
+.Dv PARMRK
+is set, as
+.Ql \&\e377 ,
+.Ql \&\e0 ,
+.Ql \&\e0 .
+.Pp
+If
+.Dv IGNPAR
+is set, a byte with a framing or parity error (other than
+break) is ignored.
+.Pp
+If
+.Dv PARMRK
+is set, and
+.Dv IGNPAR
+is not set, a byte with a framing or parity
+error (other than break) is given to the application as the
+three-character sequence
+.Ql \&\e377 ,
+.Ql \&\e0 ,
+X, where
+.Ql \&\e377 ,
+.Ql \&\e0
+is a two-character
+flag preceding each sequence and X is the data of the character received
+in error.
+To avoid ambiguity in this case, if
+.Dv ISTRIP
+is not set, a valid
+character of
+.Ql \&\e377
+is given to the application as
+.Ql \&\e377 ,
+.Ql \&\e377 .
+If
+neither
+.Dv PARMRK
+nor
+.Dv IGNPAR
+is set, a framing or parity error (other than
+break) is given to the application as a single character
+.Ql \&\e0 .
+.Pp
+If
+.Dv INPCK
+is set, input parity checking is enabled.
+If
+.Dv INPCK
+is not set,
+input parity checking is disabled, allowing output parity generation
+without input parity errors.
+Note that whether input parity checking is
+enabled or disabled is independent of whether parity detection is enabled
+or disabled (see
+.Sx "Control Modes" ) .
+If parity detection is enabled but input
+parity checking is disabled, the hardware to which the terminal is
+connected recognizes the parity bit, but the terminal special file
+does not check whether this bit is set correctly or not.
+.Pp
+If
+.Dv ISTRIP
+is set, valid input bytes are first stripped to seven bits,
+otherwise all eight bits are processed.
+.Pp
+If
+.Dv INLCR
+is set, a received
+.Dv NL
+character is translated into a
+.Dv CR
+character.
+If
+.Dv IGNCR
+is set, a received
+.Dv CR
+character is ignored (not
+read).
+If
+.Dv IGNCR
+is not set and
+.Dv ICRNL
+is set, a received
+.Dv CR
+character is
+translated into a
+.Dv NL
+character.
+.Pp
+If
+.Dv IXON
+is set, start/stop output control is enabled.
+A received
+.Dv STOP
+character suspends output and a received
+.Dv START
+character
+restarts output.
+If
+.Dv IXANY
+is also set, then any character may
+restart output.
+When
+.Dv IXON
+is set,
+.Dv START
+and
+.Dv STOP
+characters are not
+read, but merely perform flow control functions.
+When
+.Dv IXON
+is not set,
+the
+.Dv START
+and
+.Dv STOP
+characters are read.
+.Pp
+If
+.Dv IXOFF
+is set, start/stop input control is enabled.
+The system shall transmit one or more
+.Dv STOP
+characters, which are intended to cause the
+terminal device to stop transmitting data, as needed to prevent the input
+queue from overflowing and causing the undefined behavior described in
+.Sx "Input Processing and Reading Data" ,
+and shall transmit one or more
+.Dv START
+characters, which are
+intended to cause the terminal device to resume transmitting data, as
+soon as the device can continue transmitting data without risk of
+overflowing the input queue.
+The precise conditions under which
+.Dv STOP
+and
+.Dv START
+characters are transmitted are implementation defined.
+.Pp
+If
+.Dv IMAXBEL
+is set and the input queue is full, subsequent input shall cause an
+.Tn ASCII
+.Dv BEL
+character to be transmitted to
+the output queue.
+.Pp
+The initial input control value after
+.Fn open
+is implementation defined.
+.Ss Output Modes
+Values of the
+.Fa c_oflag
+field describe the basic terminal output control,
+and are composed of the following masks:
+.Pp
+.Bl -tag -width ONOEOT -offset indent -compact
+.It Dv OPOST
+/* enable following output processing */
+.It Dv ONLCR
+/* map NL to CR-NL (ala
+.Dv CRMOD )
+*/
+.It Dv OCRNL
+/* map CR to NL */
+.It Dv TABDLY
+/* tab delay mask */
+.It Dv TAB0
+/* no tab delay and expansion */
+.It Dv TAB3
+/* expand tabs to spaces */
+.It Dv ONOEOT
+/* discard
+.Dv EOT Ns 's
+.Ql \&^D
+on output) */
+.It Dv ONOCR
+/* do not transmit CRs on column 0 */
+.It Dv ONLRET
+/* on the terminal NL performs the CR function */
+.El
+.Pp
+If
+.Dv OPOST
+is set, the remaining flag masks are interpreted as follows;
+otherwise characters are transmitted without change.
+.Pp
+If
+.Dv ONLCR
+is set, newlines are translated to carriage return, linefeeds.
+.Pp
+If
+.Dv OCRNL
+is set, carriage returns are translated to newlines.
+.Pp
+The
+.Dv TABDLY
+bits specify the tab delay.
+The
+.Fa c_oflag
+is masked with
+.Dv TABDLY
+and compared with the
+values
+.Dv TAB0
+or
+.Dv TAB3 .
+If
+.Dv TAB3
+is set, tabs are expanded to the appropriate number of
+spaces (assuming 8 column tab stops).
+.Pp
+If
+.Dv ONOEOT
+is set,
+.Tn ASCII
+.Dv EOT Ns 's
+are discarded on output.
+.Pp
+If
+.Dv ONOCR
+is set, no CR character is transmitted when at column 0 (first position).
+.Pp
+If
+.Dv ONLRET
+is set, the NL character is assumed to do the carriage-return function;
+the column pointer will be set to 0.
+.Ss Control Modes
+Values of the
+.Fa c_cflag
+field describe the basic
+terminal hardware control, and are composed of the
+following masks.
+Not all values
+specified are supported by all hardware.
+.Pp
+.Bl -tag -width CRTSXIFLOW -offset indent -compact
+.It Dv CSIZE
+/* character size mask */
+.It Dv CS5
+/* 5 bits (pseudo) */
+.It Dv CS6
+/* 6 bits */
+.It Dv CS7
+/* 7 bits */
+.It Dv CS8
+/* 8 bits */
+.It Dv CSTOPB
+/* send 2 stop bits */
+.It Dv CREAD
+/* enable receiver */
+.It Dv PARENB
+/* parity enable */
+.It Dv PARODD
+/* odd parity, else even */
+.It Dv HUPCL
+/* hang up on last close */
+.It Dv CLOCAL
+/* ignore modem status lines */
+.It Dv CCTS_OFLOW
+/*
+.Dv CTS
+flow control of output */
+.It Dv CRTSCTS
+/* same as
+.Dv CCTS_OFLOW
+*/
+.It Dv CRTS_IFLOW
+/* RTS flow control of input */
+.It Dv MDMBUF
+/* flow control output via Carrier */
+.El
+.Pp
+The
+.Dv CSIZE
+bits specify the byte size in bits for both transmission and
+reception.
+The
+.Fa c_cflag
+is masked with
+.Dv CSIZE
+and compared with the
+values
+.Dv CS5 ,
+.Dv CS6 ,
+.Dv CS7 ,
+or
+.Dv CS8 .
+This size does not include the parity bit, if any.
+If
+.Dv CSTOPB
+is set, two stop bits are used, otherwise one stop bit.
+For example, at 110 baud, two stop bits are normally used.
+.Pp
+If
+.Dv CREAD
+is set, the receiver is enabled.
+Otherwise, no character is received.
+Not all hardware supports this bit.
+In fact, this flag is pretty silly and if it were not part of the
+.Nm
+specification
+it would be omitted.
+.Pp
+If
+.Dv PARENB
+is set, parity generation and detection are enabled and a parity
+bit is added to each character.
+If parity is enabled,
+.Dv PARODD
+specifies
+odd parity if set, otherwise even parity is used.
+.Pp
+If
+.Dv HUPCL
+is set, the modem control lines for the port are lowered
+when the last process with the port open closes the port or the process
+terminates.
+The modem connection is broken.
+.Pp
+If
+.Dv CLOCAL
+is set, a connection does not depend on the state of the modem
+status lines.
+If
+.Dv CLOCAL
+is clear, the modem status lines are
+monitored.
+.Pp
+Under normal circumstances, a call to the
+.Fn open
+function waits for
+the modem connection to complete.
+However, if the
+.Dv O_NONBLOCK
+flag is set
+or if
+.Dv CLOCAL
+has been set, the
+.Fn open
+function returns
+immediately without waiting for the connection.
+.Pp
+The
+.Dv CCTS_OFLOW
+.Pf ( Dv CRTSCTS )
+flag is currently unused.
+.Pp
+If
+.Dv MDMBUF
+is set then output flow control is controlled by the state
+of Carrier Detect.
+.Pp
+If the object for which the control modes are set is not an asynchronous
+serial connection, some of the modes may be ignored; for example, if an
+attempt is made to set the baud rate on a network connection to a
+terminal on another host, the baud rate may or may not be set on the
+connection between that terminal and the machine it is directly connected
+to.
+.Ss Local Modes
+Values of the
+.Fa c_lflag
+field describe the control of
+various functions, and are composed of the following
+masks.
+.Pp
+.Bl -tag -width NOKERNINFO -offset indent -compact
+.It Dv ECHOKE
+/* visual erase for line kill */
+.It Dv ECHOE
+/* visually erase chars */
+.It Dv ECHO
+/* enable echoing */
+.It Dv ECHONL
+/* echo
+.Dv NL
+even if
+.Dv ECHO
+is off */
+.It Dv ECHOPRT
+/* visual erase mode for hardcopy */
+.It Dv ECHOCTL
+/* echo control chars as ^(Char) */
+.It Dv ISIG
+/* enable signals
+.Dv INTR ,
+.Dv QUIT ,
+.Dv [D]SUSP
+*/
+.It Dv ICANON
+/* canonicalize input lines */
+.It Dv ALTWERASE
+/* use alternate
+.Dv WERASE
+algorithm */
+.It Dv IEXTEN
+/* enable
+.Dv DISCARD
+and
+.Dv LNEXT
+*/
+.It Dv EXTPROC
+/* external processing */
+.It Dv TOSTOP
+/* stop background jobs from output */
+.It Dv FLUSHO
+/* output being flushed (state) */
+.It Dv NOKERNINFO
+/* no kernel output from
+.Dv VSTATUS
+*/
+.It Dv PENDIN
+/* XXX retype pending input (state) */
+.It Dv NOFLSH
+/* don't flush after interrupt */
+.El
+.Pp
+If
+.Dv ECHO
+is set, input characters are echoed back to the terminal.
+If
+.Dv ECHO
+is not set, input characters are not echoed.
+.Pp
+If
+.Dv ECHOE
+and
+.Dv ICANON
+are set, the
+.Dv ERASE
+character causes the terminal
+to erase the last character in the current line from the display, if
+possible.
+If there is no character to erase, an implementation may echo
+an indication that this was the case or do nothing.
+.Pp
+If
+.Dv ECHOK
+and
+.Dv ICANON
+are set, the
+.Dv KILL
+character causes
+the current line to be discarded and the system echoes the
+.Ql \&\en
+character after the
+.Dv KILL
+character.
+.Pp
+If
+.Dv ECHOKE
+and
+.Dv ICANON
+are set, the
+.Dv KILL
+character causes
+the current line to be discarded and the system causes
+the terminal
+to erase the line from the display.
+.Pp
+If
+.Dv ECHOPRT
+and
+.Dv ICANON
+are set, the system assumes
+that the display is a printing device and prints a
+backslash and the erased characters when processing
+.Dv ERASE
+characters, followed by a forward slash.
+.Pp
+If
+.Dv ECHOCTL
+is set, the system echoes control characters
+in a visible fashion using a caret followed by the control character.
+.Pp
+If
+.Dv ALTWERASE
+is set, the system uses an alternative algorithm
+for determining what constitutes a word when processing
+.Dv WERASE
+characters (see
+.Dv WERASE ) .
+.Pp
+If
+.Dv ECHONL
+and
+.Dv ICANON
+are set, the
+.Ql \&\en
+character echoes even if
+.Dv ECHO
+is not set.
+.Pp
+If
+.Dv ICANON
+is set, canonical processing is enabled.
+This enables the
+erase and kill edit functions, and the assembly of input characters into
+lines delimited by
+.Dv NL ,
+.Dv EOF ,
+and
+.Dv EOL ,
+as described in
+.Sx "Canonical Mode Input Processing" .
+.Pp
+If
+.Dv ICANON
+is not set, read requests are satisfied directly from the input
+queue.
+A read is not satisfied until at least
+.Dv MIN
+bytes have been
+received or the timeout value
+.Dv TIME
+expired between bytes.
+The time value
+represents tenths of seconds.
+See
+.Sx "Noncanonical Mode Input Processing"
+for more details.
+.Pp
+If
+.Dv ISIG
+is set, each input character is checked against the special
+control characters
+.Dv INTR ,
+.Dv QUIT ,
+and
+.Dv SUSP
+(job control only).
+If an input
+character matches one of these control characters, the function
+associated with that character is performed.
+If
+.Dv ISIG
+is not set, no
+checking is done.
+Thus these special input functions are possible only
+if
+.Dv ISIG
+is set.
+.Pp
+If
+.Dv IEXTEN
+is set, implementation-defined functions are recognized
+from the input data.
+How
+.Dv IEXTEN
+being set
+interacts with
+.Dv ICANON ,
+.Dv ISIG ,
+.Dv IXON ,
+or
+.Dv IXOFF
+is implementation defined.
+If
+.Dv IEXTEN
+is not set, then
+implementation-defined functions are not recognized, and the
+corresponding input characters are not processed as described for
+.Dv ICANON ,
+.Dv ISIG ,
+.Dv IXON ,
+and
+.Dv IXOFF .
+.Pp
+If
+.Dv NOFLSH
+is set, the normal flush of the input and output queues
+associated with the
+.Dv INTR ,
+.Dv QUIT ,
+and
+.Dv SUSP
+characters
+are not be done.
+.Pp
+If
+.Dv TOSTOP
+is set, the signal
+.Dv SIGTTOU
+is sent to the process group of a process that tries to write to
+its controlling terminal if it is not in the foreground process group for
+that terminal.
+This signal, by default, stops the members of the process group.
+Otherwise, the output generated by that process is output to the
+current output stream.
+Processes that are blocking or ignoring
+.Dv SIGTTOU
+signals are excepted and allowed to produce output and the
+.Dv SIGTTOU
+signal
+is not sent.
+.Pp
+If
+.Dv NOKERNINFO
+is set, the kernel does not produce a status message
+when processing
+.Dv STATUS
+characters (see
+.Dv STATUS ) .
+.Ss Special Control Characters
+The special control characters values are defined by the array
+.Fa c_cc .
+This table lists the array index, the corresponding special character,
+and the system default value.
+For an accurate list of
+the system defaults, consult the header file
+.In sys/ttydefaults.h .
+.Pp
+.Bl -column "Index Name" "Special Character" -offset indent -compact
+.It Em "Index Name Special Character Default Value"
+.It Dv VEOF Ta EOF Ta \&^D
+.It Dv VEOL Ta EOL Ta _POSIX_VDISABLE
+.It Dv VEOL2 Ta EOL2 Ta _POSIX_VDISABLE
+.It Dv VERASE Ta ERASE Ta \&^? Ql \&\e177
+.It Dv VWERASE Ta WERASE Ta \&^W
+.It Dv VKILL Ta KILL Ta \&^U
+.It Dv VREPRINT Ta REPRINT Ta \&^R
+.It Dv VINTR Ta INTR Ta \&^C
+.It Dv VQUIT Ta QUIT Ta \&^\e\e Ql \&\e34
+.It Dv VSUSP Ta SUSP Ta \&^Z
+.It Dv VDSUSP Ta DSUSP Ta \&^Y
+.It Dv VSTART Ta START Ta \&^Q
+.It Dv VSTOP Ta STOP Ta \&^S
+.It Dv VLNEXT Ta LNEXT Ta \&^V
+.It Dv VDISCARD Ta DISCARD Ta \&^O
+.It Dv VMIN Ta --- Ta \&1
+.It Dv VTIME Ta --- Ta \&0
+.It Dv VSTATUS Ta STATUS Ta \&^T
+.El
+.Pp
+If the
+value of one of the changeable special control characters (see
+.Sx "Special Characters" )
+is
+.Dv {_POSIX_VDISABLE} ,
+that function is disabled; that is, no input
+data is recognized as the disabled special character.
+If
+.Dv ICANON
+is
+not set, the value of
+.Dv {_POSIX_VDISABLE}
+has no special meaning for the
+.Dv VMIN
+and
+.Dv VTIME
+entries of the
+.Fa c_cc
+array.
+.Pp
+The initial values of the flags and control characters
+after
+.Fn open
+is set according to
+the values in the header
+.In sys/ttydefaults.h .
+.Sh SEE ALSO
+.Xr stty 1 ,
+.Xr tcgetsid 3 ,
+.Xr tcsendbreak 3 ,
+.Xr tcsetattr 3 ,
+.Xr tcsetsid 3 ,
+.Xr tty 4
diff --git a/share/man/man4/textdump.4 b/share/man/man4/textdump.4
new file mode 100644
index 0000000..f3aa5bd
--- /dev/null
+++ b/share/man/man4/textdump.4
@@ -0,0 +1,196 @@
+.\"
+.\" Copyright (c) 2007 Robert N. M. Watson
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice(s), this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified other than the possible
+.\" addition of one or more copyright notices.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice(s), this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
+.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
+.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+.\" DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 24, 2008
+.Dt TEXTDUMP 4
+.Os
+.Sh NAME
+.Nm textdump
+.Nd textdump kernel dumping facility
+.Sh SYNOPSIS
+.Cd options DDB
+.Cd options KDB
+.Pp
+.Cd options TEXTDUMP_PREFERRED
+.Cd options TEXTDUMP_VERBOSE
+.Sh DESCRIPTION
+The
+.Nm
+facility allows the capture of kernel debugging information to disk in a
+human-readable rather than the machine-readable form normally used with
+kernel memory dumps and minidumps.
+This representation, while less complete in that it does not capture full
+kernel state, can provide debugging information in a more compact, portable,
+and persistent form than a traditional dump.
+By combining
+.Nm
+with other
+.Xr ddb 4
+facilities, such as scripting and output capture, detailed bug information
+can be captured in a fully automated manner.
+.Sh FORMAT
+.Nm
+data is stored in a dump partition in the same style as a regular memory
+dump, and will be automatically extracted by
+.Xr savecore 8
+if present on boot.
+.Pp
+.Nm
+files are stored in the
+.Xr tar 5
+format, and consist of one or more text files, each storing a particular type
+of debugging output.
+The following parts may be present:
+.Bl -tag -width version.txt
+.It Pa ddb.txt
+Captured
+.Xr ddb 4
+output, if the capture facility has been used.
+May be disabled by clearing the
+.Dv debug.ddb.textdump.do_ddb
+sysctl.
+.It Pa config.txt
+Kernel configuration, if
+.Cd options INCLUDE_CONFIG_FILE
+has been compiled into the kernel.
+May be disabled by clearing the
+.Dv debug.ddb.textdump.do_config
+sysctl.
+.It Pa msgbuf.txt
+Kernel message buffer, including recent console output if the capture
+facility has been used.
+May be disabled by clearing the
+.Dv debug.ddb.textdump.do_msgbuf
+sysctl.
+.It Pa panic.txt
+Kernel panic string, if the kernel panicked before the dump was generated.
+May be disabled by clearing the
+.Dv debug.ddb.textdump.do_panic
+sysctl.
+.It Pa version.txt
+Kernel version string.
+My be disabled by clearing the
+.Dv debug.ddb.textdump.do_version
+sysctl.
+.El
+.Pp
+Kernel textdumps may be extracted using
+.Xr tar 1 .
+.Sh CONFIGURATION
+The
+.Nm
+facility is enabled as part of the kernel debugger using
+.Cd options KDB
+and
+.Cd options DDB .
+By default, kernel dumps generated on panic or via explicit requests for a
+dump will be regular memory dumps; however, by using the
+.Ic textdump set
+command in
+.Xr ddb 4 ,
+or by setting the
+.Dv debug.ddb.textdump.pending
+sysctl to 1 using
+.Xr sysctl 8 ,
+it is possible to request that the next dump be a textdump.
+One may also directly trigger a textdump in
+.Xr ddb 4
+by running the command
+.Ic textdump dump .
+.Pp
+If at the
+.Xr ddb 4
+command line, the commands
+.Ic textdump set ,
+.Ic textdump status ,
+and
+.Ic textdump unset
+may be used to set, query, and clear the textdump pending flag.
+.Pp
+As with regular kernel dumps, a dump partition must be automatically or
+manually configured using
+.Xr dumpon 8 .
+.Pp
+Additional kernel
+.Xr config 8
+options:
+.Bl -tag -width TEXTDUMP_PREFERRED
+.It Cd TEXTDUMP_PREFERRED
+sets textdumps to be the default manner of doing dumps.
+This means there will be no need to
+.Xr sysctl 8
+or use the
+.Ic textdump set
+.Xr ddb 8
+commands.
+.It Cd TEXTDUMP_VERBOSE
+will have the textdump facility be more verbose about each file it is emitting
+as well as other diagnostics useful to debug the textdump facility itself.
+.El
+.Sh EXAMPLES
+In the following example, the script
+.Dv kdb.enter.panic
+will run when the kernel debugger is entered as a result of a panic, enable
+output capture, dump several useful pieces of debugging information, and then
+invoke panic in order to force a kernel dump to be written out followed by a
+reboot:
+.Bd -literal -offset indent
+script kdb.enter.panic=textdump set; capture on; show allpcpu; bt;
+ ps; alltrace; show alllocks; call doadump; reset
+.Ed
+.Pp
+In the following example, the script
+.Dv kdb.enter.witness
+will run when the kernel debugger is entered as a result of a witness
+violation, printing lock-related information for the user:
+.Bd -literal -offset indent
+script kdb.enter.witness=show locks
+.Ed
+.Pp
+These scripts may also be configured using the
+.Xr ddb 8
+utility.
+.Sh SEE ALSO
+.Xr tar 1 ,
+.Xr ddb 4 ,
+.Xr tar 5 ,
+.Xr ddb 8 ,
+.Xr dumpon 8 ,
+.Xr savecore 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+facility first appeared in
+.Fx 7.1 .
+.Sh AUTHORS
+The
+.Nm
+facility was created by
+.An Robert N. M. Watson .
diff --git a/share/man/man4/ti.4 b/share/man/man4/ti.4
new file mode 100644
index 0000000..f415459
--- /dev/null
+++ b/share/man/man4/ti.4
@@ -0,0 +1,425 @@
+.\" Copyright (c) 1997, 1998, 1999
+.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 14, 2011
+.Dt TI 4
+.Os
+.Sh NAME
+.Nm ti
+.Nd "Alteon Networks Tigon I and Tigon II Gigabit Ethernet driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ti"
+.Cd "options TI_SF_BUF_JUMBO"
+.Cd "options TI_JUMBO_HDRSPLIT"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ti_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Gigabit Ethernet adapters based on
+the Alteon Networks Tigon Gigabit Ethernet controller chip.
+The Tigon
+contains an embedded R4000 CPU, gigabit MAC, dual DMA channels and
+a PCI interface unit.
+The Tigon II contains two R4000 CPUs and other
+refinements.
+Either chip can be used in either a 32-bit or 64-bit PCI
+slot.
+Communication with the chip is achieved via PCI shared memory
+and bus master DMA.
+The Tigon I and II support hardware multicast
+address filtering, VLAN tag extraction and insertion, and jumbo
+Ethernet frames sizes up to 9000 bytes.
+Note that the Tigon I chipset
+is no longer in active production: all new adapters should come equipped
+with Tigon II chipsets.
+.Pp
+While the Tigon chipset supports 10, 100 and 1000Mbps speeds, support for
+10 and 100Mbps speeds is only available on boards with the proper
+transceivers.
+Most adapters are only designed to work at 1000Mbps,
+however the driver should support those NICs that work at lower speeds
+as well.
+.Pp
+Support for jumbo frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit jumbo frames.
+Using jumbo frames can greatly improve performance for certain tasks,
+such as file transfers and data streaming.
+.Pp
+Header splitting support for Tigon 2 boards (this option has no effect for
+the Tigon 1) can be turned on with the
+.Dv TI_JUMBO_HDRSPLIT
+option.
+See
+.Xr zero_copy 9
+for more discussion on zero copy receive and header splitting.
+.Pp
+The
+.Nm
+driver uses UMA backed jumbo receive buffers, but can be configured
+to use
+.Xr sendfile 2
+buffer allocator.
+To turn on
+.Xr sendfile 2
+buffer allocator, use the
+.Dv TI_SF_BUF_JUMBO
+option.
+.Pp
+Support for vlans is also available using the
+.Xr vlan 4
+mechanism.
+See the
+.Xr vlan 4
+man page for more details.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to the
+.Pa /etc/rc.conf
+file.
+.It 10baseT/UTP
+Set 10Mbps operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.It 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.It 1000baseSX
+Set 1000Mbps (Gigabit Ethernet) operation.
+Only
+.Ar full-duplex
+mode is supported at this speed.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It full-duplex
+Force full-duplex operation.
+.It half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Gigabit Ethernet adapters based on the
+Alteon Tigon I and II chips.
+The
+.Nm
+driver has been tested with the following adapters:
+.Pp
+.Bl -bullet -compact
+.It
+3Com 3c985-SX Gigabit Ethernet adapter (Tigon 1)
+.It
+3Com 3c985B-SX Gigabit Ethernet adapter (Tigon 2)
+.It
+Alteon AceNIC V Gigabit Ethernet adapter (1000baseSX)
+.It
+Alteon AceNIC V Gigabit Ethernet adapter (1000baseT)
+.It
+Digital EtherWORKS 1000SX PCI Gigabit adapter
+.It
+Netgear GA620 Gigabit Ethernet adapter (1000baseSX)
+.It
+Netgear GA620T Gigabit Ethernet adapter (1000baseT)
+.El
+.Pp
+The following adapters should also be supported but have
+not yet been tested:
+.Pp
+.Bl -bullet -compact
+.It
+Asante GigaNIX1000T Gigabit Ethernet adapter
+.It
+Asante PCI 1000BASE-SX Gigabit Ethernet adapter
+.It
+Farallon PN9000SX Gigabit Ethernet adapter
+.It
+NEC Gigabit Ethernet
+.It
+Silicon Graphics PCI Gigabit Ethernet adapter
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "xxxxxx"
+.It Va hw.ti.%d.dac
+If this tunable is set to 0 it will disable DAC (Dual Address Cycle).
+The default value is 1 which means driver will use full 64bit
+DMA addressing.
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables.
+The interface has to be brought down and up again before a
+change takes effect when any of the following tunables are
+changed.
+The one microsecond clock tick referenced below is a nominal
+time and the actual hardware may not provide granularity to
+this level.
+For example, on Tigon 2 (revision 6) cards with release 12.0
+the clock granularity is 5 microseconds.
+.Bl -tag -width "xxxxxx"
+.It Va dev.ti.%d.rx_coal_ticks
+This value, receive coalesced ticks, controls the number of clock
+ticks (of 1 microseconds each) that must elapse before the NIC DMAs
+the receive return producer pointer to the Host and generates an
+interrupt.
+This parameter works in conjunction with the rx_max_coal_bds,
+receive max coalesced BDs, tunable parameter.
+The NIC will return the receive return producer pointer to the Host
+when either of the thresholds is exceeded.
+A value of 0 means that this parameter is ignored and receive BDs
+will only be returned when the receive max coalesced BDs value is
+reached.
+The default value is 170.
+.It Va dev.ti.%d.rx_max_coal_bds
+This value, receive max coalesced BDs, controls the number of
+receive buffer descriptors that will be coalesced before the NIC
+updates the receive return ring producer index.
+If this value is set to 0 it will disable receive buffer descriptor
+coalescing.
+The default value is 64.
+.It Va dev.ti.%d.ti_tx_coal_ticks
+This value, send coalesced ticks, controls the number of clock
+ticks (of 1 microseconds each) that must elapse before the NIC DMAs
+the send consumer pointer to the Host and generates an interrupt.
+This parameter works in conjunction with the tx_max_coal_bds,
+send max coalesced BDs, tunable parameter.
+The NIC will return the send consumer pointer to the Host when
+either of the thresholds is exceeded.
+A value of 0 means that this parameter is ignored and send BDs will
+only be returned when the send max coalesced BDs value is reached.
+The default value is 2000.
+.It Va dev.ti.%d.tx_max_coal_bds
+This value, send max coalesced BDs, controls the number of send
+buffer descriptors that will be coalesced before the NIC updates
+the send consumer index.
+If this value is set to 0 it will disable send buffer descriptor
+coalescing.
+The default value is 32.
+.It Va dev.ti.%d.tx_buf_ratio
+This value controls the ratio of the remaining memory in the NIC
+that should be devoted to transmit buffer vs. receive buffer.
+The lower 7 bits are used to indicate the ratio in 1/64th increments.
+For example, setting this value to 16 will set the transmit buffer
+to 1/4 of the remaining buffer space.
+In no cases will the transmit or receive buffer be reduced below
+68 KB.
+For a 1 MB NIC the approximate total space for data buffers is
+800 KB.
+For a 512 KB NIC that number is 300 KB.
+The default value is 21.
+.It Va dev.ti.%d.stat_ticks
+The value, stat ticks, controls the number of clock ticks
+(of 1 microseconds each) that must elapse before the NIC DMAs
+the statistics block to the Host and generates a STATS_UPDATED
+event.
+If set to zero then statistics are never DMAed to the Host.
+It is recommended that this value be set to a high enough
+frequency to not mislead someone reading statistics refreshes.
+Several times a second is enough.
+The default value is 2000000 (2 seconds).
+.El
+.Sh IOCTLS
+In addition to the standard
+.Xr socket 2
+.Xr ioctl 2
+calls implemented by most network drivers, the
+.Nm
+driver also includes a character device interface that can be used for
+additional diagnostics, configuration and debugging.
+With this character
+device interface, and a specially patched version of
+.Xr gdb 1 ,
+the user can
+debug firmware running on the Tigon board.
+.Pp
+These ioctls and their arguments are defined in the
+.In sys/tiio.h
+header file.
+.Bl -tag -width ".Dv ALT_WRITE_TG_MEM"
+.It Dv TIIOCGETSTATS
+Return card statistics DMAed from the card into kernel memory approximately
+every 2 seconds.
+(That time interval can be changed via the
+.Dv TIIOCSETPARAMS
+ioctl.)
+The argument is
+.Vt "struct ti_stats" .
+.It Dv TIIOCGETPARAMS
+Get various performance-related firmware parameters that largely affect how
+interrupts are coalesced.
+The argument is
+.Vt "struct ti_params" .
+.It Dv TIIOCSETPARAMS
+Set various performance-related firmware parameters that largely affect how
+interrupts are coalesced.
+The argument is
+.Vt "struct ti_params" .
+.It Dv TIIOCSETTRACE
+Tell the NIC to trace the requested types of information.
+The argument is
+.Vt ti_trace_type .
+.It Dv TIIOCGETTRACE
+Dump the trace buffer from the card.
+The argument is
+.Vt "struct ti_trace_buf" .
+.It Dv ALT_ATTACH
+This ioctl is used for compatibility with Alteon's Solaris driver.
+They apparently only have one character interface for debugging, so they have
+to tell it which Tigon instance they want to debug.
+This ioctl is a noop for
+.Fx .
+.It Dv ALT_READ_TG_MEM
+Read the requested memory region from the Tigon board.
+The argument is
+.Vt "struct tg_mem" .
+.It Dv ALT_WRITE_TG_MEM
+Write to the requested memory region on the Tigon board.
+The argument is
+.Vt "struct tg_mem" .
+.It Dv ALT_READ_TG_REG
+Read the requested register from the Tigon board.
+The argument is
+.Vt "struct tg_reg" .
+.It Dv ALT_WRITE_TG_REG
+Write to the requested register on the Tigon board.
+The argument is
+.Vt "struct tg_reg" .
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/ti[0-255]" -compact
+.It Pa /dev/ti[0-255]
+Tigon driver character interface.
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ti%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "ti%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "ti%d: no memory for softc struct!"
+The driver failed to allocate memory for per-device instance information
+during initialization.
+.It "ti%d: failed to enable memory mapping!"
+The driver failed to initialize PCI shared memory mapping.
+This might
+happen if the card is not in a bus-master slot.
+.It "ti%d: no memory for jumbo buffers!"
+The driver failed to allocate memory for jumbo frames during
+initialization.
+.It "ti%d: bios thinks we're in a 64 bit slot, but we aren't"
+The BIOS has programmed the NIC as though it had been installed in
+a 64-bit PCI slot, but in fact the NIC is in a 32-bit slot.
+This happens
+as a result of a bug in some BIOSes.
+This can be worked around on the
+Tigon II, but on the Tigon I initialization will fail.
+.It "ti%d: board self-diagnostics failed!"
+The ROMFAIL bit in the CPU state register was set after system
+startup, indicating that the on-board NIC diagnostics failed.
+.It "ti%d: unknown hwrev"
+The driver detected a board with an unsupported hardware revision.
+The
+.Nm
+driver supports revision 4 (Tigon 1) and revision 6 (Tigon 2) chips
+and has firmware only for those devices.
+.It "ti%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Sh SEE ALSO
+.Xr sendfile 2 ,
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8 ,
+.Xr zero_copy 9
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@bsdi.com .
+The header splitting firmware modifications, character
+.Xr ioctl 2
+interface and debugging support were written by
+.An Kenneth Merry Aq ken@FreeBSD.org .
+Initial zero copy support was written by
+.An Andrew Gallatin Aq gallatin@FreeBSD.org .
diff --git a/share/man/man4/timecounters.4 b/share/man/man4/timecounters.4
new file mode 100644
index 0000000..9abb522
--- /dev/null
+++ b/share/man/man4/timecounters.4
@@ -0,0 +1,107 @@
+.\" Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 12, 2014
+.Dt TIMECOUNTERS 4
+.Os
+.Sh NAME
+.Nm timecounters
+.Nd kernel time counters subsystem
+.Sh SYNOPSIS
+The kernel uses several types of time-related devices, such as: real time clocks,
+time counters and event timers.
+Real time clocks are responsible for tracking real world time, mostly when the system
+is down.
+Time counters are responsible for tracking purposes, when the system is running.
+Event timers are responsible for generating interrupts at a specified time or
+periodically, to run different time-based events.
+This page is about the second.
+.Sh DESCRIPTION
+Time counters are the lowest level of time tracking in the kernel.
+They provide monotonically increasing timestamps with known width and
+update frequency.
+They can overflow, drift, etc and so in raw form can be used only in very limited
+performance-critical places like the process scheduler.
+.Pp
+More usable time is created by scaling the values read from the selected
+time counter and combining it with some offset, regularly updated by
+.Fn tc_windup
+on
+.Fn hardclock
+invocation.
+.Pp
+Different platforms provide different kinds of timer hardware.
+The goal of the time counters subsystem is to provide a unified way to access
+that hardware.
+.Pp
+Each driver implementing time counters registers them with the subsystem.
+It is possible to see the list of present time counters, via the
+.Va kern.timecounter
+.Xr sysctl 8
+variable:
+.Bd -literal
+kern.timecounter.choice: TSC-low(-100) HPET(950) i8254(0) ACPI-fast(900) dummy(-1000000)
+kern.timecounter.tc.ACPI-fast.mask: 16777215
+kern.timecounter.tc.ACPI-fast.counter: 13467909
+kern.timecounter.tc.ACPI-fast.frequency: 3579545
+kern.timecounter.tc.ACPI-fast.quality: 900
+kern.timecounter.tc.i8254.mask: 65535
+kern.timecounter.tc.i8254.counter: 62692
+kern.timecounter.tc.i8254.frequency: 1193182
+kern.timecounter.tc.i8254.quality: 0
+kern.timecounter.tc.HPET.mask: 4294967295
+kern.timecounter.tc.HPET.counter: 3013495652
+kern.timecounter.tc.HPET.frequency: 14318180
+kern.timecounter.tc.HPET.quality: 950
+kern.timecounter.tc.TSC-low.mask: 4294967295
+kern.timecounter.tc.TSC-low.counter: 4067509463
+kern.timecounter.tc.TSC-low.frequency: 11458556
+kern.timecounter.tc.TSC-low.quality: -100
+.Ed
+.Pp
+The output nodes are defined as follows:
+.Bl -inset
+.It Va kern.timecounter.tc. Ns Ar X Ns Va .mask
+is a bitmask, defining valid counter bits,
+.It Va kern.timecounter.tc. Ns Ar X Ns Va .counter
+is a present counter value,
+.It Va kern.timecounter.tc. Ns Ar X Ns Va .frequency
+is a counter update frequency,
+.It Va kern.timecounter.tc. Ns Ar X Ns Va .quality
+is an integral value, defining the quality of this time counter
+compared to others.
+A negative value means this time counter is broken and should not be used.
+.El
+.Pp
+The time management code of the kernel chooses one time counter from that list.
+The current choice can be read and affected via the
+.Va kern.timecounter.hardware
+tunable/sysctl.
+.Sh SEE ALSO
+.Xr attimer 4 ,
+.Xr eventtimers 4 ,
+.Xr ffclock 4 ,
+.Xr hpet 4
diff --git a/share/man/man4/tl.4 b/share/man/man4/tl.4
new file mode 100644
index 0000000..0716ce0
--- /dev/null
+++ b/share/man/man4/tl.4
@@ -0,0 +1,185 @@
+.\" Copyright (c) 1997, 1998
+.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt TL 4
+.Os
+.Sh NAME
+.Nm tl
+.Nd "Texas Instruments ThunderLAN Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device tl"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_tl_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Ethernet adapters based on the Texas
+Instruments ThunderLAN Ethernet controller chip.
+.Pp
+The ThunderLAN controller has a standard MII interface that supports
+up to 32 physical interface devices (PHYs).
+It also has a built-in
+10baseT PHY hardwired at MII address 31, which may be used in some
+10Mbps-only hardware configurations.
+In 100Mbps configurations, a
+National Semiconductor DP83840A or other MII-compliant PHY may be
+attached to the ThunderLAN's MII bus.
+If a DP83840A or equivalent
+is available, the ThunderLAN chip can operate at either 100Mbps or
+10Mbps in either half-duplex or full-duplex modes.
+The ThunderLAN's
+built-in PHY and the DP83840A also support autonegotiation.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It autoselect
+Enable autoselection of the media type and options.
+Note that this
+option is only available on those PHYs that support autonegotiation.
+Also, the PHY will not advertise those modes that have been explicitly
+disabled using the following media options.
+.It 10baseT/UTP
+Set 10Mbps operation.
+.It 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+.It 10base5/AUI
+Enable AUI/BNC interface (useful only with the built-in PHY).
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It full-duplex
+Force full duplex operation.
+.It half-duplex
+Force half duplex operation.
+.It hw-loopback
+Enable hardware loopback mode.
+.El
+.Pp
+Note that the 100baseTX media type is only available if supported
+by the PHY.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Texas Instruments ThunderLAN based
+Ethernet and Fast Ethernet adapters including a large
+number of Compaq PCI Ethernet adapters.
+Also supported are:
+.Pp
+.Bl -bullet -compact
+.It
+Olicom OC-2135/2138 10/100 TX UTP adapter
+.It
+Olicom OC-2325/OC-2326 10/100 TX UTP adapter
+.It
+Racore 8148 10baseT/100baseTX/100baseFX adapter
+.It
+Racore 8165 10/100baseTX adapter
+.El
+.Pp
+The
+.Nm
+driver also supports the built-in Ethernet adapters of
+various Compaq Prosignia servers and Compaq Deskpro desktop
+machines including:
+.Pp
+.Bl -bullet -compact
+.It
+Compaq Netelligent 10
+.It
+Compaq Netelligent 10 T PCI UTP/Coax
+.It
+Compaq Netelligent 10/100
+.It
+Compaq Netelligent 10/100 Dual-Port
+.It
+Compaq Netelligent 10/100 Proliant
+.It
+Compaq Netelligent 10/100 TX Embedded UTP
+.It
+Compaq Netelligent 10/100 TX UTP
+.It
+Compaq NetFlex 3P
+.It
+Compaq NetFlex 3P Integrated
+.It
+Compaq NetFlex 3P w/BNC
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "tl%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "tl%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "tl%d: device timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.It "tl%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.It "tl%d: no memory for tx list"
+The driver failed to allocate an mbuf for the transmitter ring when
+allocating a pad buffer or collapsing an mbuf chain into a cluster.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 2.2 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ctr.columbia.edu .
diff --git a/share/man/man4/tnt4882.4 b/share/man/man4/tnt4882.4
new file mode 100644
index 0000000..e3eacbb
--- /dev/null
+++ b/share/man/man4/tnt4882.4
@@ -0,0 +1,55 @@
+.\" Copyright (c) 2010, Joerg Wunsch
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 24, 2010
+.Dt TNT4882 4
+.Os
+.Sh NAME
+.Nm tnt4882
+.Nd National Instruments TNT4882A GPIB controller driver
+.Sh SYNOPSIS
+.Cd "device tnt4882"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for driving an IEEE-488 bus, also called
+IEC-625 (or just "IEC bus"), or HP-IB (Hewlett Packard Instrument
+Bus), or GPIB (General Purpose Instrument Bus).
+The driver supports National Instruments PCI GPIB cards using
+the TNT4882 bus interface chip.
+This chip emulates a NEC \(mcPD7210 controller IC as the main
+interface between the host computer and the instrument bus.
+.Sh SEE ALSO
+.Xr gpib 3 ,
+.Xr gpib 4
+.Sh HISTORY
+The
+.Nm
+driver was written by Poul-Henning Kamp, and first appeared in
+.Fx 5.4 .
+.Sh AUTHORS
+This manual page was written by
+.An J\(:org Wunsch .
diff --git a/share/man/man4/tpm.4 b/share/man/man4/tpm.4
new file mode 100644
index 0000000..897aa00
--- /dev/null
+++ b/share/man/man4/tpm.4
@@ -0,0 +1,86 @@
+.\"
+.\" Copyright (c) 2010 Hans-Joerg Hoexer
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 15, 2010
+.Dt TPM 4
+.Os
+.Sh NAME
+.Nm tpm
+.Nd Trusted Platform Module
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device tpm"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+tpm_load="YES"
+.Ed
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.tpm.0.at="isa"
+.Cd hint.tpm.0.maddr="0xfed40000"
+.Cd hint.tpm.0.msize="0x5000"
+.Cd hint.tpm.1.at="isa"
+.Cd hint.tpm.1.maddr="0xfed40000"
+.Cd hint.tpm.1.msize="0x1000"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for various trusted platform modules (TPM) that can
+store cryptographic keys.
+.Pp
+Supported modules:
+.Pp
+.Bl -bullet -compact -offset indent
+.It
+Atmel 97SC3203
+.It
+Broadcom BCM0102
+.It
+Infineon IFX SLD 9630 TT 1.1 and IFX SLB 9635 TT 1.2
+.It
+Intel INTC0102
+.It
+Sinosun SNS SSX35
+.It
+STM ST19WP18
+.It
+Winbond WEC WPCT200
+.El
+.Pp
+The driver can be configured to use an IRQ by providing a free ISA
+interrupt vector in
+.Pa /boot/device.hints .
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr device.hints 5 ,
+.Xr config 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Michael Shalayeff
+and
+.An Hans-Joerg Hoexer .
diff --git a/share/man/man4/trm.4 b/share/man/man4/trm.4
new file mode 100644
index 0000000..6180c94
--- /dev/null
+++ b/share/man/man4/trm.4
@@ -0,0 +1,107 @@
+.\" $NetBSD: trm.4,v 1.3 2001/11/11 05:24:45 tsutsui Exp $
+.\"
+.\" Copyright (c) 2002, David E O'Brien. All rights reserved.
+.\" Copyright (c) 2001, Izumi Tsutsui. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 8, 2002
+.Dt TRM 4
+.Os
+.Sh NAME
+.Nm trm
+.Nd Tekram TRM-S1040 ASIC based PCI SCSI host adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device trm"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+trm_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports PCI SCSI host adapters based on the Tekram TRM-S1040 SCSI ASIC.
+.Sh HARDWARE
+SCSI controllers supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+.Tn Tekram DC-315
+PCI Ultra SCSI adapter without BIOS and internal SCSI connector
+.It
+.Tn Tekram DC-315U
+PCI Ultra SCSI adapter without BIOS
+.It
+.Tn Tekram DC-395F
+PCI Ultra-Wide SCSI adapter with flash BIOS and 68-pin external SCSI connector
+.It
+.Tn Tekram DC-395U
+PCI Ultra SCSI adapter with flash BIOS
+.It
+.Tn Tekram DC-395UW
+PCI Ultra-Wide SCSI adapter with flash BIOS
+.It
+.Tn Tekram DC-395U2W
+PCI Ultra2-Wide SCSI adapter with flash BIOS
+.El
+.Pp
+For the Tekram DC-310/U and DC-390F/U/UW/U2B/U2W/U3W PCI SCSI host adapters,
+use the
+.Xr sym 4
+driver.
+.Sh SEE ALSO
+.Xr cd 4 ,
+.Xr ch 4 ,
+.Xr da 4 ,
+.Xr intro 4 ,
+.Xr sa 4 ,
+.Xr scsi 4 ,
+.Xr sym 4
+.Pp
+.Pa http://www.tekram.com/
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was originally written for
+.Fx 3.0 Ns /i386
+by
+.An Erich Chen
+of Tekram Technology,
+and ported to
+.Fx 5.0
+by
+.An Olivier Houchard Aq cognet@FreeBSD.org .
diff --git a/share/man/man4/tty.4 b/share/man/man4/tty.4
new file mode 100644
index 0000000..ec6d9f1
--- /dev/null
+++ b/share/man/man4/tty.4
@@ -0,0 +1,366 @@
+.\" Copyright (c) 1991, 1992, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)tty.4 8.3 (Berkeley) 4/19/94
+.\" $FreeBSD$
+.\"
+.Dd December 26, 2009
+.Dt TTY 4
+.Os
+.Sh NAME
+.Nm tty
+.Nd general terminal interface
+.Sh SYNOPSIS
+.In sys/ioctl.h
+.Sh DESCRIPTION
+This section describes the interface to the terminal drivers
+in the system.
+.Ss Terminal Special Files
+Each hardware terminal port on the system usually has a terminal special device
+file associated with it in the directory ``/dev/'' (for
+example, ``/dev/tty03'').
+When a user logs into
+the system on one of these hardware terminal ports, the system has already
+opened the associated device and prepared the line for normal interactive
+use (see
+.Xr getty 8 . )
+There is also a special case of a terminal file that connects not to
+a hardware terminal port, but to another program on the other side.
+These special terminal devices are called
+.Em ptys
+and provide the mechanism necessary to give users the same interface to the
+system when logging in over a network (using
+.Xr rlogin 1 ,
+or
+.Xr telnet 1
+for example).
+Even in these cases the details of how the terminal
+file was opened and set up is already handled by special software
+in the system.
+Thus, users do not normally need to worry about the details of
+how these lines are opened or used.
+Also, these lines are often used
+for dialing out of a system (through an out-calling modem), but again
+the system provides programs that hide the details of accessing
+these terminal special files (see
+.Xr tip 1 ) .
+.Pp
+When an interactive user logs in, the system prepares the line to
+behave in a certain way (called a
+.Em "line discipline" ) ,
+the particular details of which is described in
+.Xr stty 1
+at the command level, and in
+.Xr termios 4
+at the programming level.
+A user may be concerned with changing
+settings associated with his particular login terminal and should refer
+to the preceding man pages for the common cases.
+The remainder of this man page is concerned
+with describing details of using and controlling terminal devices
+at a low level, such as that possibly required by a program wishing
+to provide features similar to those provided by the system.
+.Ss Terminal File Operations
+All of the following operations are invoked using the
+.Xr ioctl 2
+system call.
+Refer to that man page for a description of the
+.Em request
+and
+.Em argp
+parameters.
+In addition to the ioctl
+.Em requests
+defined here, the specific line discipline
+in effect will define other
+.Em requests
+specific to it (actually
+.Xr termios 4
+defines them as function calls, not ioctl
+.Em requests . )
+The following section lists the available ioctl requests.
+The name of the request, a description of its purpose, and the typed
+.Em argp
+parameter (if any)
+are listed.
+For example, the first entry says
+.Pp
+.D1 Em "TIOCSPGRP int *tpgrp"
+.Pp
+and would be called on the terminal associated with
+file descriptor zero by the following code fragment:
+.Bd -literal
+ int pgrp;
+
+ pgrp = getpgrp();
+ ioctl(0, TIOCSPGRP, &pgrp);
+.Ed
+.Ss Terminal File Request Descriptions
+.Bl -tag -width TIOCGWINSZ
+.It Dv TIOCSETD Fa int *ldisc
+This call is obsolete but left for compatibility.
+Before
+.Fx 8.0 ,
+it would change to the new line discipline pointed to by
+.Fa ldisc .
+.It Dv TIOCGETD Fa int *ldisc
+Return the current line discipline in the integer pointed to by
+.Fa ldisc .
+.It Dv TIOCSBRK Fa void
+Set the terminal hardware into BREAK condition.
+.It Dv TIOCCBRK Fa void
+Clear the terminal hardware BREAK condition.
+.It Dv TIOCSDTR Fa void
+Assert data terminal ready (DTR).
+.It Dv TIOCCDTR Fa void
+Clear data terminal ready (DTR).
+.It Dv TIOCGPGRP Fa int *tpgrp
+Return the current process group with which the terminal is associated
+in the integer pointed to by
+.Fa tpgrp .
+This is the underlying call that implements the
+.Xr termios 4
+.Fn tcgetattr
+call.
+.It Dv TIOCSPGRP Fa int *tpgrp
+Associate the terminal with the process group (as an integer) pointed to by
+.Fa tpgrp .
+This is the underlying call that implements the
+.Xr termios 4
+.Fn tcsetattr
+call.
+.It Dv TIOCGETA Fa struct termios *term
+Place the current value of the termios state associated with the
+device in the termios structure pointed to by
+.Fa term .
+This is the underlying call that implements the
+.Xr termios 4
+.Fn tcgetattr
+call.
+.It Dv TIOCSETA Fa struct termios *term
+Set the termios state associated with the device immediately.
+This is the underlying call that implements the
+.Xr termios 4
+.Fn tcsetattr
+call with the
+.Dv TCSANOW
+option.
+.It Dv TIOCSETAW Fa struct termios *term
+First wait for any output to complete, then set the termios state
+associated with the device.
+This is the underlying call that implements the
+.Xr termios 4
+.Fn tcsetattr
+call with the
+.Dv TCSADRAIN
+option.
+.It Dv TIOCSETAF Fa struct termios *term
+First wait for any output to complete, clear any pending input,
+then set the termios state associated with the device.
+This is the underlying call that implements the
+.Xr termios 4
+.Fn tcsetattr
+call with the
+.Dv TCSAFLUSH
+option.
+.It Dv TIOCOUTQ Fa int *num
+Place the current number of characters in the output queue in the
+integer pointed to by
+.Fa num .
+.It Dv TIOCSTI Fa char *cp
+Simulate typed input.
+Pretend as if the terminal received the character pointed to by
+.Fa cp .
+.It Dv TIOCNOTTY Fa void
+This call is obsolete but left for compatibility.
+In the past, when a process that did not have a controlling terminal (see
+.Em The Controlling Terminal
+in
+.Xr termios 4 )
+first opened a terminal device, it acquired that terminal as its
+controlling terminal.
+For some programs this was a hazard as they
+did not want a controlling terminal in the first place, and this
+provided a mechanism to disassociate the controlling terminal from
+the calling process.
+It
+.Em must
+be called by opening the file
+.Pa /dev/tty
+and calling
+.Dv TIOCNOTTY
+on that file descriptor.
+.Pp
+The current system does not allocate a controlling terminal to
+a process on an
+.Fn open
+call: there is a specific ioctl called
+.Dv TIOCSCTTY
+to make a terminal the controlling
+terminal.
+In addition, a program can
+.Fn fork
+and call the
+.Fn setsid
+system call which will place the process into its own session - which
+has the effect of disassociating it from the controlling terminal.
+This is the new and preferred method for programs to lose their controlling
+terminal.
+.It Dv TIOCSTOP Fa void
+Stop output on the terminal (like typing ^S at the keyboard).
+.It Dv TIOCSTART Fa void
+Start output on the terminal (like typing ^Q at the keyboard).
+.It Dv TIOCSCTTY Fa void
+Make the terminal the controlling terminal for the process (the process
+must not currently have a controlling terminal).
+.It Dv TIOCDRAIN Fa void
+Wait until all output is drained.
+.It Dv TIOCEXCL Fa void
+Set exclusive use on the terminal.
+No further opens are permitted except by root.
+Of course, this means that programs that are run by
+root (or setuid) will not obey the exclusive setting - which limits
+the usefulness of this feature.
+.It Dv TIOCNXCL Fa void
+Clear exclusive use of the terminal.
+Further opens are permitted.
+.It Dv TIOCFLUSH Fa int *what
+If the value of the int pointed to by
+.Fa what
+contains the
+.Dv FREAD
+bit as defined in
+.In sys/file.h ,
+then all characters in the input queue are cleared.
+If it contains the
+.Dv FWRITE
+bit, then all characters in the output queue are cleared.
+If the value of the integer is zero, then it behaves as if both the
+.Dv FREAD
+and
+.Dv FWRITE
+bits were set (i.e., clears both queues).
+.It Dv TIOCGWINSZ Fa struct winsize *ws
+Put the window size information associated with the terminal in the
+.Va winsize
+structure pointed to by
+.Fa ws .
+The window size structure contains the number of rows and columns (and pixels
+if appropriate) of the devices attached to the terminal.
+It is set by user software
+and is the means by which most full\&-screen oriented programs determine the
+screen size.
+The
+.Va winsize
+structure is defined in
+.In sys/ioctl.h .
+.It Dv TIOCSWINSZ Fa struct winsize *ws
+Set the window size associated with the terminal to be the value in
+the
+.Va winsize
+structure pointed to by
+.Fa ws
+(see above).
+.It Dv TIOCCONS Fa int *on
+If
+.Fa on
+points to a non-zero integer, redirect kernel console output (kernel printf's)
+to this terminal.
+If
+.Fa on
+points to a zero integer, redirect kernel console output back to the normal
+console.
+This is usually used on workstations to redirect kernel messages
+to a particular window.
+.It Dv TIOCMSET Fa int *state
+The integer pointed to by
+.Fa state
+contains bits that correspond to modem state.
+Following is a list of defined variables and the modem state they represent:
+.Pp
+.Bl -tag -width TIOCMXCTS -compact
+.It TIOCM_LE
+Line Enable.
+.It TIOCM_DTR
+Data Terminal Ready.
+.It TIOCM_RTS
+Request To Send.
+.It TIOCM_ST
+Secondary Transmit.
+.It TIOCM_SR
+Secondary Receive.
+.It TIOCM_CTS
+Clear To Send.
+.It TIOCM_CAR
+Carrier Detect.
+.It TIOCM_CD
+Carrier Detect (synonym).
+.It TIOCM_RNG
+Ring Indication.
+.It TIOCM_RI
+Ring Indication (synonym).
+.It TIOCM_DSR
+Data Set Ready.
+.El
+.Pp
+This call sets the terminal modem state to that represented by
+.Fa state .
+Not all terminals may support this.
+.It Dv TIOCMGET Fa int *state
+Return the current state of the terminal modem lines as represented
+above in the integer pointed to by
+.Fa state .
+.It Dv TIOCMBIS Fa int *state
+The bits in the integer pointed to by
+.Fa state
+represent modem state as described above, however the state is OR-ed
+in with the current state.
+.It Dv TIOCMBIC Fa int *state
+The bits in the integer pointed to by
+.Fa state
+represent modem state as described above, however each bit which is on
+in
+.Fa state
+is cleared in the terminal.
+.El
+.Sh IMPLEMENTATION NOTES
+The total number of input and output bytes
+through all terminal devices
+are available via the
+.Va kern.tk_nin
+and
+.Va kern.tk_nout
+read-only
+.Xr sysctl 8
+variables.
+.Sh SEE ALSO
+.Xr stty 1 ,
+.Xr ioctl 2 ,
+.Xr ng_tty 4 ,
+.Xr pty 4 ,
+.Xr termios 4 ,
+.Xr getty 8
diff --git a/share/man/man4/tun.4 b/share/man/man4/tun.4
new file mode 100644
index 0000000..b5139a7
--- /dev/null
+++ b/share/man/man4/tun.4
@@ -0,0 +1,313 @@
+.\" $NetBSD: tun.4,v 1.1 1996/06/25 22:17:37 pk Exp $
+.\" $FreeBSD$
+.\" Based on PR#2411
+.\"
+.Dd February 4, 2007
+.Dt TUN 4
+.Os
+.Sh NAME
+.Nm tun
+.Nd tunnel software network interface
+.Sh SYNOPSIS
+.Cd device tun
+.Sh DESCRIPTION
+The
+.Nm
+interface is a software loopback mechanism that can be loosely
+described as the network interface analog of the
+.Xr pty 4 ,
+that is,
+.Nm
+does for network interfaces what the
+.Xr pty 4
+driver does for terminals.
+.Pp
+The
+.Nm
+driver, like the
+.Xr pty 4
+driver, provides two interfaces: an interface like the usual facility
+it is simulating
+(a network interface in the case of
+.Nm ,
+or a terminal for
+.Xr pty 4 ) ,
+and a character-special device
+.Dq control
+interface.
+.Pp
+The network interfaces are named
+.Dq Li tun0 ,
+.Dq Li tun1 ,
+etc., one for each control device that has been opened.
+These network interfaces persist until the
+.Pa if_tun.ko
+module is unloaded, or until removed with the
+.Xr ifconfig 8
+command.
+.Pp
+.Nm
+devices are created using interface cloning.
+This is done using the
+.Dq ifconfig tun Ns Sy N No create
+command.
+This is the preferred method of creating
+.Nm
+devices.
+The same method allows removal of interfaces.
+For this, use the
+.Dq ifconfig tun Ns Sy N No destroy
+command.
+.Pp
+If the
+.Xr sysctl 8
+variable
+.Va net.link.tun.devfs_cloning
+is non-zero, the
+.Nm
+interface
+permits opens on the special control device
+.Pa /dev/tun .
+When this device is opened,
+.Nm
+will return a handle for the lowest unused
+.Nm
+device (use
+.Xr devname 3
+to determine which).
+.Pp
+.Bf Em
+Disabling the legacy devfs cloning functionality may break existing
+applications which use
+.Nm ,
+such as
+.Xr ppp 8
+and
+.Xr ssh 1 .
+It therefore defaults to being enabled until further notice.
+.Ef
+.Pp
+Control devices (once successfully opened) persist until
+.Pa if_tun.ko
+is unloaded in the same way that network interfaces persist (see above).
+.Pp
+Each interface supports the usual network-interface
+.Xr ioctl 2 Ns s ,
+such as
+.Dv SIOCAIFADDR
+and thus can be used with
+.Xr ifconfig 8
+like any other interface.
+At boot time, they are
+.Dv POINTOPOINT
+interfaces, but this can be changed; see the description of the control
+device, below.
+When the system chooses to transmit a packet on the
+network interface, the packet can be read from the control device
+(it appears as
+.Dq input
+there);
+writing a packet to the control device generates an input
+packet on the network interface, as if the (non-existent)
+hardware had just received it.
+.Pp
+The tunnel device
+.Pq Pa /dev/tun Ns Ar N
+is exclusive-open
+(it cannot be opened if it is already open).
+A
+.Xr read 2
+call will return an error
+.Pq Er EHOSTDOWN
+if the interface is not
+.Dq ready
+(which means that the control device is open and the interface's
+address has been set).
+.Pp
+Once the interface is ready,
+.Xr read 2
+will return a packet if one is available; if not, it will either block
+until one is or return
+.Er EWOULDBLOCK ,
+depending on whether non-blocking I/O has been enabled.
+If the packet is longer than is allowed for in the buffer passed to
+.Xr read 2 ,
+the extra data will be silently dropped.
+.Pp
+If the
+.Dv TUNSLMODE
+ioctl has been set, packets read from the control device will be prepended
+with the destination address as presented to the network interface output
+routine,
+.Fn tunoutput .
+The destination address is in
+.Vt struct sockaddr
+format.
+The actual length of the prepended address is in the member
+.Va sa_len .
+If the
+.Dv TUNSIFHEAD
+ioctl has been set, packets will be prepended with a four byte address
+family in network byte order.
+.Dv TUNSLMODE
+and
+.Dv TUNSIFHEAD
+are mutually exclusive.
+In any case, the packet data follows immediately.
+.Pp
+A
+.Xr write 2
+call passes a packet in to be
+.Dq received
+on the pseudo-interface.
+If the
+.Dv TUNSIFHEAD
+ioctl has been set, the address family must be prepended, otherwise the
+packet is assumed to be of type
+.Dv AF_INET .
+Each
+.Xr write 2
+call supplies exactly one packet; the packet length is taken from the
+amount of data provided to
+.Xr write 2
+(minus any supplied address family).
+Writes will not block; if the packet cannot be accepted for a
+transient reason
+(e.g., no buffer space available),
+it is silently dropped; if the reason is not transient
+(e.g., packet too large),
+an error is returned.
+.Pp
+The following
+.Xr ioctl 2
+calls are supported
+(defined in
+.In net/if_tun.h ) :
+.Bl -tag -width ".Dv TUNSIFMODE"
+.It Dv TUNSDEBUG
+The argument should be a pointer to an
+.Vt int ;
+this sets the internal debugging variable to that value.
+What, if anything, this variable controls is not documented here; see
+the source code.
+.It Dv TUNGDEBUG
+The argument should be a pointer to an
+.Vt int ;
+this stores the internal debugging variable's value into it.
+.It Dv TUNSIFINFO
+The argument should be a pointer to an
+.Vt struct tuninfo
+and allows setting the MTU, the type, and the baudrate of the tunnel
+device.
+The
+.Vt struct tuninfo
+is declared in
+.In net/if_tun.h .
+.Pp
+The use of this ioctl is restricted to the super-user.
+.It Dv TUNGIFINFO
+The argument should be a pointer to an
+.Vt struct tuninfo ,
+where the current MTU, type, and baudrate will be stored.
+.It Dv TUNSIFMODE
+The argument should be a pointer to an
+.Vt int ;
+its value must be either
+.Dv IFF_POINTOPOINT
+or
+.Dv IFF_BROADCAST
+and should have
+.Dv IFF_MULTICAST
+OR'd into the value if multicast support is required.
+The type of the corresponding
+.Dq Li tun Ns Ar N
+interface is set to the supplied type.
+If the value is outside the above range, an
+.Er EINVAL
+error is returned.
+The interface must be down at the time; if it is up, an
+.Er EBUSY
+error is returned.
+.It Dv TUNSLMODE
+The argument should be a pointer to an
+.Vt int ;
+a non-zero value turns off
+.Dq multi-af
+mode and turns on
+.Dq link-layer
+mode, causing packets read from the tunnel device to be prepended with
+the network destination address (see above).
+.It Dv TUNSIFPID
+Will set the pid owning the tunnel device to the current process's pid.
+.It Dv TUNSIFHEAD
+The argument should be a pointer to an
+.Vt int ;
+a non-zero value turns off
+.Dq link-layer
+mode, and enables
+.Dq multi-af
+mode, where every packet is preceded with a four byte address family.
+.It Dv TUNGIFHEAD
+The argument should be a pointer to an
+.Vt int ;
+the ioctl sets the value to one if the device is in
+.Dq multi-af
+mode, and zero otherwise.
+.It Dv FIONBIO
+Turn non-blocking I/O for reads off or on, according as the argument
+.Vt int Ns 's
+value is or is not zero.
+(Writes are always non-blocking.)
+.It Dv FIOASYNC
+Turn asynchronous I/O for reads
+(i.e., generation of
+.Dv SIGIO
+when data is available to be read)
+off or on, according as the argument
+.Vt int Ns 's
+value is or is not zero.
+.It Dv FIONREAD
+If any packets are queued to be read, store the size of the first one
+into the argument
+.Vt int ;
+otherwise, store zero.
+.It Dv TIOCSPGRP
+Set the process group to receive
+.Dv SIGIO
+signals, when asynchronous I/O is enabled, to the argument
+.Vt int
+value.
+.It Dv TIOCGPGRP
+Retrieve the process group value for
+.Dv SIGIO
+signals into the argument
+.Vt int
+value.
+.El
+.Pp
+The control device also supports
+.Xr select 2
+for read; selecting for write is pointless, and always succeeds, since
+writes are always non-blocking.
+.Pp
+On the last close of the data device, by default, the interface is
+brought down
+(as if with
+.Nm ifconfig Ar tunN Cm down ) .
+All queued packets are thrown away.
+If the interface is up when the data device is not open
+output packets are always thrown away rather than letting
+them pile up.
+.Sh SEE ALSO
+.Xr ioctl 2 ,
+.Xr read 2 ,
+.Xr select 2 ,
+.Xr write 2 ,
+.Xr devname 3 ,
+.Xr inet 4 ,
+.Xr intro 4 ,
+.Xr pty 4 ,
+.Xr ifconfig 8
+.Sh AUTHORS
+This manual page was originally obtained from
+.Nx .
diff --git a/share/man/man4/twa.4 b/share/man/man4/twa.4
new file mode 100644
index 0000000..32cccfc
--- /dev/null
+++ b/share/man/man4/twa.4
@@ -0,0 +1,135 @@
+.\"
+.\" Copyright (c) 2004 3ware, Inc.
+.\" Copyright (c) 2000 BSDi
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 9, 2007
+.Dt TWA 4
+.Os
+.Sh NAME
+.Nm twa
+.Nd 3ware 9000/9500/9550/9650 series SATA RAID controllers driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device twa"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+twa_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for AMCC's 3ware 9000/9500/9550/9650 series
+SATA controllers.
+.Pp
+These controllers are available in 4, 8, 12 or 16-port configurations,
+and support the following RAID levels: 0, 1, 10, 5, 50.
+The device nodes for the controllers are of the form
+.Pa /dev/twa Ns Ar X ,
+where
+.Ar X
+is the controller number.
+The driver is implemented as a SCSI SIM
+under CAM, and, as such, the logical units that it controls are accessible
+via the device nodes,
+.Pa /dev/da Ns Ar Y ,
+where
+.Ar Y
+is the logical unit number.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following SATA RAID controllers:
+.Pp
+.Bl -bullet -compact
+.It
+AMCC's 3ware 9500S-4LP
+.It
+AMCC's 3ware 9500S-8
+.It
+AMCC's 3ware 9500S-8MI
+.It
+AMCC's 3ware 9500S-12
+.It
+AMCC's 3ware 9500S-12MI
+.It
+AMCC's 3ware 9500SX-4LP
+.It
+AMCC's 3ware 9500SX-8LP
+.It
+AMCC's 3ware 9500SX-12
+.It
+AMCC's 3ware 9500SX-12MI
+.It
+AMCC's 3ware 9500SX-16ML
+.It
+AMCC's 3ware 9550SX-4LP
+.It
+AMCC's 3ware 9550SX-8LP
+.It
+AMCC's 3ware 9550SX-12
+.It
+AMCC's 3ware 9550SX-12MI
+.It
+AMCC's 3ware 9550SX-16ML
+.It
+AMCC's 3ware 9650SE-2LP
+.It
+AMCC's 3ware 9650SE-4LPML
+.It
+AMCC's 3ware 9650SE-8LPML
+.It
+AMCC's 3ware 9650SE-12ML
+.It
+AMCC's 3ware 9650SE-16ML
+.It
+AMCC's 3ware 9650SE-24M8
+.El
+.Sh DIAGNOSTICS
+Whenever the driver encounters a command failure, it prints out an error code in
+the format:
+.Qq Li "ERROR: (<error source>: <error code>):" ,
+followed by a text description of the error.
+There are other error messages and warnings that the
+driver prints out, depending on the kinds of errors that it encounters.
+If the driver is compiled with
+.Dv TWA_DEBUG
+defined, it prints out a whole bunch of debug
+messages, the quantity of which varies depending on the value assigned to
+.Dv TWA_DEBUG
+(0 to 10).
+.Sh AUTHORS
+The
+.Nm
+driver and manpage were written by
+.An Vinod Kashyap Aq vkashyap@FreeBSD.org .
diff --git a/share/man/man4/twe.4 b/share/man/man4/twe.4
new file mode 100644
index 0000000..fc73a01
--- /dev/null
+++ b/share/man/man4/twe.4
@@ -0,0 +1,278 @@
+.\"
+.\" Copyright (c) 2000 Michael Smith
+.\" Copyright (c) 2000 BSDi
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 15, 2004
+.Dt TWE 4
+.Os
+.Sh NAME
+.Nm twe
+.Nd 3ware 5000/6000/7000/8000 series PATA/SATA RAID adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device pci"
+.Cd "device twe"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+twe_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for AMCC's 3ware 5000/6000/7000/8000 series
+PATA/SATA RAID adapters.
+These adapters were formerly known as
+.Dq 3ware Escalade .
+.Pp
+These devices support 2, 4, 8, or 12 ATA disk drives
+and provide RAID0 (striping) and RAID1 (mirroring) functionality.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following PATA/SATA RAID
+controllers:
+.Pp
+.Bl -bullet -compact
+.It
+AMCC's 3ware 5000 series
+.It
+AMCC's 3ware 6000 series
+.It
+AMCC's 3ware 7000-2
+.It
+AMCC's 3ware 7006-2
+.It
+AMCC's 3ware 7500-4LP
+.It
+AMCC's 3ware 7500-8
+.It
+AMCC's 3ware 7500-12
+.It
+AMCC's 3ware 7506-4LP
+.It
+AMCC's 3ware 7506-8
+.It
+AMCC's 3ware 7506-12
+.It
+AMCC's 3ware 8006-2LP
+.It
+AMCC's 3ware 8500-4LP
+.It
+AMCC's 3ware 8500-8
+.It
+AMCC's 3ware 8500-12
+.It
+AMCC's 3ware 8506-4LP
+.It
+AMCC's 3ware 8506-8
+.It
+AMCC's 3ware 8506-8MI
+.It
+AMCC's 3ware 8506-12
+.It
+AMCC's 3ware 8506-12MI
+.El
+.Sh DIAGNOSTICS
+.Ss Controller initialisation phase
+.Bl -diag
+.It twe%d: microcontroller not ready
+.Pp
+The controller's onboard CPU is not reporting that it is ready;
+this may be due to either a board or system failure.
+Initialisation has failed.
+.It twe%d: no attention interrupt
+.It twe%d: can't drain AEN queue
+.It twe%d: reset not reported
+.It twe%d: controller errors detected
+.It twe%d: can't drain response queue
+.It twe%d: reset %d failed, trying again
+.Pp
+The controller is not responding correctly to
+the driver's attempts to reset and initialise it.
+This process is retried several times.
+.It twe%d: can't initialise controller, giving up
+.Pp
+Several attempts to reset and initialise the controller have failed;
+initialisation has failed
+and the driver will not attach to this controller.
+.El
+.Ss Driver initialisation/shutdown phase
+.Bl -diag
+.It twe%d: register window not available
+.It twe%d: can't allocate register window
+.It twe%d: can't allocate parent DMA tag
+.It twe%d: can't allocate interrupt
+.It twe%d: can't set up interrupt
+.It twe%d: can't establish configuration hook
+.Pp
+A resource allocation error occurred while initialising the driver;
+initialisation has failed
+and the driver will not attach to this controller.
+.It twe%d: can't detect attached units
+.Pp
+Fetching the list of attached units failed; initialisation has failed.
+.It twe%d: error fetching capacity for unit %d
+.It twe%d: error fetching state for unit %d
+.It twe%d: error fetching descriptor size for unit %d
+.It twe%d: error fetching descriptor for unit %d
+.It twe%d: device_add_child failed
+.It twe%d: bus_generic_attach returned %d
+.Pp
+Creation of the disk devices failed, either due to communication
+problems with the adapter or due to resource shortage;
+attachment of one or more units may have been aborted.
+.El
+.Ss Operational phase
+.Bl -diag
+.It twe%d: command completed - %s
+.El
+.Pp
+A command was reported completed with a warning by the controller.
+The warning may be one of:
+.Bl -diag
+.It redundant/inconsequential request ignored
+.It failed to write zeroes to LBA 0
+.It failed to profile TwinStor zones
+.El
+.Bl -diag
+.It twe%d: command failed - %s
+.El
+.Pp
+A command was reported as failed by the controller.
+The failure message may be one of:
+.Bl -diag
+.It aborted due to system command or reconfiguration
+.It aborted
+.It access error
+.It access violation
+.It device failure
+.It controller error
+.It timed out
+.It invalid unit number
+.It unit not available
+.It undefined opcode
+.It request incompatible with unit
+.It invalid request
+.It firmware error, reset requested
+.Pp
+The command will be returned to the operating system after a
+fatal error.
+.El
+.Bl -diag
+.It twe%d: command failed submission - controller wedged
+.Pp
+A command could not be delivered to the controller because
+the controller is unresponsive.
+.It twe%d: AEN: <%s>
+.El
+.Pp
+The controller has reported a change in status using an AEN
+(Asynchronous Event Notification).
+The following AENs may be reported:
+.Bl -diag
+.It queue empty
+.It soft reset
+.It degraded mirror
+.It controller error
+.It rebuild fail
+.It rebuild done
+.It incomplete unit
+.It initialisation done
+.It unclean shutdown detected
+.It drive timeout
+.It drive error
+.It rebuild started
+.It aen queue full
+.Pp
+AENs are also queued internally for use by management tools.
+.El
+.Bl -diag
+.It twe%d: error polling for signalled AENs
+.Pp
+The controller has reported
+that one or more status messages are ready for the driver,
+but attempting to fetch one of these has returned an error.
+.It twe%d: AEN queue overflow, lost AEN <%s>
+.Pp
+A status message was retrieved from the controller,
+but there is no more room to queue it in the driver.
+The message is lost (but will be printed to the console).
+.It twe%d: missing expected status bits %s
+.It twe%d: unexpected status bits %s
+.Pp
+A check of the controller's status bits
+indicates an unexpected condition.
+.It twe%d: host interrupt
+.Pp
+The controller has signalled a host interrupt.
+This serves an unknown purpose and is ignored.
+.It twe%d: command interrupt
+.Pp
+The controller has signalled a command interrupt.
+This is not used, and will be disabled.
+.It twe%d: controller reset in progress...
+.Pp
+The controller is being reset by the driver.
+Typically this is done when the driver has determined that the
+controller is in an unrecoverable state.
+.It twe%d: can't reset controller, giving up
+.Pp
+The driver has given up on resetting the controller.
+No further I/O will be handled.
+.It controller reset done, %d commands restarted
+.Pp
+The controller was successfully reset,
+and outstanding commands were restarted.
+.El
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver and manual page were written by
+.An Michael Smith
+.Aq msmith@FreeBSD.org .
+.Pp
+Extensive work done on the driver by
+.An Vinod Kashyap
+.Aq vkashyap@FreeBSD.org
+and
+.An Paul Saab
+.Aq ps@FreeBSD.org .
+.Sh BUGS
+The controller cannot handle I/O transfers
+that are not aligned to a 512-byte boundary.
+In order to support raw device access from user-space,
+the driver will perform alignment fixup on non-aligned data.
+This process is inefficient,
+and thus in order to obtain best performance
+user-space applications accessing the device
+should do so with aligned buffers.
diff --git a/share/man/man4/tws.4 b/share/man/man4/tws.4
new file mode 100644
index 0000000..3f2ab66
--- /dev/null
+++ b/share/man/man4/tws.4
@@ -0,0 +1,118 @@
+.\"
+.\"Copyright (c) 2010, 2011 iXsystems, Inc.
+.\"All rights reserved.
+.\" written by: Xin LI <delphij@FreeBSD.org>
+.\"
+.\"Redistribution and use in source and binary forms, with or without
+.\"modification, are permitted provided that the following conditions
+.\"are met:
+.\"1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\"2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\"THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\"ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\"ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\"FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\"OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\"HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\"LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\"SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 4, 2011
+.Dt TWS 4
+.Os
+.Sh NAME
+.Nm tws
+.Nd 3ware 9750 SATA+SAS 6Gb/s RAID controller card driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device tws"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+tws_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for LSI's 3ware 9750 SATA+SAS 6Gb/s RAID controller cards.
+.Pp
+These controllers feature the LSISAS2108 6Gb/s SAS RAID-on-Chip (ROC)
+and are available in 4- and 8-port configurations, supports RAID levels
+0, 1, 5, 6, 10, 50 and single disk, with 96 SATA and/or SAS hard drives and SSDs.
+.Pp
+For further hardware information, see
+.Pa http://www.lsi.com/.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following SATA/SAS RAID controller:
+.Pp
+.Bl -bullet -compact
+.It
+LSI's 3ware SAS 9750 series
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "hw.tws.use_32bit_sgls"
+.It Va hw.tws.cam_depth
+The maximum queued CAM SIM requests for one controller.
+The default value is 256.
+.It Va hw.tws.enable_msi
+This tunable enables MSI support on the controller if set to a non-zero value.
+The default value is 0.
+.It Va hw.tws.queue_depth
+The maximum queued requests for one controller.
+.It Va hw.tws.use_32bit_sgls
+Limit the driver to use only 32-bit SG elements regardless whether the operating
+system is running in 64-bit mode.
+The default value is 0.
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/tws?" -compact
+.It Pa /dev/da?
+array/logical disk interface
+.It Pa /dev/tws?
+management interface
+.El
+.Sh DIAGNOSTICS
+Whenever the driver encounters a command failure, it prints out an error code in
+the format:
+.Qq Li "ERROR: (<error source>: <error code>):" ,
+followed by a text description of the error.
+There are other error messages and warnings that the
+driver prints out, depending on the kinds of errors that it encounters.
+If the driver is compiled with
+.Dv TWS_DEBUG
+defined, it prints out a whole bunch of debug
+messages.
+.Sh SEE ALSO
+.Xr da 4 ,
+.Xr scsi 4
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Manjunath Ranganathaiah
+for LSI and this manual page was written by
+.An Xin LI Aq delphij@FreeBSD.org
+for iXsystems, Inc.
diff --git a/share/man/man4/tx.4 b/share/man/man4/tx.4
new file mode 100644
index 0000000..2f7ea59
--- /dev/null
+++ b/share/man/man4/tx.4
@@ -0,0 +1,120 @@
+.\"
+.\" Copyright (c) 1998-2001 Semen Ustimenko <semenu@FreeBSD.org>
+.\"
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt TX 4
+.Os
+.Sh NAME
+.Nm tx
+.Nd "SMC 83c17x Fast Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device tx"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_tx_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Ethernet adapters based on the
+SMC 83c17x (EPIC) chips.
+These are mostly SMC 9432 series cards.
+.Pp
+The
+.Nm
+driver supports the following media types (depending on card's capabilities):
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autonegotiation (default).
+.It Cm 100baseFX
+Set 100Mbps (Fast Ethernet) fiber optic operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) twisted pair operation.
+.It Cm 10baseT/UTP
+Set 10Mbps on 10baseT port.
+.It Cm 10base2/BNC
+Set 10Mbps on 10base2 port.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Set full-duplex operation.
+.El
+.Pp
+The
+.Nm
+driver supports oversized Ethernet packets (up to 1600 bytes).
+Refer to the
+.Xr ifconfig 8
+man page on setting the interface's MTU.
+.Pp
+The old
+.Dq Li "ifconfig tx0 linkN"
+method of configuration is not supported.
+.Ss "VLAN (IEEE 802.1Q) support"
+The
+.Nm
+driver supports the VLAN operation (using
+.Xr vlan 4
+interfaces) without decreasing the MTU on the
+.Xr vlan 4
+interfaces.
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "tx%d: device timeout %d packets"
+The device stops responding.
+Device and driver reset follows this error.
+.It "tx%d: PCI fatal error occurred (%s)"
+One of following errors occurred: PCI Target Abort, PCI Master Abort, Data
+Parity Error or Address Parity Error.
+Device and driver reset follows this error.
+.It "tx%d: cannot allocate mbuf header/cluster"
+Cannot allocate memory for received packet.
+Packet thrown away.
+.It "tx%d: can't stop %s DMA"
+While resetting, the driver failed to stop the device correctly.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh BUGS
+The auto-negotiation does not work very well.
diff --git a/share/man/man4/txp.4 b/share/man/man4/txp.4
new file mode 100644
index 0000000..e30f8b7
--- /dev/null
+++ b/share/man/man4/txp.4
@@ -0,0 +1,140 @@
+.\" $OpenBSD: txp.4,v 1.8 2001/06/26 02:09:11 pjanzen Exp $
+.\"
+.\" Copyright (c) 2001 Jason L. Wright (jason@thought.net)
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 26, 2012
+.Dt TXP 4
+.Os
+.Sh NAME
+.Nm txp
+.Nd "3Com 3XP Typhoon/Sidewinder (3CR990) Ethernet interface"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device txp"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_txp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+interface provides access to the 10Mb/s and 100Mb/s Ethernet networks via the
+.Tn 3Com
+.Tn Typhoon/Sidewinder
+chipset.
+.Pp
+Basic Ethernet functions are provided as well as support for
+.Xr vlan 4
+tag removal and insertion assistance, receive
+.Xr ip 4 ,
+.Xr tcp 4 ,
+and
+.Xr udp 4
+checksum offloading,
+and
+transmit
+.Xr ip 4
+checksum offloading.
+There is currently no support for
+transmit
+.Xr tcp 4
+or
+.Xr udp 4
+checksum offloading,
+.Xr tcp 4
+segmentation, nor
+.Xr ipsec 4
+acceleration.
+.Pp
+When a
+.Nm
+interface is brought up, by default, it will attempt to auto-negotiate the
+link speed and duplex mode.
+The speeds, in order of attempt, are:
+100Mb/s Full Duplex, 100Mb/s Half Duplex, 10 Mb/s Full Duplex, and
+10 Mb/s Half Duplex.
+.Pp
+The
+.Nm
+supports several media types, which are selected via the
+.Xr ifconfig 8
+command.
+The supported media types are:
+.Bl -tag -width indent
+.It Cm media autoselect
+Attempt to autoselect the media type (default)
+.It Cm media 100baseTX mediaopt full-duplex
+Use 100baseTX, full duplex
+.It Cm media 100baseTX Op Cm mediaopt half-duplex
+Use 100baseTX, half duplex
+.It Cm media 10baseT mediaopt full-duplex
+Use 10baseT, full duplex
+.It Cm media 10baseT Op Cm mediaopt half-duplex
+Use 10baseT, half duplex
+.El
+.Sh HARDWARE
+The
+.Nm
+driver supports the following cards:
+.Pp
+.Bl -bullet -offset indent -compact
+.It
+3Com 3CR990-TX-95
+.It
+3Com 3CR990-TX-97
+.It
+3Com 3cR990B-TXM
+.It
+3Com 3CR990SVR95
+.It
+3Com 3CR990SVR97
+.It
+3Com 3cR990B-SRV
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr inet 4 ,
+.Xr intro 4 ,
+.Xr ip 4 ,
+.Xr miibus 4 ,
+.Xr tcp 4 ,
+.Xr udp 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 2.9 .
diff --git a/share/man/man4/u3g.4 b/share/man/man4/u3g.4
new file mode 100644
index 0000000..d83f157
--- /dev/null
+++ b/share/man/man4/u3g.4
@@ -0,0 +1,127 @@
+.\"
+.\" Copyright (c) 2008 AnyWi Technologies
+.\" All rights reserved.
+.\"
+.\" This code is derived from uark.c
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 26, 2013
+.Dt U3G 4
+.Os
+.Sh NAME
+.Nm u3g
+.Nd USB support for 3G datacards
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device u3g"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+u3g_load="YES"
+.Ed
+.Pp
+If neither of the above is done, the driver will automatically be loaded
+by devd(8) when the device is connected.
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the multiple USB-to-serial interfaces exposed by
+many 3G USB/PCCard modems.
+.Pp
+The device is accessed through the
+.Xr ucom 4
+driver which makes it behave like a
+.Xr tty 4 .
+.Sh HARDWARE
+The
+.Nm
+driver supports the following adapters:
+.Pp
+.Bl -bullet -compact
+.It
+Option GT 3G Fusion, GT Fusion Quad, etc. (only 3G part, not WLAN)
+.It
+Option GT 3G, GT 3G Quad, etc.
+.It
+Vodafone Mobile Connect Card 3G
+.It
+Vodafone Mobile Broadband K3772-Z
+.It
+Qualcomm Inc. CDMA MSM
+.It
+Huawei B190, E180v, E220 ('<Huawei Mobile>')
+.It
+Novatel U740, MC950D, X950D, etc.
+.It
+Sierra MC875U, MC8775U, etc.
+.El
+.Pp
+(See
+.Pa /sys/dev/usb/serial/u3g.c
+for the complete list of supported cards for each vendor
+mentioned above.)
+.Pp
+The supported 3G cards provide the necessary modem port for ppp, or mpd
+connections as well as extra ports (depending on the specific device) to
+provide other functions (additional command port, diagnostic port, SIM toolkit
+port).
+.Pp
+In some of these devices a mass storage device supported by the
+.Xr umass 4
+driver is present which contains Windows and Mac OS X drivers.
+The device starts up in disk mode (TruInstall, ZeroCD, etc.) and requires
+additional commands to switch it to modem mode. If your device is not
+switching automatically, please try to add quirks. See
+.Xr usbconfig 8
+and
+.Xr usb_quirk 4 .
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr usb 4 ,
+.Xr usb_quirk 4 ,
+.Xr devd 8 ,
+.Xr usbconfig 8
+.Sh HISTORY
+The
+.Nm
+driver appeared in
+.Fx 7.2 ,
+is based on the
+.Xr uark 4
+driver, and written by
+.An Andrea Guzzo Aq aguzzo@anywi.com
+in September 2008.
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Andrea Guzzo Aq aguzzo@anywi.com
+and
+.An Nick Hibma Aq n_hibma@FreeBSD.org .
+Hardware for testing was provided by AnyWi Technologies, Leiden, NL.
+.Sh BUGS
+The automatic mode switch from disk mode to modem mode does not work unless
+the driver is either built into the kernel or loaded before the device is
+connected.
diff --git a/share/man/man4/uark.4 b/share/man/man4/uark.4
new file mode 100644
index 0000000..a4e2e56
--- /dev/null
+++ b/share/man/man4/uark.4
@@ -0,0 +1,85 @@
+.\" $OpenBSD: uark.4,v 1.3 2006/10/26 19:42:36 jmc Exp $
+.\"
+.\" Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 20, 2011
+.Dt UARK 4
+.Os
+.Sh NAME
+.Nm uark
+.Nd Arkmicro Technologies ARK3116 based USB serial adapter
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device uark"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+uark_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports Arkmicro Technologies ARK3116 based serial adapters.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following adapters:
+.Pp
+.Bl -bullet -compact
+.It
+HL USB-RS232
+.It
+HugePine USB-UART
+.It
+KQ-U8A Data Cable
+.It
+Skymaster USB to RS232
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Ox 4.0 .
+The first
+.Fx
+release to include it was
+.Fx 7.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Jonathan Gray
+.Aq jsg@openbsd.org .
+.Sh CAVEATS
+Setting hardware flow control is not currently supported.
+It is not yet known how to ask the hardware to send a break.
+.Pp
+Arkmicro Technologies do not reply to requests of documentation
+for their products.
diff --git a/share/man/man4/uart.4 b/share/man/man4/uart.4
new file mode 100644
index 0000000..644c37d
--- /dev/null
+++ b/share/man/man4/uart.4
@@ -0,0 +1,181 @@
+.\"
+.\" Copyright (c) 2003 Marcel Moolenaar
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 12, 2008
+.Dt UART 4
+.Os
+.Sh NAME
+.Nm uart
+.Nd driver for Universal Asynchronous Receiver/Transmitter (UART) devices
+.Sh SYNOPSIS
+.Cd "device uart"
+.Pp
+.Cd "device puc"
+.Cd "device uart"
+.Pp
+.Cd "device scc"
+.Cd "device uart"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.uart.0.disabled="1"
+.Cd hint.uart.0.baud="38400"
+.Cd hint.uart.0.port="0x3f8"
+.Cd hint.uart.0.flags="0x10"
+.Pp
+With
+.Ar flags
+encoded as:
+.Bl -tag -compact -width 0x000000
+.It 0x00010
+device is potential system console
+.It 0x00080
+use this port for remote kernel debugging
+.It 0x00100
+set RX FIFO trigger level to ``low'' (NS8250 only)
+.It 0x00200
+set RX FIFO trigger level to ``medium low'' (NS8250 only)
+.It 0x00400
+set RX FIFO trigger level to ``medium high'' (default, NS8250 only)
+.It 0x00800
+set RX FIFO trigger level to ``high'' (NS8250 only)
+.El
+.\"
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for various classes of UARTs implementing the
+EIA RS-232C (CCITT V.24) serial communications interface.
+Each such interface is controlled by a separate and independent instance of
+the
+.Nm
+driver.
+The primary support for devices that contain multiple serial interfaces or
+that contain other functionality besides one or more serial interfaces is
+provided by the
+.Xr puc 4 ,
+or
+.Xr scc 4
+device drivers.
+However, the serial interfaces of those devices that are managed by the
+.Xr puc 4 ,
+or
+.Xr scc 4
+driver are each independently controlled by the
+.Nm
+driver.
+As such, the
+.Xr puc 4 ,
+or
+.Xr scc 4
+driver provides umbrella functionality for the
+.Nm
+driver and hides the complexities that are inherent when elementary components
+are packaged together.
+.Pp
+The
+.Nm
+driver has a modular design to allow it to be used on differing hardware and
+for various purposes.
+In the following sections the components are discussed in detail.
+Options are described in the section that covers the component to which each
+option applies.
+.\"
+.Ss CORE COMPONENT
+At the heart of the
+.Nm
+driver is the core component.
+It contains the bus attachments and the low-level interrupt handler.
+.\"
+.Ss HARDWARE DRIVERS
+The core component and the kernel interfaces talk to the hardware through the
+hardware interface.
+This interface serves as an abstraction of the hardware and allows varying
+UARTs to be used for serial communications.
+.\"
+.Ss SYSTEM DEVICES
+System devices are UARTs that have a special purpose by way of hardware
+design or software setup.
+For example, Sun UltraSparc machines use UARTs as their keyboard interface.
+Such an UART cannot be used for general purpose communications.
+Likewise, when the kernel is configured for a serial console, the
+corresponding UART will in turn be a system device so that the kernel can
+output boot messages early on in the boot process.
+.\"
+.Ss KERNEL INTERFACES
+The last but not least of the components is the kernel interface.
+This component ultimately determines how the UART is made visible to the
+kernel in particular and to users in general.
+The default kernel interface is the TTY interface.
+This allows the UART to be used for terminals, modems and serial line IP
+applications.
+System devices, with the notable exception of serial consoles, generally
+have specialized kernel interfaces.
+.\"
+.Sh HARDWARE
+The
+.Nm
+driver supports the following classes of UARTs:
+.Pp
+.Bl -bullet -compact
+.It
+NS8250: standard hardware based on the 8250, 16450, 16550, 16650, 16750 or
+the 16950 UARTs.
+.It
+SCC: serial communications controllers supported by the
+.Xr scc 4
+device driver.
+.El
+.\"
+.Sh FILES
+.Bl -tag -width ".Pa /dev/ttyu?.init" -compact
+.It Pa /dev/ttyu?
+for callin ports
+.It Pa /dev/ttyu?.init
+.It Pa /dev/ttyu?.lock
+corresponding callin initial-state and lock-state devices
+.Pp
+.It Pa /dev/cuau?
+for callout ports
+.It Pa /dev/cuau?.init
+.It Pa /dev/cuau?.lock
+corresponding callout initial-state and lock-state devices
+.El
+.Sh SEE ALSO
+.Xr puc 4 ,
+.Xr scc 4
+.\"
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.2 .
+.Sh AUTHORS
+The
+.Nm
+device driver and this manual page were written by
+.An Marcel Moolenaar Aq marcel@xcllnt.net .
diff --git a/share/man/man4/uath.4 b/share/man/man4/uath.4
new file mode 100644
index 0000000..e93094e
--- /dev/null
+++ b/share/man/man4/uath.4
@@ -0,0 +1,187 @@
+.\"
+.\" Copyright (c) 2006
+.\" Damien Bergamini <damien.bergamini@free.fr>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 7, 2009
+.Dt UATH 4
+.Os
+.Sh NAME
+.Nm uath
+.Nd Atheros USB IEEE 802.11a/b/g wireless network device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device uath"
+.Cd "device wlan"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_uath_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports USB 2.0 wireless network devices based on Atheros
+Communications fifth generation AR5005UG and AR5005UX chipsets.
+.Pp
+The AR5005UG chipset is made of an AR5523 multiprotocol MAC/baseband processor
+and an AR2112 Radio-on-a-Chip that can operate between 2300 and 2500 MHz
+(802.11b/g).
+.Pp
+The AR5005UX chipset is made of an AR5523 multiprotocol MAC/baseband processor
+and an AR5112 dual band Radio-on-a-Chip that can operate between 2300 and
+2500 MHz (802.11b/g) or 4900 and 5850 MHz (802.11a).
+.Pp
+The AR5005UG and AR5005UX chipsets both have an integrated 32-bit MIPS
+R4000-class processor that runs a firmware and manages, among other things,
+the automatic control of the transmit rate and the calibration of the radio.
+.Pp
+.Nm
+supports
+.Cm station ,
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh FIRMWARE
+.Nm
+requires firmware that is downloaded to the device.
+This is normally done by the
+.Xr uathload 8
+utility that is launched by
+.Xr devd 8
+when the device is inserted.
+.Xr uathload
+includes the firmware in the binary program.
+This firmware is licensed for general use and is included in the base system.
+.Sh HARDWARE
+The
+.Nm
+driver should work with the following adapters:
+.Bl -column "TRENDware International TEW-444UB" "AR5005UX"
+.It Em "Adapter" Ta Em "Chipset"
+.\".It Belkin F6D3050 AR5005UX
+.It Li "Compex WLU108AG" Ta AR5005UX
+.It Li "Compex WLU108G" Ta AR5005UG
+.\".It Li "D-Link DWL-AG132" Ta AR5005UX
+.It Li "D-Link DWL-G132" Ta AR5005UG
+.\".It Li "Edimax EW-7315Ug" Ta AR5005UG (AR2414???)
+.\".It Li "Lancom USB-54ag" Ta AR5005UX
+.\".It Li "NEC WL54TU" Ta AR5005UX
+.It Li "IODATA WN-G54/US" Ta AR5005UG
+.It Li "MELCO WLI-U2-KAMG54" Ta AR5005UX
+.It Li "Netgear WG111T" Ta AR5005UG
+.It Li "Netgear WG111U" Ta AR5005UX
+.It Li "Netgear WPN111" Ta AR5005UG
+.It Li "Olitec 000544" Ta AR5005UG
+.It Li "PLANET WDL-U357" Ta AR5005UX
+.\".It Li "Senao WUB-8004" Ta AR5005UX
+.It Li "Siemens Gigaset 108" Ta AR5005UG
+.It Li "SMC SMCWUSBT-G" Ta AR5005UG
+.It Li "SMC SMCWUSBT-G2" Ta AR5005UG
+.\".It Li "SparkLAN WL-685GS" Ta AR5005UG
+.It Li "SparkLAN WL-785A" Ta AR5005UX
+.It Li "TP-Link TL-WN620G" Ta AR5005UG
+.It Li "TRENDware International TEW-444UB" Ta AR5005UG
+.It Li "TRENDware International TEW-504UB" Ta AR5005UX
+.It Li "Unex Technology UR054ag" Ta AR5005UX
+.\".It Li "Wistron NeWeb DCUA-81" Ta AR5005UX
+.\".It Li "Wistron NeWeb DRUA-81" Ta AR5005UG
+.\".It Li "Wistron NeWeb DRUA-82" Ta AR5005UX
+.\".It Li "ZyXEL G-200 v2" Ta AR5005UG
+.It Li "ZyXEL XtremeMIMO M-202" Ta AR5005UX
+.El
+.Pp
+An up to date list can be found at
+.Pa http://customerproducts.atheros.com/customerproducts/default.asp .
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev uath0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev uath0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev uath0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Pp
+Join a specific BSS network with 128-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev uath0 wlanmode adhoc ssid my_net \e
+ wepmode on wepkey 0x01020304050607080910111213 weptxkey 1
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "uath%d: could not send command (error=%s)"
+An attempt to send a command to the firmware failed.
+.It "uath%d: timeout waiting for command reply"
+A read command was sent to the firmware but the firmware failed to reply in
+time.
+.It "uath%d: device timeout"
+A frame dispatched to the hardware for transmission did not complete in time.
+The driver will reset the hardware.
+This should not happen.
+.El
+.Sh SEE ALSO
+.Xr netintro 4 ,
+.Xr usb 4 ,
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr devd 8 ,
+.Xr ifconfig 8 ,
+.Xr uathload 8 ,
+.Xr wpa_supplicant 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 4.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Weongyo Jeong Aq weongyo@FreeBSD.org
+and
+.An Sam Leffler Aq sam@FreeBSD.org .
+It is distantly related to a driver written by
+.An Damien Bergamini Aq damien@openbsd.org .
+.Sh CAVEATS
+Atheros proprietary 108 Mbps mode (aka Super AG mode) is not supported.
+.Pp
+Dual-band adapters are presently not working;
+to workaround, restriction operation to 2.4GHz channels.
diff --git a/share/man/man4/ubsa.4 b/share/man/man4/ubsa.4
new file mode 100644
index 0000000..df9002c
--- /dev/null
+++ b/share/man/man4/ubsa.4
@@ -0,0 +1,109 @@
+.\"
+.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 20, 2011
+.Dt UBSA 4
+.Os
+.Sh NAME
+.Nm ubsa
+.Nd USB support for Belkin serial adapters
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device ubsa"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ubsa_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the USB-to-RS232 Bridge chip used by a variety of
+serial adapters from Belkin and other vendors.
+.Pp
+The device is accessed through the
+.Xr ucom 4
+driver which makes it behave like a
+.Xr tty 4 .
+.Sh HARDWARE
+The
+.Nm
+driver supports the following adapters:
+.Pp
+.Bl -bullet -compact
+.It
+AnyData ADU-500A EV-DO modem
+.It
+AnyData ADU-E100A (no EV-DO mode support)
+.It
+Belkin F5U103
+.It
+Belkin F5U120
+.It
+e-Tek Labs Kwik232
+.It
+GoHubs GoCOM232
+.It
+Peracom single port serial adapter
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver
+appeared in
+.Fx 5.0 .
+The
+.Xr uplcom 4
+manual page was adopted from
+.Nx
+by
+.An Tom Rhodes Aq trhodes@FreeBSD.org
+in April 2002 and modified for the
+.Nm
+driver by
+.An Alexander Kabaev Aq kan@FreeBSD.org
+in October 2002.
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Alexander Kabaev Aq kan@FreeBSD.org .
diff --git a/share/man/man4/ubsec.4 b/share/man/man4/ubsec.4
new file mode 100644
index 0000000..4675da0
--- /dev/null
+++ b/share/man/man4/ubsec.4
@@ -0,0 +1,123 @@
+.\" $OpenBSD: ubsec.4,v 1.25 2003/08/12 19:42:46 jason Exp $
+.\"
+.\" Copyright (c) 2000 Jason L. Wright (jason@thought.net)
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 16, 2009
+.Dt UBSEC 4
+.Os
+.Sh NAME
+.Nm ubsec
+.Nd Broadcom and BlueSteel uBsec 5x0x crypto accelerator
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device crypto"
+.Cd "device cryptodev"
+.Cd "device ubsec"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ubsec_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports cards containing Broadcom and BlueSteel uBsec 5x0x
+crypto accelerator chips.
+.Pp
+The
+.Nm
+driver registers itself to accelerate DES, Triple-DES, MD5-HMAC,
+and SHA1-HMAC operations for
+.Xr ipsec 4
+and
+.Xr crypto 4 .
+.Pp
+On those models which contain a public key engine (almost all of the
+more recent ones), this feature is registered with the
+.Xr crypto 4
+subsystem.
+.Pp
+On all models except the Bluesteel 5501 and Broadcom 5801, the driver
+registers itself to provide random data to the
+.Xr random 4
+subsystem.
+.Sh HARDWARE
+The
+.Nm
+driver supports cards containing any of the following chips:
+.Bl -tag -width "Broadcom BCM5822" -offset indent
+.It Bluesteel 5501
+The original chipset, no longer made.
+This extremely rare unit
+was not very fast, lacked an RNG, and had a number of other bugs.
+.It Bluesteel 5601
+A faster and fixed version of the original, with a random number
+unit and large number engine added.
+.It Broadcom BCM5801
+A BCM5805 without public key engine or random number generator.
+.It Broadcom BCM5802
+A slower version of the BCM5805.
+.It Broadcom BCM5805
+Faster version of Bluesteel 5601.
+.It Broadcom BCM5820
+64 bit version of the chip, and significantly more advanced.
+.It Broadcom BCM5821
+Faster version of the BCM5820.
+This is the chip found on the Sun Crypto Accelerator 1000.
+.It Broadcom BCM5822
+Faster version of the BCM5820.
+.It Broadcom BCM5823
+A BCM5822 with AES capability.
+.It Broadcom BCM5825
+Faster version of the BCM5823.
+.El
+.Sh SEE ALSO
+.Xr crypt 3 ,
+.Xr crypto 4 ,
+.Xr intro 4 ,
+.Xr ipsec 4 ,
+.Xr random 4 ,
+.Xr crypto 9
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Ox 2.8 .
+The
+.Nm
+device driver was imported to
+.Fx 5.0 .
+.Sh BUGS
+The BCM5801 and BCM5802 have not actually been tested.
+The AES capability of the BCM5823 is not yet supported; it is awaiting
+public disclosure of programming information from Broadcom.
diff --git a/share/man/man4/ubser.4 b/share/man/man4/ubser.4
new file mode 100644
index 0000000..556d4ec
--- /dev/null
+++ b/share/man/man4/ubser.4
@@ -0,0 +1,69 @@
+.\" Copyright (c) 2004 Bernd Walter <ticso@FreeBSD.org>
+.\"
+.\" $URL: https://devel.bwct.de/svn/projects/ubser/ubser.4 $
+.\" $Date: 2004-02-29 21:54:17 +0100 (Sun, 29 Feb 2004) $
+.\" $Author: ticso $
+.\" $Rev: 1130 $
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 20, 2011
+.Dt UBSER 4
+.Os
+.Sh NAME
+.Nm ubser
+.Nd USB support for BWCT console serial adapters
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device ubser"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ubser_load="YES"
+.Ed
+.Sh HARDWARE
+The
+.Nm
+driver provides support for the BWCT console management serial adapters.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/ttyy??" -compact
+.It Pa /dev/ttyy??
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver
+appeared in
+.Fx 5.2 .
diff --git a/share/man/man4/ubtbcmfw.4 b/share/man/man4/ubtbcmfw.4
new file mode 100644
index 0000000..8451c6f
--- /dev/null
+++ b/share/man/man4/ubtbcmfw.4
@@ -0,0 +1,108 @@
+.\" Copyright (c) 2003 Maksim Yevmenkin <m_evmenkin@yahoo.com>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $Id: ubtbcmfw.4,v 1.3 2003/05/21 19:37:35 max Exp $
+.\" $FreeBSD$
+.\"
+.Dd November 22, 2006
+.Dt UBTBCMFW 4
+.Os
+.Sh NAME
+.Nm ubtbcmfw
+.Nd Firmware driver for Broadcom BCM2033 chip based Bluetooth USB devices
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ubtbcmfw"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ubtbcmfw_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+is a firmware driver for Broadcom BCM2033 chip based Bluetooth USB devices.
+It provides minimal access to the parts of the device required to download
+firmware.
+.Pp
+The
+.Nm
+driver creates three fixed endpoint device nodes.
+.Pp
+The control transfers can only happen on the control endpoint which
+is always endpoint 0.
+Control requests are issued by
+.Xr ioctl 2
+calls.
+.Pp
+Only incoming transfers are supported on an interrupt endpoint.
+To perform I/O on an interrupt endpoint,
+.Xr read 2
+should be used.
+All I/O operations on an interrupt endpoint are unbuffered.
+Interrupt endpoint is always endpoint 1.
+.Pp
+Only outgoing bulk transfers are supported on a bulk endpoint.
+To perform I/O on a bulk endpoint,
+.Xr write 2
+should be used.
+All I/O operations on a bulk endpoint are unbuffered.
+Outgoing bulk endpoint is always endpoint 2.
+.Pp
+The control endpoint (endpoint 0) handles the following
+.Xr ioctl 2
+calls:
+.Bl -tag -width indent
+.It Dv USB_GET_DEVICE_DESC Pq Vt usb_device_descriptor_t
+Return the device descriptor.
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/ubtbcmfw Ns Ar N Ns Pa \&. Ns Ar EE" -compact
+.It Pa /dev/ubtbcmfw Ns Ar N Ns Pa \&. Ns Ar EE
+Endpoint
+.Ar EE
+of device
+.Ar N .
+.El
+.Sh SEE ALSO
+.Xr ng_ubt 4 ,
+.Xr ugen 4 ,
+.Xr usb 4 ,
+.Xr bcmfw 8
+.Sh HISTORY
+The
+.Nm
+driver was implemented in
+.Fx 5.0 .
+.Sh AUTHORS
+.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
+.Sh BUGS
+Most likely.
+Please report if found.
diff --git a/share/man/man4/uchcom.4 b/share/man/man4/uchcom.4
new file mode 100644
index 0000000..d7c0abc
--- /dev/null
+++ b/share/man/man4/uchcom.4
@@ -0,0 +1,88 @@
+.\" $NetBSD: uchcom.4,v 1.2 2008/04/30 13:10:54 martin Exp $
+.\"
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Takuya SHIOZAKI (tshiozak@netbsd.org).
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 20, 2011
+.Dt UCHCOM 4
+.Os
+.Sh NAME
+.Nm uchcom
+.Nd WinChipHead CH341/CH340 serial adapter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device uchcom"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+uchcom_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the WinChipHead CH341/CH340 USB-to-RS-232
+Bridge chip.
+.Pp
+The device is accessed through the
+.Xr ucom 4
+driver which makes it behave like a
+.Xr tty 4 .
+.Sh HARDWARE
+The
+.Nm
+driver supports the following adapters:
+.Pp
+.Bl -bullet -compact
+.It
+HL USB-RS232
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Nx .
+The first
+.Fx
+release to include it was
+.Fx 8.0 .
+.Sh BUGS
+Actually, this chip seems unable to drive other than 8 data bits and
+1 stop bit line.
diff --git a/share/man/man4/ucom.4 b/share/man/man4/ucom.4
new file mode 100644
index 0000000..8898872
--- /dev/null
+++ b/share/man/man4/ucom.4
@@ -0,0 +1,106 @@
+.\" $NetBSD: ucom.4,v 1.9 2002/03/22 00:39:40 augustss Exp $
+.\"
+.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 1, 2008
+.Dt UCOM 4
+.Os
+.Sh NAME
+.Nm ucom
+.Nd USB tty support
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ucom"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ucom_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver attaches to USB modems, serial ports, and other devices that need
+to look like a tty.
+The
+.Nm
+driver shows a behavior like a
+.Xr tty 4 .
+This means that normal programs such as
+.Xr tip 1
+or
+.Xr ppp 8
+can be used to access the device.
+.Pp
+The
+.Va portno
+locater can be used to decide which port to use for devices that have
+multiple external ports.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/cuaU?"
+.It Pa /dev/cuaU?
+.It Pa /dev/ttyU?
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr uark 4 ,
+.Xr uchcom 4 ,
+.Xr uftdi 4 ,
+.Xr umcs 4 ,
+.Xr umct 4 ,
+.Xr umodem 4 ,
+.Xr uplcom 4 ,
+.Xr usb 4 ,
+.Xr uvisor 4 ,
+.Xr uvscom 4
+.Sh HISTORY
+The
+.Nm
+driver was adopted from
+.Nx
+in March of 2002.
+This manual page was adopted from
+.Nx
+by
+.An Tom Rhodes Aq trhodes@FreeBSD.org
+in April 2002.
+.Sh BUGS
+Prior to
+.Fx 6.0
+.Nm
+created
+.Pa /dev/ucom?
+rather than the uniform device names created today.
+Old scripts must be adjusted accordingly.
diff --git a/share/man/man4/ucycom.4 b/share/man/man4/ucycom.4
new file mode 100644
index 0000000..063d419
--- /dev/null
+++ b/share/man/man4/ucycom.4
@@ -0,0 +1,87 @@
+.\"-
+.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 20, 2011
+.Dt UCYCOM 4
+.Os
+.Sh NAME
+.Nm ucycom
+.Nd device driver for Cypress CY7C63743 and CY7C64013 USB to RS232 bridges
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device ucycom"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ucycom_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Cypress CY7C63743 and CY7C64013 bridge
+chips.
+These chips were designed to provide a low-cost transition path to USB
+for existing RS232 devices, and have fairly limited capabilities.
+.Pp
+The
+.Nm
+driver behaves like a
+.Xr tty 4 .
+.Sh HARDWARE
+The
+.Nm
+driver currently supports the following devices which incorporate
+Cypress USB to RS232 bridge chips:
+.Pp
+.Bl -bullet -compact
+.It
+DeLorme Earthmate USB GPS receiver
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver and this manual page were written by
+.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
diff --git a/share/man/man4/udav.4 b/share/man/man4/udav.4
new file mode 100644
index 0000000..4d90236
--- /dev/null
+++ b/share/man/man4/udav.4
@@ -0,0 +1,101 @@
+.\" $NetBSD$
+.\"
+.\" Copyright (c) 2003
+.\" Shingo WATANABE <nabe@nabechan.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Shingo WATANABE.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt UDAV 4
+.Os
+.Sh NAME
+.Nm udav
+.Nd "Davicom DM9601 USB Ethernet driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device miibus"
+.Cd "device udav"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_udav_load="YES"
+.Ed
+.Sh HARDWARE
+The
+.Nm
+driver supports the following adapters:
+.Pp
+.Bl -bullet -compact
+.It
+Corega FEther USB-TXC
+.It
+ShanTou ST268 USB NIC
+.El
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB
+.Tn Ethernet
+adapters based on the Davicom DM9601 chipset.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr usb 4 ,
+.Xr ifconfig 8
+.Rs
+.%T "Davicom DM9601 data sheet"
+.%U http://ptm2.cc.utu.fi/ftp/network/cards/DM9601/From_NET/DM9601-DS-P01-930914.pdf
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Nx 2.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Shingo WATANABE Aq nabe@nabechan.org .
diff --git a/share/man/man4/udbp.4 b/share/man/man4/udbp.4
new file mode 100644
index 0000000..45afd79
--- /dev/null
+++ b/share/man/man4/udbp.4
@@ -0,0 +1,124 @@
+.\" Copyright (c) 1999
+.\" Nick Hibma <n_hibma@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 22, 2006
+.Dt UDBP 4
+.Os
+.Sh NAME
+.Nm udbp
+.Nd USB Double Bulk Pipe driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device udbp"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+udbp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for host-to-host cables
+that contain at least two bulk pipes (one for each direction),
+for example
+the EzLink cable and the NetChip 1080 chip.
+.Pp
+.\" XXX The description of how to add netgraph to the kernel
+.\" is out of place here. It should be limited to the
+.\" netgraph(4) manpage only. However, that page does
+.\" not yet give instructions for kldload(8) for the
+.\" clueless. Working on it -- sheldonh
+It requires
+.Xr netgraph 4
+to be available.
+This can be done either by adding
+.Cd "options NETGRAPH"
+to your kernel configuration file, or alternatively loading
+.Xr netgraph 4
+as a module, either from
+.Pa /boot/loader.conf
+or from the command line, before the
+.Nm
+module.
+.Sh EXAMPLES
+.Dl options NETGRAPH
+.Dl device udbp
+.Pp
+Add the
+.Nm
+driver to the kernel.
+.Pp
+.Dl kldload netgraph
+.Dl kldload udbp
+.Pp
+Load the
+.Xr netgraph 4
+module and then the
+.Nm
+driver.
+.Pp
+.Dl ngctl mkpeer udbp0: iface data inet
+.Dl ifconfig ng0 10.0.0.1 10.0.0.2
+.Pp
+Create a new network interface node
+and connect its inet hook to the data hook of the
+.Nm
+node.
+.Xr ifconfig 8
+configures the resulting network interface ng0 with a local
+IP address of 10.0.0.1 and a remote IP address of 10.0.0.2.
+On the remote host, the two
+IP addresses should of course be reversed.
+.Sh SEE ALSO
+.Xr netgraph 4 ,
+.Xr ng_iface 4 ,
+.Xr ohci 4 ,
+.Xr uhci 4 ,
+.Xr usb 4 ,
+.Xr ngctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Doug Ambrisko Aq ambrisko@whistle.com ,
+.An Julian Elischer Aq julian@FreeBSD.org
+and
+.An Nick Hibma Aq n_hibma@FreeBSD.org .
+.Pp
+This manual page was written by
+.An Nick Hibma Aq n_hibma@FreeBSD.org .
diff --git a/share/man/man4/udp.4 b/share/man/man4/udp.4
new file mode 100644
index 0000000..2f828bf
--- /dev/null
+++ b/share/man/man4/udp.4
@@ -0,0 +1,166 @@
+.\" Copyright (c) 1983, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)udp.4 8.1 (Berkeley) 6/5/93
+.\" $FreeBSD$
+.\"
+.Dd June 5, 1993
+.Dt UDP 4
+.Os
+.Sh NAME
+.Nm udp
+.Nd Internet User Datagram Protocol
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In netinet/in.h
+.Ft int
+.Fn socket AF_INET SOCK_DGRAM 0
+.Sh DESCRIPTION
+.Tn UDP
+is a simple, unreliable datagram protocol which is used
+to support the
+.Dv SOCK_DGRAM
+abstraction for the Internet
+protocol family.
+.Tn UDP
+sockets are connectionless, and are
+normally used with the
+.Xr sendto 2
+and
+.Xr recvfrom 2
+calls, though the
+.Xr connect 2
+call may also be used to fix the destination for future
+packets (in which case the
+.Xr recv 2
+or
+.Xr read 2
+and
+.Xr send 2
+or
+.Xr write 2
+system calls may be used).
+.Pp
+.Tn UDP
+address formats are identical to those used by
+.Tn TCP .
+In particular
+.Tn UDP
+provides a port identifier in addition
+to the normal Internet address format.
+Note that the
+.Tn UDP
+port
+space is separate from the
+.Tn TCP
+port space (i.e., a
+.Tn UDP
+port
+may not be
+.Dq connected
+to a
+.Tn TCP
+port).
+In addition broadcast
+packets may be sent (assuming the underlying network supports
+this) by using a reserved
+.Dq broadcast address ;
+this address
+is network interface dependent.
+.Pp
+Options at the
+.Tn IP
+transport level may be used with
+.Tn UDP ;
+see
+.Xr ip 4 .
+.Sh MIB VARIABLES
+The
+.Nm
+protocol implements a number of variables in the
+.Li net.inet
+branch of the
+.Xr sysctl 3
+MIB.
+.Bl -tag -width UDPCTL_RECVSPACEX
+.It UDPCTL_CHECKSUM
+.Pq udp.checksum
+Enable udp checksums (enabled by default).
+.It UDPCTL_MAXDGRAM
+.Pq udp.maxdgram
+Maximum outgoing UDP datagram size
+.It UDPCTL_RECVSPACE
+.Pq udp.recvspace
+Maximum space for incoming UDP datagrams
+.It udp.log_in_vain
+For all udp datagrams, to ports on which there is no socket
+listening, log the connection attempt (disabled by default).
+.It udp.blackhole
+When a datagram is received on a port where there is no socket
+listening, do not return an ICMP port unreachable message.
+(Disabled by default.
+See
+.Xr blackhole 4 . )
+.El
+.Sh ERRORS
+A socket operation may fail with one of the following errors returned:
+.Bl -tag -width Er
+.It Bq Er EISCONN
+when trying to establish a connection on a socket which
+already has one, or when trying to send a datagram with the destination
+address specified and the socket is already connected;
+.It Bq Er ENOTCONN
+when trying to send a datagram, but
+no destination address is specified, and the socket has not been
+connected;
+.It Bq Er ENOBUFS
+when the system runs out of memory for
+an internal data structure;
+.It Bq Er EADDRINUSE
+when an attempt
+is made to create a socket with a port which has already been
+allocated;
+.It Bq Er EADDRNOTAVAIL
+when an attempt is made to create a
+socket with a network address for which no network interface
+exists.
+.El
+.Sh SEE ALSO
+.Xr getsockopt 2 ,
+.Xr recv 2 ,
+.Xr send 2 ,
+.Xr socket 2 ,
+.Xr blackhole 4 ,
+.Xr inet 4 ,
+.Xr intro 4 ,
+.Xr ip 4
+.Sh HISTORY
+The
+.Nm
+protocol appeared in
+.Bx 4.2 .
diff --git a/share/man/man4/udplite.4 b/share/man/man4/udplite.4
new file mode 100644
index 0000000..5d06b14
--- /dev/null
+++ b/share/man/man4/udplite.4
@@ -0,0 +1,96 @@
+.\" Copyright (c) 2014, Kevin Lo.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 7, 2014
+.Dt UDPLITE 4
+.Os
+.Sh NAME
+.Nm udplite
+.Nd Lightweight User Datagram Protocol
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/socket.h
+.In netinet/udplite.h
+.Ft int
+.Fn socket AF_INET SOCK_DGRAM IPPROTO_UDPLITE
+.Sh DESCRIPTION
+The
+.Tn UDP-Lite
+protocol provides a partial checksum which allows
+corrupted packets to be transmitted to the receiving
+application.
+This has advantages for some types of multimedia
+transport that may be able to make use of slightly
+damaged datagrams, rather than having them discarded
+by lower-layer protocols.
+.Pp
+.Tn UDP-Lite
+supports a number of socket options which can be set with
+.Xr setsockopt 2
+and tested with
+.Xr getsockopt 2 :
+.Bl -tag -width ".Dv UDPLITE_SEND_CSCOV"
+.It Dv UDPLITE_SEND_CSCOV
+This option sets the sender checksum coverage.
+A value of zero indicates that the entire packet
+is covered by the checksum.
+A value of 1 to 7 must be discarded by the receiver.
+.It Dv UDPLITE_RECV_CSCOV
+This option is the receiver-side analogue.
+It is truly optional, i.e. not required to enable traffic
+with partial checksum coverage.
+Its function is that of a traffic filter:
+when enabled, it instructs the kernel to drop
+all packets which have a coverage less than this value.
+.El
+.Sh ERRORS
+A socket operation may fail with one of the following errors returned:
+.Bl -tag -width Er
+.It Bq Er EISCONN
+when trying to establish a connection on a socket which
+already has one, or when trying to send a datagram with the destination
+address specified and the socket is already connected;
+.It Bq Er ENOTCONN
+when trying to send a datagram, but
+no destination address is specified, and the socket has not been
+connected;
+.It Bq Er ENOBUFS
+when the system runs out of memory for
+an internal data structure;
+.It Bq Er EADDRINUSE
+when an attempt
+is made to create a socket with a port which has already been
+allocated;
+.It Bq Er EADDRNOTAVAIL
+when an attempt is made to create a
+socket with a network address for which no network interface
+exists.
+.El
+.Sh SEE ALSO
+.Xr getsockopt 2 ,
+.Xr recv 2 ,
+.Xr send 2 ,
+.Xr socket 2
diff --git a/share/man/man4/uep.4 b/share/man/man4/uep.4
new file mode 100644
index 0000000..74b65f3
--- /dev/null
+++ b/share/man/man4/uep.4
@@ -0,0 +1,79 @@
+.\" Copyright (c) 2010 Gleb Smirnoff <glebius@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 25, 2010
+.Dt UEP 4
+.Os
+.Sh NAME
+.Nm uep
+.Nd eGalax touchscreen driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines into
+your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device uep"
+.Cd "device usb"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+uep_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the eGalax onscreen touch panels.
+.Pp
+The driver is stub.
+It just probes and attaches to USB device, creates device entry
+and feeds reassembled packets from the hardware to it.
+.Pp
+To get mouse working in
+.Xr X 7 ,
+one needs to install
+.Pa ports/x11-drivers/xf86-input-egalax .
+.Sh FILES
+.Nm
+creates a blocking pseudo\-device file,
+.Pa /dev/uep0 .
+.Sh SEE ALSO
+.Xr usb 4 ,
+.Xr loader.conf 5 ,
+.Xr xorg.conf 5 Pq Pa ports/x11/xorg ,
+.Xr egalax 4 Pq Pa ports/x11-drivers/xf86-input-egalax .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Gleb Smirnoff Aq glebius@FreeBSD.org
+.Sh BUGS
+.Nm
+can't act like
+.Xr sysmouse 4 ,
+since the latter does not support absolute motion events.
diff --git a/share/man/man4/ufm.4 b/share/man/man4/ufm.4
new file mode 100644
index 0000000..7ae11bd
--- /dev/null
+++ b/share/man/man4/ufm.4
@@ -0,0 +1,85 @@
+.\" Copyright (c) 2003 M. Warner Losh
+.\" <imp@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 22, 2006
+.Dt UFM 4
+.Os
+.Sh NAME
+.Nm ufm
+.Nd USB driver for Cypress Semiconductor FM Radio
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ufm"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ufm_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the D-Link/GEMTEK FM tuner.
+The USB interface chip is the common Cypress 63001, and the tuner is a
+Philips TEA5757 radio chip that uses a serial interface to set the
+tuner parameters.
+This design is used in the D-Link DSB-R100 USB Radio.
+.Pp
+The
+.Nm
+device must be configured in the kernel, along with
+.Xr usb 4
+and one of the
+.Xr uhci 4
+or
+.Xr ohci 4
+controllers.
+.Pp
+Subsequently, the
+.Pa /dev/ufm0
+device can be used by userland applications.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/ufm0" -compact
+.It Pa /dev/ufm0
+blocking device node
+.El
+.Sh SEE ALSO
+.Xr ohci 4 ,
+.Xr uhci 4 ,
+.Xr usb 4
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An M. Warner Losh Aq imp@FreeBSD.org
+for
+.Fx .
diff --git a/share/man/man4/ufoma.4 b/share/man/man4/ufoma.4
new file mode 100644
index 0000000..19028d9
--- /dev/null
+++ b/share/man/man4/ufoma.4
@@ -0,0 +1,141 @@
+.\" Copyright (c) 2006 Takanori Watanabe.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 20, 2011
+.Dt UFOMA 4
+.Os
+.Sh NAME
+.Nm ufoma
+.Nd USB mobile phone support
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device ufoma"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ufoma_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB mobile phone terminals in the subset of
+the Mobile Computing Promotion Consortium USB Implementation Guideline,
+which is adopted by FOMA, the NTT DoCoMo 3G system, terminal.
+These are partly like CDC ACM model based modems, which are supported
+by
+.Xr umodem 4 ,
+but the
+.Nm
+driver recognizes a specific USB descriptor that describes its role and
+interface structure, and it will negotiate its role when the device is open.
+They support a regular AT command set and
+the commands can either be multiplexed with the data stream
+or handled through separate pipes.
+In the latter case the AT
+commands have to be given on a device separate from the data device.
+.Pp
+The device is accessed through the
+.Xr ucom 4
+driver which makes it behave like a
+.Xr tty 4 .
+.Sh SYSCTLS
+These devices often have a few interface sets and these interfaces
+have their role, sometimes multiplexed.
+These roles are identified with the following sysctl MIBs:
+.Bl -tag -width indent
+.It Va dev.ucom.%d.supportmode
+The modes which are supported by the interface.
+.It Va dev.ucom.%d.currentmode
+Current mode of the interface.
+.It Va dev.ucom.%d.openmode
+Mode to transit when the device is open next.
+.El
+The modes are as follows:
+.Bl -tag -width indent
+.It Li modem
+Accepts AT commands and go and pass packet communication data.
+.It Li handsfree
+Accepts AT commands but it does not pass data.
+.It Li obex
+Accepts OBEX frame which is used to exchange telephone book, etc.
+.It Li vendor1 , vendor2
+Vendor specific data may be passed.
+.It Li deactivated
+When an interface is recognized by the system but not used, the interface
+will be set to this mode.
+.It Li unlinked
+When an interface is not yet negotiated, the interface is in this mode.
+.El
+.Sh HARDWARE
+Devices supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+SHARP FOMA SH902i
+.It
+KYOCERA PHS AH-K3001V (a.k.a Kyopon)
+.It
+SANYO Vodafone3G V801SA
+.El
+.Sh SEE ALSO
+Specification can be found at:
+.Pp
+.Bl -item -compact
+.It
+.Pa http://www.nttdocomo.co.jp/corporate/technology/document/foma/index.html
+.It
+.Pa http://www.mcpc-jp.org/doclist.htm
+.El
+.Pp
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr umodem 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver
+appeared in
+.Fx 7.0 ,
+partly derived from the
+.Xr umodem 4
+code.
+.Sh BUGS
+Interfaces with multiplexed commands and data and interfaces with
+commands only are supported.
diff --git a/share/man/man4/uftdi.4 b/share/man/man4/uftdi.4
new file mode 100644
index 0000000..1045169
--- /dev/null
+++ b/share/man/man4/uftdi.4
@@ -0,0 +1,200 @@
+.\" $NetBSD: uftdi.4,v 1.5 2002/02/07 03:15:08 ross Exp $
+.\"
+.\" Copyright (c) 2000 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 31, 2014
+.Dt UFTDI 4
+.Os
+.Sh NAME
+.Nm uftdi
+.Nd USB support for serial adapters based on the FTDI family of USB
+serial adapter chips.
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device uftdi"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+uftdi_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for various serial adapters based on the
+following FTDI chips:
+.Pp
+.Bl -bullet -compact
+.It
+FT8U100AX
+.It
+FT8U232AM
+.It
+FT8U232BM
+.It
+FT232R
+.It
+FT2232C
+.It
+FT2232D
+.It
+FT2232H
+.It
+FT4232H
+.It
+FT230X
+.El
+.Pp
+The device is accessed through the
+.Xr ucom 4
+driver which makes it behave like a
+.Xr tty 4 .
+.Pp
+Many of the supported chips provide additional functionality
+such as bitbang mode and the MPSSE engine for serial bus emulation.
+The
+.Nm
+driver provides access to that functionality with the following
+.Xr ioctl 2
+calls, defined in
+.In dev/usb/uftdiio.h :
+.Bl -tag -width indent
+.It Dv UFTDIIOC_RESET_IO Pq Vt int
+Reset the channel to its default configuration, flush RX and TX FIFOs.
+.It Dv UFTDIIOC_RESET_RX Pq Vt int
+Flush the RX FIFO.
+.It Dv UFTDIIOC_RESET_TX Pq Vt int
+Flush the TX FIFO.
+.It Dv UFTDIIOC_SET_BITMODE Pq Vt "struct uftdi_bitmode"
+Put the channel into the operating mode specified in
+.Va mode ,
+and set the pins indicated by ones in
+.Va iomask
+to output mode.
+The
+.Va mode
+must be one of the
+.Va uftdi_bitmodes
+values.
+.Bd -literal
+enum uftdi_bitmodes
+{
+ UFTDI_BITMODE_ASYNC = 0,
+ UFTDI_BITMODE_MPSSE = 1,
+ UFTDI_BITMODE_SYNC = 2,
+ UFTDI_BITMODE_CPU_EMUL = 3,
+ UFTDI_BITMODE_FAST_SERIAL = 4,
+ UFTDI_BITMODE_CBUS = 5,
+ UFTDI_BITMODE_NONE = 0xff,
+};
+
+struct uftdi_bitmode
+{
+ uint8_t mode;
+ uint8_t iomask;
+};
+.Ed
+.Pp
+Manuals and application notes published by FTDI describe these
+modes in detail.
+To use most of these modes, you first put the channel into
+the desired mode, then you
+.Xr read 2
+and
+.Xr write 2
+data which either reflects pin state or is interpreted
+as MPSSE commands and parameters, depending on the mode.
+.It Dv UFTDIIOC_GET_BITMODE Pq Vt "struct uftdi_bitmode"
+Return the state of the bitbang pins at the time of the call in the
+.Va iomask
+member.
+The
+.Va mode
+member is unused.
+.It Dv UFTDIIOC_SET_ERROR_CHAR Pq Vt int
+Set the character which is inserted into the buffer to mark
+the point of an error such as FIFO overflow.
+.It Dv UFTDIIOC_SET_EVENT_CHAR Pq Vt int
+Set the character which causes a partial FIFO full of data
+to be returned immediately even if the FIFO is not full.
+.It Dv UFTDIIOC_SET_LATENCY Pq Vt int
+Set the amount of time to wait for a full FIFO,
+in milliseconds.
+If more than this much time elapses without receiving a new
+character, any characters in the FIFO are returned.
+.It Dv UFTDIIOC_GET_LATENCY Pq Vt int
+Get the current value of the latency timer.
+.It Dv UFTDIIOC_GET_HWREV Pq Vt int
+Get the hardware revision number.
+This is the
+.Va bcdDevice
+value from the
+.Va usb_device_descriptor .
+.El
+.Sh HARDWARE
+The
+.Nm
+driver supports the following adapters:
+.Pp
+.Bl -bullet -compact
+.It
+B&B Electronics USB->RS422/485 adapter
+.It
+Elexol USB MOD1 and USB MOD3
+.It
+HP USB-Serial adapter shipped with some HP laptops
+.It
+Inland UAS111
+.It
+QVS USC-1000
+.It
+Buffalo PC-OP-RS / Kurouto-shikou KURO-RS universal remote
+.It
+Prologix GPIB-USB Controller
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver
+appeared in
+.Fx 4.8
+from
+.Nx 1.5 .
diff --git a/share/man/man4/ugen.4 b/share/man/man4/ugen.4
new file mode 100644
index 0000000..875abb4
--- /dev/null
+++ b/share/man/man4/ugen.4
@@ -0,0 +1,311 @@
+.\" $NetBSD: ugen.4,v 1.13 2001/09/11 22:52:54 wiz Exp $
+.\"
+.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 16, 2014
+.Dt UGEN 4
+.Os
+.Sh NAME
+.Nm ugen
+.Nd USB generic device support
+.Sh SYNOPSIS
+.Nm
+is integrated into the
+.Xr usb 4
+kernel module.
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for all USB devices that do not have
+a special driver.
+It supports access to all parts of the device,
+but not in a way that is as convenient as a special purpose driver.
+.Pp
+There can be up to 127 USB devices connected to a USB bus.
+Each USB device can have up to 16 endpoints.
+Each of these endpoints
+will communicate in one of four different modes: control, isochronous,
+bulk, or interrupt.
+Each of the endpoints will have a different
+device node.
+The four least significant bits in the minor device
+number determine which endpoint the device accesses, and the rest
+of the bits determine which USB device.
+.Pp
+If an endpoint address is used both for input and output, the device
+can be opened for both read or write.
+.Pp
+To find out which endpoints exist, there are a series of
+.Xr ioctl 2
+operations on the control endpoint that return the USB descriptors
+of the device, configurations, interfaces, and endpoints.
+.Pp
+The control transfer mode can only happen on the control endpoint
+which is always endpoint 0.
+The control endpoint accepts a request
+and may respond with an answer to such a request.
+Control requests
+are issued by
+.Xr ioctl 2
+calls.
+.\" .Pp
+.\" The isochronous transfer mode can be in or out depending on the
+.\" endpoint.
+.\" To perform I/O on an isochronous endpoint
+.\" .Xr read 2
+.\" and
+.\" .Xr write 2
+.\" should be used.
+.\" Before any I/O operations can take place the transfer rate in
+.\" bytes/second has to be set.
+.\" This is done with
+.\" .Xr ioctl 2
+.\" .Dv USB_SET_ISO_RATE .
+.\" Performing this call sets up a buffer corresponding to
+.\" about 1 second of data.
+.Pp
+The bulk transfer mode can be in or out depending on the
+endpoint.
+To perform I/O on a bulk endpoint
+.Xr read 2
+and
+.Xr write 2
+should be used.
+All I/O operations on a bulk endpoint are unbuffered.
+.Pp
+The interrupt transfer mode can be in or out depending on the
+endpoint.
+To perform I/O on an interrupt endpoint
+.Xr read 2
+and
+.Xr write 2
+should be used.
+A moderate amount of buffering is done
+by the driver.
+.Pp
+All endpoints handle the following
+.Xr ioctl 2
+calls:
+.Bl -tag -width indent
+.It Dv USB_SET_SHORT_XFER Pq Vt int
+Allow short read transfer.
+Normally a transfer from the device
+which is shorter than the request specified is reported as an
+error.
+.It Dv USB_SET_TIMEOUT Pq Vt int
+Set the timeout on the device operations
+The time is specified in milliseconds.
+The value 0 is used to indicate that there is
+no timeout.
+.El
+.Pp
+The control endpoint (endpoint 0) handles the following
+.Xr ioctl 2
+calls:
+.Bl -tag -width indent
+.It Dv USB_GET_CONFIG Pq Vt int
+Get the device configuration number.
+.It Dv USB_SET_CONFIG Pq Vt int
+Set the device into the given configuration number.
+.Pp
+This operation can only be performed when the control endpoint
+is the sole open endpoint.
+.It Dv USB_GET_ALTINTERFACE Pq Vt "struct usb_alt_interface"
+Get the alternative setting number for the interface with the given
+index.
+The
+.Va uai_config_index
+is ignored in this call.
+.Bd -literal
+struct usb_alt_interface {
+ int uai_config_index;
+ int uai_interface_index;
+ int uai_alt_no;
+};
+.Ed
+.It Dv USB_SET_ALTINTERFACE Pq Vt "struct usb_alt_interface"
+Set the alternative setting to the given number in the interface with the
+given index.
+The
+.Va uai_config_index
+is ignored in this call.
+.Pp
+This operation can only be performed when no endpoints for the interface
+are open.
+.It Dv USB_GET_NO_ALT Pq Vt "struct usb_alt_interface"
+Return the number of different alternate settings in the
+.Va uai_alt_no
+field.
+.It Dv USB_GET_DEVICE_DESC Pq Vt usb_device_descriptor_t
+Return the device descriptor.
+.It Dv USB_GET_CONFIG_DESC Pq Vt "struct usb_config_desc"
+Return the descriptor for the configuration with the given index.
+For convenience, the current configuration can be specified by
+.Dv USB_CURRENT_CONFIG_INDEX .
+.Bd -literal
+struct usb_config_desc {
+ int ucd_config_index;
+ usb_config_descriptor_t ucd_desc;
+};
+.Ed
+.It Dv USB_GET_INTERFACE_DESC Pq Vt "struct usb_interface_desc"
+Return the interface descriptor for an interface specified by its
+configuration index, interface index, and alternative index.
+For convenience, the current alternative can be specified by
+.Dv USB_CURRENT_ALT_INDEX .
+.Bd -literal
+struct usb_interface_desc {
+ int uid_config_index;
+ int uid_interface_index;
+ int uid_alt_index;
+ usb_interface_descriptor_t uid_desc;
+};
+.Ed
+.It Dv USB_GET_ENDPOINT_DESC Pq Vt "struct usb_endpoint_desc"
+Return the endpoint descriptor for the endpoint specified by its
+configuration index, interface index, alternative index, and
+endpoint index.
+.Bd -literal
+struct usb_endpoint_desc {
+ int ued_config_index;
+ int ued_interface_index;
+ int ued_alt_index;
+ int ued_endpoint_index;
+ usb_endpoint_descriptor_t ued_desc;
+};
+.Ed
+.It Dv USB_GET_FULL_DESC Pq Vt "struct usb_full_desc"
+Return all the descriptors for the given configuration.
+.Bd -literal
+struct usb_full_desc {
+ int ufd_config_index;
+ u_int ufd_size;
+ u_char *ufd_data;
+};
+.Ed
+The
+.Va ufd_data
+field should point to a memory area of the size given in the
+.Va ufd_size
+field.
+The proper size can be determined by first issuing a
+.Dv USB_GET_CONFIG_DESC
+and inspecting the
+.Va wTotalLength
+field.
+.It Dv USB_GET_STRING_DESC Pq Vt "struct usb_string_desc"
+Get a string descriptor for the given language ID and
+string index.
+.Bd -literal
+struct usb_string_desc {
+ int usd_string_index;
+ int usd_language_id;
+ usb_string_descriptor_t usd_desc;
+};
+.Ed
+.It Dv USB_DO_REQUEST Pq Vt "struct usb_ctl_request"
+Send a USB request to the device on the control endpoint.
+Any data sent to/from the device is located at
+.Va ucr_data .
+The size of the transferred data is determined from the
+.Va ucr_request .
+The
+.Va ucr_addr
+field is ignored in this call.
+The
+.Va ucr_flags
+field can be used to flag that the request is allowed to
+be shorter than the requested size, and
+.Va ucr_actlen
+will contain the actual size on completion.
+.Bd -literal
+struct usb_ctl_request {
+ int ucr_addr;
+ usb_device_request_t ucr_request;
+ void *ucr_data;
+ int ucr_flags;
+#define USBD_SHORT_XFER_OK 0x04 /* allow short reads */
+ int ucr_actlen; /* actual length transferred */
+};
+.Ed
+This is a dangerous operation in that it can perform arbitrary operations
+on the device.
+Some of the most dangerous (e.g., changing the device
+address) are not allowed.
+.It Dv USB_GET_DEVICEINFO Pq Vt "struct usb_device_info"
+Get an information summary for the device.
+This call will not issue any USB transactions.
+.El
+.Pp
+Note that there are two different ways of addressing configurations,
+interfaces, alternatives, and endpoints: by index or by number.
+The index is the ordinal number (starting from 0) of the descriptor
+as presented by the device.
+The number is the respective number of
+the entity as found in its descriptor.
+Enumeration of descriptors
+uses the index, getting and setting typically uses numbers.
+.Pp
+Example:
+all endpoints (except the control endpoint) for the current configuration
+can be found by iterating the
+.Va interface_index
+from 0 to
+.Va config_desc->bNumInterface Ns \-1
+and for each of these, iterating the
+.Va endpoint_index
+from 0 to
+.Va interface_desc->bNumEndpoints .
+The
+.Va config_index
+should be set to
+.Dv USB_CURRENT_CONFIG_INDEX
+and
+.Va alt_index
+should be set to
+.Dv USB_CURRENT_ALT_INDEX .
+.Sh FILES
+.Bl -tag -width ".Pa /dev/ugen Ns Ar N Ns Pa \&. Ns Ar E" -compact
+.It Pa /dev/ugen Ns Ar N Ns Pa \&. Ns Ar E
+Endpoint
+.Ar E
+of device
+.Ar N .
+.El
+.Sh SEE ALSO
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver
+appeared in
+.Nx 1.4 .
+.\" .Sh BUGS
+.\" The driver is not yet finished; there is no access to isochronous endpoints.
diff --git a/share/man/man4/uhci.4 b/share/man/man4/uhci.4
new file mode 100644
index 0000000..6c8b659
--- /dev/null
+++ b/share/man/man4/uhci.4
@@ -0,0 +1,68 @@
+.\" Copyright (c) 1999
+.\" Nick Hibma <n_hibma@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 20, 2005
+.Dt UHCI 4
+.Os
+.Sh NAME
+.Nm uhci
+.Nd UHCI USB Host Controller driver
+.Sh SYNOPSIS
+.Cd "device uhci"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for UHCI-type PCI based USB controllers.
+.Sh HARDWARE
+The
+.Nm
+driver supports all UHCI v1.1 compliant controllers including:
+.Pp
+.Bl -bullet -compact
+.It
+Intel 82371AB/EB (PIIX4)
+.It
+Intel 82371SB (PIIX3)
+.It
+VIA 83C572
+.El
+.Sh SEE ALSO
+.Xr xhci 4 ,
+.Xr ehci 4 ,
+.Xr ohci 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Lennart Augustsson Aq augustss@carlstedt.se
+for the
+.Nx
+project.
diff --git a/share/man/man4/uhid.4 b/share/man/man4/uhid.4
new file mode 100644
index 0000000..b6274ba
--- /dev/null
+++ b/share/man/man4/uhid.4
@@ -0,0 +1,147 @@
+.\" $NetBSD: uhid.4,v 1.13 2001/12/29 14:41:59 augustss Exp $
+.\"
+.\" Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 22, 2006
+.Dt UHID 4
+.Os
+.Sh NAME
+.Nm uhid
+.Nd USB generic HID support
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device uhid"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+uhid_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for all HID (Human Interface Device) interfaces
+in USB devices that do not have a special driver.
+.Pp
+The device handles the following
+.Xr ioctl 2
+calls:
+.Bl -tag -width indent
+.It Dv USB_GET_REPORT_ID Pq Vt int
+Get the report identifier used by this HID report.
+.It Dv USB_GET_REPORT_DESC Pq Vt "struct usb_ctl_report_desc"
+Get the HID report descriptor.
+Using
+this descriptor the exact layout and meaning of data to/from
+the device can be found.
+The report descriptor is delivered
+without any processing.
+.Bd -literal
+struct usb_ctl_report_desc {
+ int ucrd_size;
+ u_char ucrd_data[1024]; /* filled data size will vary */
+};
+.Ed
+.It Dv USB_SET_IMMED Pq Vt int
+Sets the device in a mode where each
+.Xr read 2
+will return the current value of the input report.
+Normally
+a
+.Xr read 2
+will only return the data that the device reports on its
+interrupt pipe.
+This call may fail if the device does not support
+this feature.
+.It Dv USB_GET_REPORT Pq Vt "struct usb_ctl_report"
+Get a report from the device without waiting for data on
+the interrupt pipe.
+The
+.Va report
+field indicates which report is requested.
+It should be
+.Dv UHID_INPUT_REPORT ,
+.Dv UHID_OUTPUT_REPORT ,
+or
+.Dv UHID_FEATURE_REPORT .
+This call may fail if the device does not support this feature.
+.Bd -literal
+struct usb_ctl_report {
+ int ucr_report;
+ u_char ucr_data[1024]; /* used data size will vary */
+};
+.Ed
+.It Dv USB_SET_REPORT Pq Vt "struct usb_ctl_report"
+Set a report in the device.
+The
+.Va report
+field indicates which report is to be set.
+It should be
+.Dv UHID_INPUT_REPORT ,
+.Dv UHID_OUTPUT_REPORT ,
+or
+.Dv UHID_FEATURE_REPORT .
+This call may fail if the device does not support this feature.
+.El
+.Pp
+Use
+.Xr read 2
+to get data from the device.
+Data should be read in chunks of the
+size prescribed by the report descriptor.
+.Pp
+Use
+.Xr write 2
+to send data to the device.
+Data should be written in chunks of the
+size prescribed by the report descriptor.
+.Sh FILES
+.Bl -tag -width ".Pa /dev/uhid?"
+.It Pa /dev/uhid?
+.El
+.Sh SEE ALSO
+.Xr usbhidctl 1 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver
+appeared in
+.Nx 1.4 .
+This manual page was adopted from
+.Nx
+by
+.An Tom Rhodes Aq trhodes@FreeBSD.org
+in April 2002.
diff --git a/share/man/man4/uhso.4 b/share/man/man4/uhso.4
new file mode 100644
index 0000000..cc2e9ae
--- /dev/null
+++ b/share/man/man4/uhso.4
@@ -0,0 +1,142 @@
+.\" Copyright (c) 2009 Fredrik Lindberg
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 20, 2010
+.Dt UHSO 4
+.Os
+.Sh NAME
+.Nm uhso
+.Nd support for several HSxPA devices from Option N.V.
+.Sh SYNOPSIS
+The module can be loaded at boot time by placing the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+uhso_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for several HSxPA devices from Option N.V. that are
+based on their packet interface.
+Each device has a set of serial ports and a raw IP packet interface.
+The serial ports of the device are accessed through the
+.Xr ucom 4
+driver which makes them behave like
+.Xr tty 4
+devices.
+The packet interface is exposed as a network interface.
+.Pp
+Establishing a connection on the packet interface is achieved by using the
+proprietary AT commands
+.Dq Li AT_OWANCALL
+and
+.Dq Li AT_OWANDATA
+on any of the available serial ports.
+.Pp
+The network interface must be configured manually using the data obtain from
+these calls.
+.Pp
+Each device usually have at least two or more serial ports, their individual purpose
+can be identified through
+.Xr sysctl 8 .
+Ports identified as
+.Dq Modem
+features a normal modem interface that can be used with PPP.
+Ports identified as
+.Dq Diagnostic
+uses a proprietary binary interface used for firmware upgrades, this port does not
+have a AT command interface and can not be used to control the device.
+Other ports features an AT command interface that can be used for normal device control.
+.Sh HARDWARE
+The
+.Nm
+driver should work with most devices from Option.
+The following devices have been verified to work
+.Pp
+.Bl -bullet -compact
+.It
+Option GlobeSurfer iCON 7.2 (new firmware)
+.It
+Option GlobeTrotter Max 7.2 (new firmware)
+.It
+Option iCON 225
+.It
+Option iCON 452
+.It
+Option iCON 505
+.El
+.Pp
+The device features a mass storage device referred to as
+.Dq Zero-CD
+which contains drivers for Microsoft Windows; this is the default
+mode for the device.
+The
+.Nm
+driver automatically switches the device from
+.Dq Zero-CD
+mode to modem mode.
+This behavior can be disabled by setting
+.Va hw.usb.uhso.auto_switch
+to 0 using
+.Xr sysctl 8 .
+.Sh FILES
+.Bl -tag -width "XXXXXX"
+.It Pa /dev/cuaU?.?
+.El
+.Sh EXAMPLES
+Establishing a packet interface connection using the AT command interface available
+at one of the serial ports
+.Bd -literal -offset indent
+AT+CGDCONT=1,,"apn.provider"
+AT_OWANCALL=1,1,1
+OK
+_OWANCALL=1,1
+
+AT_OWANDATA=1
+_OWANDATA: 1, 10.11.12.13, 0.0.0.0, 10.2.3.4, 10.2.3.5, \e
+ 0.0.0.0, 0.0.0.0, 72000
+.Ed
+.Pp
+Configuring the interface
+.Bd -literal -offset indent
+ifconfig uhso0 10.11.12.13 up
+route add default -interface uhso0
+echo "nameserver 10.2.3.4" > /etc/resolv.conf
+echo "nameserver 10.2.3.5" >> /etc/resolv.conf
+.Ed
+.Pp
+The connection can be terminated with
+.Bd -literal -offset indent
+AT_OWANCALL=1,0,1
+.Ed
+.Sh SEE ALSO
+.Xr uhsoctl 1 ,
+.Xr ucom 4 ,
+.Xr usb 4
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Fredrik Lindberg Aq fli@shapeshifter.se .
diff --git a/share/man/man4/uipaq.4 b/share/man/man4/uipaq.4
new file mode 100644
index 0000000..96b23e3
--- /dev/null
+++ b/share/man/man4/uipaq.4
@@ -0,0 +1,98 @@
+.\" $OpenBSD: uipaq.4,v 1.1 2005/06/17 23:50:35 deraadt Exp $
+.\" $NetBSD: uipaq.4,v 1.3 2008/04/30 13:10:54 martin Exp $
+.\"
+.\" Copyright (c) 2001-2005 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 20, 2011
+.Dt UIPAQ 4
+.Os
+.Sh NAME
+.Nm uipaq
+.Nd USB support for iPAQ units
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device uipaq"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+uipaq_load="YES"
+.Ed
+.Sh HARDWARE
+The
+.Nm
+driver supports the following adapters:
+.Pp
+.Bl -tag -width Ds -offset indent -compact
+.It ASUS P535 PDA
+.It Casio BE300 PDA
+.It Compaq IPaq PocketPC
+.It HP Jornada 568
+.It HP iPAQ 22xx/Jornada 548
+.It HTC PPC6700 Modem
+.It HTC Smart Phone
+.It HTC Winmobile
+.It Sharp W-ZERO3 ES Spart Phone
+.It Most Windows CE based phones
+.El
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the USB serial emulation provided
+by the iPAQ devices.
+.Pp
+The device is accessed through the
+.Xr ucom 4
+driver which makes it behave like a
+.Xr tty 4 .
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr uhub 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Fx
+support was imported from
+.Nx
+for
+.Fx 7.0 .
+.Nx
+added support in
+.Nx 4.0
+and it was imported from
+.Ox 3.8 .
diff --git a/share/man/man4/ukbd.4 b/share/man/man4/ukbd.4
new file mode 100644
index 0000000..71ee348
--- /dev/null
+++ b/share/man/man4/ukbd.4
@@ -0,0 +1,171 @@
+.\" Copyright (c) 1997, 1998
+.\" Nick Hibma <n_hibma@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 22, 2006
+.Dt UKBD 4
+.Os
+.Sh NAME
+.Nm ukbd
+.Nd USB keyboard driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ukbd"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ukbd_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for keyboards that attach to the USB port.
+.Xr usb 4
+and one of
+.Xr uhci 4
+or
+.Xr ohci 4
+must be configured in the kernel as well.
+.Sh CONFIGURATION
+By default, the keyboard subsystem does not create the appropriate devices yet.
+Make sure you reconfigure your kernel with the following option in the kernel
+config file:
+.Pp
+.Dl "options KBD_INSTALL_CDEV"
+.Pp
+If both an AT keyboard USB keyboards are used at the same time, the
+AT keyboard will appear as
+.Pa kbd0
+in
+.Pa /dev .
+The USB keyboards will be
+.Pa kbd1 , kbd2 ,
+etc.
+You can see some information about the keyboard with the following command:
+.Pp
+.Dl "kbdcontrol -i < /dev/kbd1"
+.Pp
+or load a keymap with
+.Pp
+.Dl "kbdcontrol -l keymaps/pt.iso < /dev/kbd1"
+.Pp
+See
+.Xr kbdcontrol 1
+for more possible options.
+.Pp
+You can swap console keyboards by using the command
+.Pp
+.Dl "kbdcontrol -k /dev/kbd1"
+.Pp
+From this point on, the first USB keyboard will be the keyboard
+to be used by the console.
+.Pp
+If you want to use a USB keyboard as your default and not use an AT keyboard at
+all, you will have to remove the
+.Cd "device atkbd"
+line from the kernel configuration file.
+Because of the device initialization order,
+the USB keyboard will be detected
+.Em after
+the console driver
+initializes itself and you have to explicitly tell the console
+driver to use the existence of the USB keyboard.
+This can be done in
+one of the following two ways.
+.Pp
+Run the following command as a part of system initialization:
+.Pp
+.Dl "kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null"
+.Pp
+(Note that as the USB keyboard is the only keyboard, it is accessed as
+.Pa /dev/kbd0 )
+or otherwise tell the console driver to periodically look for a
+keyboard by setting a flag in the kernel configuration file:
+.Pp
+.Dl "device sc0 at isa? flags 0x100"
+.Pp
+With the above flag, the console driver will try to detect any
+keyboard in the system if it did not detect one while it was
+initialized at boot time.
+.Sh DRIVER CONFIGURATION
+.D1 Cd "options KBD_INSTALL_CDEV"
+.Pp
+Make the keyboards available through a character device in
+.Pa /dev .
+.Pp
+.D1 Cd options UKBD_DFLT_KEYMAP
+.D1 Cd makeoptions UKBD_DFLT_KEYMAP=fr.iso
+.Pp
+The above lines will put the French ISO keymap in the ukbd driver.
+You can specify any keymap in
+.Pa /usr/share/syscons/keymaps
+with this option.
+.Pp
+.D1 Cd "options KBD_DISABLE_KEYMAP_LOADING"
+.Pp
+Do not allow the user to change the keymap.
+Note that these options also affect the AT keyboard driver,
+.Xr atkbd 4 .
+.Sh FILES
+.Bl -tag -width ".Pa /dev/kbd*" -compact
+.It Pa /dev/kbd*
+blocking device nodes
+.El
+.Sh EXAMPLES
+.D1 Cd "device ukbd"
+.Pp
+Add the
+.Nm
+driver to the kernel.
+.Sh SEE ALSO
+.Xr kbdcontrol 1 ,
+.Xr ohci 4 ,
+.Xr syscons 4 ,
+.Xr uhci 4 ,
+.Xr usb 4 ,
+.Xr config 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Lennart Augustsson Aq augustss@cs.chalmers.se
+for
+.Nx
+and was substantially rewritten for
+.Fx
+by
+.An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .
+.Pp
+This manual page was written by
+.An Nick Hibma Aq n_hibma@FreeBSD.org
+with a large amount of input from
+.An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .
diff --git a/share/man/man4/ulpt.4 b/share/man/man4/ulpt.4
new file mode 100644
index 0000000..cd3b300
--- /dev/null
+++ b/share/man/man4/ulpt.4
@@ -0,0 +1,110 @@
+.\" $NetBSD: ulpt.4,v 1.6 2002/02/05 00:37:48 augustss Exp $
+.\"
+.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 22, 2006
+.Dt ULPT 4
+.Os
+.Sh NAME
+.Nm ulpt
+.Nd USB printer support
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ulpt"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ulpt_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB printers that follow the printer
+bi- or uni-directional protocol.
+The bits in the minor number select various features of the driver.
+.Bl -column "Minor Bit" "Functionxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -offset indent
+.It Em "Minor Bit" Ta Em "Function"
+.It "64" Ta "Do not initialize (reset) the device on the port."
+.El
+.Pp
+Some printers cannot handle the reset on open; in case of problems try the
+.Pa unlpt
+device.
+.Sh HARDWARE
+The
+.Nm
+driver provides support for USB printers and parallel printer
+conversion cables, including the following:
+.Pp
+.Bl -bullet -compact
+.It
+ATen parallel printer adapter
+.It
+Belkin F5U002 parallel printer adapter
+.It
+Canon BJ F850, S600
+.It
+Canon LBP-1310, 350
+.It
+Entrega USB-to-parallel printer adapter
+.It
+Hewlett-Packard HP Deskjet 3420 (P/N: C8947A #ABJ)
+.It
+Oki Data MICROLINE ML660PS
+.It
+Seiko Epson PM-900C, 880C, 820C, 730C
+.El
+.Sh FILES
+.Bl -tag -width ".Pa /dev/unlpt?" -compact
+.It Pa /dev/ulpt?
+device with reset
+.It Pa /dev/unlpt?
+device without reset
+.El
+.Sh SEE ALSO
+.Xr lpt 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver
+appeared in
+.Nx 1.4 .
+This manual page was adopted from
+.Nx
+by
+.An Tom Rhodes Aq trhodes@FreeBSD.org
+in April 2002.
diff --git a/share/man/man4/umass.4 b/share/man/man4/umass.4
new file mode 100644
index 0000000..e57849e
--- /dev/null
+++ b/share/man/man4/umass.4
@@ -0,0 +1,262 @@
+.\" Copyright (c) 1999
+.\" Nick Hibma <n_hibma@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 19, 2014
+.Dt UMASS 4
+.Os
+.Sh NAME
+.Nm umass
+.Nd USB Mass Storage Devices driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device scbus"
+.Cd "device usb"
+.Cd "device umass"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+umass_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Mass Storage devices that attach to the USB
+port.
+.Pp
+To use the
+.Nm
+driver,
+.Xr usb 4
+and one of
+.Xr uhci 4
+or
+.Xr ohci 4
+or
+.Xr ehci 4
+or
+.Xr xhci 4
+must be configured in the kernel.
+Additionally, since
+.Nm
+uses the SCSI subsystem and sometimes acts as a SCSI device, it
+requires
+.Xr da 4
+and
+.Xr scbus 4
+to be included in the kernel.
+.Sh HARDWARE
+The
+.Nm
+driver supports USB Mass Storage devices, including:
+.Pp
+.Bl -bullet -compact
+.It
+ADTEC Stick Drive AD-UST32M, 64M, 128M, 256M
+.It
+Denno FireWire/USB2 Removable 2.5-inch HDD Case MIFU-25CB20
+.It
+FujiFilm Zip USB Drive ZDR100 USB A
+.It
+GREEN HOUSE USB Flash Memory "PicoDrive" GH-UFD32M, 64M, 128M
+.It
+Huawei Mobile (SD slot)
+.It
+IBM 32MB USB Memory Key (P/N 22P5296)
+.It
+IBM 256MB USB Drive (MSYSTEM DiskOnKey2)
+.It
+IBM ThinkPad USB Portable CD-ROM Drive (P/N 33L5151)
+.It
+I-O DATA USB CD/CD-R/CD-RW/DVD-R/DVD-RW/DVD-RAM/DVD-ROM Drive DVR-iUH2 (CDROM, DVD-RAM only)
+.It
+I-O DATA USB x6 CD-RW Drive CDRW-i64/USB (CDROM only)
+.It
+I-O DATA USB/IEEE1394 Portable HD Drive HDP-i30P/CI, HDP-i40P/CI
+.It
+Iomega USB Zip 100/250 drive
+.It
+Iomega Zip750 USB2.0 drive
+.It
+Keian USB1.1/2.0 3.5-inch HDD Case KU350A
+.It
+Kurouto Shikou USB 2.5-inch HDD Case GAWAP2.5PS-USB2.0
+.It
+LaCie P3 HardDrive USB 200GB
+.It
+Logitec LDR-H443U2 DVD-RAM/-R/+R/-RW/+RW drive
+.It
+Logitec Mobile USB Memory LMC-256UD
+.It
+Logitec USB1.1/2.0 HDD Unit SHD-E60U2
+.It
+Logitec USB Double-Speed Floppy Drive LFD-31U2
+.It
+Logitec USB/IEEE1394 DVD-RAM/R/RW Unit LDR-N21FU2 (CDROM only)
+.It
+MELCO USB Flash Disk "ClipDrive", RUF-C32M, -C64M, -C128M, -C256M, -C512M
+.It
+MELCO USB Flash Disk "PetitDrive", RUF-32M, -64M, -128M, -256Mm
+.It
+MELCO USB2.0 Flash Disk "PetitDrive2", RUF-256M/U2, -512M/U2
+.It
+MELCO USB2.0 MO Drive MO-CH640U2
+.It
+Matshita CF-VFDU03 floppy drive
+.It
+Merlin SM300 MP3/WMA Player (256Mb)
+.It
+Microtech International, Inc.\& USB-SCSI-HD 50 USB to SCSI cable
+.It
+Motorola E398 Mobile Phone (TransFlash memory card)
+.It
+NOVAC USB2.0 2.5/3.5-inch HDD Case NV-HD351U
+.It
+PNY Attache Flash Drive
+.It
+Panasonic ("Matshita FDD CF-VFDU03")
+.It
+Panasonic KXL-CB20AN Portable DVD-ROM/CD-R/RW
+.It
+Panasonic KXL-CB35AN (DVD-ROM & CD-R/RW)
+.It
+Panasonic USB2.0 Portable CD-RW Drive KXL-RW40AN (CDROM only)
+.It
+Panasonic floppy drive
+.It
+Qware BeatZkey!\& Pro
+.It
+RATOC Systems USB2.0 Removable HDD Case U2-MDK1, U2-MDK1B
+.It
+SanDisk SDDR-31 (Compact Flash)
+.It
+SanDisk SDDR-75 (only Compact Flash port works)
+.It
+Sitecom CN-300 MultiFlash (MMC/SD, SmartMedia, CF, MemoryStick)
+.It
+Sony Portable CD-R/RW Drive CRX10U (CDROM only)
+.It
+TEAC Portable USB CD-ROM Unit CD-110PU/210PU
+.It
+Time DPA20B MP3 Player (1Gb)
+.It
+Trek Thumbdrive 8MB
+.It
+VAIO floppy drive (includes Y-E Data Flashbuster-U)
+.It
+Y-E Data floppy drive (720/1.44/2.88Mb)
+.El
+.Pp
+Among the supported digital cameras are:
+.Pp
+.Bl -bullet -compact
+.It
+Asahi Optical (PENTAX) Optio 230 & 330
+.El
+.Sh EXAMPLES
+.Bd -literal -offset indent
+device umass
+device scbus
+device da
+device pass
+.Ed
+.Pp
+Add the
+.Nm
+driver to the kernel.
+.Pp
+.Dl "camcontrol rescan 0"
+.Pp
+Rescan a Zip drive that was added after boot.
+The command above
+assumes that the Zip drive is on the first SCSI bus in the system.
+.Bd -literal -offset indent
+camcontrol rescan 0:0:0
+camcontrol rescan 0:0:1
+camcontrol rescan 0:0:2
+camcontrol rescan 0:0:3
+.Ed
+.Pp
+Rescan all slots on a multi-slot flash reader, where the slots map to separate
+LUNs on a single SCSI ID.
+Typically only the first slot will be enabled at boot time.
+Again, this assumes that the flash reader is the first SCSI bus in the system.
+.Bd -literal -offset indent
+bsdlabel -w da0 zip100
+newfs da0c
+mount -t ufs /dev/da0c /mnt
+.Ed
+.Pp
+Write a disklabel to the Zip drive (see
+.Xr vpo 4
+for the
+.Xr disktab 5
+entry), creates the file system and mounts the new file system on /mnt.
+.Pp
+.Dl "newfs_msdos /dev/da0"
+.Pp
+Create a new FAT type file system.
+Care should be taken not to run
+.Xr newfs 8
+on devices that already contain data, as this will result in the
+information being lost.
+.Pp
+Many consumer devices such as digital cameras automatically create
+.Tn MS-DOS
+based file systems when storing information such as images and
+videos.
+These file systems can be accessed by specifying the file system
+type as
+.Cm msdosfs
+when using
+.Xr mount 8 .
+.Sh SEE ALSO
+.Xr ehci 4 ,
+.Xr xhci 4 ,
+.Xr ohci 4 ,
+.Xr uhci 4 ,
+.Xr usb 4 ,
+.Xr vpo 4 ,
+.Xr disktab 5 ,
+.Xr bsdlabel 8 ,
+.Xr camcontrol 8
+.\".Sh HISTORY
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An MAEKAWA Masahide Aq bishop@rr.iij4u.or.jp
+and
+.An Nick Hibma Aq n_hibma@FreeBSD.org .
+.Pp
+This manual page was written by
+.An Nick Hibma Aq n_hibma@FreeBSD.org .
diff --git a/share/man/man4/umcs.4 b/share/man/man4/umcs.4
new file mode 100644
index 0000000..fc96ad2
--- /dev/null
+++ b/share/man/man4/umcs.4
@@ -0,0 +1,101 @@
+.\"
+.\" Copyright (c) 2010 Lev Serebryakov <lev@FreeBSD.org>.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 25, 2012
+.Dt UMCS 4
+.Os
+.Sh NAME
+.Nm umcs
+.Nd USB support for serial adapters based on the MCS7820 and MCS7840 chips
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device umcs"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+umcs_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for various multiport serial adapters based on the MosCom
+MCS7820 and MCS7840 chips.
+They are 2- or 4-port adapters with full-featured
+16550-compatible UARTs and very flexible baud generators.
+Also, these chips
+support RS422/RS485 and IrDA operations.
+.Pp
+The device is accessed through the
+.Xr ucom 4
+driver which makes it behave like a
+.Xr tty 4 .
+.Pp
+Different ports on device are presented as sub-units, like
+.Pa /dev/ttyU0.1
+and
+.Pa /dev/ttyU0.2 .
+.Sh HARDWARE
+The
+.Nm
+driver was tested on the following adapters:
+.Pp
+.Bl -bullet -compact
+.It
+ST Lab U-360 two-port serial USB adapter
+.It
+ST Lab U-400 four-port serial USB adapter
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver
+appeared in ports since December of 2010.
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Lev Serebryakov
+.Aq lev@FreeBSD.org .
+.Sh BUGS
+This driver doesn't support access to any fine tunes of
+chip, like RS522/RS485 mode, non-standard baudrates, etc.
diff --git a/share/man/man4/umct.4 b/share/man/man4/umct.4
new file mode 100644
index 0000000..e40e146
--- /dev/null
+++ b/share/man/man4/umct.4
@@ -0,0 +1,101 @@
+.\"
+.\" Copyright (c) 2004 Scott Long
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 20, 2011
+.Dt UMCT 4
+.Os
+.Sh NAME
+.Nm umct
+.Nd Magic Control Technology USB-RS232 converter driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device umct"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+umct_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB to RS-232 converters based on the Magic
+Control Technology USB-232 design.
+These devices support most of the
+standard RS-232 features including baud rates ranging from 300 to 115200
+bits per second.
+However, neither hardware nor software flow control
+seems to be supported.
+.Pp
+Access to devices under this driver is via the
+.Xr ucom 4
+framework and device nodes.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following adapters:
+.Pp
+.Bl -bullet -compact
+.It
+Belkin F5U109
+.It
+Belkin F5U409
+.It
+D-Link DU-H3SP USB BAY Hub
+.It
+Magic Control Technology USB-232
+.It
+Sitecom USB-232
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver
+appeared in
+.Fx 5.2 .
+It is loosely based on the
+.Xr ubsa 4
+driver by
+.An Alexander Kabaev Aq kan@FreeBSD.org
+with documentation from
+.An Wolfgang Grandeggar Aq wolfgang@cec.ch .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Scott Long Aq scottl@FreeBSD.org .
diff --git a/share/man/man4/umodem.4 b/share/man/man4/umodem.4
new file mode 100644
index 0000000..71827db
--- /dev/null
+++ b/share/man/man4/umodem.4
@@ -0,0 +1,115 @@
+.\" $NetBSD: umodem.4,v 1.6 2001/09/11 23:18:55 wiz Exp $
+.\"
+.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 6, 2012
+.Dt UMODEM 4
+.Os
+.Sh NAME
+.Nm umodem
+.Nd USB modem support
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device umodem"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+umodem_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB modems in the Communication
+Device Class using the Abstract Control Model.
+These modems are basically standard serial line modems, but they are
+accessed via USB instead.
+They support a regular AT command set.
+The commands can either be multiplexed with the data stream
+or handled through separate pipes.
+In the latter case the AT
+commands have to be given on a device separate from the data device.
+.Pp
+The device is accessed through the
+.Xr ucom 4
+driver which makes it behave like a
+.Xr tty 4 .
+.Sh HARDWARE
+Devices supported by the
+.Nm
+driver include:
+.Pp
+.Bl -bullet -compact
+.It
+3Com 5605
+.It
+Curitel PC5740 Wireless Modem
+.It
+Kyocera AH-K3001V Mobile Phone(WILLCOM)
+.It
+Kyocera WX320K Mobile Phone(WILLCOM)
+.It
+Metricom Ricochet GS USB wireless modem
+.It
+Sierra MC5720 Wireless Modem
+.It
+Yamaha Broadband Wireless Router RTW65b
+.It
+ELSA MicroLink 56k USB modem
+.It
+Sony Ericsson W810i phone
+.It
+Sonim XP5300 Force
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver
+appeared in
+.Nx 1.5 .
+This manual page was adopted from
+.Nx
+by
+.An Tom Rhodes Aq trhodes@FreeBSD.org
+in April 2002.
+.Sh BUGS
+Only modems with multiplexed commands and data are supported
+at the moment.
diff --git a/share/man/man4/umoscom.4 b/share/man/man4/umoscom.4
new file mode 100644
index 0000000..93f5fbd
--- /dev/null
+++ b/share/man/man4/umoscom.4
@@ -0,0 +1,66 @@
+.\"
+.\" Copyright (c) 2014 Hans Petter Selasky
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 18, 2014
+.Dt UMOSCOM 4
+.Os
+.Sh NAME
+.Nm umoscom
+.Nd USB support for serial adapters based on chips made by MOSCHIP
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device umoscom"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+umoscom_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for various serial adapters based on chips from MOSCHIP.
+.Pp
+The device is accessed through the
+.Xr ucom 4
+driver which makes it behave like a
+.Xr tty 4 .
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver appeared in OpenBSD and was ported to FreeBSD.
diff --git a/share/man/man4/ums.4 b/share/man/man4/ums.4
new file mode 100644
index 0000000..6c052a1
--- /dev/null
+++ b/share/man/man4/ums.4
@@ -0,0 +1,113 @@
+.\" Copyright (c) 1999
+.\" Nick Hibma <n_hibma@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 27, 2006
+.Dt UMS 4
+.Os
+.Sh NAME
+.Nm ums
+.Nd USB mouse driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ums"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ums_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for mice that attach to the USB port.
+Supported are
+mice with any number of buttons and mice with a wheel.
+.Pp
+The
+.Pa /dev/ums0
+device presents the mouse as a
+.Ar sysmouse
+or
+.Ar mousesystems
+type device.
+See
+.Xr moused 8
+for an explanation of these mouse types.
+.Sh FILES
+.Bl -tag -width /dev/ums0 -compact
+.It Pa /dev/ums0
+blocking device node
+.El
+.Sh EXAMPLES
+Use the first
+USB mouse on the system as your console mouse:
+.Pp
+.Dl moused -p /dev/ums0 -t auto
+.Pp
+To be able to use the USB mouse under X, change the "Pointer" section in
+.Nm xorg.conf
+to the following:
+.Pp
+.Dl Device "/dev/ums0"
+.Dl Protocol "Auto"
+.Pp
+If you want to be able to use the mouse in both virtual consoles as well
+as in X change it to:
+.Pp
+.Dl Device "/dev/sysmouse"
+.Dl Protocol "Auto"
+.Sh SEE ALSO
+.Xr ohci 4 ,
+.Xr sysmouse 4 ,
+.Xr uhci 4 ,
+.Xr usb 4 ,
+.Xr xorg.conf 5 Pq Pa ports/x11/xorg ,
+.Xr moused 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Lennart Augustsson Aq augustss@cs.chalmers.se
+for
+.Nx
+and was adopted for
+.Fx
+by
+.An MAEKAWA Masahide Aq bishop@rr.iij4u.or.jp .
+.Pp
+This manual page was written by
+.An Nick Hibma Aq n_hibma@FreeBSD.org
+with input from
+.An Kazutaka YOKOTA Aq yokota@zodiac.mech.utsunomiya-u.ac.jp .
diff --git a/share/man/man4/unix.4 b/share/man/man4/unix.4
new file mode 100644
index 0000000..173fd0e
--- /dev/null
+++ b/share/man/man4/unix.4
@@ -0,0 +1,300 @@
+.\" Copyright (c) 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)unix.4 8.1 (Berkeley) 6/9/93
+.\" $FreeBSD$
+.\"
+.Dd March 19, 2013
+.Dt UNIX 4
+.Os
+.Sh NAME
+.Nm unix
+.Nd UNIX-domain protocol family
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/un.h
+.Sh DESCRIPTION
+The
+.Ux Ns -domain
+protocol family is a collection of protocols
+that provides local (on-machine) interprocess
+communication through the normal
+.Xr socket 2
+mechanisms.
+The
+.Ux Ns -domain
+family supports the
+.Dv SOCK_STREAM ,
+.Dv SOCK_SEQPACKET ,
+and
+.Dv SOCK_DGRAM
+socket types and uses
+file system pathnames for addressing.
+.Sh ADDRESSING
+.Ux Ns -domain
+addresses are variable-length file system pathnames of
+at most 104 characters.
+The include file
+.In sys/un.h
+defines this address:
+.Bd -literal -offset indent
+struct sockaddr_un {
+ u_char sun_len;
+ u_char sun_family;
+ char sun_path[104];
+};
+.Ed
+.Pp
+Binding a name to a
+.Ux Ns -domain
+socket with
+.Xr bind 2
+causes a socket file to be created in the file system.
+This file is
+.Em not
+removed when the socket is closed \(em
+.Xr unlink 2
+must be used to remove the file.
+.Pp
+The length of
+.Ux Ns -domain
+address, required by
+.Xr bind 2
+and
+.Xr connect 2 ,
+can be calculated by the macro
+.Fn SUN_LEN
+defined in
+.In sys/un.h .
+The
+.Va sun_path
+field must be terminated by a
+.Dv NUL
+character to be used with
+.Fn SUN_LEN ,
+but the terminating
+.Dv NUL
+is
+.Em not
+part of the address.
+.Pp
+The
+.Ux Ns -domain
+protocol family does not support broadcast addressing or any form
+of
+.Dq wildcard
+matching on incoming messages.
+All addresses are absolute- or relative-pathnames
+of other
+.Ux Ns -domain
+sockets.
+Normal file system access-control mechanisms are also
+applied when referencing pathnames; e.g., the destination
+of a
+.Xr connect 2
+or
+.Xr sendto 2
+must be writable.
+.Sh PASSING FILE DESCRIPTORS
+The
+.Ux Ns -domain
+sockets support the communication of
+.Ux
+file descriptors through the use of the
+.Va msg_control
+field in the
+.Fa msg
+argument to
+.Xr sendmsg 2
+and
+.Xr recvmsg 2 .
+.Pp
+Any valid descriptor may be sent in a message.
+The file descriptor(s) to be passed are described using a
+.Vt "struct cmsghdr"
+that is defined in the include file
+.In sys/socket.h .
+The type of the message is
+.Dv SCM_RIGHTS ,
+and the data portion of the messages is an array of integers
+representing the file descriptors to be passed.
+The number of descriptors being passed is defined
+by the length field of the message;
+the length field is the sum of the size of the header
+plus the size of the array of file descriptors.
+.Pp
+The received descriptor is a
+.Em duplicate
+of the sender's descriptor, as if it were created via
+.Li dup(fd)
+or
+.Li fcntl(fd, F_DUPFD_CLOEXEC, 0)
+depending on whether
+.Dv MSG_CMSG_CLOEXEC
+is passed in the
+.Xr recvmsg 2
+call.
+Descriptors that are awaiting delivery, or that are
+purposely not received, are automatically closed by the system
+when the destination socket is closed.
+.Sh SOCKET OPTIONS
+.Tn UNIX
+domain sockets support a number of socket options which can be set with
+.Xr setsockopt 2
+and tested with
+.Xr getsockopt 2 :
+.Bl -tag -width ".Dv LOCAL_CONNWAIT"
+.It Dv LOCAL_CREDS
+This option may be enabled on
+.Dv SOCK_DGRAM ,
+.Dv SOCK_SEQPACKET ,
+or a
+.Dv SOCK_STREAM
+socket.
+This option provides a mechanism for the receiver to
+receive the credentials of the process as a
+.Xr recvmsg 2
+control message.
+The
+.Va msg_control
+field in the
+.Vt msghdr
+structure points to a buffer that contains a
+.Vt cmsghdr
+structure followed by a variable length
+.Vt sockcred
+structure, defined in
+.In sys/socket.h
+as follows:
+.Bd -literal
+struct sockcred {
+ uid_t sc_uid; /* real user id */
+ uid_t sc_euid; /* effective user id */
+ gid_t sc_gid; /* real group id */
+ gid_t sc_egid; /* effective group id */
+ int sc_ngroups; /* number of supplemental groups */
+ gid_t sc_groups[1]; /* variable length */
+};
+.Ed
+.Pp
+The
+.Fn SOCKCREDSIZE
+macro computes the size of the
+.Vt sockcred
+structure for a specified number
+of groups.
+The
+.Vt cmsghdr
+fields have the following values:
+.Bd -literal
+cmsg_len = CMSG_LEN(SOCKCREDSIZE(ngroups))
+cmsg_level = SOL_SOCKET
+cmsg_type = SCM_CREDS
+.Ed
+.Pp
+On
+.Dv SOCK_STREAM
+and
+.Dv SOCK_SEQPACKET
+sockets credentials are passed only on the first read from a socket,
+then system clears the option on socket.
+.It Dv LOCAL_CONNWAIT
+Used with
+.Dv SOCK_STREAM
+sockets, this option causes the
+.Xr connect 2
+function to block until
+.Xr accept 2
+has been called on the listening socket.
+.It Dv LOCAL_PEERCRED
+Requested via
+.Xr getsockopt 2
+on a
+.Dv SOCK_STREAM
+socket returns credentials of the remote side.
+These will arrive in the form of a filled in
+.Vt xucred
+structure, defined in
+.In sys/ucred.h
+as follows:
+.Bd -literal
+struct xucred {
+ u_int cr_version; /* structure layout version */
+ uid_t cr_uid; /* effective user id */
+ short cr_ngroups; /* number of groups */
+ gid_t cr_groups[XU_NGROUPS]; /* groups */
+};
+.Ed
+The
+.Vt cr_version
+fields should be checked against
+.Dv XUCRED_VERSION
+define.
+.Pp
+The credentials presented to the server (the
+.Xr listen 2
+caller) are those of the client when it called
+.Xr connect 2 ;
+the credentials presented to the client (the
+.Xr connect 2
+caller) are those of the server when it called
+.Xr listen 2 .
+This mechanism is reliable; there is no way for either party to influence
+the credentials presented to its peer except by calling the appropriate
+system call (e.g.,
+.Xr connect 2
+or
+.Xr listen 2 )
+under different effective credentials.
+.Pp
+To reliably obtain peer credentials on a
+.Dv SOCK_DGRAM
+socket refer to the
+.Dv LOCAL_CREDS
+socket option.
+.El
+.Sh SEE ALSO
+.Xr connect 2 ,
+.Xr dup 2 ,
+.Xr fcntl 2 ,
+.Xr getsockopt 2 ,
+.Xr listen 2 ,
+.Xr recvmsg 2 ,
+.Xr sendto 2 ,
+.Xr setsockopt 2 ,
+.Xr socket 2 ,
+.Xr intro 4
+.Rs
+.%T "An Introductory 4.3 BSD Interprocess Communication Tutorial"
+.%B PS1
+.%N 7
+.Re
+.Rs
+.%T "An Advanced 4.3 BSD Interprocess Communication Tutorial"
+.%B PS1
+.%N 8
+.Re
diff --git a/share/man/man4/upgt.4 b/share/man/man4/upgt.4
new file mode 100644
index 0000000..7b81438
--- /dev/null
+++ b/share/man/man4/upgt.4
@@ -0,0 +1,222 @@
+.\" $OpenBSD: upgt.4,v 1.6 2008/04/17 14:01:22 jmc Exp $
+.\" $FreeBSD$
+.\"
+.\" Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
+.\" Copyright (c) 2005-2007
+.\" Damien Bergamini <damien.bergamini@free.fr>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\"
+.\"
+.\" Copyright (c) 2006 Theo de Raadt.
+.\" Copyright (c) 2006 The DragonFly Project. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in
+.\" the documentation and/or other materials provided with the
+.\" distribution.
+.\" 3. Neither the name of The DragonFly Project nor the names of its
+.\" contributors may be used to endorse or promote products derived
+.\" from this software without specific, prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
+.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd April 17, 2008
+.Dt UPGT 4
+.Os
+.Sh NAME
+.Nm upgt
+.Nd Conexant/Intersil PrismGT SoftMAC USB IEEE 802.11b/g wireless network
+device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device upgt"
+.Cd "device wlan"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_upgt_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports the USB 2.0 Conexant/Intersil PrismGT series wireless
+adapters based on the GW3887 chipset.
+.Pp
+These are the modes the
+.Nm
+driver can operate in:
+.Bl -tag -width "IBSS-masterXX"
+.It BSS mode
+Also known as
+.Em infrastructure
+mode, this is used when associating with an access point, through
+which all traffic passes.
+This mode is the default.
+.\" .It IBSS mode
+.\" Also known as
+.\" .Em IEEE ad-hoc
+.\" mode or
+.\" .Em peer-to-peer
+.\" mode.
+.\" This is the standardized method of operating without an access point.
+.\" Stations associate with a service set.
+.\" However, actual connections between stations are peer-to-peer.
+.\" .It Host AP
+.\" In this mode the driver acts as an access point (base station)
+.\" for other cards.
+.It monitor mode
+In this mode the driver is able to receive packets without
+associating with an access point.
+This disables the internal receive filter and enables the card to
+capture packets from networks which it wouldn't normally have access to,
+or to scan for access points.
+.El
+.Pp
+.Nm
+supports software WEP.
+Wired Equivalent Privacy (WEP) is the de facto encryption standard
+for wireless networks.
+It can be typically configured in one of three modes:
+no encryption; 40-bit encryption; or 104-bit encryption.
+Unfortunately, due to serious weaknesses in WEP protocol
+it is strongly recommended that it not be used as the
+sole mechanism to secure wireless communication.
+WEP is not enabled by default.
+.\".Pp
+.\"The transmit speed is user-selectable or can be adapted automatically by the
+.\"driver depending on the received signal strength and on the number of hardware
+.\"transmission retries.
+.Pp
+The
+.Nm
+driver can be configured at runtime with
+.Xr ifconfig 8 .
+.Sh FILES
+.\".Pp
+.\"These firmware files are not free because Conexant/Intersil refuses
+.\"to grant distribution rights.
+.\"As a result, even though
+.\".Ox
+.\"includes the driver, the firmware files cannot be included and
+.\"users have to download these files on their own.
+This driver requires the
+.Nm upgtfw
+firmware to be installed before it will work.
+The firmware files are not publicly available.
+A package of the firmware which can be installed via
+.Xr pkg_add 1
+is available:
+.Bd -literal -offset indent
+http://weongyo.org/project/upgt/upgt-firmware-2.13.1.0.tar.gz
+.Ed
+.Sh HARDWARE
+The
+.Nm
+driver supports USB 2.0 Conexant/Intersil PrismGT series wireless
+adapters based on the GW3887 chipset, among them:
+.Pp
+.Bl -bullet -compact
+.It
+Belkin F5D7050 (version 1000)
+.It
+Cohiba Proto Board
+.It
+D-Link DWL-G120 Cohiba
+.It
+FSC Connect2Air E-5400 USB D1700
+.It
+Gigaset USB Adapter 54
+.It
+Inventel UR045G
+.It
+SMC EZ ConnectG SMC2862W-G
+.It
+Sagem XG703A
+.It
+Spinnaker DUT
+.It
+Spinnaker Proto Board
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev upgt0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev upgt0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev upgt0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr usb 4 ,
+.Xr wlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 4.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Marcus Glocker Aq mglocker@openbsd.org .
+.Pp
+The hardware specification was reverse engineered by the people at
+.Pa http://www.prism54.org .
+.Sh CAVEATS
+The
+.Nm
+driver just supports the USB 2.0 devices (GW3887 chipset) but not the
+USB 1.0 devices containing the NET2280, ISL3880, and ISL3886 chipsets.
+Some further efforts would be necessary to add USB 1.0 support to the
+driver.
diff --git a/share/man/man4/uplcom.4 b/share/man/man4/uplcom.4
new file mode 100644
index 0000000..7c2bce0
--- /dev/null
+++ b/share/man/man4/uplcom.4
@@ -0,0 +1,197 @@
+.\" $NetBSD: uplcom.4,v 1.9 2002/02/07 03:15:09 ross Exp $
+.\"
+.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 25, 2012
+.Dt UPLCOM 4
+.Os
+.Sh NAME
+.Nm uplcom
+.Nd USB support for Prolific PL-2303/2303X/2303HX serial adapters driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device uplcom"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+uplcom_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for various serial adapters based on the Prolific
+PL-2303, PL-2303X and PL-2303HX USB-to-RS232 Bridge chips.
+.Pp
+The device is accessed through the
+.Xr ucom 4
+driver which makes it behave like a
+.Xr tty 4 .
+.Sh HARDWARE
+The
+.Nm
+driver supports the following devices and adapters:
+.Pp
+.Bl -bullet -compact
+.It
+ADLINK ND-6530 USB-Serial Adapter
+.It
+Alcatel One Touch 535/735 Phone
+.It
+Alcor AU9720 USB-RS232 Serial Adapter
+.It
+AlDiga AL-11U Modem
+.It
+Alltronix ACM003U00 Modem
+.It
+Anchor Serial adapter
+.It
+ATEN UC-232A
+.It
+BAFO BF-800 and BF-810
+.It
+Belkin F5U257
+.It
+BenQ S81 Phone
+.It
+Corega CG-USBRS232R Serial Adapter
+.It
+Cressi Edy (Seiko) Diving Computer
+.It
+ELECOM UC-SGT Serial Adapter
+.It
+HAL Corporation Crossam2+USB IR commander
+.It
+Hama USB RS-232 Serial Adapter
+.It
+Hamlet exagerate XURS232
+.It
+HP LD220 Point-Of-Sale (POS) Display
+.It
+IOGEAR UC-232A
+.It
+I/O DATA USB-RSAQ, USB-RSAQ2, USB-RSAQ3 and USB-RSAQ5
+.It
+iTegno WM1080A GSM/GFPRS Modem
+.It
+iTegno WM2080A CDMA Modem
+.It
+Leadtek 9531 GPS
+.It
+Micromax 610U Modem
+.It
+Microsoft Palm 700WX
+.It
+Mobile Action MA-620 Infrared Adapter
+.It
+Motorola Cables
+.It
+Nokia CA-42 Cable
+.It
+OTI DKU-5 cable
+.It
+Panasonic TY-TP50P6-S flat screen
+.It
+PLX CA-42 Phone Cable
+.It
+PLANEX USB-RS232 URS-03
+.It
+Prolific Generic USB-Serial Adapters
+.It
+Prolific Pharos USB-Serial Adapter
+.It
+RATOC REX-USB60
+.It
+Radio Shack USB Serial Cable
+.It
+Sagem USB-Serial Adapter
+.It
+Samsung I330 Phone Cradle
+.It
+Sandberg USB to Serial Link (model number 133-08)
+.It
+Sanwa KB-USB2 Multimeter cable
+.It
+Siemens/BenQ EF81, SX1, X65 and X75 Mobile Phones
+.It
+Sitecom USB-Serial Adapter
+.It
+SMART Technologies USB-Serial Adapter
+.It
+Sony QN3 Phone Cable
+.It
+Sony Ericsson Datapilot
+.It
+Sony Ericsson DCU-10 and DCU-11 (Susteen) USB Cables
+.It
+SOURCENEXT KeikaiDenwa 8 (with and without charger)
+.It
+Speed Dragon USB-Serial Cable
+.It
+Syntech CPT-8001C Barcode Scanner
+.It
+TDK UHA6400 and UPA9664 USB-PHS Adapters
+.It
+TRENDnet USB to Serial Converter (TU-S9)
+.It
+Tripp-Lite U209-000-R USB-Serial Adapter
+.It
+UIC HCR331 Magnetic Stripe Card Reader
+.It
+UIC MSR206 Magnetic Stripe Card Reader
+.It
+Willcom W-SIM DD PHS terminal.(WS002IN)
+.It
+YC-Cable USB-Serial Adapter
+.It
+Zeagle N2iTion3 Diving Computer
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver
+appeared in
+.Nx 1.6 .
+This manual page was adopted from
+.Nx
+by
+.An Tom Rhodes Aq trhodes@FreeBSD.org
+in April 2002.
diff --git a/share/man/man4/ural.4 b/share/man/man4/ural.4
new file mode 100644
index 0000000..4ae6c18
--- /dev/null
+++ b/share/man/man4/ural.4
@@ -0,0 +1,165 @@
+.\" Copyright (c) 2005, 2006
+.\" Damien Bergamini <damien.bergamini@free.fr>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 13, 2008
+.Dt URAL 4
+.Os
+.Sh NAME
+.Nm ural
+.Nd "Ralink Technology RT2500USB IEEE 802.11 driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device ural"
+.Cd "device wlan"
+.Cd "device wlan_amrr"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_ural_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports USB 2.0 wireless adapters based on the RT2500USB chipset.
+.Pp
+The RT2500USB chipset consists of two integrated chips, a RT2570 MAC/BBP
+and a radio transceiver (the model of which depends on the card revision).
+.Pp
+The RT2522, RT2523, RT2524, RT2525, RT2525e and RT2526 radio transceivers
+operate in the 2.4GHz band (802.11b/g) whereas the RT5222 is a dual-band radio
+transceiver that can operate in the 2.4GHz and 5.2GHz bands (802.11a).
+.Pp
+.Nm
+supports
+.Cm station ,
+.Cm adhoc ,
+.Cm hostap ,
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports USB 2.0 wireless adapters based on the Ralink Technology
+RT2500USB chipset, including:
+.Pp
+.Bl -column -compact ".Li Atlantis Land A02-PCM-W54" "Bus"
+.It Em Card Ta Em Bus
+.It "AMIT WL532U" Ta USB
+.It "ASUS WL-167g" Ta USB
+.It "Belkin F5D7050 v2000" Ta USB
+.It "Buffalo WLI-U2-KG54-AI" Ta USB
+.It "CNet CWD-854" Ta USB
+.It "Compex WLU54G 2A1100" Ta USB
+.It "Conceptronic C54RU" Ta USB
+.It "D-Link DWL-G122 b1" Ta USB
+.It "Dynalink WLG25USB" Ta USB
+.It "E-Tech WGUS02" Ta USB
+.It "Gigabyte GN-WBKG" Ta USB
+.It "Hercules HWGUSB2-54" Ta USB
+.It "KCORP LifeStyle KLS-685" Ta USB
+.It "Linksys WUSB54G v4" Ta USB
+.It "Linksys WUSB54GP v4" Ta USB
+.It "MSI MS-6861" Ta USB
+.It "MSI MS-6865" Ta USB
+.It "MSI MS-6869" Ta USB
+.It "NovaTech NV-902" Ta USB
+.It "OvisLink Evo-W54USB" Ta USB
+.It "SerComm UB801R" Ta USB
+.It "SparkLAN WL-685R" Ta USB
+.It "Surecom EP-9001-g" Ta USB
+.It "Sweex LC100060" Ta USB
+.It "Tonze UW-6200C" Ta USB
+.It "Zinwell ZWX-G261" Ta USB
+.It "Zonet ZEW2500P" Ta USB
+.El
+.Pp
+An up to date list can be found at
+.Pa http://ralink.rapla.net/ .
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev ural0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev ural0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev ural0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Pp
+Join a specific BSS network with 128-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev ural0 wlanmode adhoc ssid my_net \e
+ wepmode on wepkey 0x01020304050607080910111213 weptxkey 1
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "ural%d: device timeout"
+The driver will reset the hardware.
+This should not happen.
+.El
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr netintro 4 ,
+.Xr usb 4 ,
+.Xr wlan 4 ,
+.Xr wlan_amrr 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr wlan_xauth 4 ,
+.Xr ifconfig 8 ,
+.Xr hostapd 8 ,
+.Xr wpa_supplicant 8 .
+.Rs
+.%T "Ralink Technology"
+.%U http://www.ralinktech.com/
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 3.7 .
+.Sh AUTHORS
+The original
+.Nm
+driver was written by
+.An Damien Bergamini Aq damien.bergamini@free.fr
+.Sh BUGS
+Host AP mode doesn't support client power save.
+Clients using power save mode will experience
+packet loss (disabling power saving on the client will fix this).
diff --git a/share/man/man4/urio.4 b/share/man/man4/urio.4
new file mode 100644
index 0000000..68a4964
--- /dev/null
+++ b/share/man/man4/urio.4
@@ -0,0 +1,130 @@
+.\" Copyright (c) 2000 Dirk-Willem van Gulik <dirkx@webweaving.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 22, 2006
+.Dt URIO 4
+.Os
+.Sh NAME
+.Nm urio
+.Nd "USB driver for the Rio MP3 players"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device urio"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+urio_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Rio MP3 players from Diamond MultiMedia
+which attaches to the USB port.
+The
+.Nm
+device must be configured in the kernel, along with
+.Em usb
+and one of the
+.Em uhci
+or
+.Em ohci
+controllers.
+.Pp
+Subsequently, the
+.Pa /dev/urio0
+device can be used by the Rio userland applications.
+.Sh HARDWARE
+The following devices are supported by the
+.Nm
+driver:
+.Pp
+.Bl -bullet -compact
+.It
+Diamond MultiMedia Rio 500
+.It
+Diamond MultiMedia Rio 600
+.It
+Diamond MultiMedia Rio 800
+.El
+.Sh FILES
+.Bl -tag -width /dev/ums0 -compact
+.It Pa /dev/urio0
+blocking device node
+.El
+.Sh EXAMPLES
+The following line in the kernel configuration file adds the
+.Nm
+driver to the kernel:
+.Dl device urio
+.Pp
+To download a song over the
+.Tn USB
+connection into the Rio using the
+.Xr rio_add_song 1
+utility (see the
+.Sx SEE ALSO
+section):
+.Dl rio_add_song /usr/local/MP3/TracyChapman/02-Fast-Car.mp3
+.Sh SEE ALSO
+.Xr ohci 4 ,
+.Xr uhci 4 ,
+.Xr usb 4
+.Rs
+.%T The Rio 500 SourceForge Project Web Page
+.%U http://rio500.sourceforge.net/
+.Re
+.Pp
+The Rio500 tools from SourceForge
+are the actual userland tools used to download,
+format or rename songs on players.
+When compiling these tools,
+the following pre-build configuration command will ensure that
+.Pa rio_usb.h
+is available in the include path
+and that the device used is
+.Pa /dev/urio0 :
+.Bd -literal -offset indent
+CFLAGS="-I/usr/include/dev/usb" ./configure \\
+ --with-devicepath='/dev' --with-deviceentry='urio0'
+.Ed
+.\".Sh HISTORY
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Iwasa Kazmi Aq kzmi@ca2.so-net.ne.jp
+for
+.Fx .
+.Pp
+This manual page was written by
+.An Dirk-Willem van Gulik Aq dirkx@webweaving.org .
diff --git a/share/man/man4/urndis.4 b/share/man/man4/urndis.4
new file mode 100644
index 0000000..9d126bd
--- /dev/null
+++ b/share/man/man4/urndis.4
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2010 Michael Knudsen <mk@openbsd.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" - Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" - Redistributions in binary form must reproduce the above
+.\" copyright notice, this list of conditions and the following
+.\" disclaimer in the documentation and/or other materials provided
+.\" with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $OpenBSD: urndis.4,v 1.15 2013/07/16 16:05:49 schwarze Exp $
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 21, 2014
+.Dt URNDIS 4
+.Os
+.Sh NAME
+.Nm urndis
+.Nd USB Remote NDIS Ethernet device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device xhci"
+.Cd "device usb"
+.Cd "device urndis"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_urndis_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides Ethernet access over Remote NDIS (RNDIS),
+allowing mobile devices such as phones and tablets to provide network access.
+It is often referred to as USB tethering,
+and in most cases must be explicitly enabled on the device.
+.Pp
+.Nm
+should work with any USB RNDIS devices,
+such as those commonly found on Android devices.
+It does not support different media types or options.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr usb 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Ox 4.7 .
+The first
+.Fx
+release to include it was
+.Fx 9.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Jonathan Armani Aq Mt armani@openbsd.org ,
+.An Michael Knudsen Aq Mt mk@openbsd.org ,
+and
+.An Fabien Romano Aq Mt fabien@openbsd.org .
+It was ported to
+.Fx
+by
+.An Hans Petter Selasky Aq Mt hps@FreeBSD.org .
diff --git a/share/man/man4/urtw.4 b/share/man/man4/urtw.4
new file mode 100644
index 0000000..58f291f
--- /dev/null
+++ b/share/man/man4/urtw.4
@@ -0,0 +1,126 @@
+.\" Copyright (c) 2008 Weongyo Jeong
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 17, 2009
+.Dt URTW 4
+.Os
+.Sh NAME
+.Nm urtw
+.Nd Realtek RTL8187B/L USB IEEE 802.11b/g wireless network device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device urtw"
+.Cd "device wlan"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time,
+place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_urtw_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports USB 802.11b/g wireless adapters based on the
+Realtek RTL8187B/L.
+.Pp
+.Nm
+supports
+.Cm station
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Realtek RTL8187B/L based wireless network devices, including:
+.Pp
+.Bl -column "Shuttle XPC Accessory PN20" "RTL8225" "USB" -compact -offset 6n
+.It Em "Card Radio Bus"
+.It "Belkin F5D7050E RTL8225 USB"
+.It "Linksys WUSB54GCv2 RTL8225 USB"
+.It "Netgear WG111v2 RTL8225 USB"
+.It "Netgear WG111v3 RTL8225 USB"
+.It "Safehome WLG-1500SMA5 RTL8225 USB"
+.It "Shuttle XPC Accessory PN20 RTL8225 USB"
+.It "Sitecom WL168v1 RTL8225 USB"
+.It "Sitecom WL168v4 RTL8225 USB"
+.It "SureCom EP-9001-g(2A) RTL8225 USB"
+.It "TRENDnet TEW-424UB V3.xR RTL8225 USB"
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev urtw0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev urtw0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev urtw0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr netintro 4 ,
+.Xr usb 4 ,
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Rs
+.%T Realtek
+.%U http://www.realtek.com.tw
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Weongyo Jeong
+.Aq weongyo@FreeBSD.org .
diff --git a/share/man/man4/urtwn.4 b/share/man/man4/urtwn.4
new file mode 100644
index 0000000..da1db76
--- /dev/null
+++ b/share/man/man4/urtwn.4
@@ -0,0 +1,158 @@
+.\" Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 3, 2014
+.Dt URTWN 4
+.Os
+.Sh NAME
+.Nm urtwn
+.Nd Realtek RTL8188CU/RTL8188EU/RTL8192CU USB IEEE 802.11b/g/n wireless network device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device urtwn"
+.Cd "device wlan"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_urtwn_load="YES"
+.Ed
+.Pp
+In both cases, place the following line in
+.Xr loader.conf 5
+to acknowledge the firmware license (see below):
+.Bd -literal -offset indent
+legal.realtek.license_ack=1
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports USB 2.0 wireless network devices based on Realtek
+RTL8188CUS, RTL8188CE-VAU, RTL8188EUS, RTL8188RU and RTL8192CU chipsets.
+.Pp
+The RTL8188CUS and RTL8188EUS are highly integrated 802.11n adapter that
+combine a MAC, a 1T1R capable baseband and an RF in a single chip.
+They operate in the 2GHz spectrum only.
+The RTL8188RU is a high-power variant of the RTL8188CUS.
+The RTL8188CE-VAU is a PCI Express Mini Card adapter that attaches
+to the USB interface.
+.Pp
+The RTL8192CU is a highly integrated multiple-in, multiple-out (MIMO)
+802.11n adapter that combines a MAC, a 2T2R capable baseband and an
+RF in a single chip.
+It operates in the 2GHz spectrum only.
+.Pp
+This driver requires the firmware built with the
+.Nm urtwnfw
+module to work.
+For the loaded firmware to be enabled for use the license at
+.Pa /usr/share/doc/legal/realtek
+must be agreed by adding the following line to
+.Xr loader.conf 5 :
+.Pp
+.Dl "legal.realtek.license_ack=1"
+.Sh FILES
+.Bl -tag -width ".Pa /usr/share/doc/legal/realtek" -compact
+.It Pa /usr/share/doc/legal/realtek
+.Nm
+firmware license
+.El
+.Sh HARDWARE
+The
+.Nm
+driver supports Realtek RTL8188CU/RTL8188EU/RTL8192CU based USB
+IEEE 802.11b/g/n wireless network adapters, including:
+.Pp
+.Bl -tag -width Ds -offset indent -compact
+.It ASUS USB-N10 NANO
+.It Belkin F7D1102 Surf Wireless Micro
+.It D-Link DWA-131
+.It Edimax EW-7811Un
+.It Netgear WNA1000M
+.It Realtek RTL8192CU
+.It Realtek RTL8188CUS
+.It TP-LINK TL-WN723N v3
+.It TP-LINK TL-WN725N v2
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev urtwn0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev urtwn0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev urtwn0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "urtwn%d: error %d, could not read firmware %s"
+For some reason, the driver was unable to read the microcode file from the
+filesystem.
+The file might be missing or corrupted.
+.It "urtwn%d: device timeout"
+A frame dispatched to the hardware for transmission did not complete in time.
+The driver will reset the hardware.
+This should not happen.
+.El
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr netintro 4 ,
+.Xr urtwnfw 4 ,
+.Xr usb 4 ,
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Rs
+.%T Realtek
+.%U http://www.realtek.com.tw
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 4.9
+and
+.Fx 10.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Damien Bergamini Aq damien@openbsd.org .
+.Sh CAVEATS
+The
+.Nm
+driver does not support any of the 802.11n capabilities offered by the
+adapters.
diff --git a/share/man/man4/urtwnfw.4 b/share/man/man4/urtwnfw.4
new file mode 100644
index 0000000..c25f944
--- /dev/null
+++ b/share/man/man4/urtwnfw.4
@@ -0,0 +1,77 @@
+.\" Copyright (c) 2013 Kevin Lo
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 25, 2014
+.Dt URTWNFW 4
+.Os
+.Sh NAME
+.Nm urtwnfw
+.Nd "Firmware Module for Realtek Wireless driver"
+.Sh SYNOPSIS
+To compile this module into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device urtwnfw"
+.Ed
+.Pp
+This will include three firmware images inside the kernel.
+If you want to pick only the firmware image for your network adapter choose one
+of the following:
+.Bd -ragged -offset indent
+.Cd "device urtwn-rtl8192cfwT"
+.Cd "device urtwn-rtl8192cfwU"
+.Cd "device urtwn-rtl8188eufw"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+urtwn-rtl8192cfwT_load="YES"
+urtwn-rtl8192cfwU_load="YES"
+urtwn-rtl8188eufw_load="YES"
+.Ed
+.Sh DESCRIPTION
+This module provides access to firmware sets for the
+Realtek RTL8188CUS, RTL8188CE-VAU, RTL8188EUS, RTL8188RU and RTL8192CU
+chip based USB WiFi adapters.
+It may be
+statically linked into the kernel, or loaded as a module.
+.Pp
+For the loaded firmware to be enabled for use the license at
+.Pa /usr/share/doc/legal/realtek
+must be agreed to by adding the following line to
+.Xr loader.conf 5 :
+.Pp
+.Dl "legal.realtek.license_ack=1"
+.Sh FILES
+.Bl -tag -width ".Pa /usr/share/doc/legal/realtek" -compact
+.It Pa /usr/share/doc/legal/realtek
+.Nm
+firmware license
+.El
+.Sh SEE ALSO
+.Xr urtwn 4 ,
+.Xr firmware 9
diff --git a/share/man/man4/usb.4 b/share/man/man4/usb.4
new file mode 100644
index 0000000..f64d8b8
--- /dev/null
+++ b/share/man/man4/usb.4
@@ -0,0 +1,182 @@
+.\" Copyright (c) 1997, 1998 Nick Hibma <n_hibma@FreeBSD.org>
+.\" Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 26, 2013
+.Dt USB 4
+.Os
+.Sh NAME
+.Nm usb
+.Nd Universal Serial Bus
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+usb_load="YES"
+.Ed
+.Sh USERLAND PROGRAMMING
+USB functions can be accessed from userland through the libusb library.
+See
+.Xr libusb 3
+for more information.
+.Sh DESCRIPTION
+.Fx
+provides machine-independent bus support and drivers for
+.Tn USB
+devices in host and device side mode.
+.Pp
+The
+.Nm
+driver has three layers:
+.Bl -tag -width 6n -offset indent
+.It USB Controller (Bus)
+.It USB Device
+.It USB Driver
+.El
+.Pp
+The controller attaches to a physical bus
+like
+.Xr pci 4 .
+The
+.Tn USB
+bus attaches to the controller, and the root hub attaches
+to the controller.
+Any devices attached to the bus will attach to the root hub
+or another hub attached to the
+.Tn USB
+bus.
+.Pp
+The
+.Nm uhub
+device will always be present as it is needed for the
+root hub.
+.Sh INTRODUCTION TO USB
+The
+.Tn USB
+is a system where external devices can be connected to a PC.
+The most common USB speeds are:
+.Bl -tag -width 6n -offset indent
+.It Low Speed (1.5MBit/sec)
+.It Full Speed (12MBit/sec)
+.It High Speed (480MBit/sec)
+.El
+.Pp
+Each
+.Tn USB
+has a USB controller that is the master of the bus.
+The physical communication is simplex which means the host controller only communicates with one USB device at a time.
+.Pp
+There can be up to 127 devices connected to an USB HUB tree.
+The addresses are assigned
+dynamically by the host when each device is attached to the bus.
+.Pp
+Within each device there can be up to 16 endpoints.
+Each endpoint
+is individually addressed and the addresses are static.
+Each of these endpoints will communicate in one of four different modes:
+.Em control , isochronous , bulk ,
+or
+.Em interrupt .
+A device always has at least one endpoint.
+This endpoint has address 0 and is a control
+endpoint and is used to give commands to and extract basic data,
+such as descriptors, from the device.
+Each endpoint, except the control endpoint, is unidirectional.
+.Pp
+The endpoints in a device are grouped into interfaces.
+An interface is a logical unit within a device; e.g.\&
+a compound device with both a keyboard and a trackball would present
+one interface for each.
+An interface can sometimes be set into different modes,
+called alternate settings, which affects how it operates.
+Different alternate settings can have different endpoints
+within it.
+.Pp
+A device may operate in different configurations.
+Depending on the
+configuration, the device may present different sets of endpoints
+and interfaces.
+.Pp
+The bus enumeration of the
+.Tn USB
+bus proceeds in several steps:
+.Bl -enum
+.It
+Any interface specific driver can attach to the device.
+.It
+If none is found, generic interface class drivers can attach.
+.El
+.Sh SEE ALSO
+The
+.Tn USB
+specifications can be found at:
+.Pp
+.D1 Pa http://www.usb.org/developers/docs/
+.Pp
+.Xr libusb 3 ,
+.Xr usbdi 4 ,
+.Xr aue 4 ,
+.Xr axe 4 ,
+.Xr axge 4 ,
+.Xr cue 4 ,
+.Xr ehci 4 ,
+.Xr kue 4 ,
+.Xr mos 4 ,
+.Xr ohci 4 ,
+.Xr pci 4 ,
+.Xr rue 4 ,
+.Xr ucom 4 ,
+.Xr udav 4 ,
+.Xr uhci 4 ,
+.Xr uhid 4 ,
+.Xr ukbd 4 ,
+.Xr ulpt 4 ,
+.Xr umass 4 ,
+.Xr ums 4 ,
+.Xr uplcom 4 ,
+.Xr urio 4 ,
+.Xr uvscom 4 ,
+.Xr usbconfig 8 ,
+.Xr xhci 4
+.Sh STANDARDS
+The
+.Nm
+module complies with the USB 2.0 standard.
+.Sh HISTORY
+The
+.Nm
+module has been inspired by the NetBSD USB stack initially written by
+Lennart Augustsson. The
+.Nm
+module was written by
+.An Hans Petter Selasky Aq hselasky@FreeBSD.org .
diff --git a/share/man/man4/usb_quirk.4 b/share/man/man4/usb_quirk.4
new file mode 100644
index 0000000..eb45eaa
--- /dev/null
+++ b/share/man/man4/usb_quirk.4
@@ -0,0 +1,196 @@
+.\"
+.\" Copyright (c) 2010 AnyWi Technologies
+.\" All rights reserved.
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 21, 2013
+.Dt USB_QUIRK 4
+.Os
+.Sh NAME
+.Nm usb_quirk
+.Nd USB quirks module
+.Sh SYNOPSIS
+To compile this module into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Ed
+.Pp
+Alternatively, to load the module at boot
+time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+usb_quirk_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+module provides support for dynamically adding and removing quirks for
+USB devices with
+.Xr usbconfig 8 .
+.Sh General quirks:
+.Bl -tag -width Ds
+.It UQ_AUDIO_SWAP_LR
+swap left and right channels
+.It UQ_AU_INP_ASYNC
+input is async despite claim of adaptive
+.It UQ_AU_NO_FRAC
+do not adjust for fractional samples
+.It UQ_AU_NO_XU
+audio device has broken extension unit
+.It UQ_BAD_ADC
+bad audio spec version number
+.It UQ_BAD_AUDIO
+device claims audio class, but is not
+.It UQ_BROKEN_BIDIR
+printer has broken bidir mode
+.It UQ_BUS_POWERED
+device is bus powered, despite claim
+.It UQ_HID_IGNORE
+device should be ignored by hid class
+.It UQ_KBD_IGNORE
+device should be ignored by kbd class
+.It UQ_KBD_BOOTPROTO
+device should set the boot protocol
+.It UQ_UMS_IGNORE
+device should be ignored by ums class
+.It UQ_MS_BAD_CLASS
+does not identify properly
+.It UQ_MS_LEADING_BYTE
+mouse sends an unknown leading byte
+.It UQ_MS_REVZ
+mouse has Z-axis reversed
+.It UQ_NO_STRINGS
+string descriptors are broken
+.It UQ_POWER_CLAIM
+hub lies about power status
+.It UQ_SPUR_BUT_UP
+spurious mouse button up events
+.It UQ_SWAP_UNICODE
+has some Unicode strings swapped
+.It UQ_CFG_INDEX_1
+select configuration index 1 by default
+.It UQ_CFG_INDEX_2
+select configuration index 2 by default
+.It UQ_CFG_INDEX_3
+select configuration index 3 by default
+.It UQ_CFG_INDEX_4
+select configuration index 4 by default
+.It UQ_CFG_INDEX_0
+select configuration index 0 by default
+.It UQ_ASSUME_CM_OVER_DATA
+assume cm over data feature
+.El
+.Sh USB Mass Storage quirks:
+.Bl -tag -width Ds
+.It UQ_MSC_NO_TEST_UNIT_READY
+send start/stop instead of TUR
+.It UQ_MSC_NO_RS_CLEAR_UA
+does not reset Unit Att.
+.It UQ_MSC_NO_START_STOP
+does not support start/stop
+.It UQ_MSC_NO_GETMAXLUN
+does not support get max LUN
+.It UQ_MSC_NO_INQUIRY
+fake generic inq response
+.It UQ_MSC_NO_INQUIRY_EVPD
+does not support inq EVPD
+.It UQ_MSC_NO_SYNC_CACHE
+does not support sync cache
+.It UQ_MSC_SHUTTLE_INIT
+requires Shuttle init sequence
+.It UQ_MSC_ALT_IFACE_1
+switch to alternate interface 1
+.It UQ_MSC_FLOPPY_SPEED
+does floppy speeds (20kb/s)
+.It UQ_MSC_IGNORE_RESIDUE
+gets residue wrong
+.It UQ_MSC_WRONG_CSWSIG
+uses wrong CSW signature
+.It UQ_MSC_RBC_PAD_TO_12
+pad RBC requests to 12 bytes
+.It UQ_MSC_READ_CAP_OFFBY1
+reports sector count, not max sec.
+.It UQ_MSC_FORCE_SHORT_INQ
+does not support full inq.
+.It UQ_MSC_FORCE_WIRE_BBB
+force BBB wire protocol
+.It UQ_MSC_FORCE_WIRE_CBI
+force CBI wire protocol
+.It UQ_MSC_FORCE_WIRE_CBI_I
+force CBI with int. wire protocol
+.It UQ_MSC_FORCE_PROTO_SCSI
+force SCSI command protocol
+.It UQ_MSC_FORCE_PROTO_ATAPI
+force ATAPI command protocol
+.It UQ_MSC_FORCE_PROTO_UFI
+force UFI command protocol
+.It UQ_MSC_FORCE_PROTO_RBC
+force RBC command protocol
+.El
+.Sh 3G Datacard (u3g) quirks:
+.Bl -tag -width Ds
+.It UQ_MSC_EJECT_HUAWEI
+ejects after Huawei USB command
+.It UQ_MSC_EJECT_SIERRA
+ejects after Sierra USB command
+.It UQ_MSC_EJECT_SCSIEJECT
+ejects after SCSI eject command
+.Dv 0x1b0000000200
+.It UQ_MSC_EJECT_REZERO
+ejects after SCSI rezero command
+.Dv 0x010000000000
+.It UQ_MSC_EJECT_ZTESTOR
+ejects after ZTE SCSI command
+.Dv 0x850101011801010101010000
+.It UQ_MSC_EJECT_CMOTECH
+ejects after C-motech SCSI command
+.Dv 0xff52444556434847
+.It UQ_MSC_EJECT_WAIT
+wait for the device to eject
+.It UQ_MSC_EJECT_SAEL_M460
+ejects after Sael USB commands
+.It UQ_MSC_EJECT_HUAWEISCSI
+ejects after Huawei SCSI command
+.Dv 0x11060000000000000000000000000000
+.It UQ_MSC_EJECT_TCT
+ejects after TCT SCSI command
+.Dv 0x06f504025270
+.El
+.Pp
+See
+.Pa /sys/dev/usb/quirk/usb_quirk.h
+for the complete list of supported quirks.
+.Sh EXAMPLES
+After attaching a
+.Nm u3g
+device which appears as a USB device on
+.Pa ugen0.3 :
+.Bd -literal -offset indent
+usbconfig -d ugen0.3 add_quirk UQ_MSC_EJECT_WAIT
+.Ed
+.Sh SEE ALSO
+.Xr usbconfig 8
+.Sh HISTORY
+The
+.Nm
+module appeared in
+.Fx 8.0 ,
+and was written by
+.An Hans Petter Selasky Aq hselasky@FreeBSD.org .
+This manual page was written by
+.An Nick Hibma Aq n_hibma@FreeBSD.org .
diff --git a/share/man/man4/usb_template.4 b/share/man/man4/usb_template.4
new file mode 100644
index 0000000..331ece9
--- /dev/null
+++ b/share/man/man4/usb_template.4
@@ -0,0 +1,83 @@
+.\" $FreeBSD$
+.\"
+.\" Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd March 18, 2014
+.Dt USB_TEMPLATE 4
+.Os
+.
+.Sh NAME
+.
+.
+.Nm usb_template
+.
+.Nd "USB templates"
+.
+.
+.Sh SYNOPSIS
+To compile this module into the kernel, place the following line in
+your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb_template"
+.Ed
+.Pp
+To load the module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+usb_template_load="YES"
+.Ed
+.
+.Sh DESCRIPTION
+The
+.Nm
+module implements various USB templates that are needed when
+programming an USB device side driver.
+.
+A USB template consists of an USB device descriptor, one or more USB
+configuration descriptors, one or more USB interface descriptors, one
+or more USB endpoint descriptors, USB strings and additional USB
+descriptors.
+.
+The USB template module currently has templates for USB Mass Storage,
+USB CDC Ethernet and Message Transfer Protocol.
+.
+USB templates are currently selected using the "hw.usb.template"
+sysctl.
+.
+The "hw.usb.template" value can be changed at any time, but will not
+have any effect until the USB device has been re-enumerated.
+.
+.
+.
+.Sh SEE ALSO
+.Xr usb 4
+.Sh STANDARDS
+The
+.Nm
+module complies to the USB 1.0, 2.0 and 3.0 standard.
+.Sh HISTORY
+The
+.Nm
+module was written by
+.An Hans Petter Selasky Aq hselasky@FreeBSD.org .
diff --git a/share/man/man4/usfs.4 b/share/man/man4/usfs.4
new file mode 100644
index 0000000..215d31e
--- /dev/null
+++ b/share/man/man4/usfs.4
@@ -0,0 +1,62 @@
+.\"
+.\" Copyright (c) 2014 Hans Petter Selasky
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 18, 2014
+.Dt USFS 4
+.Os
+.Sh NAME
+.Nm usfs
+.Nd USB device side support for bulk only transport mass storage
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device usfs"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+usfs_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for emulating an USB mass storage device when
+the USB stack is activated in USB device side mode.
+.Pp
+Upon attach the driver creates a RAM disk which can be read and written.
+.Sh SEE ALSO
+.Xr umass 4
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver appeared in FreeBSD 8.
diff --git a/share/man/man4/uslcom.4 b/share/man/man4/uslcom.4
new file mode 100644
index 0000000..d043cb2
--- /dev/null
+++ b/share/man/man4/uslcom.4
@@ -0,0 +1,212 @@
+.\" $OpenBSD: uslcom.4,v 1.6 2007/10/08 03:10:42 jcs Exp $
+.\"
+.\" Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd August 4, 2012
+.Dt USLCOM 4
+.Os
+.Sh NAME
+.Nm uslcom
+.Nd Silicon Laboratories CP2101/CP2102/CP2103/CP2104/CP2105 based USB serial adapter
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device uslcom"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+uslcom_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports Silicon Laboratories CP2101/CP2102/CP2103/CP2104/CP2105
+based USB serial adapters.
+.Sh HARDWARE
+The following devices should work with the
+.Nm
+driver:
+.Pp
+.Bl -bullet -compact
+.It
+AC-Services CAN, CIS-IBUS, IBUS and OBD interfaces
+.It
+Aerocomm Radio
+.It
+AKTACOM ACE-1001 cable
+.It
+AMBER Wireless AMB2560
+.It
+Arkham DS-101 Adapter
+.It
+Argussoft ISP
+.It
+Arygon Technologies Mifare RFID Reader
+.It
+AVIT Research USB-TTL interface
+.It
+B&G H3000 Data Cable
+.It
+Balluff RFID reader
+.It
+Baltech card reader
+.It
+BEI USB VCP Sensor
+.It
+Burnside Telecom Desktop Mobile
+.It
+chip45.com Crumb128 module
+.It
+Clipsal 5000CT2, 5500PACA, 5500PCU, 560884, 5800PC, C5000CT2
+and L51xx C-Bus Home Automation products
+.It
+Commander 2 EDGE(GSM) Modem
+.It
+Cygnal Fasttrax GPS and Debug adapter
+.It
+DataApex MultiCOM USB to RS232 converter
+.It
+Degree Controls USB adapter
+.It
+DekTec DTA Plus VHF/UHF Booster
+.It
+Dell DW700 GPS Receiver
+.It
+Digianswer ZigBee/802.15.4 MAC
+.It
+Dynastream ANT Development kits
+.It
+Elan USBcount50, USBscope50, USBpulse100 and USBwave12
+.It
+ELV USB-I2C interface
+.It
+EMS C1007 HF RFID controller
+.It
+Festo CPX-USB and CMSP interfaces
+.It
+Gemalto Prox-PU/CU contactless card reader
+.It
+Helicomm IP-Link 1220-DVM
+.It
+IMS USB-RS422 adapter
+.It
+Infinity GPS-MIC-1 Radio Monophone
+.It
+INSYS Modem
+.It
+IRZ SG-10 and MC35pu GSM/GPRS Modems
+.It
+Jablotron PC-60B
+.It
+Kamstrup M-Bus Master MultiPort 250D
+and Optical Eye/3 wire utility meter interfaces
+.It
+Kyocera GPS
+.It
+Link Instruments MS-019 and MS-028
+Oscilloscope/Logic Analyzer/Pattern Generators
+.It
+Lipowsky Baby-JTAG, Baby-LIN and HARP-1
+.It
+MEI CashFlow SC and Series 2000 cash acceptors
+.It
+MJS USB-TOSLINK Adapter
+.It
+MobiData GPRS USB Modems
+.It
+MSD DashHawk
+.It
+Multiplex RC adapter
+.It
+Optris MSpro LT Thermometer
+.It
+Owen AC4 USB-RS485 converter
+.It
+Pirelli DP-L10 SIP phone
+.It
+PLX CA-42 Phone cable
+.It
+Pololu USB to Serial
+.It
+Procyon AVS Mind Machine
+.It
+Renesas RX-Stick for RX610
+.It
+Siemens MC60 Cable
+.It
+Silicon Laboratories generic CP2101/CP2102/CP2103/CP2104/CP2105 chips
+.It
+Software Bisque Paramount ME
+.It
+SPORTident BSM7-D USB
+.It
+Suunto Sports Instrument
+.It
+Syntech CipherLab USB Barcode Scanner
+.It
+T-Com TC 300 SIP phone
+.It
+Tams Master Easy Control
+.It
+Telegesis ETRX2USB
+.It
+Timewave HamLinkUSB
+.It
+Tracient RFID Reader
+.It
+Track Systems Traqmate
+.It
+Vaisala USB Instrument cable
+.It
+VStabi Controller
+.It
+WAGO 750-923 USB Service Cable
+.It
+WaveSense Jazz Blood Glucose Meter
+.It
+WIENER Plein & Baus CML Data Logger, RCM Remote,
+and PL512 and MPOD PSUs
+.It
+WMR RIGblaster Plug&Play and RIGtalk RT1
+.It
+Zephyr Bioharness
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Ox 4.0 .
+The first
+.Fx
+release to include it was
+.Fx 7.1 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Jonathan Gray Aq jsg@openbsd.org .
diff --git a/share/man/man4/utopia.4 b/share/man/man4/utopia.4
new file mode 100644
index 0000000..00020ea
--- /dev/null
+++ b/share/man/man4/utopia.4
@@ -0,0 +1,196 @@
+.\" Copyright (c) 2003
+.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Author: Hartmut Brandt <harti@FreeBSD.org>
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 22, 2006
+.Dt UTOPIA 4
+.Os
+.Sh NAME
+.Nm utopia
+.Nd "driver module for ATM PHY chips"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device utopia"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+utopia_load="YES"
+.Ed
+.Sh DESCRIPTION
+This module is used by all ATM drivers for cards that use
+PMC-Sierra S/Uni and IDT77105/IDT77155
+chips to provide uniform functionality.
+The module implements status monitoring
+in either interrupt or polling mode, media option handling and application
+access to chip registers.
+.Pp
+The driver implements several sysctls that are accessible under the
+.Va hw.atm. Ns Ao Ar iface Ac Ns Va .\&
+tree, where
+.Ar iface
+is the name of the ATM interface:
+.Bl -tag -width indent
+.It Va phy_regs
+When reading this sysctl an array of 8-bit unsigned integers is returned
+containing all accessible chip registers starting at register 0.
+A register can be written by writing three 8-bit unsigned integers to the
+sysctl: the register number, the new value and a bit mask.
+This changes all bits in the register for which the corresponding bit in the
+mask is one to the bit values from value.
+Note that not all registers may
+be writeable.
+.It Va phy_loopback
+allows to put the interface in one of several loopback modes.
+Not all modes and all combinations of modes are supported on all chips.
+The possible modes are:
+.Bl -tag -width indent
+.It Dv UTP_LOOP_NONE Pq No 0x00
+No loopback, normal operation.
+.It Dv UTP_LOOP_TIME Pq No 0x01
+Timing source loopback.
+When this is set the transmitter's clock is
+derived from the receiver's clock.
+.It Dv UTP_LOOP_DIAG Pq No 0x02
+Diagnostic loopback.
+In this mode the receiver's input is connected to the
+transmitter's output.
+The receiver gets back everything that is sent.
+The
+transmitter operates normally.
+.It Dv UTP_LOOP_LINE Pq No 0x04
+Serial line loopback.
+This connects the line receiver to the line transmitter.
+The chip transmits all cells back that it receives.
+The receiver operates
+normally.
+.It Dv UTP_LOOP_PARAL Pq No 0x08
+Parallel diagnostic loopback.
+This feeds back all transmitted cells into the
+receiver between the parallel/serial converters.
+The transmitter
+operates normally.
+.It Dv UTP_LOOP_TWIST Pq No 0x10
+Twisted pair diagnostic loopback.
+Connects the high speed receive data to the
+high speed transmit data.
+All received data is sent back.
+The receiver
+operates normally.
+.It Dv UTP_LOOP_PATH Pq No 0x20
+Diagnostic path loopback.
+This connects the receiver input to the transmitter
+output just between the path overhead processor and the byte mux.
+The
+transmitter operates normally.
+.El
+.It Va phy_type
+This is the detected type of the phy chip.
+Currently the following chips are
+supported:
+.Bl -tag -width indent
+.It Dv UTP_TYPE_UNKNOWN Pq No 0
+The module could not determine the type of the PHY chip.
+.It Dv UTP_TYPE_SUNI_LITE Pq No 1
+PMC-5346 (S/Uni-Lite)
+.It Dv UTP_TYPE_SUNI_ULTRA Pq No 2
+PMC-5350 (S/Uni-Ultra)
+.It Dv UTP_TYPE_SUNI_622 Pq No 3
+PMC-5355 (S/Uni-622)
+.It Dv UTP_TYPE_IDT77105 Pq No 4
+IDT77105 (25.6MBit UTP interface)
+.It Dv UTP_TYPE_IDT77155 Pq No 5
+IDT77155 (155MBit interface)
+.El
+.It Va phy_name
+This is a string describing the type of the PHY chip.
+.It Va phy_stats
+Physical and some ATM layer statistics.
+These are the statistics usually
+provided by the chip.
+The data is a returned in the following structure:
+.Bd -literal
+struct utopia_stats1 {
+ uint32_t version; /* version of this struct */
+ uint32_t fill;
+ uint64_t rx_sbip; /* rx section BIP errors */
+ uint64_t rx_lbip; /* rx line BIP errors */
+ uint64_t rx_lfebe; /* rx line far end block errors */
+ uint64_t rx_pbip; /* rx path BIP errors */
+ uint64_t rx_pfebe; /* rx path far end block errors */
+ uint64_t rx_cells; /* received cells */
+ uint64_t rx_corr; /* correctable cell errors */
+ uint64_t rx_uncorr; /* uncorrectable cell errors */
+ uint64_t rx_symerr; /* symbol errors */
+ uint64_t tx_cells; /* transmitted cells */
+};
+.Ed
+.Pp
+The current version is 1.
+The statistics are updated from the chip once
+a second.
+On overflow the counters wrap to zero.
+Note that not all counters
+are meaningful for all PHY chips.
+The statistics are cleared by writing an
+arbitrary new value (the value is ignored).
+.El
+.Pp
+The
+.Nm
+module also interfaces with the ifmedia system.
+The module reports the current state of the carrier and will issue a
+warning message when the carrier state changes.
+While the physical media itself cannot be changed, several media options can:
+.Bl -tag -width indent
+.It Cm SDH
+If the PHY is a Sonet/SDH chip this flag switches the interface into SDH mode.
+If this option is not set (the default) the interface is in Sonet mode.
+.It Cm noscramb
+If the PHY is a Sonet/SDH chip disable scrambling.
+This may be useful for debugging purposes.
+.It Cm unassigned
+Normally the interface emits idle cells when there are no other cells to
+transmit.
+This changes the default cell type to unassigned cells.
+This
+may be needed for interworking with public networks.
+.El
+.Sh SEE ALSO
+.Xr en 4 ,
+.Xr fatm 4 ,
+.Xr hatm 4 ,
+.Xr patm 4 ,
+.Xr utopia 9
+.Sh AUTHORS
+.An Harti Brandt Aq harti@FreeBSD.org
diff --git a/share/man/man4/uvisor.4 b/share/man/man4/uvisor.4
new file mode 100644
index 0000000..2397e45
--- /dev/null
+++ b/share/man/man4/uvisor.4
@@ -0,0 +1,142 @@
+.\" $NetBSD: uvisor.4,v 1.3 2001/01/23 21:31:10 augustss Exp $
+.\"
+.\" Copyright (c) 2000 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 20, 2011
+.Dt UVISOR 4
+.Os
+.Sh NAME
+.Nm uvisor
+.Nd "USB support for the PalmOS based PDAs"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device uvisor"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+uvisor_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for USB based PalmOS PDAs, like Handspring
+Visor, Palm Mxxx series, and Sony Clie.
+.Pp
+The device is accessed through the
+.Xr ucom 4
+driver which makes it behave like a
+.Xr tty 4 .
+The device has several ports for different purposes, each of them gets its
+own
+.Xr ucom 4
+device.
+The attach message describes the purpose of each port.
+.Pp
+The usual Pilot tools can be used to access the attached device on the
+HotSync port.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following devices:
+.Pp
+.Bl -bullet -compact
+.It
+Aceeca Mez1000 RDA
+.It
+Handspring Treo
+.It
+Handspring Treo 600
+.It
+Handspring Visor
+.It
+Palm I705
+.It
+Palm M125
+.It
+Palm M130
+.It
+Palm M500
+.It
+Palm M505
+.It
+Palm M515
+.It
+Palm Tungsten T
+.It
+Palm Tungsten Z
+.It
+Palm Zire
+.It
+Palm Zire 31
+.It
+Sony Clie 4.0
+.It
+Sony Clie 4.1
+.It
+Sony Clie 5.0
+.It
+Sony Clie PEG-S500C
+.It
+Sony Clie NX60
+.It
+Sony Clie S360
+.It
+Sony Clie TJ37
+.El
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver was adopted from
+.Nx 1.5
+in August 2002.
+This manual page was adopted from
+.Nx
+by
+.An Tom Rhodes Aq trhodes@FreeBSD.org
+at that time.
+.Sh BUGS
+The code to provide multiple
+.Xr ucom 4
+instances has not yet been ported from
+.Nx .
+It is unclear whether this driver works in its
+current state.
diff --git a/share/man/man4/uvscom.4 b/share/man/man4/uvscom.4
new file mode 100644
index 0000000..be40518
--- /dev/null
+++ b/share/man/man4/uvscom.4
@@ -0,0 +1,95 @@
+.\" $NetBSD: uvscom.4,v 1.1 2002/03/19 15:17:49 augustss Exp $
+.\"
+.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Lennart Augustsson.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 20, 2011
+.Dt UVSCOM 4
+.Os
+.Sh NAME
+.Nm uvscom
+.Nd USB support for SUNTAC Slipper U VS-10U serial adapters driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device usb"
+.Cd "device ucom"
+.Cd "device uvscom"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+uvscom_load="YES"
+.Ed
+.Sh HARDWARE
+The
+.Nm
+driver supports the following adapters:
+.Pp
+.Bl -bullet -compact
+.It
+DDI Pocket Air H" C@rd
+.It
+DDI Pocket Air H" C@rd 64
+.It
+NTT P-in
+.It
+NTT P-in m@ster
+.El
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the SUNTAC Slipper U VS-10U chip.
+Slipper U is a PC Card to USB converter for data communication card
+adapters.
+.Pp
+The device is accessed through the
+.Xr ucom 4
+driver which makes it behave like a
+.Xr tty 4 .
+.Sh SEE ALSO
+.Xr tty 4 ,
+.Xr ucom 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx
+and later in
+.Nx 1.6 .
+This manual page was adopted from
+.Nx
+by
+.An Tom Rhodes Aq trhodes@FreeBSD.org
+in April 2002.
diff --git a/share/man/man4/vale.4 b/share/man/man4/vale.4
new file mode 100644
index 0000000..4eeab1a
--- /dev/null
+++ b/share/man/man4/vale.4
@@ -0,0 +1,131 @@
+.\" Copyright (c) 2012 Luigi Rizzo, Universita` di Pisa
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" This document is derived in part from the enet man page (enet.4)
+.\" distributed with 4.3BSD Unix.
+.\"
+.\" $FreeBSD$
+.\" $Id: $
+.\"
+.Dd July 27, 2012
+.Dt VALE 4
+.Os
+.Sh NAME
+.Nm vale
+.Nd a very fast Virtual Local Ethernet using the netmap API
+.Sh SYNOPSIS
+.Cd device netmap
+.Sh DESCRIPTION
+.Nm
+is a feature of the
+.Xr netmap 4
+module that implements multiple Virtual switches that can
+be used to interconnect netmap clients, including traffic
+sources and sinks, packet forwarders, userspace firewalls,
+and so on.
+.Pp
+.Nm
+is implemented completely in software, and is extremely fast.
+On a modern machine it can move almost 20 Million packets per
+second (Mpps) per core with small frames, and about 70 Gbit/s
+with 1500 byte frames.
+.Sh OPERATION
+.Nm
+dynamically creates switches and ports as clients connect
+to it using the
+.Xr netmap 4
+API.
+.Pp
+.Nm
+ports are named
+.Pa vale[bdg:][port]
+where
+.Pa vale
+is the prefix indicating a VALE switch rather than a standard interface,
+.Pa bdg
+indicates a specific switch (the colon is a separator),
+and
+.Pa port
+indicates a port within the switch.
+Bridge and port names are arbitrary strings, the only
+constraint being that the full name must fit within 16
+characters.
+.Pp
+See
+.Xr netmap 4
+for details on the API.
+.Ss LIMITS
+.Nm
+currently supports up to 4 switches, 16 ports per switch, with
+1024 buffers per port.
+These hard limits will be
+changed to sysctl variables in future releases.
+.Sh SYSCTL VARIABLES
+.Nm
+uses the following sysctl variables to control operation:
+.Bl -tag -width dev.netmap.verbose
+.It dev.netmap.bridge
+The maximum number of packets processed internally
+in each iteration.
+Defaults to 1024, use lower values to trade latency
+with throughput.
+.It dev.netmap.verbose
+Set to non-zero values to enable in-kernel diagnostics.
+.El
+.Sh EXAMPLES
+Create one switch, with a traffic generator connected to one
+port, and a netmap-enabled tcpdump instance on another port:
+.Bd -literal -offset indent
+tcpdump -ni vale-a:1 &
+pkt-gen -i vale-a:0 -f tx &
+.Ed
+.Pp
+Create two switches,
+each connected to two qemu machines on different ports.
+.Bd -literal -offset indent
+qemu -net nic -net netmap,ifname=vale-1:a ... &
+qemu -net nic -net netmap,ifname=vale-1:b ... &
+qemu -net nic -net netmap,ifname=vale-2:c ... &
+qemu -net nic -net netmap,ifname=vale-2:d ... &
+.Ed
+.Sh SEE ALSO
+.Xr netmap 4
+.Pp
+.Xr http://info.iet.unipi.it/~luigi/vale/
+.Pp
+Luigi Rizzo, Giuseppe Lettieri: VALE, a switched ethernet for virtual machines,
+June 2012, http://info.iet.unipi.it/~luigi/vale/
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+switch was designed and implemented in 2012 by
+.An Luigi Rizzo
+and
+.An Giuseppe Lettieri
+at the Universita` di Pisa.
+.Pp
+.Nm
+was funded by the European Commission within FP7 Projects
+CHANGE (257422) and OPENLAB (287581).
diff --git a/share/man/man4/vga.4 b/share/man/man4/vga.4
new file mode 100644
index 0000000..b102d2f
--- /dev/null
+++ b/share/man/man4/vga.4
@@ -0,0 +1,185 @@
+.\"
+.\" Copyright (c) 1999
+.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 30, 1999
+.Dt VGA 4
+.Os
+.Sh NAME
+.Nm vga
+.Nd generic video card interface
+.Sh SYNOPSIS
+.Cd "options VESA"
+.Cd "options VESA_DEBUG=N"
+.Cd "options VGA_ALT_SEQACCESS"
+.Cd "options VGA_NO_FONT_LOADING"
+.Cd "options VGA_NO_MODE_CHANGE"
+.Cd "options VGA_SLOW_IOACCESS"
+.Cd "options VGA_WIDTH90"
+.Cd "device vga"
+.Pp
+In
+.Pa /boot/device.hints :
+.Cd hint.vga.0.at="isa"
+.Sh DESCRIPTION
+The
+.Nm
+driver is a generic video card driver which provides access to
+video cards.
+This driver is required for the console driver
+.Xr syscons 4 .
+The console driver will call the
+.Nm
+driver to manipulate video hardware (changing video modes, loading font, etc).
+.Pp
+The
+.Nm
+driver supports the standard video cards: MDA, CGA, EGA and VGA.
+In
+addition, the driver can utilize VESA BIOS extensions if the video card
+supports them.
+VESA support can either be statically included in the kernel
+or can be loaded as a separate module.
+.Pp
+In order to statically link the VESA support to the kernel, the
+.Dv VESA
+option (see below) must be defined in the kernel configuration file.
+.Pp
+The
+.Nm vesa
+module can be dynamically loaded into the kernel using
+.Xr kldload 8 .
+.Sh DRIVER CONFIGURATION
+.Ss Kernel Configuration Options
+The following kernel configuration options
+(see
+.Xr config 8 )
+can be used to control the
+.Nm
+driver.
+These options provide compatibility with certain VGA cards.
+.Bl -tag -width MOUSE
+.It Dv VGA_ALT_SEQACCESS
+You may want to try this option if the mouse pointer is not drawn correctly
+or the font does not seem to be loaded properly on the VGA card.
+However, it may cause flicker on some systems.
+.It Dv VGA_SLOW_IOACCESS
+Older VGA cards may require this option for proper operation.
+It makes the driver perform byte-wide I/O to VGA registers and
+slow down a little.
+.It Dv VGA_WIDTH90
+This option enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60.
+These modes are not always supported by the video card and the display.
+It is highly likely that LCD display cannot work with these modes.
+.El
+.Pp
+The following options add optional features to the driver.
+.Bl -tag -width MOUSE
+.It Dv VESA
+Add VESA BIOS support to the driver.
+If the VGA card has the VESA BIOS extension 1.2 or later,
+this option will utilize the VESA BIOS service to switch to high
+resolution modes.
+.It Dv VESA_DEBUG=N
+Set the VESA support debug level to
+.Fa N .
+The default value is zero, which suppresses all debugging output.
+.El
+.Pp
+The following options will remove some features from the
+.Nm
+driver and save kernel memory.
+.Bl -tag -width MOUSE
+.It Dv VGA_NO_FONT_LOADING
+The
+.Nm
+driver can load software font to EGA and VGA cards.
+This option removes this feature.
+Note that if you use this option and
+still wish to use the mouse on the console then you must also use the
+.Dv SC_ALT_MOUSE_IMAGE
+option.
+See
+.Xr syscons 4 .
+.It Dv VGA_NO_MODE_CHANGE
+This option prevents the driver from changing video modes.
+.El
+.\".Sh FILES
+.Sh EXAMPLES
+Your kernel configuration should normally have:
+.Pp
+.Dl "device vga"
+.Pp
+And you need the following line in
+.Pa /boot/device.hints .
+.Pp
+.Dl hint.vga.0.at="isa"
+.Pp
+The following lines should be included in the kernel configuration file
+in order to enable the VESA BIOS Extension support.
+.Pp
+.Dl "options VESA"
+.Dl "device vga"
+.Pp
+If you do not want VESA support included in the kernel, but
+want to use occasionally, do not add the
+.Dv VESA
+option.
+And load the
+.Nm vesa
+module as desired:
+.Pp
+.Dl kldload vesa
+.\".Sh DIAGNOSTICS
+.\".Sh CAVEATS
+.\".Sh BUGS
+.Sh SEE ALSO
+.Xr vgl 3 ,
+.Xr syscons 4 ,
+.Xr config 8 ,
+.Xr kldload 8 ,
+.Xr kldunload 8
+.Sh STANDARDS
+.Rs
+.%T "VESA BIOS Extension (VBE)"
+.%A Video Electronics Standards Association
+.Re
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 3.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An S\(/oren Schmidt Aq sos@FreeBSD.org
+and
+.An Kazutaka Yokota Aq yokota@FreeBSD.org .
+This manual page was written by
+.An Kazutaka Yokota .
diff --git a/share/man/man4/vge.4 b/share/man/man4/vge.4
new file mode 100644
index 0000000..f8fd8f7
--- /dev/null
+++ b/share/man/man4/vge.4
@@ -0,0 +1,225 @@
+.\" Copyright (c) 2004
+.\" Bill Paul <wpaul@windriver.com>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 29, 2011
+.Dt VGE 4
+.Os
+.Sh NAME
+.Nm vge
+.Nd "VIA Networking Technologies Velocity Gigabit Ethernet adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device vge"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_vge_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for various NICs and embedded Ethernet interfaces
+based on the VIA Technologies VT6120, VT6122, VT6130 and VT6132 Velocity
+Family Gigabit Ethernet controller chips.
+.Pp
+The VT6120/VT6122 is a 33/66MHz 64-bit PCI device which combines a tri-speed
+MAC with an integrated 10/100/1000 copper PHY.
+(Some older cards use an external PHY.)
+The VT6130/VT6132 is the PCI express version of Velocity family.
+The MAC supports TCP/IP hardware
+checksums (IPv4 only), TCP large send, VLAN tag insertion and stripping,
+as well as VLAN filtering, a 64-entry CAM filter and a 64-entry VLAN filter,
+64-bit multicast hash filter, 4 separate transmit DMA queues, flow control
+and jumbo frames (not on VT6130/VT6132) up to 16K in size.
+The Velocity family controllers have a 16K receive FIFO and 48K transmit FIFO.
+.Pp
+The
+.Nm
+driver takes advantage of the controller's checksum offload and VLAN
+tagging features, as well as the jumbo frame (except VT6130/VT6132) and CAM
+filter support.
+The CAM filter is used for multicast address filtering to provide
+64 perfect multicast address filter support.
+If it is necessary for the interface to join more than 64 multicast
+groups, the driver will switch over to using the hash filter.
+.Pp
+The jumbo frame support can be enabled by setting the interface MTU
+to any value larger than the default of 1500 bytes, up to a maximum
+of 9000 bytes.
+Jumbo frames are disabled on the VT6130/VT6132 controllers because the TX
+MAC will hang when trying to send a frame that is larger than 4K.
+The receive and transmit checksum offload support
+can be toggled on and off using the
+.Xr ifconfig 8
+utility.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.It Cm 1000baseTX
+Set 1000baseTX operation over twisted pair.
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
+.Cm full-duplex
+or
+.Cm half-duplex
+modes.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports VIA Networking VT6120, VT6122, VT6130 and VT6132 based
+Gigabit Ethernet adapters including:
+.Pp
+.Bl -bullet -compact
+.It
+VIA Networking LAN-on-motherboard Gigabit Ethernet
+.It
+ZyXEL GN650-T 64-bit PCI Gigabit Ethernet NIC (ZX1701)
+.It
+ZyXEL GN670-T 32-bit PCI Gigabit Ethernet NIC (ZX1702)
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "xxxxxx"
+.It Va hw.vge.msi_disable
+This tunable disables MSI support on the Ethernet hardware.
+The default value is 0.
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width "xxxxxx"
+.It Va dev.vge.%d.int_holdoff
+Maximum number of time to delay interrupts.
+The valid range is 0 to 5100 in units of 1us, the default is
+150 (150us).
+The resolution of timer is about 20us so finer tuning than
+20us wouldn't be available.
+The interface should be brought down and up again before a change
+takes effect.
+.It Va dev.vge.%d.rx_coal_pkt
+Maximum number of packets to fire Rx completion interrupt.
+The valid range is 1 to 255, the default is 64.
+.It Va dev.vge.%d.tx_coal_pkt
+Maximum number of packets to fire Tx completion interrupt.
+The valid range is 1 to 255, the default is 128.
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "vge%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "vge%d: couldn't map ports"
+A fatal initialization error has occurred.
+.It "vge%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "vge%d: failed to enable memory mapping!"
+The driver failed to initialize PCI shared memory mapping.
+This might
+happen if the card is not in a bus-master slot.
+.It "vge%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 5.3 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@windriver.com .
diff --git a/share/man/man4/viapm.4 b/share/man/man4/viapm.4
new file mode 100644
index 0000000..851c1fc
--- /dev/null
+++ b/share/man/man4/viapm.4
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2002 Nicolas Souchu
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 20, 2002
+.Dt VIAPM 4
+.Os
+.Sh NAME
+.Nm viapm
+.Nd VIA chipsets Power Management controller driver
+.Sh SYNOPSIS
+.Cd device iicbb
+.Cd device iicbus
+.Cd device iicsmb
+.Cd device smbus
+.Cd device smb
+.Cd device viapm
+.Sh DESCRIPTION
+This driver provides access to the
+.Tn "VIA chipset Power Management Unit"
+family.
+They are
+VT82C586B, VT82C596A, VT82C596B, VT82C686A and VT8233.
+.Pp
+The embedded controller of the VIA chipset may give you access
+to the monitoring facilities of your mainboard.
+.Pp
+The 586B support is made by software whereas other controllers support
+the SMBus protocol by hardware.
+See
+.Xr smb 4
+for writing user code to fetch voltages, temperature and so on from the
+monitoring chip of your mainboard.
+.Sh SEE ALSO
+.Xr iicbb 4 ,
+.Xr iicbus 4 ,
+.Xr iicsmb 4 ,
+.Xr smb 4 ,
+.Xr smbus 4
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 4.5 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Nicolas Souchu Aq nsouch@FreeBSD.org .
+.Sh BUGS
+Only polling mode is supported.
diff --git a/share/man/man4/viawd.4 b/share/man/man4/viawd.4
new file mode 100644
index 0000000..47473cf
--- /dev/null
+++ b/share/man/man4/viawd.4
@@ -0,0 +1,79 @@
+.\"-
+.\" Copyright (c) 2011 Fabien Thomas <fabient@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS `AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 7, 2011
+.Dt VIAWD 4
+.Os
+.Sh NAME
+.Nm viawd
+.Nd device driver for VIA south bridge watchdog timer
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device viawd"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+viawd_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides
+.Xr watchdog 4
+support for the watchdog interrupt timer present on
+VIA south bridge chipset (VT8251, CX700, VX800, VX855, VX900).
+.Pp
+The VIA south bridge have a built-in watchdog timer,
+which can be enabled and disabled by user's program and set between
+1 to 1023 seconds.
+.Pp
+The
+.Nm
+driver when unloaded with running watchdog will reschedule the watchdog
+to 5 minutes.
+.Sh SEE ALSO
+.Xr watchdog 4 ,
+.Xr watchdog 8 ,
+.Xr watchdogd 8 ,
+.Xr watchdog 9
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver and this manual page were written by
+.An Fabien Thomas Aq fabient@FreeBSD.org .
diff --git a/share/man/man4/virtio.4 b/share/man/man4/virtio.4
new file mode 100644
index 0000000..10ebf20
--- /dev/null
+++ b/share/man/man4/virtio.4
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2011 Bryan Venteicher
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 22, 2012
+.Dt VIRTIO 4
+.Os
+.Sh NAME
+.Nm virtio
+.Nd VirtIO Device Support
+.Sh SYNOPSIS
+To compile VirtIO device support into the kernel, place the following lines
+in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device virtio"
+.Cd "device virtio_pci"
+.Ed
+.Pp
+Alternatively, to load VirtIO support as modules at boot time, place the
+following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+virtio_load="YES"
+virtio_pci_load="YES"
+.Ed
+.Sh DESCRIPTION
+VirtIO is a specification for para-virtualized I/O in a virtual machine (VM).
+Traditionally, the hypervisor emulated real devices such as an Ethernet
+interface or disk controller to provide the VM with I/O.
+This emulation is often inefficient.
+.Pp
+VirtIO defines an interface for efficient I/O between the hypervisor and VM.
+The
+.Nm
+module provides a shared memory transport called a virtqueue.
+The
+.Xr virtio_pci
+device driver represents an emulated PCI device that the hypervisor makes
+available to the VM.
+This device provides the probing, configuration, and
+interrupt notifications needed to interact with the hypervisor.
+.Fx
+supports the following VirtIO devices:
+.Bl -hang -offset indent -width xxxxxxxx
+.It Nm Ethernet
+An emulated Ethernet device is provided by the
+.Xr vtnet 4
+device driver.
+.It Nm Block
+An emulated disk controller is provided by the
+.Xr virtio_blk 4
+device driver.
+.It Nm SCSI
+An emulated SCSI HBA is provided by the
+.Xr virtio_scsi 4
+device driver.
+.It Nm Balloon
+A pseudo-device to allow the VM to release memory back to the hypervisor is
+provided by the
+.Xr virtio_balloon 4
+device driver.
+.El
+.Sh SEE ALSO
+.Xr virtio_balloon 4 ,
+.Xr virtio_blk 4 ,
+.Xr virtio_scsi 4 ,
+.Xr vtnet 4
+.Sh HISTORY
+Support for VirtIO first appeared in
+.Fx 9.0 .
+.Sh AUTHORS
+.An -nosplit
+.Fx
+support for VirtIO was first added by
+.An Bryan Venteicher Aq bryanv@FreeBSD.org .
diff --git a/share/man/man4/virtio_balloon.4 b/share/man/man4/virtio_balloon.4
new file mode 100644
index 0000000..450b5cd
--- /dev/null
+++ b/share/man/man4/virtio_balloon.4
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2011 Bryan Venteicher
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 22, 2012
+.Dt VIRTIO_BALLOON 4
+.Os
+.Sh NAME
+.Nm virtio_balloon
+.Nd VirtIO Memory Balloon driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device virtio_balloon"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+virtio_balloon_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for VirtIO memory balloon devices.
+.Pp
+The memory balloon allows the guest to, at the request of the
+hypervisor, return memory allocated to the hypervisor so it can
+be made available to other guests.
+The hypervisor can later signal the balloon to return the memory.
+.Sh SEE ALSO
+.Xr virtio 4
+.Sh HISTORY
+The
+.Nm
+driver was written by
+.An Bryan Venteicher Aq bryanv@FreeBSD.org .
+It first appeared in
+.Fx 9.0 .
diff --git a/share/man/man4/virtio_blk.4 b/share/man/man4/virtio_blk.4
new file mode 100644
index 0000000..eb5fded
--- /dev/null
+++ b/share/man/man4/virtio_blk.4
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2011 Bryan Venteicher
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 2, 2013
+.Dt VIRTIO_BLK 4
+.Os
+.Sh NAME
+.Nm virtio_blk
+.Nd VirtIO Block driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device virtio_blk"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+virtio_blk_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for VirtIO block devices.
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va hw.vtblk.no_ident
+.It Va hw.vtblk. Ns Ar X Ns Va .no_ident
+.Pp
+These tunables disable retrieving the device identification string
+from the hypervisor either globally or per-device.
+The default value is 0.
+.It Va hw.vtblk.writecache_mode
+.It Va hw.vtblk. Ns Ar X Ns Va .writecache_mode
+.Pp
+These tunables determine the write cache mode globally or per-device.
+The mode can changed only if the ConfigWCE feature is negotiated.
+Set to 0 for writethrough mode, 1 for writeback mode, and -1 to leave
+it as-is.
+The default value is to leave as-is.
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as
+.Xr sysctl 8
+variables.
+.Bl -tag -width indent
+.It Va dev.vtblk. Ns Ar X Ns Va .writecache_mode
+.Pp
+The write cache mode of the device can be either writethrough (0) or
+writeback (1).
+If the ConfigWCE feature is negotiated, the write cache mode can
+be toggled between writethrough and writeback.
+.El
+.Sh SEE ALSO
+.Xr virtio 4
+.Sh HISTORY
+The
+.Nm
+driver was written by
+.An Bryan Venteicher Aq bryanv@FreeBSD.org .
+It first appeared in
+.Fx 9.0 .
diff --git a/share/man/man4/virtio_random.4 b/share/man/man4/virtio_random.4
new file mode 100644
index 0000000..a20e868
--- /dev/null
+++ b/share/man/man4/virtio_random.4
@@ -0,0 +1,61 @@
+.\" Copyright (c) 2013 Bryan Venteicher
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 28, 2013
+.Dt VIRTIO_RANDOM 4
+.Os
+.Sh NAME
+.Nm virtio_random
+.Nd VirtIO Entropy driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device virtio_random"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+virtio_random_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for VirtIO entropy devices.
+.Pp
+The entropy device supplies high-quality randomness from the
+hypervisor to the guest.
+.Sh SEE ALSO
+.Xr random 4
+.Xr virtio 4
+.Sh HISTORY
+The
+.Nm
+driver was written by
+.An Bryan Venteicher Aq bryanv@FreeBSD.org .
diff --git a/share/man/man4/virtio_scsi.4 b/share/man/man4/virtio_scsi.4
new file mode 100644
index 0000000..b136de6
--- /dev/null
+++ b/share/man/man4/virtio_scsi.4
@@ -0,0 +1,92 @@
+.\" Copyright (c) 2012 Bryan Venteicher
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 24, 2012
+.Dt VIRTIO_SCSI 4
+.Os
+.Sh NAME
+.Nm virtio_scsi
+.Nd VirtIO SCSI driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device virtio_scsi"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+virtio_scsi_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for VirtIO SCSI devices.
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "xxxxxx"
+.It Va hw.vtscsi.bus_reset_disable
+In the initial QEMU release with VirtIO SCSI support, in-flight
+operations were not aborted when stopping the device, rendering
+bus reset ineffective. This tunable disables attempts to issue
+reset bus commands. The default value is 1.
+.El
+.Sh DEBUGGING
+To enable debugging prints from the
+.Nm
+driver, set the
+.Bd -literal -offset indent
+hw.vtscsi.X.debug_level
+.Ed
+.Pp
+variable, where X is the adapter number, either in
+.Xr loader.conf 5
+or via
+.Xr sysctl 8 .
+The following bits have the described effects:
+.Bl -tag -width 6n -offset indent
+.It 0x01
+Enable informational prints.
+.It 0x02
+Enable prints for driver errors.
+.It 0x04
+Enable tracing prints.
+.El
+.Sh SEE ALSO
+.Xr virtio 4
+.Sh HISTORY
+The
+.Nm
+driver was written by
+.An Bryan Venteicher Aq bryanv@FreeBSD.org .
+It first appeared in
+.Fx 10.0 .
diff --git a/share/man/man4/vkbd.4 b/share/man/man4/vkbd.4
new file mode 100644
index 0000000..debdd3e
--- /dev/null
+++ b/share/man/man4/vkbd.4
@@ -0,0 +1,153 @@
+.\" $Id: vkbd.4,v 1.4 2004/11/16 16:49:39 max Exp $
+.\" $FreeBSD$
+.\"
+.Dd August 12, 2004
+.Dt VKBD 4
+.Os
+.Sh NAME
+.Nm vkbd
+.Nd the virtual AT keyboard interface
+.Sh SYNOPSIS
+.Cd "device vkbd"
+.Sh DESCRIPTION
+The
+.Nm
+interface is a software loopback mechanism that can be loosely
+described as the virtual AT keyboard analog of the
+.Xr pty 4 ,
+that is,
+.Nm
+does for virtual AT keyboards what the
+.Xr pty 4
+driver does for terminals.
+.Pp
+The
+.Nm
+driver, like the
+.Xr pty 4
+driver, provides two interfaces: a keyboard interface like the usual
+facility it is simulating (a virtual AT keyboard in the case of
+.Nm ,
+or a terminal for
+.Xr pty 4 ) ,
+and a character-special device
+.Dq control
+interface.
+.Pp
+The virtual AT keyboards are named
+.Pa vkbd0 , vkbd1 ,
+etc., one for each control device that has been opened.
+.Pp
+The
+.Nm
+interface permits opens on the special control device
+.Pa /dev/vkbdctl .
+When this device is opened,
+.Nm
+will return a handle for the lowest unused
+.Pa vkbdctl
+device (use
+.Xr devname 3
+to determine which).
+.Pp
+Each virtual AT keyboard supports the usual keyboard interface
+.Xr ioctl 2 Ns s ,
+and thus can be used with
+.Xr kbdcontrol 1
+like any other keyboard.
+The control device supports exactly the same
+.Xr ioctl 2 Ns s
+as the virtual AT keyboard device.
+Writing AT scan codes to the control device generates an input on
+the virtual AT keyboard, as if the
+(non-existent)
+hardware had just received it.
+.Pp
+The virtual AT keyboard control device, normally
+.Pa /dev/vkbdctl Ns Aq Ar N ,
+is exclusive-open
+(it cannot be opened if it is already open)
+and is restricted to the super-user.
+A
+.Xr read 2
+call will return the virtual AT keyboard status structure
+(defined in
+.In dev/vkbd/vkbd_var.h )
+if one is available;
+if not, it will either block until one is or return
+.Er EWOULDBLOCK ,
+depending on whether non-blocking I/O has been enabled.
+.Pp
+A
+.Xr write 2
+call passes AT scan codes to be
+.Dq received
+from the virtual AT keyboard.
+Each AT scan code must be passed as
+.Vt "unsigned int" .
+Although AT scan codes must be passes as
+.Vt "unsigned int" Ns s ,
+the size of the buffer passed to
+.Xr write 2
+still should be in bytes, i.e.,
+.Bd -literal -offset indent
+static unsigned int codes[] =
+{
+/* Make Break */
+ 0x1e, 0x9e
+};
+
+int
+main(void)
+{
+ int fd, len;
+
+ fd = open("/dev/vkbdctl0", O_RDWR);
+ if (fd < 0)
+ err(1, "open");
+
+ /* Note sizeof(codes) - not 2! */
+ len = write(fd, codes, sizeof(codes));
+ if (len < 0)
+ err(1, "write");
+
+ close(fd);
+
+ return (0);
+}
+.Ed
+.Pp
+Write will block if there is not enough space in the input queue.
+.Pp
+The control device also supports
+.Xr select 2
+for read and write.
+.Pp
+On the last close of the control device, the virtual AT keyboard is removed.
+All queued scan codes are thrown away.
+.Sh SEE ALSO
+.Xr kbdcontrol 1 ,
+.Xr atkbdc 4 ,
+.Xr psm 4 ,
+.Xr syscons 4
+.Sh HISTORY
+The
+.Nm
+module was implemented in
+.Fx 6.0 .
+.Sh AUTHORS
+.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com
+.Sh CAVEATS
+The
+.Nm
+interface is a software loopback mechanism, and, thus
+.Xr ddb 4
+will not work with it.
+Current implementation of the
+.Xr syscons 4
+driver can accept input from only one keyboard, even if it is virtual.
+Thus it is not possible to have both wired and virtual keyboard to be active
+at the same time.
+It is, however, in principal possible to obtain AT scan
+codes from the different sources and write them into the same virtual keyboard.
+The virtual keyboard state synchronization is the user's responsibility.
diff --git a/share/man/man4/vlan.4 b/share/man/man4/vlan.4
new file mode 100644
index 0000000..efdae27
--- /dev/null
+++ b/share/man/man4/vlan.4
@@ -0,0 +1,207 @@
+.\"
+.\" Copyright (c) 2001 Yar Tikhiy
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 4, 2012
+.Dt VLAN 4
+.Os
+.Sh NAME
+.Nm vlan
+.Nd "IEEE 802.1Q VLAN network interface"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device vlan"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_vlan_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver demultiplexes frames tagged according to
+the IEEE 802.1Q standard into logical
+.Nm
+network interfaces, which allows routing/bridging between
+multiple VLANs through a single switch trunk port.
+.Pp
+Each
+.Nm
+interface is created at runtime using interface cloning.
+This is
+most easily done with the
+.Xr ifconfig 8
+.Cm create
+command or using the
+.Va cloned_interfaces
+variable in
+.Xr rc.conf 5 .
+.Pp
+To function, a
+.Nm
+interface must be assigned a parent interface and
+numeric VLAN tag using
+.Xr ifconfig 8 .
+A single parent can be assigned to multiple
+.Nm
+interfaces provided they have different tags.
+The parent interface is likely to be an Ethernet card connected
+to a properly configured switch port.
+The VLAN tag should match one of those set up in the switched
+network.
+.Pp
+.Nm
+initially assumes the same minimum length for tagged and untagged frames.
+This mode is selected by setting the
+.Xr sysctl 8
+variable
+.Va net.link.vlan.soft_pad
+to 0
+.Pq default .
+However, there are network devices that fail to adjust frame length
+when it falls below the allowed minimum due to untagging.
+Such devices should be able to interoperate with
+.Nm
+after changing the value of
+.Va net.link.vlan.soft_pad
+to 1.
+In the latter mode,
+.Nm
+will pad short frames before tagging them
+so that their length is not less than the minimum value
+after untagging by the non-compliant devices.
+.Sh HARDWARE
+The
+.Nm
+driver supports efficient operation over parent interfaces that can provide
+help in processing VLANs.
+Such interfaces are automatically recognized by their capabilities.
+Depending on the level of sophistication found in a physical
+interface, it may do full VLAN processing or just be able to
+receive and transmit long frames (up to 1522 bytes including an Ethernet
+header and FCS).
+The capabilities may be user-controlled by the respective parameters to
+.Xr ifconfig 8 ,
+.Cm vlanhwtag ,
+and
+.Cm vlanmtu .
+However, a physical interface is not obliged to react to them:
+It may have either capability enabled permanently without
+a way to turn it off.
+The whole issue is very specific to a particular device and its driver.
+.Pp
+At present, these devices are capable of full VLAN processing
+in hardware:
+.Xr ae 4 ,
+.Xr age 4 ,
+.Xr alc 4 ,
+.Xr ale 4 ,
+.Xr bce 4 ,
+.Xr bge 4 ,
+.Xr bxe 4 ,
+.Xr cxgb 4 ,
+.Xr cxgbe 4 ,
+.Xr em 4 ,
+.Xr igb 4 ,
+.Xr ixgb 4 ,
+.Xr ixgbe 4 ,
+.Xr jme 4 ,
+.Xr msk 4 ,
+.Xr mxge 4 ,
+.Xr nxge 4 ,
+.Xr nge 4 ,
+.Xr re 4 ,
+.Xr sge 4 ,
+.Xr stge 4 ,
+.Xr ti 4 ,
+.Xr txp 4 ,
+and
+.Xr vge 4 .
+.Pp
+Other Ethernet interfaces can run VLANs using software emulation in the
+.Nm
+driver.
+However, some lack the capability
+of transmitting and receiving long frames.
+Assigning such an interface as the parent to
+.Nm
+will result in a reduced MTU on the corresponding
+.Nm
+interfaces.
+In the modern Internet, this is likely to cause
+.Xr tcp 4
+connectivity problems due to massive, inadequate
+.Xr icmp 4
+filtering that breaks the Path MTU Discovery mechanism.
+.Pp
+These interfaces natively support long frames for
+.Nm :
+.Xr axe 4 ,
+.Xr bfe 4 ,
+.Xr cas 4 ,
+.Xr dc 4 ,
+.Xr et 4 ,
+.Xr fwe 4 ,
+.Xr fxp 4 ,
+.Xr gem 4 ,
+.Xr hme 4 ,
+.Xr le 4 ,
+.Xr nfe 4 ,
+.Xr rl 4 ,
+.Xr sf 4 ,
+.Xr sis 4 ,
+.Xr sk 4 ,
+.Xr ste 4 ,
+.Xr tl 4 ,
+.Xr tx 4 ,
+.Xr vr 4 ,
+.Xr vte 4 ,
+and
+.Xr xl 4 .
+.Pp
+The
+.Nm
+driver automatically recognizes devices that natively support long frames
+for
+.Nm
+use and calculates the appropriate frame MTU based on the
+capabilities of the parent interface.
+Some other interfaces not listed above may handle long frames,
+but they do not advertise this ability.
+The MTU setting on
+.Nm
+can be corrected manually if used in conjunction with such a parent interface.
+.Sh SEE ALSO
+.Xr ifconfig 8 ,
+.Xr sysctl 8
+.Sh BUGS
+No 802.1Q features except VLAN tagging are implemented.
diff --git a/share/man/man4/vmx.4 b/share/man/man4/vmx.4
new file mode 100644
index 0000000..0598aa8
--- /dev/null
+++ b/share/man/man4/vmx.4
@@ -0,0 +1,155 @@
+.\"
+.\" Copyright (c) 2006,2013 Reyk Floeter <reyk@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\" $OpenBSD: src/share/man/man4/vmx.4,v 1.1 2013/05/31 20:18:44 reyk Exp $
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 17, 2014
+.Dt VMX 4
+.Os
+.Sh NAME
+.Nm vmx
+.Nd VMware VMXNET3 Virtual Interface Controller device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device vmx"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_vmx_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the VMXNET3 virtual NIC available in virtual
+machines by VMware.
+It appears as a simple Ethernet device but is actually a virtual network
+interface to the underlying host operating system.
+.Pp
+This driver supports the
+.Ic VMXNET3
+driver protocol, as an alternative to the emulated
+.Xr pcn 4 ,
+.Xr em 4
+interfaces also available in the VMware environment.
+The
+.Nm
+driver is optimized for the virtual machine, it can provide advanced
+capabilities depending on the underlying host operating system and
+the physical network interface controller of the host.
+The
+.Nm
+driver supports features like multiqueue support, IPv6
+checksum offloading, MSI/MSI-X support and hardware VLAN tagging in
+VMware's VLAN Guest Tagging (VGT) mode.
+.Pp
+The
+.Nm
+driver supports VMXNET3 VMware virtual NICs provided by the virtual
+machine hardware version 7 or newer, as provided by the following
+products:
+.Pp
+.Bl -bullet -compact -offset indent
+.It
+VMware ESX/ESXi 4.0 and newer
+.It
+VMware Server 2.0 and newer
+.It
+VMware Workstation 6.5 and newer
+.It
+VMware Fusion 2.0 and newer
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh MULTIPLE QUEUES
+The
+.Nm
+driver supports multiple transmit and receive queues.
+Multiple queues are only supported by certain VMware products, such as ESXi.
+The number of queues allocated depends on the presence of MSI-X,
+the number of configured CPUs,
+and the tunables listed below.
+.Fx
+does not enable MSI-X support on VMware by default.
+The
+.Va hw.pci.honor_msi_blacklist
+tunable must be disabled to enable MSI-X support.
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va hw.vmx.txnqueue
+.It Va hw.vmx. Ns Ar X Ns Va .txnqueue
+Maximum number of transmit queues allocated by default by the driver.
+The default value is 8.
+The maximum supported by the VMXNET3 virtual NIC is 8.
+.It Va hw.vmx.rxnqueue
+.It Va hw.vmx. Ns Ar X Ns Va .rxnqueue
+Maximum number of receive queues allocated by default by the driver.
+The default value is 8.
+The maximum supported by the VMXNET3 virtual NIC is 16.
+.It Va hw.vmx.txndesc
+.It Va hw.vmx. Ns Ar X Ns Va .txndesc
+.Pp
+Number of transmit descriptors allocated by the driver.
+The default value is 512.
+The value must be a multiple of 32, and the maximum is 4096.
+.It Va hw.vmx.rxndesc
+.It Va hw.vmx. Ns Ar X Ns Va .rxndesc
+.Pp
+Number of receive descriptors per ring allocated by the driver.
+The default value is 256.
+The value must be a multiple of 32, and the maximum is 2048.
+There are two rings so the actual usage is doubled.
+.El
+.Sh EXAMPLES
+The following entry must be added to the VMware configuration file
+to provide the
+.Nm
+device:
+.Bd -literal -offset indent
+ethernet0.virtualDev = "vmxnet3"
+.Ed
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr em 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr pcn 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was ported from
+.Ox
+and significantly rewritten by
+.An Bryan Venteicher Aq bryanv@freebsd.org .
+The
+.Ox
+driver was written by
+.An Tsubai Masanari .
diff --git a/share/man/man4/vpo.4 b/share/man/man4/vpo.4
new file mode 100644
index 0000000..722a18f
--- /dev/null
+++ b/share/man/man4/vpo.4
@@ -0,0 +1,105 @@
+.\" Copyright (c) 1998, 1999, Nicolas Souchu
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 14, 2004
+.Dt VPO 4
+.Os
+.Sh NAME
+.Nm vpo
+.Nd parallel to SCSI interface driver
+.Sh SYNOPSIS
+.Cd "device vpo"
+.Pp
+For one or more SCSI busses:
+.Cd "device scbus"
+.Sh DESCRIPTION
+The
+.Nm
+driver provide access to parallel port Iomega Zip and Jaz drives.
+.Sh HARDWARE
+The
+.Nm
+driver supports the following parallel to SCSI interfaces:
+.Pp
+.Bl -bullet -compact
+.It
+Adaptec AIC-7110 Parallel to SCSI interface (built-in to Iomega ZIP
+drives)
+.It
+Iomega Jaz Traveller interface
+.It
+Iomega MatchMaker SCSI interface (built-in to Iomega ZIP+ drives)
+.El
+.Sh USAGE
+The driver should let you use a printer connected to the drive while
+transferring data.
+.Pp
+DOS and
+.Fx
+file systems are supported.
+When mounting a DOS file system or
+formatting a
+.Fx
+file system, check the slice of the disk with the
+.Xr fdisk 8
+utility.
+.Pp
+In order to unixify a ZIP disk, put the following in /etc/disktab:
+.Bd -literal
+zip|zip 100:\\
+ :ty=removable:se#512:nc#96:nt#64:ns#32:\\
+ :pa#196608:oa#0:ba#4096:fa#512:\\
+ :pb#196608:ob#0:bb#4096:fb#512:\\
+ :pc#196608:oc#0:bc#4096:fc#512:
+.Ed
+.Pp
+and use
+.Xr bsdlabel 8 .
+.Pp
+If you have trouble with your driver, your parallel chipset may not run
+properly at the detected mode (NIBBLE, PS2 or EPP).
+Tune the
+.Xr ppc 4
+bootflags to force other modes.
+.Sh SEE ALSO
+.Xr da 4 ,
+.Xr lpt 4 ,
+.Xr ppbus 4 ,
+.Xr ppc 4 ,
+.Xr scsi 4
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+This
+manual page was written by
+.An Nicolas Souchu .
+.Sh BUGS
+During boot, the driver first tries to detect a classic ZIP, then a ZIP+.
+The ZIP+ detection is intrusive and may send erroneous characters to your
+printer if the drive is not connected to your parallel port.
diff --git a/share/man/man4/vr.4 b/share/man/man4/vr.4
new file mode 100644
index 0000000..1390cc9
--- /dev/null
+++ b/share/man/man4/vr.4
@@ -0,0 +1,217 @@
+.\" Copyright (c) 1997, 1998
+.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 25, 2012
+.Dt VR 4
+.Os
+.Sh NAME
+.Nm vr
+.Nd "VIA Technologies Rhine I/II/III Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device vr"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_vr_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Ethernet adapters and embedded
+controllers based on the VIA Technologies VT3043 Rhine I,
+VT86C100A Rhine II, and VT6105/VT6105M Rhine III Fast Ethernet
+controller chips.
+.Pp
+The VIA Rhine chips use bus master DMA and have a descriptor layout
+designed to resemble that of the DEC 21x4x
+.Dq tulip
+chips.
+The register
+layout is different however and the receive filter in the Rhine chips
+is much simpler and is programmed through registers rather than by
+downloading a special setup frame through the transmit DMA engine.
+Transmit and receive DMA buffers must be longword
+aligned.
+The Rhine chips are meant to be interfaced with external
+physical layer devices via an MII bus.
+They support both
+10 and 100Mbps speeds in either full or half duplex.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to the
+.Pa /etc/rc.conf
+file.
+.It 10baseT/UTP
+Set 10Mbps operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.It 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It full-duplex
+Force full duplex operation.
+.It half-duplex
+Force half duplex operation.
+.El
+.Pp
+Note that the 100baseTX media type is only available if supported
+by the adapter.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports VIA Technologies Rhine I, Rhine II, and Rhine III based
+Fast Ethernet adapters including:
+.Pp
+.Bl -bullet -compact
+.It
+AOpen/Acer ALN-320
+.It
+D-Link DFE520-TX
+.It
+D-Link DFE530-TX
+.It
+Hawking Technologies PN102TX
+.It
+Soekris Engineering net5501
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as
+.Xr sysctl 8
+variables:
+.Bl -tag -width indent
+.It Va dev.vr.%d.stats
+Display lots of useful MAC counters maintained in the driver.
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "vr%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "vr%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "vr%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.It "vr%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.It "vr%d: no memory for tx list"
+The driver failed to allocate an mbuf for the transmitter ring when
+allocating a pad buffer or collapsing an mbuf chain into a cluster.
+.It "vr%d: chip is in D3 power state -- setting to D0"
+This message applies only to adapters which support power
+management.
+Some operating systems place the controller in low power
+mode when shutting down, and some PCI BIOSes fail to bring the chip
+out of this state before configuring it.
+The controller loses all of
+its PCI configuration in the D3 state, so if the BIOS does not set
+it back to full power mode in time, it will not be able to configure it
+correctly.
+The driver tries to detect this condition and bring
+the adapter back to the D0 (full power) state, but this may not be
+enough to return the driver to a fully operational condition.
+If
+you see this message at boot time and the driver fails to attach
+the device as a network interface, you will have to perform second
+warm boot to have the device properly configured.
+.Pp
+Note that this condition only occurs when warm booting from another
+operating system.
+If you power down your system prior to booting
+.Fx ,
+the card should be configured correctly.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr polling 4 ,
+.Xr ifconfig 8
+.Rs
+.%T The VIA Technologies VT86C100A data sheet
+.%U http://www.via.com.tw
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ctr.columbia.edu .
+.Sh BUGS
+The
+.Nm
+driver always copies transmit mbuf chains into longword-aligned
+buffers prior to transmission in order to pacify the Rhine chips.
+If buffers are not aligned correctly, the chip will round the
+supplied buffer address and begin DMAing from the wrong location.
+This buffer copying impairs transmit performance on slower systems but cannot
+be avoided.
+On faster machines (e.g.\& a Pentium II), the performance
+impact is much less noticeable.
diff --git a/share/man/man4/vt.4 b/share/man/man4/vt.4
new file mode 100644
index 0000000..10be590
--- /dev/null
+++ b/share/man/man4/vt.4
@@ -0,0 +1,230 @@
+.\" Copyright (c) 2014 Warren Block
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 9, 2014
+.Dt "VIRTUAL TERMINALS" 4
+.Os
+.Sh NAME
+.Nm vt
+.Nd virtual terminal console driver
+.Sh SYNOPSIS
+.Cd "options VT_MAXWINDOWS=N"
+.Cd "options VT_ALT_TO_ESC_HACK=1"
+.Cd "options VT_TWOBUTTON_MOUSE"
+.Cd "options VT_FB_DEFAULT_WIDTH=X"
+.Cd "options VT_FB_DEFAULT_HEIGHT=Y"
+.Cd "options SC_NO_CUTPASTE"
+.Cd "options SC_NO_SYSMOUSE"
+.Cd "device vt"
+.Pp
+In
+.Xr loader.conf 5 :
+.Cd hw.vga.textmode=1
+.Sh DESCRIPTION
+The
+.Nm
+device provides multiple virtual terminals with an extensive feature
+set:
+.Bl -item -offset indent
+.It
+Unicode UTF-8 text with double-width characters.
+.It
+Large font maps in graphics mode, including support for Asian
+character sets.
+.It
+Graphics-mode consoles.
+.It
+Integration with
+KMS
+.Pq Kernel Mode Setting
+video drivers for switching between the
+.Em X Window System
+and virtual terminals.
+.El
+.Ss Virtual Terminals
+Multiple virtual terminals are provided on a single computer.
+Up to sixteen virtual terminals can be defined.
+A single virtual terminal is connected to the screen and keyboard
+at a time.
+Key combinations are used to select a virtual terminal.
+Alt-F1 through Alt-F12 correspond to the first twelve virtual terminals.
+If more than twelve virtual terminals are created, Shift-Alt-F1 through
+Shift-Alt-F4 are used to switch to the additional terminals.
+.Ss Copying and Pasting Text with a Mouse
+Copying and pasting text from the screen with a mouse is supported.
+Press and hold down mouse button 1, usually the left button, while
+moving the mouse to select text.
+Selected text is highlighted with reversed foreground and background
+colors.
+To select more text after releasing mouse button 1, press mouse button
+3, usually the right button.
+To paste text that has been selected, press mouse button 2, usually the
+middle button.
+The text is entered as if it were typed at the keyboard.
+The
+.Dv VT_TWOBUTTON_MOUSE
+kernel option can be used with mice that only have two buttons.
+Setting this option makes the second mouse button into the
+paste button.
+See
+.Xr moused 8
+for more information.
+.Ss Scrolling Back
+Output that has scrolled off the screen can be reviewed by pressing the
+Scroll Lock key, then scrolling up and down with the arrow keys.
+The Page Up and Page Down keys scroll up or down a full screen at a
+time.
+The Home and End keys jump to the beginning or end of the scrollback
+buffer.
+When finished reviewing, press the Scroll Lock key again to return to
+normal use.
+.Sh DRIVER CONFIGURATION
+.Ss Kernel Configuration Options
+These kernel options control the
+.Nm
+driver.
+.Bl -tag -width MAXCONS
+.It Dv VT_MAXWINDOWS=N
+Set the number of virtual terminals to be created to
+.Fa N .
+The value defaults to 12.
+.It Dv VT_ALT_TO_ESC_HACK=1
+When the Alt key is held down while pressing another key, send an ESC
+sequence instead of the Alt key.
+.It Dv VT_TWOBUTTON_MOUSE
+If defined, swap the functions of mouse buttons 2 and 3.
+In effect, this makes the right-hand mouse button perform a paste.
+These options are checked in the order shown.
+.It Dv SC_NO_CUTPASTE
+Disable mouse support.
+.It VT_FB_DEFAULT_WIDTH=X
+Set the default width to
+.Fa X .
+.It VT_FB_DEFAULT_HEIGHT=Y
+Set the default height to
+.Fa Y .
+.El
+.Sh BACKWARDS COMPATIBILITY
+Several options are provided for compatibility with the previous
+console device,
+.Xr sc 4 .
+These options will be removed in a future
+.Fx
+version.
+.Bl -column -offset indent ".Sy vt VT_TWOBUTTON_MOUSE" ".Sy SC_TWOBUTTON_MOUSE"
+.It Sy vt Option Name Ta Sy sc Option Name
+.It Dv VT_TWOBUTTON_MOUSE Ta Dv SC_TWOBUTTON_MOUSE
+.It Dv VT_MAXWINDOWS Ta Dv MAXCONS
+.It none Ta Dv SC_NO_CUTPASTE
+.It none Ta Dv SC_NO_SYSMOUSE
+.El
+.Sh START-UP OPERATION WITH X86 BIOS SYSTEMS
+The computer BIOS starts in text mode, and
+the
+.Fx
+.Xr loader 8
+runs, loading the kernel.
+If
+.Va hw.vga.textmode
+is set, the system remains in text mode.
+Otherwise,
+.Nm
+switches to 640x480x16 VGA mode using
+.Fn vt_vga .
+If a KMS
+.Pq Kernel Mode Switching
+video driver is available, the display is switched to high resolution
+and the KMS driver takes over.
+When a KMS driver is not available,
+.Fn vt_vga
+remains active.
+.Sh LOADER TUNABLES
+These settings can be entered at the
+.Xr loader 8
+prompt or in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va hw.vga.textmode
+Set to 1 to use virtual terminals in text mode instead of graphics mode.
+Features that require graphics mode, like loadable fonts, will be
+disabled.
+.El
+.Sh FILES
+.Bl -tag -width /usr/share/syscons/keymaps/* -compact
+.It Pa /dev/console
+.It Pa /dev/consolectl
+.It Pa /dev/ttyv*
+virtual terminals
+.It Pa /etc/ttys
+terminal initialization information
+.El
+.Sh SEE ALSO
+.Xr kbdcontrol 1 ,
+.Xr login 1 ,
+.Xr vidcontrol 1 ,
+.Xr atkbd 4 ,
+.Xr atkbdc 4 ,
+.Xr keyboard 4 ,
+.Xr screen 4 ,
+.Xr splash 4 ,
+.Xr syscons 4 ,
+.Xr ukbd 4 ,
+.Xr vga 4 ,
+.Xr kbdmap 5 ,
+.Xr rc.conf 5 ,
+.Xr ttys 5 ,
+.Xr config 8 ,
+.Xr getty 8 ,
+.Xr kbdmux 8 ,
+.Xr kldload 8 ,
+.Xr moused 8
+.\" WB: to be uncommented when an actual release contains vt(4)
+.\" .Sh HISTORY
+.\" The
+.\" Nm
+.\" driver first appeared in
+.\" .Fx 9.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was developed by
+.An Ed Schouten Aq ed@FreeBSD.org ,
+.An Ed Maste Aq emaste@FreeBSD.org ,
+and
+.An Aleksandr Rybalko Aq ray@FreeBSD.org ,
+with sponsorship provided by the
+.Fx
+Foundation.
+This manual page was written by
+.An Warren Block <wblock@FreeBSD.org>.
+.Sh CAVEATS
+Paste buffer size is limited by the system value
+.Brq Dv MAX_INPUT ,
+the number of bytes that can be stored in the terminal
+input queue, usually 1024 bytes
+(see
+.Xr termios 4 ) .
diff --git a/share/man/man4/vte.4 b/share/man/man4/vte.4
new file mode 100644
index 0000000..18b39d0
--- /dev/null
+++ b/share/man/man4/vte.4
@@ -0,0 +1,152 @@
+.\" Copyright (c) 2010 Pyun YongHyeon
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 30, 2010
+.Dt VTE 4
+.Os
+.Sh NAME
+.Nm vte
+.Nd Vortex86 RDC R6040 Fast Ethernet driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device vte"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_vte_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for RDC R6040 Fast Ethernet controller
+which is commonly found on Vortex86 System On a Chip (SoC).
+.Pp
+The RDC R6040 has integrated 10/100 PHY for 10/100Mbps support in full
+or half-duplex.
+The controller supports interrupt moderation mechanism, a 64-bit multicast
+hash filter, VLAN over-size frame and four station addresses.
+The
+.Nm
+device driver uses three station addresses out of four as perfect
+multicast filter.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm 10baseT/UTP"
+.It Cm autoselect
+Enable autoselection of the media type and options.
+The user can manually override
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
+.It Cm 10baseT/UTP
+Set 10Mbps operation.
+.It Cm 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width ".Cm full-duplex"
+.It Cm full-duplex
+Force full duplex operation.
+.It Cm half-duplex
+Force half duplex operation.
+.El
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+device driver provides support for the following Ethernet controllers:
+.Pp
+.Bl -bullet -compact
+.It
+DM&P Vortex86 RDC R6040 Fast Ethernet controller
+.El
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "xxxxxx"
+.It Va hw.vte.tx_deep_copy
+The RDC R6040 controller has no auto-padding support for short
+frames and the controller's DMA engine does not have capability to
+handle multiple buffers for a TX frame such that driver has to
+create a single contiguous TX buffer.
+This hardware limitation leads to poor TX performance since most of
+CPU cycles are wasted on both de-fragmenting mbuf chains and padding.
+This tunable enables deep copy operation for TX frames such that
+driver will spend less CPU cycles in de-fragmentation with the
+cost of extra TX buffer memory.
+The default value is 1 to use deep copy.
+.El
+.Sh SYSCTL VARIABLES
+The following variables are available as both
+.Xr sysctl 8
+variables and
+.Xr loader 8
+tunables:
+.Bl -tag -width "xxxxxx"
+.It Va dev.vte.%d.rx_mod
+Maximum number of packets to fire RX completion interrupt.
+The accepted range is 0 to 15, the default is 15.
+.It Va dev.vte.%d.tx_mod
+Maximum number of packets to fire TX completion interrupt.
+The accepted range is 0 to 15, the default is 15.
+.It Va dev.vte.%d.stats
+Show hardware MAC statistics maintained in driver.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Rs
+.%T "DM&P Electronics Inc. Vortex86"
+.%U http://www.dmp.com.tw
+.Re
+.Sh HISTORY
+The
+.Nm
+driver was written by
+.An Pyun YongHyeon
+.Aq yongari@FreeBSD.org .
+It first appeared in
+.Fx 8.3 .
diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4
new file mode 100644
index 0000000..d3d7bc8
--- /dev/null
+++ b/share/man/man4/vtnet.4
@@ -0,0 +1,115 @@
+.\" Copyright (c) 2011 Bryan Venteicher
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 22, 2012
+.Dt VTNET 4
+.Os
+.Sh NAME
+.Nm vtnet
+.Nd VirtIO Ethernet driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device vtnet"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_vtnet_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+device driver provides support for VirtIO Ethernet devices.
+.Pp
+If the hypervisor advertises the appreciate features, the
+.Nm
+driver supports TCP/UDP checksum offload for both transmit and receive,
+TCP segmentation offload (TSO), TCP large receive offload (LRO), and
+hardware VLAN tag stripping/insertion features, as well as a multicast
+hash filter, as well as Jumbo Frames (up to 9216 bytes), which can be
+configured via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width "xxxxxx"
+.It Va hw.vtnet.csum_disable
+.It Va hw.vtnet. Ns Ar X Ns Va .csum_disable
+This tunable disables receive and send checksum offload.
+The default value is 0.
+.It Va hw.vtnet.tso_disable
+.It Va hw.vtnet. Ns Ar X Ns Va .tso_disable
+This tunable disables TSO.
+The default value is 0.
+.It Va hw.vtnet.lro_disable
+.It Va hw.vtnet. Ns Ar X Ns Va .lro_disable
+This tunable disables LRO.
+The default value is 0.
+.It Va hw.vtnet.mq_disable
+.It Va hw.vtnet. Ns Ar X Ns Va .mq_disable
+This tunable disables multiqueue.
+The default value is 0.
+.It Va hw.vtnet.mq_max_pairs
+.It Va hw.vtnet. Ns Ar X Ns Va .mq_max_pairs
+This tunable sets the maximum number of transmit and receive queue pairs.
+Multiple queues are only supported when the Multiqueue feature is negotiated.
+This driver supports a maximum of 8 queue pairs.
+The number of queue pairs used is the lesser of the maximum supported by the
+driver and the hypervisor, the number of CPUs present in the guest, and this
+tunable if not zero.
+The default value is 0.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr virtio 4 ,
+.Xr vlan 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver was written by
+.An Bryan Venteicher Aq bryanv@FreeBSD.org .
+It first appeared in
+.Fx 9.0 .
+.Sh CAVEATS
+The
+.Nm
+driver only supports LRO when the hypervisor advertises the
+mergeable buffer feature.
diff --git a/share/man/man4/vxge.4 b/share/man/man4/vxge.4
new file mode 100644
index 0000000..fdca8e2
--- /dev/null
+++ b/share/man/man4/vxge.4
@@ -0,0 +1,110 @@
+.\" Copyright (c) 2002-2011 Exar Corp.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer as
+.\" the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 16, 2011
+.Dt VXGE 4
+.Os
+.Sh NAME
+.Nm vxge
+.Nd "Neterion X3100 10GbE Server/Storage adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device vxge"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_vxge_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Neterion X3100 adapters.
+The driver supports TCP Segmentation Offload (TSO/LSO),
+Large Receive Offload (LRO), Jumbo Frames, Receive Traffic Hash (RTH),
+VLAN, Promiscuous mode and Multi function mode.
+.Pp
+The
+.Nm
+driver supports the following function modes:
+.Bd -ragged -offset indent
+.Cd "SF1_VP17 - 1 function with 17 VPATHs"
+.Ed
+.Bd -ragged -offset indent
+.Cd "MF8_VP2 - 8 functions with 2 VPATHs per function"
+.Ed
+.Bd -ragged -offset indent
+.Cd "MF2_VP8 - 2 functions, 8 Paths/Function"
+.Ed
+.Bd -ragged -offset indent
+.Cd "MF4_VP4 - 4 Functions, 4 Paths/Function"
+.Ed
+.Bd -ragged -offset indent
+.Cd "MF8P_VP2 - 8 functions with 2 VPATHs per function required for DirectIO"
+.Ed
+.Pp
+For general information and support, please visit the Neterion support page
+.Pa http://www.neterion.com/support/support.html .
+.Pp
+Support for Jumbo Frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to transmit and receive Jumbo Frames.
+X3100 adapters support Jumbo Frames up to 9600 bytes.
+.Pp
+For Jumbo Frames, the driver will try to allocate physically contiguous buffers.
+Failures to do so may degrade the performance.
+To resolve such problems, please visit
+.Pa http://www.neterion.com
+where additional information and a kernel patch can be found.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Neterion X3100 10 Gigabit Ethernet adapters listed in
+.Pa http://www.neterion.com .
+.Sh SUPPORT
+For troubleshooting tips and FAQs, please visit
+.Pa http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous .
+.Pp
+For any issues please send an email to
+.Aq support@neterion.com .
+.Sh SEE ALSO
+.Xr arp 8 ,
+.Xr ifconfig 8
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Neterion
+.Aq support@neterion.com .
diff --git a/share/man/man4/watchdog.4 b/share/man/man4/watchdog.4
new file mode 100644
index 0000000..4d953d6
--- /dev/null
+++ b/share/man/man4/watchdog.4
@@ -0,0 +1,148 @@
+.\" Copyright (c) 2004 Poul-Henning Kamp <phk@FreeBSD.org>
+.\" Copyright (c) 2003, 2004 Sean M. Kelly <smkelly@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 21, 2009
+.Dt WATCHDOG 4
+.Os
+.Sh NAME
+.Nm watchdog
+.Nd "hardware and software watchdog"
+.Sh SYNOPSIS
+.In sys/watchdog.h
+.Sh DESCRIPTION
+The
+.Nm
+facility is used for controlling hardware and software watchdogs.
+.Pp
+The device
+.Pa /dev/fido
+responds to a single
+.Xr ioctl 2
+call,
+.Dv WDIOCPATPAT .
+It takes a single argument which represents a timeout value specified as a
+power of two nanoseconds, or-ed with a flag selecting active or passive control
+of the watchdog.
+.Pp
+.Dv WD_ACTIVE
+indicates that the
+.Nm
+will be kept from timing out from userland, for instance by the
+.Xr watchdogd 8
+daemon.
+.Dv WD_PASSIVE
+indicates that the
+.Nm
+will be kept from timing out from the kernel.
+.Pp
+The
+.Xr ioctl 2
+call will return success if just one of the available
+.Xr watchdog 9
+implementations supports setting the timeout to the specified timeout.
+This
+means that at least one watchdog is armed.
+If the call fails, for instance if
+none of
+.Xr watchdog 9
+implementations support the timeout length, all watchdogs are disabled and must
+be explicitly re-enabled.
+.Pp
+To disable the watchdogs pass
+.Dv WD_TO_NEVER .
+If disarming the watchdog(s) failed an error is returned.
+The watchdog might
+still be armed!
+.Sh RETURN VALUES
+The ioctl returns zero on success and non-zero on failure.
+.Bl -tag -width Er
+.It Bq Er EOPNOTSUPP
+No watchdog present in the kernel or
+none of the watchdogs supports the requested timeout value
+(timeout value other than 0).
+.It Bq Er EOPNOTSUPP
+Watchdog could not be disabled (timeout value of 0).
+.It Bq Er EINVAL
+Invalid flag combination passed.
+.El
+.Sh EXAMPLES
+.Bd -literal -offset indent
+#include <paths.h>
+#include <sys/watchdog.h>
+
+#define WDPATH "/dev/" _PATH_WATCHDOG
+int wdfd = -1;
+
+static void
+wd_init(void)
+{
+ wdfd = open(WDPATH, O_RDWR);
+ if (wdfd == -1)
+ err(1, WDPATH);
+}
+static void
+wd_reset(u_int timeout)
+{
+ if (ioctl(wdfd, WDIOCPATPAT, &timeout) == -1)
+ err(1, "WDIOCPATPAT");
+}
+
+/* in main() */
+wd_init();
+wd_reset(WD_ACTIVE|WD_TO_8SEC);
+/* potential freeze point */
+wd_reset(WD_TO_NEVER);
+.Ed
+.Pp
+Enables a watchdog to recover from a potentially freezing piece of code.
+.Pp
+.Dl "options SW_WATCHDOG"
+.Pp
+in your kernel config adds a software watchdog in the kernel, dropping to KDB
+or panic-ing when firing.
+.Sh SEE ALSO
+.Xr watchdogd 8 ,
+.Xr watchdog 9
+.Sh HISTORY
+The
+.Nm
+code first appeared in
+.Fx 5.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+facility was written by
+.An Poul-Henning Kamp Aq phk@FreeBSD.org .
+The software watchdog code and this manual page were written by
+.An Sean Kelly Aq smkelly@FreeBSD.org .
+Some contributions were made by
+.An Jeff Roberson Aq jeff@FreeBSD.org .
+.Sh BUGS
+The
+.Dv WD_PASSIVE
+option has not yet been implemented.
diff --git a/share/man/man4/wb.4 b/share/man/man4/wb.4
new file mode 100644
index 0000000..22a6706
--- /dev/null
+++ b/share/man/man4/wb.4
@@ -0,0 +1,196 @@
+.\" Copyright (c) 1997, 1998
+.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt WB 4
+.Os
+.Sh NAME
+.Nm wb
+.Nd "Winbond W89C840F Fast Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device wb"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_wb_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Ethernet adapters and embedded
+controllers based on the Winbond W89C840F Fast Ethernet controller
+chip.
+The 840F should not be confused with the 940F, which is
+an NE2000 clone and only supports 10Mbps speeds.
+.Pp
+The Winbond controller uses bus master DMA and is designed to be
+a DEC 'tulip' workalike.
+It differs from the standard DEC design
+in several ways: the control and status registers are spaced 4
+bytes apart instead of 8, and the receive filter is programmed through
+registers rather than by downloading a special setup frame via
+the transmit DMA engine.
+Using an external PHY, the Winbond chip
+supports both 10 and 100Mbps speeds in either full or half duplex.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It autoselect
+Enable autoselection of the media type and options.
+This is only
+supported if the PHY chip attached to the Winbond controller
+supports NWAY autonegotiation.
+The user can manually override
+the autoselected mode by adding media options to the
+.Pa /etc/rc.conf
+file.
+.It 10baseT/UTP
+Set 10Mbps operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.It 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It full-duplex
+Force full duplex operation.
+.It half-duplex
+Force half duplex operation.
+.El
+.Pp
+Note that the 100baseTX media type is only available if supported
+by the adapter.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Winbond W89C840F based Fast Ethernet
+adapters and embedded controllers including:
+.Pp
+.Bl -bullet -compact
+.It
+Trendware TE100-PCIE
+.El
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "wb%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "wb%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "wb%d: watchdog timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.It "wb%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.It "wb%d: no memory for tx list"
+The driver failed to allocate an mbuf for the transmitter ring when
+allocating a pad buffer or collapsing an mbuf chain into a cluster.
+.It "wb%d: chip is in D3 power state -- setting to D0"
+This message applies only to adapters which support power
+management.
+Some operating systems place the controller in low power
+mode when shutting down, and some PCI BIOSes fail to bring the chip
+out of this state before configuring it.
+The controller loses all of
+its PCI configuration in the D3 state, so if the BIOS does not set
+it back to full power mode in time, it will not be able to configure it
+correctly.
+The driver tries to detect this condition and bring
+the adapter back to the D0 (full power) state, but this may not be
+enough to return the driver to a fully operational condition.
+If
+you see this message at boot time and the driver fails to attach
+the device as a network interface, you will have to perform second
+warm boot to have the device properly configured.
+.Pp
+Note that this condition only occurs when warm booting from another
+operating system.
+If you power down your system prior to booting
+.Fx ,
+the card should be configured correctly.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ctr.columbia.edu .
+.Sh BUGS
+The Winbond chip seems to behave strangely in some cases when the
+link partner switches modes.
+If for example both sides are set to
+10Mbps half-duplex, and the other end is changed to 100Mbps
+full-duplex, the Winbond's receiver suddenly starts writing trash
+all over the RX descriptors.
+The
+.Nm
+driver handles this by forcing a reset of both the controller
+chip and attached PHY.
+This is drastic, but it appears to be the
+only way to recover properly from this condition.
diff --git a/share/man/man4/wbwd.4 b/share/man/man4/wbwd.4
new file mode 100644
index 0000000..49290ff
--- /dev/null
+++ b/share/man/man4/wbwd.4
@@ -0,0 +1,113 @@
+.\"-
+.\" Copyright (c) 2012 Bjoern A. Zeeb <bz@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 28, 2012
+.Dt WBWD 4
+.Os
+.Sh NAME
+.Nm wbwd
+.Nd device driver for watchdog timer found on Winbond Super I/O chips
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device wbwd"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the following
+line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+wbwd_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides
+.Xr watchdog 4
+support for the watchdog interrupt timer present on at least the following
+Winbond Super I/O chips:
+.Pp
+.Bl -bullet -compact
+.It
+83627HF/F/HG/G Rev. G
+.It
+83627HF/F/HG/G Rev. J
+.It
+83627HF/F/HG/G Rev. UD-A
+.It
+83627DHG IC ver. 5
+.El
+.Sh SYSCTL VARIABLES
+The
+.Nm
+driver provides the following options as
+.Xr sysctl 8
+variables.
+.Bl -tag -width "xxxxxx"
+.It Va dev.wbwd.0.timeout_override
+This variable allows to program the timer to a value independent on the one
+provided by the
+.Xr watchdog 4
+framework while still relying on the regular updates from e.g.
+.Xr watchdogd 8 .
+This is particularly useful if your system provides multiple watchdogs and
+you want them to fire in a special sequence to trigger an NMI after a shorter
+period than the reset timeout for example.
+The value set must not be lower than the sleep time of
+.Xr watchdogd 8 .
+A value of 0 disables this feature and the timeout value provided by
+.Xr watchdog 4
+will be used.
+.It Va dev.wbwd.0.debug_verbose
+If set this sysctl will tell the driver to log its current state before and
+after the timer reset on each invocation from
+.Xr watchdog 9
+to the kernel message buffer for debugging.
+.It Va dev.wbwd.0.debug
+This read-only value gives the state of some registers on last update.
+.El
+.Pp
+The
+.Nm
+driver also provides further sysctl options that are hidden by default.
+See the source code for more information.
+.Sh SEE ALSO
+.Xr watchdog 4 ,
+.Xr device.hints 5 ,
+.Xr watchdog 8 ,
+.Xr watchdogd 8 ,
+.Xr watchdog 9
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+This manual page was written by
+.An Bjoern A. Zeeb Aq bz@FreeBSD.org .
diff --git a/share/man/man4/wi.4 b/share/man/man4/wi.4
new file mode 100644
index 0000000..92dedff
--- /dev/null
+++ b/share/man/man4/wi.4
@@ -0,0 +1,377 @@
+.\" Copyright (c) 1997, 1998, 1999
+.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\" $OpenBSD: wi.4tbl,v 1.14 2002/04/29 19:53:50 jsyn Exp $
+.\"
+.Dd July 23, 2011
+.Dt WI 4
+.Os
+.Sh NAME
+.Nm wi
+.Nd "Lucent Hermes, and Intersil PRISM IEEE 802.11 driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device wi"
+.Cd "device wlan"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_wi_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for 802.11b wireless network adapters based around
+the Lucent Hermes, Intersil PRISM-II, Intersil PRISM-2.5, and Intersil
+Prism-3 chipsets.
+All chipsets provide a similar interface to the driver.
+Only the Intersil chipsets support access point operation or WPA.
+Very old versions of firmware are not supported at all.
+Older versions of the firmware that are supported may severely limit
+the ability to use these cards in newer networks.
+Only relatively recent versions of Intersil firmware supports WPA.
+See CAVEATS for details.
+All host/device interaction is via programmed I/O, even on those cards
+that support a DMA interface.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+.Nm
+supports
+.Cm station ,
+.Cm adhoc ,
+.Cm adhoc-demo ,
+.Cm hostap ,
+and
+.Cm monitor
+mode operation.
+Only one
+virtual interface may be configured at a time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+Cards supported by the
+.Nm
+driver come in a variety of packages, though the most common
+are of the PCMCIA type.
+In many cases, the PCI version of a wireless card is simply
+a PCMCIA card bundled with a PCI adapter.
+The PCI adapters come in two flavors: true PCMCIA bridges and
+dumb PCMCIA bridges.
+A true PCMCIA bridge (such as those sold by Lucent) will attach
+as a real PCMCIA controller.
+The wireless card will then attach to the PCMCIA bus.
+Wireless cards in PCMCIA slots may be inserted and ejected on the fly.
+.Pp
+A dumb bridge, on the other hand, does not show up as a true PCMCIA bus.
+The wireless card will simply appear to the host as a normal PCI
+device and will not require any PCMCIA support.
+Cards in this type of adapter should only be removed when the
+machine is powered down.
+.Pp
+The following cards are among those supported by the
+.Nm
+driver:
+.Pp
+.Bl -column -compact "Linksys Instant Wireless WPC11 2.5" "Spectrum24" "PCI or PCMCIA"
+.Em "Card Chip Bus"
+3Com AirConnect 3CRWE777A Prism-II PCI
+Accton airDirect WN3301 PCMCIA
+ACTIONTEC HWC01170 Prism-2.5 PCMCIA
+Adaptech ANW-8030 Prism-3 PCMCIA
+Addtron AWP-100 Prism-II PCMCIA
+Adtec Adlink/340C Prism-II PCMCIA
+Airvast WN 100 Prism-3 PCMCIA
+Airway 802.11 Adapter PCMCIA
+Agere Orinoco Hermes PCMCIA
+Allied Telesis WR211PCM Prism-II PCMCIA
+ArTem OnAir Prism? PCMCIA
+Asus WL100 Prism-2.5 PCMCIA
+Avaya Wireless Prism-II PCMCIA
+Bay eMobility 11B Prism-2.5? PCMCIA
+Blue Concentric Circle WL-379F Prism-II CF
+BreezeNet Wireless Prism-II PCMCIA
+Buffalo WLI-PCM-S11 Prism-II PCMCIA
+Buffalo WLI-PCM-L11G Hermes PCMCIA
+Buffalo WLI-CF-S11G Prism-II CF
+Buffalo WLI2-CF-S11G Prism 2.5 CF
+Cabletron RoamAbout Hermes PCMCIA
+Compaq Agency NC5004 Prism-II PCMCIA
+Compaq WL100 Prism-II PCMCIA
+Compaq WL110 Hermes PCMCIA
+Compaq WL200 Prism-II PCMCIA
+Contec FLEXLAN/FX-DS110-PCC Prism-II PCMCIA
+Corega PCC-11 Prism-II PCMCIA
+Corega PCCA-11 Prism-II PCMCIA
+Corega PCCB-11 Prism-II PCMCIA
+Corega CGWLPCIA11 Prism-II PCI
+Dell TrueMobile 1150 Hermes PCMCIA
+Dlink Air 660 Prism-II PCMCIA
+Dlink DWL520 Prism-2.5 PCI
+Dlink DWL650 Prism-2.5 PCMCIA
+ELECOM Air@Hawk/LD-WL11/PCC PCMCIA
+ELSA MC-11 PCMCIA
+ELSA XI300 Prism-II PCMCIA
+ELSA XI325 Prism-2.5 PCMCIA
+ELSA APDL325 Prism-2.5 PCMCIA
+ELSA XI330 Prism-3 PCMCIA
+ELSA XI800 Prism-II CF
+EMTAC A2424i Prism-II PCMCIA
+Farallon Skyline Prism-II PCMCIA
+Gemtek WL-311 Prism-2.5 PCMCIA
+Hawking Technology WE110P Prism-2.5 PCMCIA
+Home Wireless Networks Prism-II PCMCIA
+IBM High Rate Wireless Hermes PCMCIA
+ICOM SL-1100 Prism-II PCMCIA
+I-O DATA WN-B11/PCM Prism-II PCMCIA
+Intersil Prism II Prism-II PCMCIA
+Intersil Mini-PCI Prism-2.5 PCI
+Intersil ISL37100P Prism-3 PCMCIA
+Intersil ISL37110P Prism-3 PCMCIA
+Intersil ISL37300P Prism-3 PCMCIA
+Laneed Wireless PCMCIA
+Linksys Instant Wireless WPC11 Prism-II PCMCIA
+Linksys Instant Wireless WPC11 2.5 Prism-2.5 PCMCIA
+Linksys Instant Wireless WPC11 3.0 Prism-3 PCMCIA
+Linksys WCF11 Prism-3 PCMCIA
+Linksys WCF12 Prism-3 CF
+Lucent WaveLAN Hermes PCMCIA
+Melco Airconnect Prism-II PCMCIA
+Microsoft MN-520 WLAN Prism-II PCMCIA
+NANOSPEED ROOT-RZ2000 Prism-II PCMCIA
+NCR WaveLAN/IEEE 802.11 PCMCIA
+NDC/Sohoware NCP130 Prism-II PCI
+NEC CMZ-RT-WP Prism-II PCMCIA
+NEC PK-WL001 Lucent PCMCIA
+NEC PC-WL/11C Prism-II PCMCIA
+Netgear MA311 Prism-2.5 PCI
+Netgear MA401 Prism-II/2.5 PCMCIA
+Netgear MA401RA Prism-II PCMCIA
+Netgear MA701 Prism-II CF
+NOKIA C020 WLAN Prism-II PCMCIA
+NOKIA C110 WLAN Prism-2.5 PCMCIA
+NTT-ME 11Mbps Wireless LAN Prism-II PCMCIA
+Planex GeoWave/GW-NS110 Prism-II PCMCIA
+Planex GW-NS11H Prism-II PCMCIA
+Proxim Harmony Prism-II PCMCIA
+Proxim RangeLAN-DS Prism-II PCMCIA
+Samsung MagicLAN SWL-2000N Prism-II PCMCIA
+SENAO SL-2511CD Prism-3 PCMCIA
+Siemens SpeedStream SS1021 Prism-II PCMCIA
+Siemens SpeedStream SS1021 Prism-3 PCMCIA
+SMC 2532W-B Prism-II PCMCIA
+SMC 2602 EZ Connect (3.3V) Prism-II PCI or PCMCIA
+SMC 2632 EZ Connect Prism-II PCMCIA
+Socket Low Power WLAN-CF Prism-II CF
+Sony PCWA-C100 Lucent PCMCIA
+Sony PEGA-WL110 Prism-2.5 PCMCIA
+TDK LAK-CD011WL Prism-II PCMCIA
+Toshiba Wireless LAN Card Prism-II PCMCIA
+U.S.\& Robotics Wireless Card 2410 Prism-II PCMCIA
+YIS YWL-11B Prism-II PCMCIA
+.El
+.Pp
+Several vendors sell PCI adapters built around the PLX Technology 9050
+or 9052 chip.
+The following such adapters are supported or expected to work:
+.Pp
+.Bl -item -compact
+.It
+3Com AirConnect 3CRWE777A (3.3V)
+.It
+Belkin F5D6000 (a rebadged WL11000P)
+.It
+Eumitcom WL11000P
+.It
+Global Sun Technology GL24110P (untested)
+.It
+Global Sun Technology GL24110P02
+.It
+LinkSys WDT11 (a rebadged GL24110P02)
+.It
+Netgear MA301
+.It
+US Robotics 2415 (rebadged WL11000P)
+.It
+Wisecom Wireless LAN PCI Adapter
+.El
+.Pp
+The following adapters have the same model numbers as those listed
+above, but might not work if the actual card is after the change away
+from the Prism family:
+.Pp
+.Bl -item -compact
+.It
+DLink DWL520
+.El
+.Sh EXAMPLES
+Join an existing BSS network (ie: connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev wi0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Bd -literal -offset indent
+ifconfig wlan create wlandev wi0 inet 192.168.0.20 \e
+ netmask 0xffffff00 ssid my_net
+.Ed
+.Pp
+Join a specific BSS network with WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev wi0 inet 192.168.0.20 \e
+ netmask 0xffffff00 ssid my_net \e
+ wepmode on wepkey 0x8736639624 weptxkey 1
+.Ed
+.Pp
+Join a Lucent legacy demo ad-hoc network with network name
+.Dq Li my_net :
+.Bd -literal -offset indent
+ifconfig wlan create wlandev wi0 wlanmode ahdemo \e
+ inet 192.168.0.20 netmask 0xffffff00 ssid my_net
+.Ed
+.Pp
+Join/create an IBSS network with network name
+.Dq Li my_net :
+.Bd -literal -offset indent
+ifconfig wlan create wlandev wi0 wlanmode adhoc wi0 \e
+ inet 192.168.0.22 netmask 0xffffff00 ssid my_net
+.Ed
+.Pp
+Create a host-based access point (Prism only):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev wi0 wlanmode hostap \e
+ inet 192.168.0.10 netmask 0xffffff00 ssid my_ap
+.Ed
+.Pp
+Create a host-based access point with WEP enabled (Prism only)
+and plumb it into bridge to fxp0:
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev wi0 wlanmode hostap \e
+ inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e
+ wepmode on wepkey 0x1234567890 weptxkey 1
+ifconfig bridge0 create
+ifconfig bridge0 addm wlan0 addm fxp0 up
+.Ed
+.Pp
+This will give you the same functionality as an access point.
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "wi%d: init failed"
+The WaveLAN card failed to become ready after an initialization command
+was issued.
+.It "wi%d: failed to allocate %d bytes on NIC"
+The driver was unable to allocate memory for transmit frames in the
+NIC's on-board RAM.
+This can also be an indication of an incorrectly configured interrupt.
+.It "wi%d: device timeout"
+The WaveLAN card failed to generate an interrupt to acknowledge a transmit
+command.
+.El
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr pccard 4 ,
+.Xr pccbb 4 ,
+.Xr pcic 4 ,
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr wlan_xauth 4 ,
+.Xr hostapd 8 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8 .
+.Rs
+.%T HCF Light programming specification
+.%U http://web.archive.org/web/20040130141721/http://wavelan.com/
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+The original
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ctr.columbia.edu .
+This man page comes from
+.Ox .
+.Sh CAVEATS
+The driver will reject devices with old firmware to
+avoid dealing with numerous defects.
+Unfortunately the driver does not support downloading new firmware
+to the card so if new firmware is needed users will have to boot
+a different system to accomplish this.
+.Pp
+Intersil Prism cards must have firmware versions 0.8.0 or later and
+version 1.7.0 or later are required to support functionality such as WPA.
+Some users of Prism-II and 2.5 based cards report that station firmware
+version 1.3.4 works better for them in hostap than 1.4.9.
+Older versions of the Prism station firmware have a number of issues
+with hostap mode.
+The IBSS/adhoc mode appears to work well on station firmware 1.3.1 and
+later.
+The IBSS/adhoc mode appears to have problems for some people with
+older versions of station firmware.
+.Pp
+Lucent cards prior to firmware version 6.0.6 do not implement IBSS
+mode and are not supported.
+.Pp
+Prior versions of
+.Nm
+supported Symbol firmware.
+That support has been removed due to persistent problems with this
+firmware as well as getting proper documentation on this firmware.
+.Pp
+Hermes 2 and Hermes 3 chips are not supported by this driver.
+.Pp
+Here's the above requirements in the form of a table
+.Pp
+.Bl -column -compact "Prims II/2.5" "xxxxxxxx" "xxxxxxxx" "xxxxxxxx" "xxxxxxxx"
+.Em "Firmware Minimum WPA Host AP Adhoc/IBSS"
+Prism II/2.5 0.8.0 1.7.0 1.3.4 1.3.1
+Prism 3 0.8.0 1.7.0 1.4.9 1.3.1
+Hermes 6.0.6 none none 6.0.6
+Symbol none none none none
+.El
+.Sh BUGS
+Not all the new messages are documented here, and many of them are
+indications of transient errors that are not indications of serious
+problems.
diff --git a/share/man/man4/witness.4 b/share/man/man4/witness.4
new file mode 100644
index 0000000..ffd9f8f
--- /dev/null
+++ b/share/man/man4/witness.4
@@ -0,0 +1,147 @@
+.\" Copyright (c) 2001 John H. Baldwin <jhb@FreeBSD.org>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 30, 2012
+.Dt WITNESS 4
+.Os
+.Sh NAME
+.Nm witness
+.Nd lock validation facility
+.Sh SYNOPSIS
+.Cd options WITNESS
+.Cd options WITNESS_KDB
+.Cd options WITNESS_SKIPSPIN
+.Sh DESCRIPTION
+The
+.Nm
+module keeps track of the locks acquired and released by each thread.
+It also keeps track of the order in which locks are acquired with respect
+to each other.
+Each time a lock is acquired,
+.Nm
+uses these two lists to verify that a lock is not being acquired in the
+wrong order.
+If a lock order violation is detected, then a message is output to the
+kernel console detailing the locks involved and the locations in question.
+Witness can also be configured to drop into the kernel debugger when an order
+violation occurs.
+.Pp
+The
+.Nm
+code also checks various other conditions such as verifying that one
+does not recurse on a non-recursive lock,
+or attempt an upgrade on a shared lock held by another thread.
+If any of these checks fail, then the kernel will panic.
+.Pp
+The flag that controls whether or not the kernel debugger is entered when a
+lock order violation is detected can be set in a variety of ways.
+By default, the flag is off, but if the
+.Dv WITNESS_KDB
+kernel option is
+specified, then the flag will default to on.
+It can also be set from the
+.Xr loader 8
+via the
+.Va debug.witness.kdb
+environment variable or after the kernel has booted via the
+.Va debug.witness.kdb
+sysctl.
+If the flag is set to zero, then the debugger will not be entered.
+If the flag is non-zero, then the debugger will be entered.
+.Pp
+The
+.Nm
+code can also be configured to skip all checks on spin mutexes.
+By default, this flag defaults to off, but it can be turned on by
+specifying the
+.Dv WITNESS_SKIPSPIN
+kernel option.
+The flag can also be set via the
+.Xr loader 8
+environment variable
+.Va debug.witness.skipspin .
+If the variable is set to a non-zero value, then spin mutexes are skipped.
+Once the kernel has booted, the status of this flag can be examined but not
+set via the read-only sysctl
+.Va debug.witness.skipspin .
+.Pp
+The sysctl
+.Va debug.witness.watch
+specifies the level of witness involvement in the system.
+A value of 1 specifies that witness is enabled.
+A value of 0 specifies that witness is disabled, but that can be enabled
+again. This will maintain a small amount of overhead in the system.
+A value of -1 specifies that witness is disabled permanently and
+cannot be enabled again.
+The sysctl
+.Va debug.witness.watch
+can be set via
+.Xr loader 8 .
+.Pp
+The
+.Nm
+code also provides two extra
+.Xr ddb 4
+commands if both
+.Nm
+and
+.Xr ddb 4
+are compiled into the kernel:
+.Bl -ohang
+.It Ic show locks Op thread
+Outputs the list of locks held by a thread to the kernel console
+along with the filename and line number at which each lock was last acquired
+by the thread.
+The optional
+.Ar thread
+argument may be either a TID,
+PID,
+or pointer to a thread structure.
+If
+.Ar thread
+is not specified,
+then the locks held by the current thread are displayed.
+.It Ic show all locks
+Outputs the list of locks held by all threads in the system to the
+kernel console.
+.It Ic show witness
+Dump the current order list to the kernel console.
+The code first displays the lock order tree for all of the sleep locks.
+Then it displays the lock order tree for all of the spin locks.
+Finally, it displays a list of locks that have not yet been acquired.
+.El
+.Sh SEE ALSO
+.Xr ddb 4 ,
+.Xr loader 8 ,
+.Xr sysctl 8 ,
+.Xr mutex 9
+.Sh HISTORY
+The
+.Nm
+code first appeared in
+.Bsx 5.0
+and was imported from there into
+.Fx 5.0 .
diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4
new file mode 100644
index 0000000..76e797c
--- /dev/null
+++ b/share/man/man4/wlan.4
@@ -0,0 +1,219 @@
+.\"
+.\" Copyright (c) 2003 Tom Rhodes
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 22, 2012
+.Dt WLAN 4
+.Os
+.Sh NAME
+.Nm wlan
+.Nd generic 802.11 link-layer support
+.Sh SYNOPSIS
+.Cd "device wlan"
+.Sh DESCRIPTION
+The
+.Nm
+module provides generic code to support 802.11 drivers.
+Where a device does not directly support 802.11 functionality
+this layer fills in.
+The
+.Nm
+module is required by all native 802.11 drivers as well as the
+.Xr ndis 4
+support.
+.Pp
+.Nm
+supports multi-mode devices capable of
+operating in both 2.4GHz and 5GHz bands and supports numerous
+802.11 standards: 802.11a, 802.11b, 802.11g, 802.11n, and 802.11s (Draft 3.0).
+The WPA, 802.11i, and 802.1x security protocols are supported
+through a combination of in-kernel code and user-mode applications.
+The WME/WMM multi-media protocols are supported entirely within
+the
+.Nm
+module but require a suitably capable hardware device.
+Likewise the 802.11h specification is supported only by suitably
+capable devices.
+.Pp
+Drivers provide 802.11 functionality through
+.Nm
+interfaces that are created at runtime using interface cloning.
+This is done with the
+.Xr ifconfig 8
+.Cm create
+command or using the
+.Va wlans_IFX
+variable in
+.Xr rc.conf 5 .
+Some drivers support the creation of multiple
+.Nm
+interfaces that share the same underlying device;
+this is the way by which ``multi-bss support'' is provided but it
+can also be used to create WDS links and other interesting applications.
+.Pp
+There are several types of
+.Nm
+interfaces that may be created:
+.Bl -tag -width monitor
+.It Cm sta
+A client station in an infrastructure bss
+(i.e. one that associates to an access point).
+.It Cm hostap
+An access point in an infrastructure bss.
+.It Cm mesh
+A mesh station in an MBSS network.
+.It Cm adhoc
+A station in an IBSS network.
+.It Cm ahdemo
+A station operating in ``adhoc demo mode''.
+This is essentially an IBSS station that does not use management
+frames (e.g. no beacons are transmitted).
+An
+.Cm ahdemo
+interface is especially useful for applications that want to transmit
+and receive raw 802.11 packets.
+.It Cm monitor
+An interface used exclusively for capturing 802.11 frames.
+In particular this specified to have read-only properties
+which enables it to be operated on frequencies where one
+would otherwise not be allowed.
+.It Cm wds
+A station that passes 4-address 802.11 traffic for the purpose
+of tunneling traffic over a wireless link.
+Typically this station would share the same MAC address as a
+.Cm hostap
+interface.
+It may be possible to create
+.Cm wds
+interfaces without a companion
+.Cm hostap
+interface but that is not guaranteed; one may need to create a
+.Cm hostap
+interface that does not send beacon frames before
+.Cm wds
+interfaces may be created.
+.El
+.Pp
+Note that an interface's type cannot be changed once it is created.
+.Pp
+.Nm
+defines several mechanisms by which plugin modules may
+be used to extend its functionality.
+Cryptographic support such as WEP, TKIP, and AES-CCMP are implemented
+as standalone modules (if not statically configured into a system)
+that register with
+.Nm .
+Similarly there is an authenticator framework for defining 802.11
+authentication services and a framework for integrating access
+control mechanisms specific to the 802.11 protocol.
+.Sh DEBUGGING
+If the
+.Dv IEEE80211_DEBUG
+option is included in the kernel configuration,
+debugging controls are available using:
+.Pp
+.Dl "sysctl net.wlan.X.debug=mask"
+.Pp
+where
+.Ar X
+is the number of the
+.Nm
+instance and mask is a bit-or of control bits that determine which
+debugging messages to enable.
+For example,
+.Pp
+.Dl "sysctl net.wlan.0.debug=0x00200000"
+.Pp
+enables debugging messages related to scanning for an access point,
+adhoc neighbor, or an unoccupied channel when operation as an access point.
+The
+.Xr wlandebug 8
+tool provides a more user-friendly mechanism for doing the same thing.
+Note that
+.Pp
+.Dl "sysctl net.wlan.debug=mask"
+.Pp
+defines the initial value of the debugging flags for each cloned
+.Nm
+interface; this is useful to enable debug messages during interface creation.
+.Sh COMPATIBILITY
+The module name of
+.Nm
+was used to be compatible with
+.Nx .
+.Pp
+Mesh stations follow the 802.11s Draft 3.0 specification which is
+not ratified and subject to change.
+Beware that this specification is incompatible with earlier drafts;
+and stations implementing earlier drafts (e.g. Linux)
+may not interoperate.
+.Sh SEE ALSO
+.Xr an 4 ,
+.Xr ath 4 ,
+.Xr bwi 4 ,
+.Xr bwn 4 ,
+.Xr ipw 4 ,
+.Xr iwi 4 ,
+.Xr iwn 4 ,
+.Xr malo 4 ,
+.Xr mwl 4 ,
+.Xr netintro 4 ,
+.Xr ral 4 ,
+.Xr rum 4 ,
+.Xr run 4 ,
+.Xr uath 4 ,
+.Xr upgt 4 ,
+.Xr ural 4 ,
+.Xr urtw 4 ,
+.Xr wi 4 ,
+.Xr wlan_acl 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr wlan_xauth 4 ,
+.Xr wpi 4 ,
+.Xr zyd 4
+.Sh STANDARDS
+More information can be found in the IEEE 802.11 Standards.
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 5.0 .
+.Sh AUTHORS
+Atsushi Onoe is the author of original
+.Nx
+software from which this work began.
+.An -nosplit
+.An Sam Leffler
+brought the code into
+.Fx
+and then rewrote it to support multi-mode devices,
+802.11g, 802.11n, WPA/802.11i, WME, multi-bss, and
+add the extensible frameworks
+for cryptographic, authentication, and access control plugins.
+This manual page was written by
+.An Tom Rhodes Aq trhodes@FreeBSD.org .
diff --git a/share/man/man4/wlan_acl.4 b/share/man/man4/wlan_acl.4
new file mode 100644
index 0000000..25314bd
--- /dev/null
+++ b/share/man/man4/wlan_acl.4
@@ -0,0 +1,57 @@
+.\"
+.\" Copyright (c) 2004 Sam Leffler
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 7, 2004
+.Dt WLAN_ACL 4
+.Os
+.Sh NAME
+.Nm wlan_acl
+.Nd MAC-based ACL support for 802.11 devices
+.Sh SYNOPSIS
+.Cd "device wlan_acl"
+.Sh DESCRIPTION
+The
+.Nm
+module implements a MAC-based access control plugin for use
+with 802.11 devices operating as an access point.
+The
+.Nm
+must be loaded for
+.Xr ifconfig 8
+to handle the
+.Cm mac:*
+requests.
+.Sh SEE ALSO
+.Xr wlan 4 ,
+.Xr ifconfig 8
+.Sh STANDARDS
+More information can be found in the IEEE 802.11 Standard.
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.0 .
diff --git a/share/man/man4/wlan_amrr.4 b/share/man/man4/wlan_amrr.4
new file mode 100644
index 0000000..9247767
--- /dev/null
+++ b/share/man/man4/wlan_amrr.4
@@ -0,0 +1,59 @@
+.\"
+.\" Copyright (c) 2007 Kevin Lo
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 13, 2008
+.Dt WLAN_AMRR 4
+.Os
+.Sh NAME
+.Nm wlan_amrr
+.Nd AMRR rate adaptation algorithm support for 802.11 devices
+.Sh SYNOPSIS
+.Cd "device wlan_amrr"
+.Sh DESCRIPTION
+The
+.Nm
+module implements the Adaptive Multi-Rate Retry tx rate control
+algorithm for use by 802.11 device drivers.
+.Sh SEE ALSO
+.Xr bwi 4 ,
+.Xr iwn 4 ,
+.Xr ral 4 ,
+.Xr rum 4 ,
+.Xr ural 4 ,
+.Xr wlan 4 ,
+.Xr wpi 4 ,
+.Xr zyd 4
+.Sh STANDARDS
+More information can be found in the paper describing the
+.Em AMRR
+algorithm at
+.Pa http://hal.inria.fr/inria-00070784/en/ .
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.0 .
diff --git a/share/man/man4/wlan_ccmp.4 b/share/man/man4/wlan_ccmp.4
new file mode 100644
index 0000000..ccf7a27
--- /dev/null
+++ b/share/man/man4/wlan_ccmp.4
@@ -0,0 +1,66 @@
+.\"
+.\" Copyright (c) 2004 Sam Leffler
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 7, 2004
+.Dt WLAN_CCMP 4
+.Os
+.Sh NAME
+.Nm wlan_ccmp
+.Nd AES-CCMP crypto support for 802.11 devices
+.Sh SYNOPSIS
+.Cd "device wlan_ccmp"
+.Sh DESCRIPTION
+The
+.Nm
+module handles the AES-CCMP cryptographic requirements of the
+WPA and 802.11i protocols.
+It does encapsulation and decapsulation of CCMP-encoded 802.11 frames
+and optionally calculates the AES-CCMP cipher.
+The
+.Nm
+module is an 802.11 cryptographic plugin module for use by the
+.Xr wlan 4
+module.
+This module is automatically loaded if an AES-CCMP key is configured;
+typically by a WPA supplicant program such as wpa_supplicant,
+or a WPA authenticator program such as
+.Nm hostapd .
+Should the underlying network device not be capable of doing the AES-CCMP
+calculations in hardware, the
+.Nm
+module will do the work.
+.Sh SEE ALSO
+.Xr wlan 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4
+.Sh STANDARDS
+More information can be found in the IEEE 802.11, WPA, and 802.11i Standards.
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.0 .
diff --git a/share/man/man4/wlan_tkip.4 b/share/man/man4/wlan_tkip.4
new file mode 100644
index 0000000..2a2a254
--- /dev/null
+++ b/share/man/man4/wlan_tkip.4
@@ -0,0 +1,66 @@
+.\"
+.\" Copyright (c) 2004 Sam Leffler
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 7, 2004
+.Dt WLAN_TKIP 4
+.Os
+.Sh NAME
+.Nm wlan_tkip
+.Nd TKIP and Michael crypto support for 802.11 devices
+.Sh SYNOPSIS
+.Cd "device wlan_tkip"
+.Sh DESCRIPTION
+The
+.Nm
+module handles the TKIP and Michael cryptographic requirements of the
+WPA and 802.11i protocols.
+It does encapsulation and decapsulation of TKIP-encoded 802.11 frames
+and optionally calculates the TKIP cipher and Michael MIC.
+The
+.Nm
+module is an 802.11 cryptographic plugin module for use by the
+.Xr wlan 4
+module.
+This module is automatically loaded if a TKIP key is configured;
+typically by a WPA supplicant program such as wpa_supplicant,
+or a WPA authenticator program such as
+.Nm hostapd .
+Should the underlying network device not be capable of doing the TKIP
+and/or Michael calculations in hardware, the
+.Nm
+module will do the work.
+.Sh SEE ALSO
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_wep 4
+.Sh STANDARDS
+More information can be found in the IEEE 802.11, WPA, and 802.11i Standards.
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.0 .
diff --git a/share/man/man4/wlan_wep.4 b/share/man/man4/wlan_wep.4
new file mode 100644
index 0000000..3bf1040
--- /dev/null
+++ b/share/man/man4/wlan_wep.4
@@ -0,0 +1,63 @@
+.\"
+.\" Copyright (c) 2004 Sam Leffler
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 7, 2004
+.Dt WLAN_WEP 4
+.Os
+.Sh NAME
+.Nm wlan_wep
+.Nd WEP crypto support for 802.11 devices
+.Sh SYNOPSIS
+.Cd "device wlan_wep"
+.Sh DESCRIPTION
+The
+.Nm
+module handles the WEP cryptographic requirements of the 802.11 protocol.
+It does encapsulation and decapsulation of WEP-encoded 802.11 frames
+and optionally calculates the WEP cipher.
+The
+.Nm
+module is an 802.11 cryptographic plugin module for use by the
+.Xr wlan 4
+module.
+This module is automatically loaded if a WEP key is configured with
+.Xr ifconfig 8 .
+Should the underlying network device not be capable of doing the WEP
+calculations in hardware, the
+.Nm
+module will do the work.
+.Sh SEE ALSO
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4
+.Sh STANDARDS
+More information can be found in the IEEE 802.11 Standard.
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.0 .
diff --git a/share/man/man4/wlan_xauth.4 b/share/man/man4/wlan_xauth.4
new file mode 100644
index 0000000..b1fdfc5
--- /dev/null
+++ b/share/man/man4/wlan_xauth.4
@@ -0,0 +1,61 @@
+.\"
+.\" Copyright (c) 2004 Sam Leffler
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 7, 2004
+.Dt WLAN_XAUTH 4
+.Os
+.Sh NAME
+.Nm wlan_xauth
+.Nd External authenticator support for 802.11 devices
+.Sh SYNOPSIS
+.Cd "device wlan_xauth"
+.Sh DESCRIPTION
+The
+.Nm
+module is a
+.Xr wlan 4
+authenticator plugin
+for use with user-mode authentication implementations such
+as
+.Nm hostapd .
+It hooks into the 802.11 layer and does nothing.
+As a result, 802.11 stations that associate are not authorized to
+send or receive frames until they are authorized by an external agent;
+typically using a protocol such as WPA, 802.1x, or 802.11i.
+.Pp
+This module is automatically loaded by the rc script that normally
+starts
+.Xr hostapd 8 .
+.Sh SEE ALSO
+.Xr wlan 4
+.Sh STANDARDS
+More information can be found in the IEEE 802.11, WPA, and 802.11i Standards.
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 6.0 .
diff --git a/share/man/man4/wpi.4 b/share/man/man4/wpi.4
new file mode 100644
index 0000000..f1bc15e
--- /dev/null
+++ b/share/man/man4/wpi.4
@@ -0,0 +1,144 @@
+.\" Copyright (c) 2004-2007
+.\" Damien Bergamini <damien.bergamini@free.fr>. All rights reserved.
+.\" Benjamin Close <Benjamin.Close@clearchain.com>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice unmodified, this list of conditions, and the following
+.\" disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 5, 2008
+.Dt WPI 4
+.Os
+.Sh NAME
+.Nm wpi
+.Nd "Intel 3945ABG Wireless LAN IEEE 802.11 driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device wpi"
+.Cd "device wpifw"
+.Cd "device pci"
+.Cd "device wlan"
+.Cd "device wlan_amrr"
+.Cd "device firmware"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_wpi_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the
+.Tn Intel
+3945ABG Wireless network adapter.
+.Nm
+supports
+.Cm station ,
+.Cm adhoc ,
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Pp
+This driver requires the firmware built with the
+.Nm wpifw
+module to work.
+.Sh FILES
+.Bl -tag -width ".Pa /usr/share/doc/legal/intel_wpi/LICENSE" -compact
+.It Pa /usr/share/doc/legal/intel_wpi/LICENSE
+.Nm
+firmware license
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev wpi0 inet 192.168.0.20 \e
+ netmask 0xffffff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan0 create wlandev wpi0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev wpi0 ssid my_net \e
+ wepmode on wepkey 0x1234567890 weptxkey 1 up
+.Ed
+.Pp
+Join a specific BSS network with 128-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan0 create wlandev wpi0 wlanmode adhoc ssid my_net \e
+ wepmode on wepkey 0x01020304050607080910111213 weptxkey 1
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "wpi%d: could not load firmware image '%s'"
+The driver failed to load the firmware image using the
+.Xr firmware 9
+subsystem.
+Verify the
+.Xr wpifw
+firmware module is installed.
+.It "wpi%d: fatal firmware error"
+An unknown error has occurred in the uploaded firmware, you may have to
+unload/reload the driver to continue.
+.It "wpi%d: Radio transmitter is switched off"
+The hardware switch controlling the radio is currently turned off.
+Data transmission is not possible in this state.
+.El
+.Sh SEE ALSO
+.Xr wpifw 4 ,
+.Xr pci 4 ,
+.Xr wlan 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Sh AUTHORS
+.An -nosplit
+The original
+.Nm
+driver was written for
+.Ox
+by
+.An Damien Bergamini Aq damien.bergamini@free.fr .
+.An Benjamin Close Aq benjsc@FreeBSD.org
+ported
+.Nm
+to
+.Fx .
+.Sh BUGS
+Not all the error messages are documented here.
+.Pp
+Background scanning is not currently supported.
diff --git a/share/man/man4/wsp.4 b/share/man/man4/wsp.4
new file mode 100644
index 0000000..a74097c
--- /dev/null
+++ b/share/man/man4/wsp.4
@@ -0,0 +1,90 @@
+.\" Copyright (c) 2014 Hans Petter Selasky <hselasky at freebsd dot org>.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd February 7, 2014
+.Dt WSP 4
+.Os
+.Sh NAME
+.Nm wsp
+.Nd Wellspring touchpad driver
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines into
+your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device wsp"
+.Cd "device usb"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time,
+place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+wsp_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Apple Internal Trackpad
+device found in many Apple laptops.
+.Pp
+The driver simulates a three-button mouse using multi-finger tap
+detection.
+A single-finger press generates a left button click.
+A two-finger tap maps to the right button; whereas a three-finger tap
+gets treated as a middle button click.
+.Pp
+.Nm
+supports dynamic reconfiguration using
+.Xr sysctl 8
+through nodes under
+.Nm hw.usb.wsp .
+Pointer sensitivity can be controlled using the sysctl tunable
+.Nm hw.usb.wsp.scale_factor .
+.Sh FILES
+.Nm
+creates a blocking pseudo-device file,
+.Pa /dev/wsp0 ,
+which presents the mouse as a
+.Em sysmouse
+or
+.Em mousesystems
+type device--see
+.Xr moused 8
+for an explanation of these mouse
+types.
+.Sh SEE ALSO
+.Xr sysmouse 4 ,
+.Xr usb 4 ,
+.Xr loader.conf 5 ,
+.Xr xorg.conf 5 Pq Pa ports/x11/xorg ,
+.Xr moused 8 ,
+.Xr sysctl 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Huang Wen Hui Aq huanghwh@gmail.com
diff --git a/share/man/man4/xe.4 b/share/man/man4/xe.4
new file mode 100644
index 0000000..0935884
--- /dev/null
+++ b/share/man/man4/xe.4
@@ -0,0 +1,168 @@
+.\"
+.\" Copyright (c) 2003 Tom Rhodes
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd July 16, 2005
+.Dt XE 4
+.Os
+.Sh NAME
+.Nm xe
+.Nd "Xircom PCMCIA Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device xe"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_xe_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports
+.Tn PCMCIA
+Ethernet adapters based on Xircom CE2- and CE3-class hardware.
+This includes devices made by Xircom along with
+various
+.Tn OEM
+manufacturers.
+.Pp
+Please note that the
+.Nm
+driver only supports
+.Tn PCMCIA
+cards and their Ethernet functions.
+.Nm
+does not support the on-board modem device located on some
+version of the Ethernet/modem combo cards.
+In particular, Xircom RealPort2 cards are not supported by this driver.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width ".Cm autoselect"
+.It Cm autoselect
+Enable autoselection of media type and options.
+.It Cm 10Base2/BNC
+Select 10Mbps operation on a BNC coaxial connector.
+.It Cm 10BaseT/UTP
+Select 10Mbps operation on a RJ-45 connector.
+.It Cm 100BaseTX
+Select 100Mbps operation.
+.El
+.Pp
+Note that 100BaseTX operation is not available on CE2-class cards,
+while the 10Base2/BNC mode is only available on CE2-class cards.
+Full-duplex
+operation is currently not supported.
+For more information on configuring network interface devices,
+see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports the following cards:
+.Pp
+.Bl -bullet -compact
+.It
+Xircom CreditCard Ethernet (PS-CE2-10)
+.It
+Xircom CreditCard Ethernet + Modem 28 (PS-CEM-28)
+.It
+Xircom CreditCard Ethernet + Modem 33 (CEM33)
+.It
+Xircom CreditCard 10/100 (CE3, CE3B)
+.It
+Xircom CreditCard Ethernet 10/100 + Modem 56 (CEM56)
+.It
+Xircom RealPort Ethernet 10 (RE10)
+.It
+Xircom RealPort Ethernet 10/100 (RE100)
+.It
+Xircom RealPort Ethernet 10/100 + Modem 56 (REM56, REM56G)
+.It
+Accton Fast EtherCard-16 (EN2226)
+.It
+Compaq Microcom CPQ550 Ethernet/Modem PC Card
+.It
+Compaq Netelligent 10/100 PC Card (CPQ-10/100)
+.It
+Intel EtherExpress Pro/100 PC Card Mobile Adapter 16 (Pro/100 M16A)
+.It
+Intel EtherExpress Pro/100 LAN/Modem PC Card Adapter (Pro/100 M16B)
+.El
+.Pp
+Other similar devices using the same hardware may also be supported.
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "xe%d: Cannot allocate ioport"
+.It "xe%d: Cannot allocate irq"
+A fatal initialization error occurred while attempting to allocate
+system resources for the card.
+.It "xe%d: Unable to fix your %s combo card"
+A fatal initialization error occurred while attempting to attach an
+Ethernet/modem combo card.
+.It "xe%d: watchdog timeout: resetting card"
+The card failed to generate an interrupt acknowledging a
+transmitted packet.
+May indicate a
+.Tn PCMCIA
+configuration problem.
+.It "xe%d: no carrier"
+The card has lost all contact with the network; this
+usually indicates a cable problem.
+.El
+.Sh SEE ALSO
+.Xr pccard 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 3.3 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+device driver was written by
+.An Scott Mitchell Aq rsm@FreeBSD.org .
+This manual page was written by
+.An Scott Mitchell Aq rsm@FreeBSD.org ,
+and
+.An Tom Rhodes Aq trhodes@FreeBSD.org .
+.Sh BUGS
+Supported devices will fail to attach on some machines using the
+.Tn NEWCARD
+.Tn PC
+Card framework.
+.Pp
+Automatic media selection is usually unreliable.
diff --git a/share/man/man4/xen.4 b/share/man/man4/xen.4
new file mode 100644
index 0000000..e053fc5
--- /dev/null
+++ b/share/man/man4/xen.4
@@ -0,0 +1,185 @@
+.\" Copyright (c) 2010 Robert N. M. Watson
+.\" All rights reserved.
+.\"
+.\" This software was developed by SRI International and the University of
+.\" Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
+.\" ("CTSRD"), as part of the DARPA CRASH research program.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 17, 2010
+.Dt XEN 4
+.Os
+.Sh NAME
+.Nm xen
+.Nd Xen Hypervisor Guest (DomU) Support
+.Sh SYNOPSIS
+To compile para-virtualized (PV) Xen guest support into an i386 kernel, place
+the following lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options PAE"
+.Cd "options XEN"
+.Cd "nooptions NATIVE"
+.Ed
+.Pp
+To compile hardware-assisted virtualization (HVM) Xen guest support with
+para-virtualized drivers into an amd64 kernel, place the following lines in
+your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options XENHVM"
+.Cd "device xenpci"
+.Ed
+.Sh DESCRIPTION
+The Xen Hypervisor allows multiple virtual machines to be run on a single
+computer system.
+When first released, Xen required that i386 kernels be compiled
+"para-virtualized" as the x86 instruction set was not fully virtualizable.
+Primarily, para-virtualization modifies the virtual memory system to use
+hypervisor calls (hypercalls) rather than direct hardware instructions to
+modify the TLB, although para-virtualized device drivers were also required
+to access resources such as virtual network interfaces and disk devices.
+.Pp
+With later instruction set extensions from AMD and Intel to support fully
+virtualizable instructions, unmodified virtual memory systems can also be
+supported; this is referred to as hardware-assisted virtualization (HVM).
+HVM configurations may either rely on transparently emulated hardware
+peripherals, or para-virtualized drivers, which are aware of virtualization,
+and hence able to optimize certain behaviors to improve performance or
+semantics.
+.Pp
+.Fx
+supports a fully para-virtualized (PV) kernel on the i386 architecture using
+.Cd "options XEN"
+and
+.Cd "nooptions NATIVE" ;
+currently, this requires use of a PAE kernel, enabled via
+.Cd "options PAE" .
+.Pp
+.Fx
+supports hardware-assisted virtualization (HVM) on both the i386 and amd64
+kernels; however, PV device drivers with an HVM kernel are only supported on
+the amd64 architecture, and require
+.Cd "options XENHVM"
+and
+.Cd "device xenpci" .
+.Pp
+Para-virtualized device drivers are required in order to support certain
+functionality, such as processing management requests, returning idle
+physical memory pages to the hypervisor, etc.
+.Ss Xen DomU device drivers
+Xen para-virtualized drivers are automatically added to the kernel if a PV
+kernel is compiled using
+.Cd "options XEN" ;
+for HVM environments,
+.Cd "options XENHVM"
+and
+.Cd "device xenpci"
+are required.
+The follow drivers are supported:
+.Bl -hang -offset indent -width blkfront
+.It Nm balloon
+Allow physical memory pages to be returned to the hypervisor as a result of
+manual tuning or automatic policy.
+.It Nm blkback
+Exports local block devices or files to other Xen domains where they can
+then be imported via
+.Nm blkfront .
+.It Nm blkfront
+Import block devices from other Xen domains as local block devices, to be
+used for file systems, swap, etc.
+.It Nm console
+Export the low-level system console via the Xen console service.
+.It Nm control
+Process management operations from Domain 0, including power off, reboot,
+suspend, crash, and halt requests.
+.It Nm evtchn
+Expose Xen events via the
+.Pa /dev/xen/evtchn
+special device.
+.It Nm netback
+Export local network interfaces to other Xen domains where they can be
+imported via
+.Nm netfront .
+.It Nm netfront
+Import network interfaces from other Xen domains as local network interfaces,
+which may be used for IPv4, IPv6, etc.
+.It Nm pcifront
+Allow physical PCI devices to be passed through into a PV domain.
+.It Nm xenpci
+Represents the Xen PCI device, an emulated PCI device that is exposed to
+HVM domains.
+This device allows detection of the Xen hypervisor, and provides interrupt
+and shared memory services required to interact with the hypervisor.
+.El
+.Ss Performance considerations
+In general, PV drivers will perform better than emulated hardware, and are
+the recommended configuration for HVM installations.
+.Pp
+Using a hypervisor introduces a second layer of scheduling that may limit the
+effectiveness of certain
+.Fx
+scheduling optimisations.
+Among these is adaptive locking, which is no longer able to determine whether
+a thread holding a lock is in execution.
+It is recommended that adaptive locking be disabled when using Xen:
+.Bd -unfilled -offset indent
+.Cd "options NO_ADAPTIVE_MUTEXES"
+.Cd "options NO_ADAPTIVE_RWLOCKS"
+.Cd "options NO_ADAPTIVE_SX"
+.Ed
+.Sh SEE ALSO
+.Xr pae 4
+.Sh HISTORY
+Support for
+.Nm
+first appeared in
+.Fx 8.1 .
+.Sh AUTHORS
+.An -nosplit
+.Fx
+support for Xen was first added by
+.An Kip Macy Aq kmacy@FreeBSD.org
+and
+.An Doug Rabson Aq dfr@FreeBSD.org .
+Further refinements were made by
+.An Justin Gibbs Aq gibbs@FreeBSD.org ,
+.An Adrian Chadd Aq adrian@FreeBSD.org ,
+and
+.An Colin Percival Aq cperciva@FreeBSD.org .
+This manual page was written by
+.An Robert Watson Aq rwatson@FreeBSD.org .
+.Sh BUGS
+.Fx
+is only able to run as a Xen guest (DomU) and not as a Xen host (Dom0).
+.Pp
+A fully para-virtualized (PV) kernel is only supported on i386, and not
+amd64.
+.Pp
+Para-virtualized drivers under hardware-assisted virtualization (HVM) kernel
+are only supported on amd64, not i386.
+.Pp
+As of this release, Xen PV DomU support is not heavily tested; instability
+has been reported during VM migration of PV kernels.
+.Pp
+Certain PV driver features, such as the balloon driver, are under-exercised.
diff --git a/share/man/man4/xhci.4 b/share/man/man4/xhci.4
new file mode 100644
index 0000000..69e944a
--- /dev/null
+++ b/share/man/man4/xhci.4
@@ -0,0 +1,68 @@
+.\"
+.\" Copyright (c) 2011 Hans Petter Selasky. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 17, 2011
+.Dt XHCI 4
+.Os
+.Sh NAME
+.Nm xhci
+.Nd USB eXtensible Host Controller driver
+.Sh SYNOPSIS
+.Cd "device xhci"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the
+.Tn USB
+eXtensible Host Controller Interface,
+which allows use of
+.Tn USB
+1.0, 2.0 and 3.0 devices on the same
+.Tn USB
+port.
+.Pp
+The
+.Tn XHCI
+controller supports
+.Tn USB
+connection speeds up to 5.0Gbps when using a USB 3.0 compliant device.
+.Sh HARDWARE
+The
+.Nm
+driver supports
+.Tn XHCI
+compatible controllers having PCI class 12 (serial bus),
+subclass 3 (USB) and programming interface 48 (XHCI).
+.Sh SEE ALSO
+.Xr ehci 4 ,
+.Xr ohci 4 ,
+.Xr uhci 4 ,
+.Xr usb 4
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 8.2 .
diff --git a/share/man/man4/xl.4 b/share/man/man4/xl.4
new file mode 100644
index 0000000..d10d270
--- /dev/null
+++ b/share/man/man4/xl.4
@@ -0,0 +1,270 @@
+.\" Copyright (c) 1997, 1998
+.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 23, 2008
+.Dt XL 4
+.Os
+.Sh NAME
+.Nm xl
+.Nd "3Com Etherlink XL and Fast Etherlink XL Ethernet device driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device miibus"
+.Cd "device xl"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_xl_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for PCI Ethernet adapters and embedded
+controllers based on the 3Com "boomerang," "cyclone," "hurricane"
+and "tornado" bus-master Etherlink XL chips.
+.Pp
+The Etherlink XL chips support built-in 10baseT, 10base2 and 10base5
+transceivers as well as an MII bus for externally attached PHY
+transceivers.
+The 3c905 series typically uses a National Semiconductor
+NS 83840A 10/100 PHY for 10/100 Mbps support in full or half-duplex.
+The 3c905B adapters have built-in autonegotiation logic mapped onto
+the MII for compatibility with previous drivers.
+Fast Etherlink XL
+adapters such as the 3c905-TX and 3c905B-TX are capable of 10 or
+100Mbps data rates in either full or half duplex and can be manually
+configured for any supported mode or automatically negotiate the highest
+possible mode with a link partner.
+.Pp
+The
+.Nm
+driver supports the following media types:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It autoselect
+Enable autoselection of the media type and options.
+Note that this
+option is only available with the 3c905 and 3c905B adapters with
+external PHYs or built-in autonegotiation logic.
+For 3c900 adapters,
+the driver will choose the mode specified in the EEPROM.
+The user can
+change this by adding media options to the
+.Pa /etc/rc.conf
+file.
+.It 10baseT/UTP
+Set 10Mbps operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.It 100baseTX
+Set 100Mbps (Fast Ethernet) operation.
+The
+.Ar mediaopt
+option can also be used to select either
+.Ar full-duplex
+or
+.Ar half-duplex
+modes.
+.It 10base5/AUI
+Enable AUI transceiver (available only on COMBO cards).
+.It 10base2/BNC
+Enable BNC coax transceiver (available only on COMBO cards).
+.El
+.Pp
+The
+.Nm
+driver supports the following media options:
+.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
+.It full-duplex
+Force full duplex operation.
+.It half-duplex
+Force half duplex operation.
+.El
+.Pp
+Note that the 100baseTX media type is only available if supported
+by the adapter.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports the following hardware:
+.Pp
+.Bl -bullet -compact
+.It
+3Com 3c900-TPO
+.It
+3Com 3c900-COMBO
+.It
+3Com 3c905-TX
+.It
+3Com 3c905-T4
+.It
+3Com 3c900B-TPO
+.It
+3Com 3c900B-TPC
+.It
+3Com 3c900B-FL
+.It
+3Com 3c900B-COMBO
+.It
+3Com 3c905B-T4
+.It
+3Com 3c905B-TX
+.It
+3Com 3c905B-FX
+.It
+3Com 3c905B-COMBO
+.It
+3Com 3c905C-TX
+.It
+3Com 3c980, 3c980B, and 3c980C server adapters
+.It
+3Com 3cSOHO100-TX OfficeConnect adapters
+.It
+3Com 3c450 HomeConnect adapters
+.It
+3Com 3c555, 3c556 and 3c556B mini-PCI adapters
+.It
+3Com 3C3SH573BT, 3C575TX, 3CCFE575BT, 3CXFE575BT, 3CCFE575CT, 3CXFE575CT,
+3CCFEM656, 3CCFEM656B, and 3CCFEM656C, 3CXFEM656, 3CXFEM656B, and
+3CXFEM656C CardBus adapters
+.It
+3Com 3c905-TX, 3c905B-TX 3c905C-TX, 3c920B-EMB, and 3c920B-EMB-WNM embedded adapters
+.El
+.Pp
+Both the 3C656 family of CardBus cards and the 3C556 family of MiniPCI
+cards have a built-in proprietary modem.
+Neither the
+.Nm
+driver nor any other
+.Fx
+driver supports this modem.
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "xl%d: couldn't map memory"
+A fatal initialization error has occurred.
+.It "xl%d: couldn't map interrupt"
+A fatal initialization error has occurred.
+.It "xl%d: device timeout"
+The device has stopped responding to the network, or there is a problem with
+the network connection (cable).
+.It "xl%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.It "xl%d: no memory for tx list"
+The driver failed to allocate an mbuf for the transmitter ring when
+allocating a pad buffer or collapsing an mbuf chain into a cluster.
+.It "xl%d: command never completed!"
+Some commands issued to the 3c90x ASIC take time to complete: the
+driver is supposed to wait until the 'command in progress' bit in
+the status register clears before continuing.
+In rare instances, this
+bit may not clear.
+To avoid getting caught in an infinite wait loop,
+the driver only polls the bit for a finite number of times before
+giving up, at which point it issues this message.
+This message may
+be printed during driver initialization on slower machines.
+If you
+see this message but the driver continues to function normally, the
+message can probably be ignored.
+.It "xl%d: chip is in D3 power state -- setting to D0"
+This message applies only to 3c905B adapters, which support power
+management.
+Some operating systems place the 3c905B in low power
+mode when shutting down, and some PCI BIOSes fail to bring the chip
+out of this state before configuring it.
+The 3c905B loses all of
+its PCI configuration in the D3 state, so if the BIOS does not set
+it back to full power mode in time, it will not be able to configure it
+correctly.
+The driver tries to detect this condition and bring
+the adapter back to the D0 (full power) state, but this may not be
+enough to return the driver to a fully operational condition.
+If
+you see this message at boot time and the driver fails to attach
+the device as a network interface, you will have to perform second
+warm boot to have the device properly configured.
+.Pp
+Note that this condition only occurs when warm booting from another
+operating system.
+If you power down your system prior to booting
+.Fx ,
+the card should be configured correctly.
+.It "xl%d: WARNING: no media options bits set in the media options register!"
+This warning may appear when using the driver on some Dell Latitude
+docking stations with built-in 3c905-TX adapters.
+For whatever the
+reason, the 'MII available' bit in the media options register on
+this particular equipment is not set, even though it should be (the
+3c905-TX always uses an external PHY transceiver).
+The driver will
+attempt to guess the proper media type based on the PCI device ID
+word.
+The driver makes a lot of noise about this condition because
+the author considers it a manufacturing defect.
+.It xl%d: transmission error: %d
+.It xl%d: tx underrun, increasing tx start threshold to %d bytes
+This message may appear while the adapter tunes its transmission
+buffers under various load amounts and are mostly harmless.
+It is probably safe to ignore them.
+.El
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr cardbus 4 ,
+.Xr miibus 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr pccard 4 ,
+.Xr polling 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ctr.columbia.edu .
diff --git a/share/man/man4/xnb.4 b/share/man/man4/xnb.4
new file mode 100644
index 0000000..d7f4609
--- /dev/null
+++ b/share/man/man4/xnb.4
@@ -0,0 +1,143 @@
+.\" Copyright (c) 2012 Spectra Logic Corporation
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions, and the following disclaimer,
+.\" without modification.
+.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
+.\" substantially similar to the "NO WARRANTY" disclaimer below
+.\" ("Disclaimer") and any redistribution must be conditioned upon
+.\" including a substantially similar Disclaimer requirement for further
+.\" binary redistribution.
+.\"
+.\" NO WARRANTY
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+.\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGES.
+.\"
+.\" Authors: Alan Somers (Spectra Logic Corporation)
+.\"
+.\" $FreeBSD$
+.\"
+.Dd June 6, 2014
+.Dt XNB 4
+.Os
+.Sh NAME
+.Nm xnb
+.Nd "Xen Paravirtualized Backend Ethernet Driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel, place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "options XENHVM"
+.Cd "device xenpci"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides the back half of a paravirtualized
+.Xr xen 4
+network connection.
+The netback and netfront drivers appear to their respective operating
+systems as Ethernet devices linked by a crossover cable.
+Typically,
+.Nm
+will run on Domain 0 and the netfront driver will run on a guest domain.
+However, it is also possible to run
+.Nm
+on a guest domain.
+It may be bridged or routed to provide the netfront's
+domain access to other guest domains or to a physical network.
+.Pp
+In most respects, the
+.Nm
+device appears to the OS as an other Ethernet device.
+It can be configured at runtime entirely with
+.Xr ifconfig 8 .
+In particular, it supports MAC changing, arbitrary MTU sizes, checksum
+offload for IP, UDP, and TCP for both receive and transmit, and TSO.
+However, see
+.Sx CAVEATS
+before enabling txcsum, rxcsum, or tso.
+.Sh SYSCTL VARIABLES
+The following read-only variables are available via
+.Xr sysctl 8 :
+.Bl -tag -width indent
+.It Va dev.xnb.%d.dump_rings
+Displays information about the ring buffers used to pass requests between the
+netfront and netback.
+Mostly useful for debugging, but can also be used to
+get traffic statistics.
+.It Va dev.xnb.%d.unit_test_results
+Runs a builtin suite of unit tests and displays the results.
+Does not affect the operation of the driver in any way.
+Note that the test suite simulates error conditions; this will result in
+error messages being printed to the system log.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr xen 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Alan Somers
+.Aq alans@spectralogic.com
+and
+.An John Suykerbuyk
+.Aq johns@spectralogic.com .
+.Sh CAVEATS
+Packets sent through Xennet pass over shared memory, so the protocol includes
+no form of link-layer checksum or CRC.
+Furthermore, Xennet drivers always report to their hosts that they support
+receive and transmit checksum offloading.
+They "offload" the checksum calculation by simply skipping it.
+That works fine for packets that are exchanged between two domains on the same
+machine.
+However, when a Xennet interface is bridged to a physical interface,
+a correct checksum must be attached to any packets bound for that physical
+interface.
+Currently,
+.Fx
+lacks any mechanism for an Ethernet device to
+inform the OS that newly received packets are valid even though their checksums
+are not.
+So if the netfront driver is configured to offload checksum calculations,
+it will pass non-checksumed packets to
+.Nm ,
+which must then calculate the checksum in software before passing the packet
+to the OS.
+.Pp
+For this reason, it is recommended that if
+.Nm
+is bridged to a physical interface, then transmit checksum offloading should be
+disabled on the netfront.
+The Xennet protocol does not have any mechanism for the netback to request
+the netfront to do this; the operator must do it manually.
+.Sh BUGS
+The
+.Nm
+driver does not properly checksum UDP datagrams that span more than one
+Ethernet frame.
+Nor does it correctly checksum IPv6 packets.
+To workaround that bug, disable transmit checksum offloading on the
+netfront driver.
diff --git a/share/man/man4/xpt.4 b/share/man/man4/xpt.4
new file mode 100644
index 0000000..e670acb
--- /dev/null
+++ b/share/man/man4/xpt.4
@@ -0,0 +1,108 @@
+.\"
+.\" Copyright (c) 1998 Kenneth D. Merry.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 10, 1998
+.Dt XPT 4
+.Os
+.Sh NAME
+.Nm xpt
+.Nd CAM transport layer interface
+.Sh SYNOPSIS
+None.
+.Sh DESCRIPTION
+The
+.Nm
+driver provides a way for userland applications to issue certain CAM CCBs
+to the kernel.
+.Pp
+Since the
+.Nm
+driver allows direct access to the CAM subsystem, system administrators
+should exercise caution when granting access to this driver.
+If used
+improperly, this driver can allow userland applications to crash a machine
+or cause data loss.
+.Sh KERNEL CONFIGURATION
+There is no kernel configuration required for the
+.Nm
+driver.
+It is enabled when
+.Tn SCSI
+support is enabled in the kernel.
+There is one instance of the xpt driver
+per CAM transport layer instance.
+Since there is currently only one CAM
+transport layer, there will only be one instance of this driver.
+.Sh IOCTLS
+.Bl -tag -width 01234567890123
+.It CAMIOCOMMAND
+This ioctl takes certain kinds of CAM CCBs and passes them through to the
+CAM transport layer for action.
+Only the following CCB types are
+supported:
+.Pp
+.Bl -tag -width XPT_DEV_MATCH -compact
+.It XPT_SCAN_BUS
+.It XPT_RESET_BUS
+.It XPT_SCAN_LUN
+.It XPT_ENG_INQ
+.It XPT_ENG_EXEC
+.It XPT_DEBUG
+.It XPT_DEV_MATCH
+.It XPT_PATH_INQ
+.El
+.Pp
+The above CCBs are the only ones supported since it makes more sense to
+send them through a generic passthrough device rather than a passthrough
+device tied to a particular underlying
+.Tn SCSI
+device.
+.It CAMGETPASSTHRU
+This ioctl takes an XPT_GDEVLIST CCB, and returns the passthrough device
+corresponding to the device in question.
+.El
+.Sh FILES
+.Bl -tag -width /dev/xpt0 -compact
+.It Pa /dev/xpt0
+Character device node for the
+.Nm
+driver.
+.El
+.Sh DIAGNOSTICS
+None.
+.Sh SEE ALSO
+.Xr cam 3 ,
+.Xr cam_cdbparse 3 ,
+.Xr pass 4 ,
+.Xr camcontrol 8
+.Sh HISTORY
+The CAM transport layer driver first appeared in
+.Fx 3.0 .
+.Sh AUTHORS
+.An Kenneth Merry Aq ken@FreeBSD.org
diff --git a/share/man/man4/zero.4 b/share/man/man4/zero.4
new file mode 100644
index 0000000..c2ba4bd
--- /dev/null
+++ b/share/man/man4/zero.4
@@ -0,0 +1,58 @@
+.\" Copyright (c) 1996
+.\" Mike Pritchard <mpp@FreeBSD.org>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Mike Pritchard and
+.\" contributors.
+.\" 4. Neither the name of the author nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 7, 1996
+.Dt ZERO 4
+.Os
+.Sh NAME
+.Nm zero
+.Nd the zero device
+.Sh DESCRIPTION
+The
+.Nm
+device accepts and reads data as any ordinary (and willing)
+file,
+but throws away any data written to it, and returns an endless
+supply of null bytes when read.
+.Sh FILES
+.Bl -tag -width /dev/zero
+.It Pa /dev/zero
+.El
+.Sh SEE ALSO
+.Xr full 4 ,
+.Xr null 4
+.Sh HISTORY
+A
+.Nm
+device appeared in
+.Bx 4.4 .
diff --git a/share/man/man4/zyd.4 b/share/man/man4/zyd.4
new file mode 100644
index 0000000..5a1f0a5
--- /dev/null
+++ b/share/man/man4/zyd.4
@@ -0,0 +1,187 @@
+.\" $OpenBSD: zyd.4,v 1.22 2007/05/24 02:49:57 cnst Exp $
+.\" $NetBSD: zyd.4,v 1.1 2007/06/09 11:20:55 kiyohara Exp $
+.\" $FreeBSD$
+.\"
+.\" Copyright (c) 1997, 1998, 1999
+.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd March 7, 2013
+.Dt ZYD 4
+.Os
+.Sh NAME
+.Nm zyd
+.Nd ZyDAS ZD1211/ZD1211B USB IEEE 802.11b/g wireless network device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device zyd"
+.Cd "device wlan"
+.Cd "device wlan_amrr"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_zyd_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for wireless network adapters based around
+the ZyDAS ZD1211 and ZD1211B USB chips.
+.Pp
+.Nm
+supports
+.Cm station
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The following devices are known to be supported by the
+.Nm
+driver:
+.Pp
+.Bl -tag -width Ds -offset indent -compact
+.It 3COM 3CRUSB10075
+.It Acer WLAN-G-US1
+.It Airlink+ AWLL3025
+.It Airlink 101 AWLL3026
+.It AOpen 802.11g WL54
+.It Asus A9T integrated wireless
+.It Asus WL-159g
+.It Belkin F5D7050 v.4000
+.It Billion BiPAC 3011G
+.It Buffalo WLI-U2-KG54L
+.It CC&C WL-2203B
+.It DrayTek Vigor 550
+.It Edimax EW-7317UG
+.It Edimax EW-7317LDG
+.It Fiberline Networks WL-43OU
+.It iNexQ UR055g
+.It Linksys WUSBF54G
+.It Longshine LCS-8131G3
+.It MSI US54SE
+.It MyTek MWU-201 USB adapter
+.It Philips SNU5600
+.It Planet WL-U356
+.It Planex GW-US54GZ
+.It Planex GW-US54GZL
+.It Planex GW-US54Mini
+.It Safecom SWMULZ-5400
+.It Sagem XG 760A
+.It Sagem XG 76NA
+.It Sandberg Wireless G54 USB
+.It Sitecom WL-113
+.It SMC SMCWUSB-G
+.It Sweex wireless USB 54 Mbps
+.It Tekram/Siemens USB adapter
+.It Telegent TG54USB
+.It Trendnet TEW-424UB rev A
+.It Trendnet TEW-429UB
+.It TwinMOS G240
+.It Unicorn WL-54G
+.It US Robotics 5423
+.It X-Micro XWL-11GUZX
+.It Yakumo QuickWLAN USB
+.It Zonet ZEW2501
+.It ZyXEL ZyAIR G-202
+.It ZyXEL ZyAIR G-220
+.El
+.Sh EXAMPLES
+The following
+example configures zyd0 to join any BSS network using WEP key
+.Dq 0x1deadbeef1 ,
+channel 11:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev zyd0 channel 11 \e
+ wepmode on wepkey 0x1deadbeef1 weptxkey 1 \e
+ inet 192.168.1.1 netmask 255.255.255.0
+.Ed
+.Pp
+Join an existing BSS network,
+.Dq my_net :
+.Bd -literal -offset indent
+ifconfig wlan create wlandev zyd0 192.168.0.2 \e
+ netmask 0xffffff00 ssid my_net
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "zyd%d: could not load firmware (error=%d)"
+An error occurred while attempting to upload the firmware to the onboard
+microcontroller unit.
+.It "zyd%d: could not send command (error=%s)"
+An attempt to send a command to the firmware failed.
+.It "zyd%d: sorry, radio %s is not supported yet"
+Support for the specified radio chip is not yet implemented in the driver.
+The device will not attach.
+.It "zyd%d: device version mismatch: 0x%x (only >= 43.30 supported)"
+Early revisions of the ZD1211 chipset are not supported by this driver.
+The device will not attach.
+.It "zyd%d: device timeout"
+A frame dispatched to the hardware for transmission did not complete in time.
+The driver will reset the hardware.
+This should not happen.
+.El
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr netintro 4 ,
+.Xr usb 4 ,
+.Xr wlan 4 ,
+.Xr wlan_amrr 4 ,
+.Xr wlan_ccmp 4 ,
+.Xr wlan_tkip 4 ,
+.Xr wlan_wep 4 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Sh AUTHORS
+.An -nosplit
+The original
+.Nm
+driver was written by
+.An Florian Stoehr Aq ich@florian-stoehr.de ,
+.An Damien Bergamini Aq damien@openbsd.org ,
+and
+.An Jonathan Gray Aq jsg@openbsd.org .
+.Sh CAVEATS
+The
+.Nm
+driver does not support a lot of the functionality available in the hardware.
+More work is required to properly support the IBSS and power management
+features.
OpenPOWER on IntegriCloud