> For use in the GUI of an application, I need to have a list of detected > serial and parallel ports. This list is used to fill a combo box where > the user select the port to use (example: in Windows, it would be a list > with COM1,COM2, etc. > > On OpenBSD, how can we retrieve the detected serial and parallel ports?
There is no clean machine-independent way. You could perhaps do something like use the output of pstat -t, but remove the console and pseudo-ttys, and you would probably be OK. The console devices will be somewhat machine dependent, but the pseudo-ttys are easy to spot.