0

I came across the TIOGCPKT ioctl command in the tty_ioctl man page. It sounds like it would be the perfect fit for an application I'm working on that wants to detect whether a pty fd is configured in packet mode. I do have a roundabout way of figuring this out but the ioctl command seems like a much cleaner approach. Although the man page mentions that it's been available since Linux 3.8, I can't seem to find the macro declared/defined in any header file (in /usr/include) or in the kernel source. I'm running Linux 4.9.10.

Does anyone know the history behind this? Or am I missing something?

Thanks.

userRG
  • 99
  • 7

1 Answers1

0

You've just got a typo, that's all. It's TIOCGPKT, not TIOGCPKT.

Nominal Animal
  • 38,216
  • 5
  • 59
  • 86
  • Thanks, I missed that! I was just copying the macro from the man page which has the same typo. – userRG Mar 18 '17 at 22:24
  • @userRG: Oh, so it has! Thank you; I [reported](https://www.kernel.org/doc/man-pages/reporting_bugs.html) the typo upstream. – Nominal Animal Mar 18 '17 at 22:37
  • @userRG: I just got a reply from Michael Kerrisk that the typo is fixed in the next release. It will take some time for the fix to be visible on the [online `man 4 tty_ioctl` page](http://man7.org/linux/man-pages/man4/tty_ioctl.4.html) and even longer for the change to "percolate" to distributions' man pages, but it is underway. – Nominal Animal Mar 20 '17 at 19:34