亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tty layer - the user perspective.htm

?? LINUX內(nèi)核編程的一些程序例子
?? HTM
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0060)http://www.geocities.com/marco_corvi/games/lkpe/tty/user.htm -->
<HTML><HEAD><TITLE>The TTY layer</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"><LINK 
href="tty layer - The user perspective_file/style.css" rel=stylesheet>
<META content="MSHTML 6.00.2800.1170" name=GENERATOR></HEAD>
<BODY>
<H2>tty layer - The user perspective</H2>
<DIV>References:<BR>W.R. Stevens, "Adavnced Programming in the UNIX 
environment", Addison-Wesley 1993 <BR></DIV><BR clear=all><BR clear=all><BR 
clear=all>
<DIV><IMG height=200 src="tty layer - The user perspective_file/ttyio.gif" 
width=240 align=right> The user perspective of the tty layer is the terminal 
I/O. This is a complex topic because it is used to control a lot of different 
devices (terminals, modem, serial lines, ...). The logical view is shown in the 
figure on the side. Between the user input/output, mediated by the device 
drivers, and the process read/write, there is the tty layer, which buffers the 
data in two queues. Both queues have a maximum size. When the output queue is 
full the process is put to wait. When the input queue is full characters are 
lost. If echo is enabled the input characters are echoed on the output queue. 
</DIV>
<DIV>The kernel characteristics of a tty are contained in a <CODE>struct 
termio</CODE> (defined in include/asm/termios.h). This contains 
<UL>
  <LI><CODE>c_iflag</CODE>, the input mode flags; 
  <LI><CODE>c_oflag</CODE>, the output mode flags; 
  <LI><CODE>c_lflag</CODE>, the local mode flags; 
  <LI><CODE>c_cflag</CODE>, the control mode flags; 
  <LI><CODE>c_line</CODE>, line discipline type (this is not seen by the user); 
  <LI><CODE>c_cc</CODE>, an array of control characters </LI></UL>A similar 
