1

Normally in Linux PCI drivers may expose a control interface to user-land via a character device, e.g. /dev/drv_ctl, and a user application can read/write I/O control commands with ioctl() on the open file descriptor.

In Linux we create this with register_chrdev() kernel API.

I would like to have the same or similar mechanism and behaviour on Solaris, but seems that on Solaris it works slightly different; DDI routine ddi_create_minor_node() requires a node type indicating audio, block, net etc. device, this looks quite vague to me, for example what type a crypto PCI device belongs to?

Also, it seems that ddi_create_minor_node() creates a node under /devices/* and not under /dev/*

I would appreciate if someone could clarify my doubts and point out at the right directions.

Thanks.

Mark
  • 6,052
  • 8
  • 61
  • 129

1 Answers1

2

Typically you create a symlink under /dev yourself, using a name which is useful to you. That would point to your actual /devices path which was created by calling ddi_create_minor_node(). You'll find the list of ddi node types in <sys/sunddi.h>; for a crypto device (what even is that?) you'd probably want DDI_PSEUDO.

James McPherson
  • 2,476
  • 1
  • 12
  • 16