Subject: bin/17976: rndctl flaws
To: None <gnats-bugs@gnats.netbsd.org>
From: None <ChristianBiere@gmx.de>
List: netbsd-bugs
Date: 08/17/2002 16:30:19
>Number:         17976
>Category:       bin
>Synopsis:       rndctl flaws
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 17 16:31:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Christian Biere
>Release:        1.6_BETA4
>Organization:
>Environment:
NetBSD localhost 1.6_BETA4 NetBSD 1.6_BETA4 (DURON) #2: Fri Aug 16 08:19:33 CEST 2002     root@localhost:/usr/src-1-6/sys/arch/i386/compile/DURON i386

>Description:
# rndctl -ec -t net 

This has no effect at all. There's not net device listed.

# dmesg
[...]
sip0 at pci0 dev 3 function 0: SiS 900 10/100 Ethernet, rev 0x90
sip0: interrupting at irq 5
sip0: Ethernet address 00:07:95:a9:a5:7f
ukphy0 at sip0 phy 1: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000004, model 0x0020, rev. 1
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
[...]

I cannot add sip0 or ukphy0

# rndctl -sl

Source                 Bits Type      Flags
fd0                       0 disk estimate, collect
pms0                  51125 tty  estimate, collect
pckbd0                83309 tty  estimate, collect
cd1                   65088 disk estimate, collect
cd0                   72000 disk estimate, collect
wd0                  103229 disk estimate, collect

Why can I use pms0 and pckbd0 but not tty00? Is there any way to add other devices like e.g. audio0?
The man page rndctl(1) should also mention all possible types.

/usr/src/sbin/rndctl/rndctl.c:
arg_t source_types[] = {
        { "???",     RND_TYPE_UNKNOWN },
        { "disk",    RND_TYPE_DISK },
        { "net",     RND_TYPE_NET },
        { "net",     RND_TYPE_NET },
        { "tape",    RND_TYPE_TAPE },
        { "tty",     RND_TYPE_TTY },
        { "rng",     RND_TYPE_RNG },
        { NULL,      0 }
};

There's a duplicate entry for "net". Is that a copy&paste victim or is there any reason?

Regards,
Christian
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted: