Serial port's input buffer partially flushed on HPUX

We are facing some problems when trying to flush the input buffer on a serial port. Our unix program is first reading 2 bytes on a serial port onto which a pc is connected, sending us messages. Depending on the value of these 2 first bytes, we may have to ignore the remaining of the message. In such a case we use tcflush to empty the input buffer before reading again. All is ok when we receive short messages (less than 64 bytes), but when receiving bigger messages, it seems that the tcflush call doesn’t empty the input buffer, but flushes only the 64 first bytes. Thus the next read begins at 65th byte of the preceding message.

Did anyone encounter such issue?
Could this be due to some configuration parameter?

Any idea will be welcome

What O.S. version, Digi product and driver version are you using?

We are using HP-UX 11iv2 (B.11.23) on Hp Itanium (ia64).
The product is a Black Box 16-Port Secure Device Server, and drpd -V replies “drpd: version: drp_rel_1_3_5”, but the drp.README file says it’s version 1.3.6 (i downloaded package 40001847K in July).

I recommend contacting Digi Tech. Support directly for this matter.

Thanks userid0, i’ll follow your recommendation.