structure exists (<CODE>termios</CODE>) which differ only in the typing of the 
fields (POSIX like). Userland has the <CODE>struct termios</CODE> (define in 
/usr/include/bits/termios.h) which contains also i/o speed fields. The values of 
the flags bits and the special characters are listed in the tables below. </DIV>
<TABLE cellSpacing=0 cellPadding=2 border=1>
  <TBODY>
  <TR>
    <TH rowSpan=14>c_iflag</TH>
    <TD>BRKINT</TD>
    <TD>generate SIGINT on BREAK</TD></TR>
  <TR>
    <TD>ICRNL</TD>
    <TD>map CR to NL on input</TD></TR>
  <TR>
    <TD>IGNBRK</TD>
    <TD>ignore BREAK</TD></TR>
  <TR>
    <TD>IGNCR</TD>
    <TD>ignore CR</TD></TR>
  <TR>
    <TD>IGNPAR</TD>
    <TD>ignore characters with parity errors</TD></TR>
  <TR>
    <TD>IMAXBEL</TD>
    <TD>ring bell on input when the input queue is full</TD></TR>
  <TR>
    <TD>INLCR</TD>
    <TD>map NL to CR </TD></TR>
  <TR>
    <TD>INPCK</TD>
    <TD>enable input parity checking</TD></TR>
  <TR>
    <TD>ISTRIP</TD>
    <TD>strip eighth bit off input characters</TD></TR>
  <TR>
    <TD>IUCLC</TD>
    <TD>map uppercase to lowercase on input</TD></TR>
  <TR>
    <TD>IXANY</TD>
    <TD>exable any character to restart output</TD></TR>
  <TR>
    <TD>IXOFF</TD>
    <TD>enable start/stop input flow control</TD></TR>
  <TR>
    <TD>IXON</TD>
    <TD>enable start/stop output flow control</TD></TR>
  <TR>
    <TD>PARMRK</TD>
    <TD>mark parity errors</TD></TR>
  <TR>
    <TH rowSpan=16>c_oflag</TH>
    <TD>BSDLY</TD>
    <TD>backspace delay mask</TD></TR>
  <TR>
    <TD>CRDLY</TD>
    <TD>CR delay mask</TD></TR>
  <TR>
    <TD>FFDLY</TD>
    <TD>formfeed delay mask</TD></TR>
  <TR>
    <TD>NLDLY</TD>
    <TD>NL delay mask</TD></TR>
  <TR>
    <TD>OCRNL</TD>
    <TD>map CR to NL on output</TD></TR>
  <TR>
    <TD>OFDEL</TD>
    <TD>fill is DEL (else is NUL)</TD></TR>
  <TR>
    <TD>OFILL</TD>
    <TD>use fill characters for delay</TD></TR>
  <TR>
    <TD>OLCUL</TD>
    <TD>map lowercase to uppercase on output</TD></TR>
  <TR>
    <TD>ONLCR</TD>
    <TD>map NL to CR-NL (this is CRMOD)</TD></TR>
  <TR>
    <TD>ONLRET</TD>
    <TD>NL performs CR function</TD></TR>
  <TR>
    <TD>ONOCR</TD>
    <TD>no CR output at column 0</TD></TR>
  <TR>
    <TD>ONOEOT</TD>
    <TD>discard EOF (^D) on output</TD></TR>
  <TR>
    <TD>OPOST</TD>
    <TD>perform output processing</TD></TR>
  <TR>
    <TD>OXTABS</TD>
    <TD>expand tabs to spaces</TD></TR>
  <TR>
    <TD>TABDLY</TD>
    <TD>horizontal tab delay mask</TD></TR>
  <TR>
    <TD>VTDLY</TD>
    <TD>vertical tab delay mask</TD></TR>
  <TR>
    <TH rowSpan=11>c_cflag</TH>
    <TD>CCTS_OFLOW</TD>
    <TD>CTS flow control of output</TD></TR>
  <TR>
    <TD>CIGNORE</TD>
    <TD>ignore control flags</TD></TR>
  <TR>
    <TD>CLOCAL</TD>
    <TD>ignore modem status line</TD></TR>
  <TR>
    <TD>CREAD</TD>
    <TD>enable receiver</TD></TR>
  <TR>
    <TD>CRTS_IFLOW</TD>
    <TD>RTS flow control on input</TD></TR>
  <TR>
    <TD>CSIZE</TD>
    <TD>character size mask</TD></TR>
  <TR>
    <TD>CSTOPB</TD>
    <TD>send two stop bits (else send one)</TD></TR>
  <TR>
    <TD>HUPCL</TD>
    <TD>hangup on last close</TD></TR>
  <TR>
    <TD>MDMBUF</TD>
    <TD>flow control output via Carrier</TD></TR>
  <TR>
    <TD>PARENB</TD>
    <TD>parity enable</TD></TR>
  <TR>
    <TD>PARODD</TD>
    <TD>parity is odd (else is even)</TD></TR>
  <TR>
    <TH rowSpan=17>c_lflag</TH>
    <TD>ALTWERASE</TD>
    <TD>use alternate WERASE algorithm</TD></TR>
  <TR>
    <TD>ECHO</TD>
    <TD>enable echo</TD></TR>
  <TR>
    <TD>ECHOCTL</TD>
    <TD>echo control characters as ^Char</TD></TR>
  <TR>
    <TD>ECHOE</TD>
    <TD>visually erase characters</TD></TR>
  <TR>
    <TD>ECHOK</TD>
    <TD>echo KILL (by erasing the entire line)</TD></TR>
  <TR>
    <TD>ECHOKE</TD>
    <TD>visual erase for KILL</TD></TR>
  <TR>
    <TD>ECHONL</TD>
    <TD>echo NL</TD></TR>
  <TR>
    <TD>ECHOPRT</TD>
    <TD>visula erase mode for hardcopy</TD></TR>
  <TR>
    <TD>FLUSHO</TD>
    <TD>output being flushed</TD></TR>
  <TR>
    <TD>ICANON</TD>
    <TD>canonical input</TD></TR>
  <TR>
    <TD>IEXTEN</TD>
    <TD>enable extended input character processing</TD></TR>
  <TR>
    <TD>ISIG</TD>
    <TD>enable terminal-generated signals</TD></TR>
  <TR>
    <TD>NOFLSH</TD>
    <TD>disable flush after interrupt or quit</TD></TR>
  <TR>
    <TD>NOKERNINFO</TD>
    <TD>no kernel output from STATUS</TD></TR>
  <TR>
    <TD>PENDIN</TD>
    <TD>retype pending input</TD></TR>
  <TR>
    <TD>TOSTOP</TD>
    <TD>send SIGTTOU for background output</TD></TR>
  <TR>
    <TD>XCASE</TD>
    <TD>canonical upper/lower presentation</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=2 border=1>
  <TBODY>
  <TR>
    <TH colSpan=2>Special characters</TH>
    <TH>subscript</TH>
    <TH>enabled by</TH></TR>
  <TR>
    <TD>CR</TD>
    <TD>carriage return</TD>
    <TD>-</TD>
    <TD rowSpan=10>ICANON</TD></TR>
  <TR>
    <TD>EOF</TD>
    <TD>end-of-file</TD>
    <TD>VEOF</TD></TR>
  <TR>
    <TD>EOL</TD>
    <TD>end-of-line</TD>
    <TD>VEOL</TD></TR>
  <TR>
    <TD>EOL2</TD>
    <TD>alternate end-of-line</TD>
    <TD>VEOL2</TD></TR>
  <TR>
    <TD>ERASE</TD>
    <TD>backspace one character</TD>
    <TD>VERASE</TD></TR>
  <TR>
    <TD>KILL</TD>
    <TD>VKILL</TD>
    <TD>erase line</TD></TR>
  <TR>
    <TD>NL</TD>
    <TD>linefeed</TD>
    <TD>-</TD></TR>
  <TR>
    <TD>REPRINT</TD>
    <TD>reprint all input</TD>
    <TD>VREPRINT</TD></TR>
  <TR>
    <TD>STATUS</TD>
    <TD>status request</TD>
    <TD>VSTATUS</TD></TR>
  <TR>
    <TD>WERASE</TD>
    <TD>backspace one word</TD>
    <TD>VWERASE</TD></TR>
  <TR>
    <TD>START</TD>
    <TD>resume output</TD>
    <TD>VSTART</TD>
    <TD rowSpan=2>IXON / IXOFF</TD></TR>
  <TR>
    <TD>STOP</TD>
    <TD>stop output</TD>
    <TD>VSTOP</TD></TR>
  <TR>
    <TD>DSUSP</TD>
    <TD>delayed suspend (SIGTSTP)</TD>
    <TD>VDSUSP</TD>
    <TD rowSpan=4>ISIG</TD></TR>
  <TR>
    <TD>INTR</TD>
    <TD>interrupt signal (SIGINT)</TD>
    <TD>VINTR</TD></TR>
  <TR>
    <TD>QUIT</TD>
    <TD>quit signal (SIGQUIT)</TD>
    <TD>VQUT</TD></TR>
  <TR>
    <TD>SUSP</TD>
    <TD>suspend signal (SIGTSTP)</TD>
    <TD>VSUSP</TD></TR>
  <TR>
    <TD>DISCARD</TD>
    <TD>discard output</TD>
    <TD>VDISCARD</TD>
    <TD rowSpan=2>IEXTEN</TD></TR>
  <TR>
    <TD>LNEXT</TD>
    <TD>literal next</TD>
    <TD>VLNEXT</TD></TR></TBODY></TABLE>
