Line Disciplines

In Linux, TTY Management provides the TTY_LDISC (Line Discpline) structure to provide the capability of using the generic serial hardware for a new purpose.
Does QNX provide an equivalent for that structure?

I basically want to port a linux driver for lonworks serial socket interface to QNX. I want to use the existing serial driver (devc-ser8250) to do the hardware related things.
So, I want my driver/resource manager in QNX to be an interface in between the client process and the serial driver (devc-ser8250). Any pointers on how could this be accomplished?

I’m not familiar with the Linux stuff you are talking about. If it is what I think it is then now the QNX driver doesn’t support that.

How I don’t think there is a need for that. Either you take the source to devc-ser8250 and turn it into your own driver, or you simply use the available interface (open/read/write/close) to devc-ser8250 to access the serial driver.

If for some reason you’d want to driver/resource manager to take over /dev/serx then you can use union mount point but I don’t think you would want to get into that, nor does it sounds like your design requires it.

The latter case seems to be a more charming option, but in that case how will I attach my own interrupt handler for a particular serial port. Because devc-ser8250 has probably got its own interrupt handler.
And if I attach my interrupt handler to the IRQ of a particular port, how will QNX get to know which handler shall it call?

If we talk about the viability of the former option that you suggested, I’d want to have two mountpoints viz. “/dev/ser1” as well as “/dev/lon”. I have no idea how will I tweak in the devc-ser8250 code to facilitate that.
The design will require to monitor the Interrupts of the serial port.

Any suggestions

If need to monitor interrupt serial port, I suspect you don`t have to, then you cannot have devc-ser8250 running. If you want to take control of the serial hardware, you cannot use devc-ser8250 at the same time.

As for /dev/lon it will be a resmgr yes, but it is at the same time a normal program and if you can use the standard services devc-8250 provide then devc-ser8250 doesn`t care about the nature of the program that talk to it.