{"id":2222520,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2222520/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260412-ioctl-v1-1-1d998a460560@bsdimp.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.2/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260412-ioctl-v1-1-1d998a460560@bsdimp.com>","list_archive_url":null,"date":"2026-04-12T16:02:24","name":"[01/17] bsd-user: Add FreeBSD tty ioctl definitions","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"1198172b5d626e6b2a2bf14add64d3babd926c6d","submitter":{"id":1896,"url":"http://patchwork.ozlabs.org/api/1.2/people/1896/?format=json","name":"Warner Losh","email":"imp@bsdimp.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260412-ioctl-v1-1-1d998a460560@bsdimp.com/mbox/","series":[{"id":499616,"url":"http://patchwork.ozlabs.org/api/1.2/series/499616/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=499616","date":"2026-04-12T16:02:24","name":"bsd-user: upstream ioctl","version":1,"mbox":"http://patchwork.ozlabs.org/series/499616/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2222520/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2222520/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=bsdimp-com.20251104.gappssmtp.com\n header.i=@bsdimp-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=ruWU3PSN;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4ftwNB4m3pz1yGl\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 02:04:41 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wBxI4-0006SA-Nu; Sun, 12 Apr 2026 12:04:06 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <imp@bsdimp.com>) id 1wBxHn-0006Pl-Ip\n for qemu-devel@nongnu.org; Sun, 12 Apr 2026 12:03:48 -0400","from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <imp@bsdimp.com>) id 1wBxHf-0004U8-Jw\n for qemu-devel@nongnu.org; Sun, 12 Apr 2026 12:03:43 -0400","by mail-oi1-x232.google.com with SMTP id\n 5614622812f47-471618e202bso881308b6e.2\n for <qemu-devel@nongnu.org>; Sun, 12 Apr 2026 09:03:35 -0700 (PDT)","from rebo.bsdimp.com ([50.253.99.174])\n by smtp.gmail.com with ESMTPSA id\n 586e51a60fabf-423ddbee0fesm6457006fac.17.2026.04.12.09.03.31\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 12 Apr 2026 09:03:31 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=bsdimp-com.20251104.gappssmtp.com; s=20251104; t=1776009813; x=1776614613;\n darn=nongnu.org;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to; bh=GYx14N1uigAfO7+nUb6U6pmUr1t2J4FtSk0xX48qd80=;\n b=ruWU3PSNjBoFKCHiDmxyEE3doMzXCbWmis1e7gqd03OoXDoRfvEPhxxOEseCj1TddH\n bWL8JtcMeZve0Tr81rTP1WqUd32yygdi2Z5n9cWkAoMxHhDsPvbfqNk21pyN76fir5+L\n NmGl/pllH0wq9oHLwxNhEy4qVcAFFlJLviq6yI3KIoHq8I0URkVxcFYS64QxTpKD0EXB\n xq65FoUV06c9UtPlqiPZ6V3vbgdsRZSH/YFQA53yQiWYOR85qdOyIZ7I78REc35cn6Tm\n GM7ZpkEg9fHLc/PxeJJOxSp/DzXl7U6VAgc9uM5pFs0utB6AbvG060s5Q4EkPkhj0UWM\n ysgA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776009813; x=1776614613;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=GYx14N1uigAfO7+nUb6U6pmUr1t2J4FtSk0xX48qd80=;\n b=Jdz3jhYBzk9jNjr5dhJg/Qzk9gJ3d8yT/tC9gRhJkxeiT9vC+IrnLRSeSrrecfXfwc\n iPr7VVq5lxKE0un3ugpc4m168BrEpraG9BdffCXs1RLbPz//IyChuaxxuxBJu8GAoy83\n K6ojucq3W8lK8G4kdpfo7NN4061Ni2MgxWslx+dqvutpvEQ6qeakTrzLVk/Ix+fmsWfc\n WnZ6Oqd53UGDOq7/fNnqOzlLHB43h8Rv+KTKTluTXMT+GUItb63aC+qpzBgNBC7AZF6L\n Dfryum0zuvmmX+15wfMs5EeqNJeUoHhfX5h091iAm+C/IwCfpJbl8+qbF1fcAaLqVHy0\n vwOA==","X-Gm-Message-State":"AOJu0YwMnkI8J+bDR7C0dQ+Ud2kZBgKu9kMean267OzP+oW5bnnpN2FU\n bS9eDsXK4JdqqvBSto+DlXr9hUs01OD9kHUDoKN9VBTnn58GHw/7jUlSlcxq2prHPwI+KZPTB82\n XEVJOWqc=","X-Gm-Gg":"AeBDiesriCSPorPCHnbE8S7EyxWYonSv550eRv3PHedil1ipXBLmXptSuTQSHTNnBk5\n RaKhMI6QryUiyIG6MR2EL0zyIcSt/8Ccw+wOU5fu0SE1m4U+CHaex9VsU2lGh05F31IGQb5TKa0\n q++4/hqYoUtyDYTqyowSwJV87vif2KX+NcqKO8c3XK2HeHN7h4Wj2wH9WaEwO3lHCeVFCte/MJU\n PhpYDE1CPTtQv41R8JunwqMMj1oe9+ToCn+LsGyVntiBrYJctPAe+0bG9+xq1MhsyBX/LvW9xgc\n RsknLZ0J5lb2/B0wurRl6F6QjKVlkUgijid0zxj340jzYa8h4KkBNRnrwNPAzBDzpV75lichI/l\n xv0eccRvBopN0iceqq9siD6UyZllUz7j2f08EnSpAWzPzSZSx5JBOK0ieIXtR9C0fyrLLz0WizY\n 1Q0uXxcZskjQ==","X-Received":"by 2002:a05:6808:6ec2:b0:467:cda:f15d with SMTP id\n 5614622812f47-4789e71bb4emr4719965b6e.26.1776009812584;\n Sun, 12 Apr 2026 09:03:32 -0700 (PDT)","From":"Warner Losh <imp@bsdimp.com>","Date":"Sun, 12 Apr 2026 10:02:24 -0600","Subject":"[PATCH 01/17] bsd-user: Add FreeBSD tty ioctl definitions","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","Message-Id":"<20260412-ioctl-v1-1-1d998a460560@bsdimp.com>","References":"<20260412-ioctl-v1-0-1d998a460560@bsdimp.com>","In-Reply-To":"<20260412-ioctl-v1-0-1d998a460560@bsdimp.com>","To":"qemu-devel@nongnu.org","Cc":"Kyle Evans <kevans@freebsd.org>, Warner Losh <imp@bsdimp.com>,\n \"Stacey D. Son\" <sson@freebsd.org>","X-Mailer":"b4 0.14.3","X-Developer-Signature":"v=1; a=openpgp-sha256; l=12750; i=imp@bsdimp.com;\n h=from:subject:message-id; bh=9PqYfDLp+JL+z2iqielsRW/geVLSgR0zAZWSVrUXOvk=;\n b=owEBbQKS/ZANAwAKAWwc0Sh9sBEAAcsmYgBp28IfZm/P+bAn0JfFCGFvTaXi427u9wxLCueq+\n kQRiusew6CJAjMEAAEKAB0WIQQgNfiUsAqjz3zN4bdsHNEofbARAAUCadvCHwAKCRBsHNEofbAR\n ABgYEADaTg7ErAMQ6u1nygmp7yIIm67zRGfUysF8LJiei4/cRDEs4NiLNYxf6EhDcdnAYawL4EZ\n mTGNXz/7MhSJeuP8DqdGR3wSA+KjB4Z6GW+/e/T6w4pJFkThJfLrn3cozqhtCbojX7VdlRxH+SI\n ZQdyRoTueplk1diVf+alDMnCQRFafaPOinqDlnDNuBklky1q/Jxng/YQG8O0I2EhulPmRUVnIXP\n Zoz4SvdLAGFNIzBR4fH4VjabID8lF4CIFthDIlSFwkEJSlxMcZ7fS4nq+IcsqhuPyu7pNmoMY8g\n zfn0F5mQRVACetq2yXOkbOmjfdDWV1KZEXGlm9v/qtNszdwmP9KDU1DTD891OPw9i+bpAYzqo+Z\n dVkn3zE5U7TmFvYLUq0AuI++uTm9+dH1FmCE6gBUZ2UpBrPcZ84UZJOzlRrJt5suTCa/FoJfMRi\n 2JAe6naBkGrMwP4XTMRJ1Ac12aiSX22wZ3tGV/B5kVHmQv1IIGm+BCDPDJcOWm9TumhXm4xtZui\n SzPotFHTucBL8pNv32NhdziOQW1LGPfhUBn4yVfCh1P0buNvxjqaWwBdOqeJ63J4n7UxVMSFsxg\n LnYSl7iMlIOwnNpjO0w6ATWk2eWHqZ5Jbe1ds/UIJDU2miO5VLzF5xYm8PLfUNJ7ur9R46xR/ED\n NbeVESjNteTd7oA==","X-Developer-Key":"i=imp@bsdimp.com; a=openpgp;\n fpr=2035F894B00AA3CF7CCDE1B76C1CD1287DB01100","Received-SPF":"none client-ip=2607:f8b0:4864:20::232;\n envelope-from=imp@bsdimp.com; helo=mail-oi1-x232.google.com","X-Spam_score_int":"-18","X-Spam_score":"-1.9","X-Spam_bar":"-","X-Spam_report":"(-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_NONE=0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"From: \"Stacey D. Son\" <sson@freebsd.org>\n\nAdd os-ioctl-ttycom.h with terminal control ioctl definitions including\nTARGET_TIOCGETA, TARGET_TIOCSETA, window size ioctls, and the\ntarget_termios structure for terminal I/O control.\n\nSigned-off-by: Stacey D. Son <sson@freebsd.org>\nSigned-off-by: Warner Losh <imp@bsdimp.com>\n---\n bsd-user/freebsd/os-ioctl-ttycom.h | 237 +++++++++++++++++++++++++++++++++++++\n 1 file changed, 237 insertions(+)","diff":"diff --git a/bsd-user/freebsd/os-ioctl-ttycom.h b/bsd-user/freebsd/os-ioctl-ttycom.h\nnew file mode 100644\nindex 0000000000..94ffa06558\n--- /dev/null\n+++ b/bsd-user/freebsd/os-ioctl-ttycom.h\n@@ -0,0 +1,237 @@\n+/*\n+ * FreeBSD ttycom definitions for ioctl(2) emulation\n+ *\n+ * Copyright (c) 2013 Stacey D. Son\n+ *\n+ * SPDX-License-Identifier: GPL-2.0-or-later\n+ */\n+#ifndef BSD_USER_FREEBSD_OS_IOCTL_TTYCOM_H\n+#define BSD_USER_FREEBSD_OS_IOCTL_TTYCOM_H\n+\n+#include \"os-ioctl-ioccom.h\"\n+\n+/* From sys/ttycom.h and sys/_termios.h */\n+\n+#define TARGET_VEOF     0   /* ICANON */\n+#define TARGET_VEOL     1   /* ICANON */\n+#define TARGET_VEOL2    2   /* ICANON together with IEXTEN */\n+#define TARGET_VERASE   3   /* ICANON */\n+#define TARGET_VWERASE  4   /* ICANON together with IEXTEN */\n+#define TARGET_VKILL    5   /* ICANON */\n+#define TARGET_VREPRINT 6   /* ICANON together with IEXTEN */\n+#define TARGET_VERASE2  7   /* ICANON */\n+#define TARGET_VINTR    8   /* ISIG */\n+#define TARGET_VQUIT    9   /* ISIG */\n+#define TARGET_VSUSP    10  /* ISIG */\n+#define TARGET_VDSUSP   11  /* ISIG together with IEXTEN */\n+#define TARGET_VSTART   12  /* IXON, IXOFF */\n+#define TARGET_VSTOP    13  /* IXON, IXOFF */\n+#define TARGET_VLNEXT   14  /* IEXTEN */\n+#define TARGET_VDISCARD 15  /* IEXTEN */\n+#define TARGET_VMIN     16  /* !ICANON */\n+#define TARGET_VTIME    17  /* !ICANON */\n+#define TARGET_VSTATUS  18  /* ICANON together with IEXTEN */\n+/*                      19         spare 2 */\n+#define TARGET_NCCS     20\n+\n+/*\n+ * Input flags - software input processing\n+ */\n+#define TARGET_IGNBRK   0x00000001  /* ignore BREAK condition */\n+#define TARGET_BRKINT   0x00000002  /* map BREAK to SIGINTR */\n+#define TARGET_IGNPAR   0x00000004  /* ignore (discard) parity errors */\n+#define TARGET_PARMRK   0x00000008  /* mark parity and framing errors */\n+#define TARGET_INPCK    0x00000010  /* enable checking of parity errors */\n+#define TARGET_ISTRIP   0x00000020  /* strip 8th bit off chars */\n+#define TARGET_INLCR    0x00000040  /* map NL into CR */\n+#define TARGET_IGNCR    0x00000080  /* ignore CR */\n+#define TARGET_ICRNL    0x00000100  /* map CR to NL (ala CRMOD) */\n+#define TARGET_IXON     0x00000200  /* enable output flow control */\n+#define TARGET_IXOFF    0x00000400  /* enable input flow control */\n+#define TARGET_IXANY    0x00000800  /* any char will restart after stop */\n+#define TARGET_IMAXBEL  0x00002000  /* ring bell on input queue full */\n+\n+/*\n+ * Output flags - software output processing\n+ */\n+#define TARGET_OPOST    0x00000001  /* enable following output processing */\n+#define TARGET_ONLCR    0x00000002  /* map NL to CR-NL (ala CRMOD) */\n+#define TARGET_TABDLY   0x00000004  /* tab delay mask */\n+#define TARGET_TAB0     0x00000000  /* no tab delay and expansion */\n+#define TARGET_TAB3     0x00000004  /* expand tabs to spaces */\n+#define TARGET_ONOEOT   0x00000008  /* discard EOT's (^D) on output) */\n+#define TARGET_OCRNL    0x00000010  /* map CR to NL on output */\n+#define TARGET_ONOCR    0x00000020  /* no CR output at column 0 */\n+#define TARGET_ONLRET   0x00000040  /* NL performs CR function */\n+\n+/*\n+ * Control flags - hardware control of terminal\n+ */\n+#define TARGET_CIGNORE      0x00000001  /* ignore control flags */\n+#define TARGET_CSIZE        0x00000300  /* character size mask */\n+#define     TARGET_CS5      0x00000000  /* 5 bits (pseudo) */\n+#define     TARGET_CS6      0x00000100  /* 6 bits */\n+#define     TARGET_CS7      0x00000200  /* 7 bits */\n+#define     TARGET_CS8      0x00000300  /* 8 bits */\n+#define TARGET_CSTOPB       0x00000400  /* send 2 stop bits */\n+#define TARGET_CREAD        0x00000800  /* enable receiver */\n+#define TARGET_PARENB       0x00001000  /* parity enable */\n+#define TARGET_PARODD       0x00002000  /* odd parity, else even */\n+#define TARGET_HUPCL        0x00004000  /* hang up on last close */\n+#define TARGET_CLOCAL       0x00008000  /* ignore modem status lines */\n+#define TARGET_CCTS_OFLOW   0x00010000  /* CTS flow control of output */\n+#define TARGET_CRTSCTS      (TARGET_CCTS_OFLOW | TARGET_CRTS_IFLOW)\n+#define TARGET_CRTS_IFLOW   0x00020000  /* RTS flow control of input */\n+#define TARGET_CDTR_IFLOW   0x00040000  /* DTR flow control of input */\n+#define TARGET_CDSR_OFLOW   0x00080000  /* DSR flow control of output */\n+#define TARGET_CCAR_OFLOW   0x00100000  /* DCD flow control of output */\n+\n+/*\n+ * \"Local\" flags - dumping ground for other state\n+ */\n+#define TARGET_ECHOKE   0x00000001  /* visual erase for line kill */\n+#define TARGET_ECHOE    0x00000002  /* visually erase chars */\n+#define TARGET_ECHOK    0x00000004  /* echo NL after line kill */\n+#define TARGET_ECHO 0x00000008  /* enable echoing */\n+#define TARGET_ECHONL   0x00000010  /* echo NL even if ECHO is off */\n+#define TARGET_ECHOPRT  0x00000020  /* visual erase mode for hardcopy */\n+#define TARGET_ECHOCTL  0x00000040  /* echo control chars as ^(Char) */\n+#define TARGET_ISIG 0x00000080  /* enable signals INTR, QUIT, [D]SUSP */\n+#define TARGET_ICANON   0x00000100  /* canonicalize input lines */\n+#define TARGET_ALTWERASE 0x00000200 /* use alternate WERASE algorithm */\n+#define TARGET_IEXTEN   0x00000400  /* enable DISCARD and LNEXT */\n+#define TARGET_EXTPROC  0x00000800  /* external processing */\n+#define TARGET_TOSTOP   0x00400000  /* stop background jobs from output */\n+#define TARGET_FLUSHO   0x00800000  /* output being flushed (state) */\n+#define TARGET_NOKERNINFO 0x02000000    /* no kernel output from VSTATUS */\n+#define TARGET_PENDIN   0x20000000  /* XXX retype pending input (state) */\n+#define TARGET_NOFLSH   0x80000000  /* don't flush after interrupt */\n+\n+struct target_termios {\n+    uint32_t c_iflag;   /* input flags */\n+    uint32_t c_oflag;   /* output flags */\n+    uint32_t c_cflag;   /* control flags */\n+    uint32_t c_lflag;   /* local flags */\n+    uint8_t  c_cc[TARGET_NCCS]; /* control chars */\n+    uint32_t c_ispeed;  /* input speed */\n+    uint32_t c_ospeed;  /* output speed */\n+};\n+\n+\n+struct target_winsize {\n+    uint16_t ws_row;    /* rows, in characters */\n+    uint16_t ws_col;    /* columns, in characters */\n+    uint16_t ws_xpixel; /* horizontal size, pixels */\n+    uint16_t ws_ypixel; /* vertical size, pixels */\n+};\n+\n+                        /* 0-2 compat */\n+                        /* 3-7 unused */\n+                        /* 8-10 compat */\n+                        /* 11-12 unused */\n+#define TARGET_TIOCEXCL  TARGET_IO('t', 13) /* set exclusive use of tty */\n+#define TARGET_TIOCNXCL  TARGET_IO('t', 14) /* reset exclusive use of tty */\n+#define TARGET_TIOCGPTN  TARGET_IOR('t', 15, int) /* Get pts number. */\n+#define TARGET_TIOCFLUSH TARGET_IOW('t', 16, int) /* flush buffers */\n+                    /* 17-18 compat */\n+/* get termios struct */\n+#define TARGET_TIOCGETA TARGET_IOR('t', 19, struct target_termios)\n+/* set termios struct */\n+#define TARGET_TIOCSETA TARGET_IOW('t', 20, struct target_termios)\n+/* drain output, set */\n+#define TARGET_TIOCSETAW    TARGET_IOW('t', 21, struct target_termios)\n+/* drn out, fls in, set */\n+#define TARGET_TIOCSETAF    TARGET_IOW('t', 22, struct target_termios)\n+                        /* 23-25 unused */\n+#define TARGET_TIOCGETD TARGET_IOR('t', 26, int) /* get line discipline */\n+#define TARGET_TIOCSETD TARGET_IOW('t', 27, int) /* set line discipline */\n+#define TARGET_TIOCPTMASTER  TARGET_IO('t', 28) /* pts master validation */\n+                    /* 29-85 unused */\n+/* get ttywait timeout */\n+#define TARGET_TIOCGDRAINWAIT   TARGET_IOR('t', 86, int)\n+/* set ttywait timeout */\n+#define TARGET_TIOCSDRAINWAIT   TARGET_IOW('t', 87, int)\n+                    /* 88 unused */\n+                    /* 89-91 conflicts: tun and tap */\n+/* enable/get timestamp of last input event */\n+#define TARGET_TIOCTIMESTAMP    TARGET_IOR('t', 89, struct target_timeval)\n+/* modem: get wait on close */\n+#define TARGET_TIOCMGDTRWAIT    TARGET_IOR('t', 90, int)\n+/* modem: set wait on close */\n+#define TARGET_TIOCMSDTRWAIT    TARGET_IOW('t', 91, int)\n+                    /* 92-93 tun and tap */\n+                    /* 94-97 conflicts: tun and tap */\n+/* wait till output drained */\n+#define TARGET_TIOCDRAIN     TARGET_IO('t', 94)\n+ /* pty: generate signal */\n+#define TARGET_TIOCSIG      TARGET_IOWINT('t', 95)\n+/* pty: external processing */\n+#define TARGET_TIOCEXT      TARGET_IOW('t', 96, int)\n+/* become controlling tty */\n+#define TARGET_TIOCSCTTY     TARGET_IO('t', 97)\n+/* become virtual console */\n+#define TARGET_TIOCCONS TARGET_IOW('t', 98, int)\n+/* get session id */\n+#define TARGET_TIOCGSID TARGET_IOR('t', 99, int)\n+                        /* 100 unused */\n+/* simulate ^T status message */\n+#define TARGET_TIOCSTAT  TARGET_IO('t', 101)\n+ /* pty: set/clr usr cntl mode */\n+#define TARGET_TIOCUCNTL    TARGET_IOW('t', 102, int)\n+/* usr cntl op \"n\" */\n+#define TARGET_TIOCCMD(n)   TARGET_IO('u', n)\n+/* set window size */\n+#define TARGET_TIOCSWINSZ   TARGET_IOW('t', 103, struct target_winsize)\n+/* get window size */\n+#define TARGET_TIOCGWINSZ   TARGET_IOR('t', 104, struct target_winsize)\n+                        /* 105 unused */\n+/* get all modem bits */\n+#define TARGET_TIOCMGET TARGET_IOR('t', 106, int)\n+#define     TARGET_TIOCM_LE 0001        /* line enable */\n+#define     TARGET_TIOCM_DTR    0002    /* data terminal ready */\n+#define     TARGET_TIOCM_RTS    0004    /* request to send */\n+#define     TARGET_TIOCM_ST 0010        /* secondary transmit */\n+#define     TARGET_TIOCM_SR 0020        /* secondary receive */\n+#define     TARGET_TIOCM_CTS    0040    /* clear to send */\n+#define     TARGET_TIOCM_DCD    0100    /* data carrier detect */\n+#define     TARGET_TIOCM_RI     0200    /* ring indicate */\n+#define     TARGET_TIOCM_DSR    0400    /* data set ready */\n+#define     TARGET_TIOCM_CD TARGET_TIOCM_DCD\n+#define     TARGET_TIOCM_CAR    TARGET_TIOCM_DCD\n+#define     TARGET_TIOCM_RNG    TARGET_TIOCM_RI\n+#define TARGET_TIOCMBIC TARGET_IOW('t', 107, int) /* bic modem bits */\n+#define TARGET_TIOCMBIS TARGET_IOW('t', 108, int) /* bis modem bits */\n+#define TARGET_TIOCMSET TARGET_IOW('t', 109, int) /* set all modem bits */\n+/* start output, like ^Q */\n+#define TARGET_TIOCSTART     TARGET_IO('t', 110)\n+/* stop output, like ^S */\n+#define TARGET_TIOCSTOP  TARGET_IO('t', 111)\n+/* pty: set/clear packet mode */\n+#define TARGET_TIOCPKT      TARGET_IOW('t', 112, int)\n+#define     TARGET_TIOCPKT_DATA     0x00    /* data packet */\n+#define     TARGET_TIOCPKT_FLUSHREAD    0x01    /* flush packet */\n+#define     TARGET_TIOCPKT_FLUSHWRITE   0x02    /* flush packet */\n+#define     TARGET_TIOCPKT_STOP     0x04    /* stop output */\n+#define     TARGET_TIOCPKT_START        0x08    /* start output */\n+#define     TARGET_TIOCPKT_NOSTOP       0x10    /* no more ^S, ^Q */\n+#define     TARGET_TIOCPKT_DOSTOP       0x20    /* now do ^S ^Q */\n+#define     TARGET_TIOCPKT_IOCTL        0x40    /* state change of pty driver */\n+#define TARGET_TIOCNOTTY TARGET_IO('t', 113)    /* void tty association */\n+#define TARGET_TIOCSTI TARGET_IOW('t', 114, char)  /* simulate terminal input */\n+#define TARGET_TIOCOUTQ TARGET_IOR('t', 115, int)   /* output queue size */\n+                        /* 116-117 compat */\n+#define TARGET_TIOCSPGRP    TARGET_IOW('t', 118, int) /* set pgrp of tty */\n+#define TARGET_TIOCGPGRP    TARGET_IOR('t', 119, int) /* get pgrp of tty */\n+#define TARGET_TIOCCDTR  TARGET_IO('t', 120) /* clear data terminal ready */\n+#define TARGET_TIOCSDTR  TARGET_IO('t', 121) /* set data terminal ready */\n+#define TARGET_TIOCCBRK  TARGET_IO('t', 122)        /* clear break bit */\n+#define TARGET_TIOCSBRK  TARGET_IO('t', 123)        /* set break bit */\n+                        /* 124-127 compat */\n+\n+#define TARGET_TTYDISC      0       /* termios tty line discipline */\n+#define TARGET_SLIPDISC     4       /* serial IP discipline */\n+#define TARGET_PPPDISC      5       /* PPP discipline */\n+#define TARGET_NETGRAPHDISC 6       /* Netgraph tty node discipline */\n+#define TARGET_H4DISC       7       /* Netgraph Bluetooth H4 discipline */\n+\n+#endif /* BSD_USER_FREEBSD_OS_IOCTL_TTYCOM_H */\n","prefixes":["01/17"]}