<DIV>The user control of the tty can be done with the <CODE>ioctl()</CODE> 
function, but its last argument depends on the action being performed. This 
makes type checking impossible. Therefore POSIX defines 12 functions, 
<UL>
  <LI><CODE>tcsetattr</CODE>, <CODE>tcgetattr</CODE>: to set/get the tty 
  attributes; 
  <LI><CODE>cfgetispeed</CODE>, <CODE>cfsetispeed</CODE>, 
  <CODE>cfgetospeed</CODE>, <CODE>cfsetospeed</CODE>: for the i/o speeds (baud 
  rate); 
  <LI><CODE>tcdrain</CODE>, <CODE>tcflow</CODE>, <CODE>tcflush</CODE> and 
  <CODE>tcsendbreak</CODE> are line control functions; 
  <LI><CODE>tcgetpgrp</CODE> and <CODE>tcsetpgrp</CODE>: get/set foreground 
  process group ID. </LI></UL></DIV>
<DIV><B>Canonical mode</B><BR>Canonical mode (cooked) is simple, from the user 
point of view: reads are linewise, ie, the read() call returns when a complete 
line has been entered by the device driver. A line is complete when one of the 
folloing delimiters is entered: NL, EOL, EOL2, EOF (and CR if ICRNL is set and 
INGCR is not set). Note that EOF is not returned with the read. </DIV>
<DIV><B>Noncanonical mode</B><BR>This is set by turning off ICANON. The input 
characters are not assembled into lines. These special characters are not 
processed: ERASE, KILL, EOF, NL, EOL, EOL2, CR, REPRINT, STATUS, WERASE. The two 
entries <CODE>c_cc[VMIN]</CODE> and <CODE>c_cc[VTIME]</CODE> determine the 
behaviour of the <CODE>read()</CODE>. There are four cases: 
<TABLE cellSpacing=0 cellPadding=2 border=1>
  <TBODY>
  <TR>
    <TD>MIN=0</TD>
    <TD>TIME=0</TD>
    <TD>read() returns immediately with whatever data are available (from 0 if 
      none, to the maximum number requested in the call)</TD></TR>
  <TR>
    <TD>MIN=0</TD>
    <TD>TIME&gt;0</TD>
    <TD>read() returns between 1 and the requested number if there are data 
      before the time expires; it returns 0 if the time expires</TD></TR>
  <TR>
    <TD>MIN&gt;0</TD>
    <TD>TIME=0</TD>
    <TD>read() returns between 1 and the requested number when there are data 
      available (may wait forever)</TD></TR>
  <TR>
    <TD>MIN&gt;0</TD>
    <TD>TIME&gt;0</TD>
    <TD>read() returns between MIN and the number requested before the time 
      expires, or or between 1 and MIN-1 if the time expires. It can block 
      forever if there are no data</TD></TR></TBODY></TABLE></DIV>
