PERFORCE change 98542 for review
Robert Watson
rwatson at FreeBSD.org
Mon Jun 5 05:46:26 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=98542
Change 98542 by rwatson at rwatson_zoo on 2006/06/05 12:43:49
Integrate TrustedBSD audit3 branch:
- bsnmp upgrade
- mount fixes
- more arm
- much cryptoness
- loader avoids corrupting UFS on writes
- bpf relocking
TrustedBSD-related:
- OpenBSM 1.0 alpha 6 import.
Affected files ...
.. //depot/projects/trustedbsd/audit3/MAINTAINERS#8 integrate
.. //depot/projects/trustedbsd/audit3/contrib/bsnmp/NEWS#6 integrate
.. //depot/projects/trustedbsd/audit3/contrib/bsnmp/gensnmpdef/gensnmpdef.1#5 integrate
.. //depot/projects/trustedbsd/audit3/contrib/bsnmp/gensnmpdef/gensnmpdef.c#3 integrate
.. //depot/projects/trustedbsd/audit3/contrib/bsnmp/gensnmptree/gensnmptree.1#6 integrate
.. //depot/projects/trustedbsd/audit3/contrib/bsnmp/gensnmptree/gensnmptree.c#6 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/HISTORY#4 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/Makefile.am#4 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/Makefile.in#4 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/README#13 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/TODO#9 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/VERSION#7 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bin/Makefile.am#4 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bin/Makefile.in#4 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bin/auditd/auditd.c#10 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bin/auditfilterd/Makefile.am#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bin/auditfilterd/Makefile.in#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bin/auditfilterd/auditfilterd.8#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bin/auditfilterd/auditfilterd.c#3 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bin/auditfilterd/auditfilterd.h#3 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bin/auditfilterd/auditfilterd_conf.c#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bin/auditreduce/auditreduce.c#8 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/Makefile.am#4 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/Makefile.in#4 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit.h#12 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit_filter.h#3 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/audit_record.h#9 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/bsm/libbsm.h#11 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/config/config.h#3 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/config/config.h.in#4 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/configure#5 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/configure.ac#5 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/etc/audit_filter#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/Makefile.am#4 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/Makefile.in#4 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/au_open.3#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/au_token.3#6 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/audit_submit.3#3 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_audit.c#12 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_io.c#14 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_token.c#15 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/bsm_wrappers.c#13 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/libbsm/libbsm.3#7 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/man/auditctl.2#6 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/modules/Makefile.am#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/modules/Makefile.in#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/modules/auditfilter_noop/Makefile.am#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/modules/auditfilter_noop/Makefile.in#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/modules/auditfilter_noop/auditfilter_noop.c#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/test/Makefile.am#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/test/Makefile.in#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/test/bsm/Makefile.am#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/test/bsm/Makefile.in#2 integrate
.. //depot/projects/trustedbsd/audit3/contrib/openbsm/test/bsm/generate.c#2 integrate
.. //depot/projects/trustedbsd/audit3/etc/defaults/rc.conf#12 integrate
.. //depot/projects/trustedbsd/audit3/etc/devd.conf#7 integrate
.. //depot/projects/trustedbsd/audit3/etc/hosts.allow#5 integrate
.. //depot/projects/trustedbsd/audit3/etc/netstart#4 integrate
.. //depot/projects/trustedbsd/audit3/etc/rc.d/Makefile#12 integrate
.. //depot/projects/trustedbsd/audit3/etc/rc.d/bridge#1 branch
.. //depot/projects/trustedbsd/audit3/etc/rc.d/devd#4 integrate
.. //depot/projects/trustedbsd/audit3/etc/rc.d/jail#6 integrate
.. //depot/projects/trustedbsd/audit3/etc/rc.d/netif#7 integrate
.. //depot/projects/trustedbsd/audit3/etc/rc.d/pf#7 integrate
.. //depot/projects/trustedbsd/audit3/lib/libc/gen/getgrent.c#4 integrate
.. //depot/projects/trustedbsd/audit3/lib/libc/sys/truncate.2#4 integrate
.. //depot/projects/trustedbsd/audit3/lib/libkvm/kvm_minidump_amd64.c#2 integrate
.. //depot/projects/trustedbsd/audit3/lib/libkvm/kvm_minidump_i386.c#2 integrate
.. //depot/projects/trustedbsd/audit3/lib/libthr/thread/thr_mutex.c#8 integrate
.. //depot/projects/trustedbsd/audit3/lib/libthr/thread/thr_private.h#9 integrate
.. //depot/projects/trustedbsd/audit3/lib/libthr/thread/thr_spec.c#4 integrate
.. //depot/projects/trustedbsd/audit3/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#10 integrate
.. //depot/projects/trustedbsd/audit3/release/pc98/fixit-small_crunch.conf#3 integrate
.. //depot/projects/trustedbsd/audit3/sbin/fsdb/fsdb.8#4 integrate
.. //depot/projects/trustedbsd/audit3/sbin/fsdb/fsdb.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sbin/ipfw/ipfw2.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sbin/mount/mount.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sbin/mount_msdosfs/mount_msdosfs.c#5 integrate
.. //depot/projects/trustedbsd/audit3/share/examples/diskless/clone_root#3 integrate
.. //depot/projects/trustedbsd/audit3/share/man/man4/ktr.4#3 integrate
.. //depot/projects/trustedbsd/audit3/share/man/man5/rc.conf.5#11 integrate
.. //depot/projects/trustedbsd/audit3/share/man/man9/crypto.9#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/Makefile#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/amd64/amd64/busdma_machdep.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/arm/arm/busdma_machdep.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/arm/arm/elf_trampoline.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/arm/arm/pmap.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/arm/include/cpuconf.h#3 integrate
.. //depot/projects/trustedbsd/audit3/sys/arm/include/cpufunc.h#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/arm/include/pmap.h#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/arm/sa11x0/assabet_machdep.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/arm/sa11x0/sa11x0_var.h#3 integrate
.. //depot/projects/trustedbsd/audit3/sys/boot/i386/libi386/biosdisk.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/cam/cam_xpt.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/cam/scsi/scsi_all.h#3 integrate
.. //depot/projects/trustedbsd/audit3/sys/compat/linprocfs/linprocfs.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/conf/Makefile.arm#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/conf/NOTES#12 integrate
.. //depot/projects/trustedbsd/audit3/sys/conf/kern.mk#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/acpica/acpi_hpet.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/ahb/ahb.c#3 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/ath/if_ath.c#9 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/awi/awi.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/bfe/if_bfe.c#9 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/bfe/if_bfereg.h#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/ciss/ciss.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/dc/dcphy.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/dc/if_dc.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/dc/if_dcreg.h#3 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/gem/if_gem.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/hifn/hifn7751.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/ipw/if_ipw.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/isp/isp_freebsd.c#10 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/isp/isp_freebsd.h#9 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/iwi/if_iwi.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/lmc/if_lmc.h#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/mpt/mpt.c#10 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/mpt/mpt.h#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/mpt/mpt_cam.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/mpt/mpt_cam.h#3 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/mpt/mpt_debug.c#9 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/mpt/mpt_pci.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/mpt/mpt_raid.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/mpt/mpt_raid.h#3 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/mpt/mpt_reg.h#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/ofw/ofw_console.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/pccbb/pccbb.c#10 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/pccbb/pccbb_isa.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/pccbb/pccbb_pci.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/pccbb/pccbbvar.h#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/pci/pcireg.h#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/ral/rt2560.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/ral/rt2661.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/safe/safe.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/midi/midi.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/midi/sequencer.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/ubsec/ubsec.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/usb/ehci.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/usb/if_axe.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/usb/if_axereg.h#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/usb/if_ural.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/usb/ohci.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/usb/ugen.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/usb/uhci.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/wi/if_wi.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-cam#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-crypto#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-dev_pci#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-dev_sound#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-dev_usb#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-geom#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-i4b#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-kern#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-libkern#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-linux#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-net80211#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-netgraph#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-netinet#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-netinet6#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-netipsec#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-opencrypto#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Doxyfile-vm#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/Makefile#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/doc/subsys/notreviewed.dox#1 branch
.. //depot/projects/trustedbsd/audit3/sys/fs/msdosfs/msdosfs_vfsops.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/fs/nullfs/null_vfsops.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/fs/smbfs/smbfs_vnops.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/geom/geom_gpt.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/FreeBSD/xfs_frw.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/FreeBSD/xfs_fs_subr.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/FreeBSD/xfs_iget.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/FreeBSD/xfs_super.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/xfs_attr.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/xfs_bit.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/xfs_dfrag.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/xfs_dir2_trace.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/xfs_inode.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/xfs_iomap.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/xfs_trans.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/xfs_vfsops.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/gnu/fs/xfs/xfs_vnodeops.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/i386/i386/busdma_machdep.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/i386/i386/initcpu.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/i386/i386/machdep.c#10 integrate
.. //depot/projects/trustedbsd/audit3/sys/i386/i386/pmap.c#9 integrate
.. //depot/projects/trustedbsd/audit3/sys/i386/i386/ptrace_machdep.c#3 integrate
.. //depot/projects/trustedbsd/audit3/sys/i386/i386/vm_machdep.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/i386/include/md_var.h#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/i386/include/npx.h#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/i386/isa/npx.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/ia64/conf/NOTES#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/ia64/ia64/busdma_machdep.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/kern/kern_event.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/kern/kern_exit.c#17 integrate
.. //depot/projects/trustedbsd/audit3/sys/kern/kern_mutex.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/kern/kern_switch.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/kern/kern_synch.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/kern/subr_disk.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/kern/subr_stack.c#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/kern/vfs_aio.c#10 integrate
.. //depot/projects/trustedbsd/audit3/sys/kern/vfs_mount.c#14 integrate
.. //depot/projects/trustedbsd/audit3/sys/kern/vnode_if.src#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/modules/acpi/acpi/Makefile#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/modules/acpi/acpi_asus/Makefile#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/modules/acpi/acpi_panasonic/Makefile#3 integrate
.. //depot/projects/trustedbsd/audit3/sys/modules/acpi/acpi_toshiba/Makefile#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/modules/acpi/acpi_video/Makefile#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/modules/cpufreq/Makefile#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/modules/fdc/Makefile#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/modules/geom/geom_eli/Makefile#3 integrate
.. //depot/projects/trustedbsd/audit3/sys/modules/mfi/Makefile#2 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/bpf.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/bpf.h#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/bpf_filter.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/bpfdesc.h#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/if.c#9 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/if_disc.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/if_faith.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/if_fwsubr.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/if_gif.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/if_gre.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/if_loop.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/if_media.h#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/if_sl.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/if_stf.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/if_tap.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/if_tun.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/raw_cb.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/net/raw_usrreq.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/net80211/ieee80211_input.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/net80211/ieee80211_node.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/netgraph/atm/uni/ng_uni_cust.h#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/netgraph/ng_base.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/netgraph/ng_iface.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/in_pcb.c#9 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/ip_carp.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/ip_gre.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/tcp_timer.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/tcp_usrreq.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/udp_usrreq.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/netipsec/ipsec.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/netipsec/ipsec_input.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/nfsclient/nfs_vfsops.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/opencrypto/criov.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/opencrypto/crypto.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/opencrypto/cryptodev.h#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/opencrypto/cryptosoft.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/opencrypto/xform.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/pci/agp_amd64.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/pci/agp_sis.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_bsm_klib.c#10 integrate
.. //depot/projects/trustedbsd/audit3/sys/sparc64/include/pmap.h#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/sparc64/sparc64/pmap.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/sys/elf_common.h#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/sys/mutex.h#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/tools/vnode_if.awk#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/ufs/ffs/ffs_vfsops.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/ufs/ufs/ufs_vnops.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/vm/vm_extern.h#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/vm/vm_glue.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/vm/vm_map.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/vm/vm_map.h#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/vm/vm_meter.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/vm/vm_page.c#10 integrate
.. //depot/projects/trustedbsd/audit3/tools/regression/execve/Makefile#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/execve/doexec.c#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/execve/execve.t#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/execve/tests/badinterplen#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/execve/tests/devnullscript#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/execve/tests/goodaout.c#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/execve/tests/goodscript#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/execve/tests/nonexistshell#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/execve/tests/scriptarg#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/execve/tests/scriptarg-nospace#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/fifo/fifo_misc/fifo_misc.c#2 integrate
.. //depot/projects/trustedbsd/audit3/tools/regression/ipsec/ipsec.t#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/sockets/unix_cmsg/Makefile#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/sockets/unix_cmsg/README#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/sockets/unix_cmsg/unix_cmsg.c#1 branch
.. //depot/projects/trustedbsd/audit3/tools/regression/sockets/unix_cmsg/unix_cmsg.t#1 branch
.. //depot/projects/trustedbsd/audit3/tools/tools/README#7 integrate
.. //depot/projects/trustedbsd/audit3/tools/tools/recoverdisk/Makefile#5 integrate
.. //depot/projects/trustedbsd/audit3/tools/tools/recoverdisk/recoverdisk.c#5 integrate
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/.cvsignore#2 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/Makefile#2 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/etc/Makefile#4 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/etc/default.rc#5 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/etc/head.rc#4 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/etc/releng_4.rc#5 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/etc/releng_5.rc#5 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/etc/releng_6.rc#5 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/etc/update_head.rc#3 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/etc/update_releng_4.rc#4 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/etc/update_releng_5.rc#4 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/etc/update_releng_6.rc#4 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/powerpc.diff#2 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/tbmaster.1#7 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/tbmaster.pl#8 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/tinderbox.1#7 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/tinderbox.pl#8 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/www/.cvsignore#2 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/www/Makefile#2 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/www/daemon.png.uu#2 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/www/index.cgi#5 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/www/tb.css#2 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/www/valid-css.png.uu#2 delete
.. //depot/projects/trustedbsd/audit3/tools/tools/tinderbox/www/valid-xhtml10.png.uu#2 delete
.. //depot/projects/trustedbsd/audit3/usr.bin/calendar/day.c#3 integrate
.. //depot/projects/trustedbsd/audit3/usr.bin/file/magic.5#5 integrate
.. //depot/projects/trustedbsd/audit3/usr.bin/id/id.c#4 integrate
.. //depot/projects/trustedbsd/audit3/usr.bin/kdump/mkioctls#4 integrate
.. //depot/projects/trustedbsd/audit3/usr.bin/vmstat/vmstat.c#6 integrate
.. //depot/projects/trustedbsd/audit3/usr.sbin/bluetooth/hccontrol/hccontrol.c#3 integrate
.. //depot/projects/trustedbsd/audit3/usr.sbin/cron/cron/do_command.c#4 integrate
.. //depot/projects/trustedbsd/audit3/usr.sbin/cron/cron/popen.c#2 integrate
.. //depot/projects/trustedbsd/audit3/usr.sbin/jail/jail.8#7 integrate
.. //depot/projects/trustedbsd/audit3/usr.sbin/mountd/mountd.c#6 integrate
.. //depot/projects/trustedbsd/audit3/usr.sbin/ntp/doc/ntp.conf.5#6 integrate
.. //depot/projects/trustedbsd/audit3/usr.sbin/portsnap/portsnap/portsnap.sh#4 integrate
.. //depot/projects/trustedbsd/audit3/usr.sbin/sysinstall/installUpgrade.c#5 integrate
.. //depot/projects/trustedbsd/audit3/usr.sbin/ypserv/yp_access.c#2 integrate
Differences ...
==== //depot/projects/trustedbsd/audit3/MAINTAINERS#8 (text+ko) ====
@@ -1,4 +1,4 @@
-$FreeBSD: src/MAINTAINERS,v 1.132 2006/05/24 16:01:34 wilko Exp $
+$FreeBSD: src/MAINTAINERS,v 1.135 2006/06/03 01:52:11 scottl Exp $
Please note that the content of this file is strictly advisory.
No locks listed here are valid. The only strict review requirements
@@ -20,6 +20,7 @@
subsystem login notes
-----------------------------
+kqueue jmg Pre-commit review requested.
mergemaster dougb Prefers to pre-approve commits
libc/posix1e rwatson Pre-commit review requested.
POSIX.1e ACLs rwatson Pre-commit review requested.
@@ -43,13 +44,6 @@
witness jhb Pre-commit review requested.
twe aradford at amcc.com Pre-commit review requested
twa aradford at amcc.com Pre-commit review requested
-aac scottl Pre-commit review requested
-udf scottl Pre-commit review requested.
-ips scottl Pre-commit review requested.
-iir scottl Pre-commit review requested.
-mlx scottl Pre-commit review requested.
-mly scottl Pre-commit review requested.
-maestro3 scottl Pre-commit review requested.
CAM gibbs,
ken Pre-commit review requested. send to scsi at freebsd.org
devstat(9) ken Pre-commit review requested.
==== //depot/projects/trustedbsd/audit3/contrib/bsnmp/NEWS#6 (text+ko) ====
@@ -1,3 +1,7 @@
+1.12a
+ Support for ENUM and BITS in gensnmp{tree,def}. Include directives
+ and typedefs.
+
1.12
A couple of man page fixes from various submitters.
==== //depot/projects/trustedbsd/audit3/contrib/bsnmp/gensnmpdef/gensnmpdef.1#5 (text+ko) ====
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (C) 2004-2005
+.\" Copyright (C) 2004-2006
.\" Hartmut Brandt.
.\" All rights reserved.
.\"
@@ -26,9 +26,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Begemot: bsnmp/gensnmpdef/gensnmpdef.1,v 1.5 2005/10/04 08:46:46 brandt_h Exp $
+.\" $Begemot: gensnmpdef.1 383 2006-05-30 07:40:49Z brandt_h $
.\"
-.Dd June 14, 2005
+.Dd May 28, 2006
.Dt GENSNMPDEF 1
.Os
.Sh NAME
@@ -36,7 +36,7 @@
.Nd "generate a MIB description file from MIBs"
.Sh SYNOPSIS
.Nm
-.Op Fl h
+.Op Fl hEe
.Op Fl c Ar cut
.Ar name Op Ar ...
.Sh DESCRIPTION
@@ -48,13 +48,28 @@
for feeding it into
.Xr gensnmptree 1 .
.Pp
-The
-.Fl c
-option specifies the number of initial sub-oids that should be omitted
-from the tree.
+The following options are available:
+.Bl -tag -width indent
+.It Fl c Ar cut
+Specify the number of initial sub-oids that should be omitted
+from the tree in the output.
.Xr gensnmptree 1
automatically adds 1.3.6 in front of all OIDs so the default value
of 3 is just correct in most cases.
+.It Fl E
+Generate typedefs for named enumerations.
+These are enumerations defined via the TEXTUAL-CONVENTION macro.
+The normal tree output is suppressed.
+.It Fl e
+Generate typedefs for unnamed enumerations.
+These are enumerations defined in the SYNTAX clause of an OBJECT-TYPE macro.
+The name of the enumeration is formed by appending the string
+.Ql Type
+to the name of the object.
+The normal tree output is suppressed.
+.It Fl h
+Print a short help text and exit.
+.El
.Pp
.Nm
does no attempt on sorting the OID tree so in case of complex and
==== //depot/projects/trustedbsd/audit3/contrib/bsnmp/gensnmpdef/gensnmpdef.c#3 (text+ko) ====
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004
+ * Copyright (C) 2004-2006
* Hartmut Brandt.
* All rights reserved.
*
@@ -26,8 +26,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Begemot: bsnmp/gensnmpdef/gensnmpdef.c,v 1.3 2004/08/06 08:46:45 brandt Exp $
+ * $Begemot: gensnmpdef.c 383 2006-05-30 07:40:49Z brandt_h $
*/
+#include <sys/queue.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -38,9 +40,13 @@
#include <smi.h>
static const char usgtxt[] =
-"Usage: gensnmpdef [-h] [-c <cut>] MIB [MIB ...]\n"
+"Usage: gensnmpdef [-hEe] [-c <cut>] MIB [MIB ...]\n"
"Options:\n"
" -c specify the number of initial sub-oids to cut from the oids\n"
+" -E extract named enum types. Print a typedef for all enums defined\n"
+" in syntax clauses of normal objects. Suppress normal output.\n"
+" -e extract unnamed enum types. Print a typedef for all enums defined\n"
+" as textual conventions. Suppress normal output.\n"
" -h print this help\n"
"MIBs are searched according to the libsmi(3) search rules and can\n"
"be specified either by path or module name\n";
@@ -48,6 +54,14 @@
static SmiNode *last_node;
static u_int cut = 3;
+struct tdef {
+ char *name;
+ SLIST_ENTRY(tdef) link;
+};
+
+static SLIST_HEAD(, tdef) tdefs = SLIST_HEAD_INITIALIZER(tdef);
+static int do_typedef = 0;
+
static void print_node(SmiNode *n, u_int level);
static void
@@ -135,7 +149,7 @@
[SMI_BASETYPE_FLOAT32] = "FLOAT32",
[SMI_BASETYPE_FLOAT64] = "FLOAT64",
[SMI_BASETYPE_FLOAT128] = "FLOAT128",
- [SMI_BASETYPE_ENUM] = "INTEGER",
+ [SMI_BASETYPE_ENUM] = "ENUM",
[SMI_BASETYPE_BITS] = "BITS",
};
@@ -152,6 +166,18 @@
};
static void
+print_enum(SmiType *t)
+{
+ SmiNamedNumber *nnum;
+
+ printf(" (");
+ for (nnum = smiGetFirstNamedNumber(t); nnum != NULL;
+ nnum = smiGetNextNamedNumber(nnum))
+ printf(" %ld %s", nnum->value.value.integer32, nnum->name);
+ printf(" )");
+}
+
+static void
print_type(SmiNode *n)
{
SmiType *type;
@@ -168,6 +194,14 @@
}
}
printf("%s", type_names[type->basetype]);
+
+ if (type->basetype == SMI_BASETYPE_ENUM ||
+ type->basetype == SMI_BASETYPE_BITS)
+ print_enum(type);
+
+ else if (type->basetype == SMI_BASETYPE_OCTETSTRING &&
+ type->name != NULL)
+ printf(" | %s", type->name);
}
static void
@@ -359,6 +393,111 @@
printf(")\n");
}
+static void
+save_typdef(char *name)
+{
+ struct tdef *t;
+ t = malloc(sizeof(struct tdef));
+
+ if (t == NULL)
+ err(1, NULL);
+
+ memset(t, 0 , sizeof(struct tdef));
+ t->name = name;
+ SLIST_INSERT_HEAD(&tdefs, t, link);
+}
+
+static void
+tdefs_cleanup(void)
+{
+ struct tdef *t;
+
+ while ((t = SLIST_FIRST(&tdefs)) != NULL) {
+ SLIST_REMOVE_HEAD(&tdefs, link);
+ free(t);
+ }
+}
+
+static void
+print_enum_typedef(SmiType *t)
+{
+ SmiNamedNumber *nnum;
+
+ for (nnum = smiGetFirstNamedNumber(t); nnum != NULL;
+ nnum = smiGetNextNamedNumber(nnum)) {
+ printf("\t%ld %s\n" , nnum->value.value.integer32, nnum->name);
+ }
+}
+
+static void
+print_stype(SmiNode *n)
+{
+ SmiType *type;
+ struct tdef *t = NULL;
+
+ type = smiGetNodeType(n);
+ assert(type != NULL);
+
+ if (type->basetype == SMI_BASETYPE_ENUM) {
+ if (do_typedef == 'e' && type->name != NULL) {
+ SLIST_FOREACH(t, &tdefs, link) {
+ if (strcmp(t->name, type->name) == 0)
+ return;
+ }
+ save_typdef(type->name);
+ printf("typedef %s ENUM (\n", type->name);
+ } else if (do_typedef == 'E' && type->name == NULL)
+ printf("typedef %sType ENUM (\n", n->name);
+ else
+ return;
+
+ print_enum_typedef(type);
+ printf(")\n\n");
+
+ } else if (type->basetype == SMI_BASETYPE_BITS) {
+ if (do_typedef == 'e' && type->name != NULL) {
+ SLIST_FOREACH(t, &tdefs, link) {
+ if (strcmp(t->name, type->name) == 0)
+ return;
+ }
+ save_typdef(type->name);
+ printf("typedef %s BITS (\n", type->name);
+ } else if (do_typedef == 'E' && type->name == NULL)
+ printf("typedef %sType BITS (\n", n->name);
+ else
+ return;
+
+ print_enum_typedef(type);
+ printf(")\n\n");
+ }
+}
+
+static void
+print_typdefs(SmiNode *n)
+{
+ SmiNode *p;
+
+ p = n;
+ n = smiGetFirstChildNode(n);
+ while (n != NULL) {
+ switch (n->nodekind) {
+ case SMI_NODEKIND_SCALAR:
+ case SMI_NODEKIND_COLUMN:
+ print_stype(n);
+ break;
+ case SMI_NODEKIND_COMPLIANCE:
+ case SMI_NODEKIND_GROUP:
+ save_node(n);
+ return;
+ default:
+ break;
+ }
+ n = smiGetNextChildNode(n);
+ }
+
+ save_node(p);
+}
+
int
main(int argc, char *argv[])
{
@@ -373,7 +512,7 @@
smiInit(NULL);
- while ((opt = getopt(argc, argv, "c:h")) != -1)
+ while ((opt = getopt(argc, argv, "c:Eeh")) != -1)
switch (opt) {
case 'c':
@@ -388,6 +527,14 @@
cut = (u_int)u;
break;
+ case 'E':
+ do_typedef = 'E';
+ break;
+
+ case 'e':
+ do_typedef = 'e';
+ break;
+
case 'h':
fprintf(stderr, usgtxt);
exit(0);
@@ -414,9 +561,12 @@
for (opt = 0; opt < argc; opt++) {
n = smiGetFirstNode(mods[opt], SMI_NODEKIND_ANY);
for (;;) {
- level = open_node(n, level, &last);
- print_it(n, level);
- last = n;
+ if (do_typedef == 0) {
+ level = open_node(n, level, &last);
+ print_it(n, level);
+ last = n;
+ } else
+ print_typdefs(n);
if (last_node == NULL ||
(n = smiGetNextNode(last_node, SMI_NODEKIND_ANY))
@@ -424,6 +574,10 @@
break;
}
}
- level = close_node(last->oidlen - 1, level - 1);
+ if (last != NULL && do_typedef == 0)
+ level = close_node(last->oidlen - 1, level - 1);
+ else if (do_typedef != 0)
+ tdefs_cleanup();
+
return (0);
}
==== //depot/projects/trustedbsd/audit3/contrib/bsnmp/gensnmptree/gensnmptree.1#6 (text+ko) ====
@@ -2,6 +2,9 @@
.\" Copyright (c) 2001-2005
.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
.\" All rights reserved.
+.\" Copyright (c) 2006
+.\" Hartmut Brandt
+.\" All rights reserved.
.\"
.\" Author: Harti Brandt <harti at freebsd.org>
.\"
@@ -26,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Begemot: bsnmp/gensnmptree/gensnmptree.1,v 1.7 2006/02/27 09:52:08 brandt_h Exp $
+.\" $Begemot: gensnmptree.1 383 2006-05-30 07:40:49Z brandt_h $
.\"
-.Dd February 27, 2006
+.Dd May 26, 2006
.Dt GENSNMPTREE 1
.Os
.Sh NAME
@@ -36,7 +39,9 @@
.Nd "generate C and header files from a MIB description file"
.Sh SYNOPSIS
.Nm
-.Op Fl helt
+.Op Fl dEehlt
+.Op Fl I Ar directory
+.Op Fl i Ar infile
.Op Fl p Ar prefix
.Op Ar name Ar ...
.Sh DESCRIPTION
@@ -49,9 +54,12 @@
daemon or for module writers.
The second form may be used by SNMP client program writers.
.Pp
-If the
-.Fl e
-option is not used
+If none of the options
+.Fl e ,
+.Fl E
+or
+.FL t
+are used
.Nm
reads a MIB description from its standard input and creates two files: a
C-file
@@ -61,12 +69,20 @@
during PDU processing
and a header file
.Ar prefix Ns tree.h
-containing appropriate declarations of the callback functions used in this table
-and the table itself.
+containing appropriate declarations of the callback functions used in this
+table, the table itself and definitions for all enums.
.Pp
-If the
-.Fl e
-option is specified
+The following options are available:
+.Bl -tag -width ".Fl E"
+.It Fl d
+Switch on debugging.
+.It Fl E
+Extract enumerations and bit constructs.
+In this mode the tool emits
+a header file that contains for each type given on the command line a
+C-enum definition and a preprocessor define that may be used to map
+values to strings.
+.It Fl e
.Nm
expects MIB variable names (only the last component) on its command line.
It reads a MIB specification from standard input and for each MIB variable
@@ -83,13 +99,13 @@
.It Va OID_ Ns Ar name
is the last component of the OID.
.El
-.Pp
-The options are as follows:
-.Bl -tag -width ".Fl d Ar argument"
.It Fl h
Print a short help page.
-.It Fl e
-Enter extract mode.
+.It Fl I Ar directory
+Add the named directory to the include path just before the standard include
+directories.
+.It Fl i Ar infile
+Read from the named file instead of standard input.
.It Fl l
Generate local preprocessor includes.
This is used for bootstrapping
@@ -103,26 +119,44 @@
.Sh MIBS
The syntax of the MIB description file can formally be specified as follows:
.Bd -unfilled -offset indent
-file := tree | tree file
+ file := top | top file
+
+ top := tree | typedef | include
+
+ tree := head elements ')'
+
+ entry := head ':' index STRING elements ')'
+
+ leaf := head type STRING ACCESS ')'
+
+ column := head type ACCESS ')'
+
+ type := BASETYPE | BASETYPE '|' subtype | enum | bits
+
+ subtype := STRING
+
+ enum := ENUM '(' value ')'
+
+ bits := BITS '(' value ')'
-tree := head elements ')'
+ value := INT STRING | INT STRING value
-entry := head ':' index STRING elements ')'
+ head := '(' INT STRING
-leaf := head TYPE STRING ACCESS ')'
+ elements := EMPTY | elements element
-column := head TYPE ACCESS ')'
+ element := tree | leaf | column
-head := '(' INT STRING
+ index := type | index type
-elements := EMPTY | elements element
+ typedef := 'typedef' STRING type
-element := tree | leaf
+ include := 'include' filespec
-index := TYPE | index TYPE
+ filespec := '"' STRING '"' | '<' STRING '>'
.Ed
.Pp
-.Ar TYPE
+.Ar BASETYPE
specifies a SNMP data type and may be one of
.Bl -bullet -offset indent -compact
.It
@@ -163,10 +197,25 @@
is a decimal integer and
.Ar STRING
is any string starting with a letter or underscore and consisting of
-letters, digits and underscores, that is not one of the keywords.
+letters, digits, underscores and minuses, that is not one of the keywords.
+.Pp
+The
+.Ar typedef
+directive associates a type with a single name.
+.Pp
+The
+.Ar include
+directive is replaced by the contents of the named file.
.Sh EXAMPLES
The following MIB description describes the system group:
.Bd -literal -offset indent
+include "tc.def"
+
+typedef AdminStatus ENUM (
+ 1 up
+ 2 down
+)
+
(1 internet
(2 mgmt
(1 mibII
==== //depot/projects/trustedbsd/audit3/contrib/bsnmp/gensnmptree/gensnmptree.c#6 (text+ko) ====
@@ -3,7 +3,7 @@
* Fraunhofer Institute for Open Communication Systems (FhG Fokus).
* All rights reserved.
*
- * Copyright (c) 2004
+ * Copyright (c) 2004-2006
* Hartmut Brandt.
* All rights reserved.
*
@@ -30,21 +30,35 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Begemot: bsnmp/gensnmptree/gensnmptree.c,v 1.44 2006/02/14 09:04:17 brandt_h Exp $
+ * $Begemot: gensnmptree.c 383 2006-05-30 07:40:49Z brandt_h $
*
* Generate OID table from table description.
*
* Syntax is:
* ---------
- * file := tree | tree file
+ * file := top | top file
+ *
+ * top := tree | typedef | include
*
* tree := head elements ')'
*
* entry := head ':' index STRING elements ')'
*
- * leaf := head TYPE STRING ACCESS ')'
+ * leaf := head type STRING ACCESS ')'
+ *
+ * column := head type ACCESS ')'
+ *
+ * type := BASETYPE | BASETYPE '|' subtype | enum | bits
+ *
+ * subtype := STRING
+ *
+ * enum := ENUM '(' value ')'
+ *
+ * bits := BITS '(' value ')'
+ *
+ * value := optminus INT STRING | optminus INT STRING value
*
- * column := head TYPE ACCESS ')'
+ * optminus := '-' | EMPTY
*
* head := '(' INT STRING
*
@@ -52,8 +66,13 @@
*
* element := tree | leaf | column
*
- * index := TYPE | index TYPE
+ * index := type | index type
+ *
+ * typedef := 'typedef' STRING type
+ *
+ * include := 'include' filespec
*
+ * filespec := '"' STRING '"' | '<' STRING '>'
*/
#include <sys/types.h>
#include <sys/param.h>
@@ -82,20 +101,27 @@
u_int tree_size;
static const char *file_prefix = "";
-static FILE *fp;
/* if true generate local include paths */
static int localincs = 0;
+/* if true print tokens */
+static int debug;
+
static const char usgtxt[] = "\
-Generate SNMP tables. Copyright (c) 2001-2002 Fraunhofer Institute for\n\
-Open Communication Systems (FhG Fokus). All rights reserved.\n\
-usage: gensnmptree [-hel] [-p prefix] [name]...\n\
+Generate SNMP tables.\n\
+usage: gensnmptree [-dEehlt] [-I directory] [-i infile] [-p prefix]\n\
+ [name]...\n\
options:\n\
+ -d debug mode\n\
+ -E extract the named enums and bits only\n\
+ -e extract the named oids or enums\n\
-h print this info\n\
- -e extrace the named oids\n\
+ -I directory add directory to include path\n\
+ -i ifile read from the named file instead of stdin\n\
-l generate local include directives\n\
-p prefix prepend prefix to file and variable names\n\
+ -t generated a .def file\n\
";
/*
@@ -153,6 +179,29 @@
static LIST_HEAD(, func) funcs = LIST_HEAD_INITIALIZER(funcs);
+struct enums {
+ const char *name;
+ long value;
+ TAILQ_ENTRY(enums) link;
+};
+
+struct type {
+ const char *name;
+ const char *from_fname;
+ u_int from_lno;
+ u_int syntax;
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the trustedbsd-cvs
mailing list