<DIV>There are two noncanonical modes (i am aware of), cbreak and raw. 
<TABLE cellSpacing=0 cellPadding=2 border=1>
  <TBODY>
  <TR>
    <TH>cbreak </TH>
    <TD>ECHO and ICANON off</TD>
    <TD>&nbsp; </TD>
    <TD>&nbsp; </TD>
    <TD>&nbsp; </TD>
    <TD>MIN=1, TIME=0 </TD></TR>
  <TR>
    <TH>raw </TH>
    <TD>ECHO, ICANON, IEXTEN and ISIG off </TD>
    <TD>BRKINT, ICRNL, INPCK, ISTRIP, IXON off </TD>
    <TD>CSIZE, PARENB and OPOST off </TD>
    <TD>CS8 (set 8-bit characters) </TD>
    <TD>MIN=1, TIME=0 </TD></TR></TBODY></TABLE></DIV><BR clear=all>
<DIV>To conclude this summary of terminal I/O look at this example from Steven's 
book. <BR><A 
href="http://www.geocities.com/marco_corvi/games/lkpe/tty/tty_raw.c">tty_raw.c</A>, 
set a tty in raw mode<BR></DIV><BR clear=all><FONT size=-1>Marco Corvi - 
2003</FONT> 
<!-- text below generated by server. PLEASE REMOVE --></OBJECT></LAYER>
<DIV></DIV></SPAN></STYLE></NOSCRIPT></TABLE></SCRIPT></APPLET>
<SCRIPT 
language=JavaScript>var PUpage="76001084"; var PUprop="geocities"; </SCRIPT>

<SCRIPT language=JavaScript 
src="tty layer - The user perspective_file/pu5geo.js"></SCRIPT>

<SCRIPT language=JavaScript 
src="tty layer - The user perspective_file/ygIELib9.js"></SCRIPT>

<SCRIPT language=JavaScript>var yviContents='http://us.toto.geo.yahoo.com/toto?s=76001084&l=NE&b=1&t=1057747208';yviR='us';yfiEA(0);</SCRIPT>

<SCRIPT language=JavaScript 
src="tty layer - The user perspective_file/mc.js"></SCRIPT>

<SCRIPT language=JavaScript 
src="tty layer - The user perspective_file/geov2.js"></SCRIPT>

<SCRIPT language=javascript>geovisit();</SCRIPT>
<NOSCRIPT><IMG height=1 alt=setstats 
src="tty layer - The user perspective_file/visit.gif" width=1 
border=0></NOSCRIPT> <IMG height=1 alt=1 
src="tty layer - The user perspective_file/serv.gif" width=1> <!-- w31.geo.scd.yahoo.com compressed/chunked Wed Jul  9 03:40:08 PDT 2003 --></BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
最好看的中文字幕久久| 在线观看一区二区视频| 成人的网站免费观看| 日韩视频一区在线观看| 亚洲影院免费观看| 一本大道久久a久久综合婷婷| 在线成人av网站| 亚洲高清免费观看高清完整版在线观看| www.在线欧美| 综合久久国产九一剧情麻豆| 国产成人亚洲综合色影视| 久久久国产一区二区三区四区小说| 男男视频亚洲欧美| 欧美成人一区二区三区片免费| 久久国产精品99精品国产| 欧美高清视频www夜色资源网| 亚洲大型综合色站| 欧美另类videos死尸| 日日嗨av一区二区三区四区| 欧美一级片在线看| 韩国视频一区二区| 久久久久亚洲蜜桃| 成人免费毛片app| 中文字幕一区二区三区乱码在线 | 午夜久久久久久电影| 在线观看视频欧美| 一二三区精品视频| 在线播放欧美女士性生活| 日韩制服丝袜av| 欧美r级在线观看| 不卡的av网站| 亚洲男人电影天堂| 欧美日本不卡视频| 精品在线免费观看| 国产精品久久久久影院色老大| 99久久99久久精品免费观看| 亚洲综合免费观看高清完整版 | 日韩女优毛片在线| 久久99国产精品久久| 国产欧美日韩另类一区| 色综合久久88色综合天天免费| 亚洲.国产.中文慕字在线| 欧美一卡二卡在线观看| 国产裸体歌舞团一区二区| 国产精品网曝门| 欧美手机在线视频| 国内成+人亚洲+欧美+综合在线| 国产视频不卡一区| 欧美日韩国产成人在线免费| 国产一区二区三区免费看| 17c精品麻豆一区二区免费| 欧美日韩久久不卡| 国产69精品久久久久毛片| 亚洲一区在线观看网站| 久久久久国产成人精品亚洲午夜| 色综合天天做天天爱| 久久爱www久久做| 中文一区二区完整视频在线观看| 色94色欧美sute亚洲线路二| 狠狠久久亚洲欧美| 亚洲午夜成aⅴ人片| 国产精品视频yy9299一区| 日韩精品一区二区三区蜜臀| 欧美日韩久久久| 欧美色手机在线观看| av在线播放一区二区三区| 国产电影一区在线| 国产精品一区二区不卡| 激情久久五月天| 国内一区二区在线| 国内精品视频666| 狠狠色丁香婷综合久久| 精品一区二区免费看| 精品在线免费视频| 国产在线不卡一区| 国产精品一区二区不卡| 国产裸体歌舞团一区二区| 国产精品一区二区男女羞羞无遮挡| 激情综合色综合久久| 狠狠色丁香久久婷婷综| 国产一区二区福利视频| 国产精品一区二区在线看| 国产夫妻精品视频| 不卡的电视剧免费网站有什么| 成人综合婷婷国产精品久久免费| 国产成人av电影在线观看| 国产69精品一区二区亚洲孕妇| 国产a精品视频| 99精品桃花视频在线观看| 色综合久久久久综合体桃花网| 91福利视频在线| 欧美日本免费一区二区三区| 欧美一区二区三区喷汁尤物| 欧美va天堂va视频va在线| 久久精品亚洲精品国产欧美| 国产精品污网站| 亚洲综合成人在线| 秋霞午夜鲁丝一区二区老狼| 国产麻豆精品在线| 97se亚洲国产综合自在线不卡| 在线观看亚洲精品| 日韩欧美一级片| 国产日韩欧美精品综合| 亚洲美女区一区| 蜜臀av性久久久久av蜜臀妖精| 国产另类ts人妖一区二区| aaa亚洲精品| 欧美日韩国产欧美日美国产精品| 日韩美女视频在线| 中文字幕在线不卡| 丝袜美腿高跟呻吟高潮一区| 国产乱子轮精品视频| av影院午夜一区| 制服丝袜亚洲精品中文字幕| 国产亚洲欧美在线| 亚洲国产精品久久不卡毛片| 国产老女人精品毛片久久| 欧美主播一区二区三区| 精品国产亚洲在线| 亚洲欧美激情视频在线观看一区二区三区| 午夜欧美在线一二页| 国产精品亚洲一区二区三区在线| 在线日韩国产精品| 久久影视一区二区| 亚洲电影视频在线| 成人性生交大片| 日韩欧美一级特黄在线播放| 亚洲免费观看高清完整版在线观看| 日韩精品亚洲一区二区三区免费| 不卡一卡二卡三乱码免费网站 | 日韩午夜中文字幕| 综合在线观看色| 国内精品伊人久久久久av影院 | 亚洲第四色夜色| 成人手机电影网| 日韩欧美激情四射| 亚洲影院理伦片| 95精品视频在线| 久久精品免费在线观看| 日韩电影免费在线观看网站| 99久久婷婷国产综合精品电影| 精品国产制服丝袜高跟| 午夜精品爽啪视频| 91久久精品一区二区三区| 国产三级精品视频| 欧洲一区二区av| 国产精品午夜在线观看| 狠狠色狠狠色综合| 日韩欧美一区二区视频| 婷婷国产v国产偷v亚洲高清| 91免费精品国自产拍在线不卡| 国产亚洲自拍一区| 久久不见久久见免费视频7| 337p亚洲精品色噜噜噜| 亚洲一区二区视频在线观看| 波多野结衣在线一区| 国产午夜亚洲精品理论片色戒| 日本不卡中文字幕| 欧美丰满少妇xxxxx高潮对白 | 国产精品三级av在线播放| 激情深爱一区二区| 精品久久久久香蕉网| 麻豆一区二区99久久久久| 欧美一级生活片| 蜜桃视频免费观看一区| 欧美一区二区三区免费| 日本美女一区二区| 日韩免费电影一区| 美腿丝袜一区二区三区| 欧美大肚乱孕交hd孕妇| 老司机精品视频在线| 精品国内片67194| 国精产品一区一区三区mba视频| 2021中文字幕一区亚洲| 狠狠色丁香久久婷婷综| 国产日韩一级二级三级| 成人激情黄色小说| 亚洲男人天堂av网| 欧美日韩精品欧美日韩精品一 | 亚洲区小说区图片区qvod| 91免费看`日韩一区二区| 亚洲一卡二卡三卡四卡| 欧美日韩一二三区| 免费成人在线视频观看| 欧美成人一区二区三区在线观看 | 高清国产一区二区三区| 国产精品青草综合久久久久99| 99国产精品久久| 亚洲高清视频在线| 精品少妇一区二区三区日产乱码| 国产福利精品导航| 亚洲色图色小说| 欧美精品一二三| 国产专区欧美精品| 亚洲另类春色校园小说| 欧美日韩在线精品一区二区三区激情| 青青草成人在线观看| 国产精品色眯眯| 欧美巨大另类极品videosbest | 99国产一区二区三精品乱码|