|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 14336 (0x3800)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package Ioctl, seg_05093d
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Ioctl_Fmt;
use Ioctl_Fmt;
with System;
with Os_Files;
with Tty;
with Tty_Sizes;
package Ioctl is
--
-- Ioctl definitions
--
--
-- Ioctl's have the command encoded in the lower word,
-- and the size of any in or out parameters in the upper
-- word. The high 2 bits of the upper word are used
-- to encode the in/out status of the parameter; for now
-- we restrict parameters to at most 128 bytes.
--
--
--------------------------------------------------------------------------
-- tty ioctl commands
Tiocgetd : constant Integer :=
Fmt_Ior_Cnst ('t', 0, Integer'Size / 8); -- get line discipline
Tiocsetd : constant Integer :=
Fmt_Iow_Cnst ('t', 1, Integer'Size / 8); -- set line discipline
Tiochpcl : constant Integer := Fmt_Io_Cnst
('t', 2); -- hang up on last close
Tiocmodg : constant Integer :=
Fmt_Ior_Cnst ('t', 3, Integer'Size / 8); -- get modem cntrl state
Tiocmods : constant Integer :=
Fmt_Iow_Cnst ('t', 4, Integer'Size / 8); -- set modem cntrl state
Tiocm_Le : constant Integer := 8#0001#; -- line enable
Tiocm_Dtr : constant Integer := 8#0002#; -- data terminal ready
Tiocm_Rts : constant Integer := 8#0004#; -- request to send
Tiocm_St : constant Integer := 8#0010#; -- secondary transmit
Tiocm_Sr : constant Integer := 8#0020#; -- secondary receive
Tiocm_Cts : constant Integer := 8#0040#; -- clear to send
Tiocm_Car : constant Integer := 8#0100#; -- carrier detect
Tiocm_Cd : constant Integer := Tiocm_Car;
Tiocm_Rng : constant Integer := 8#0200#; -- ring
Tiocm_Ri : constant Integer := Tiocm_Rng;
Tiocm_Dsr : constant Integer := 8#0400#; -- data set ready
Tiocgetp : constant Integer :=
Fmt_Ior_Cnst ('t', 8, Tty_Sizes.Sgttyb_Size);-- get parameters
Tiocsetp : constant Integer :=
Fmt_Iow_Cnst ('t', 9, Tty_Sizes.Sgttyb_Size);-- set parameters
Tiocsetn : constant Integer :=
Fmt_Iow_Cnst ('t', 10, Tty_Sizes.
Sgttyb_Size);-- as above, but no flushtty
Tiocexcl : constant Integer := Fmt_Io_Cnst
('t', 13); -- set exclusive use of tty
Tiocnxcl : constant Integer := Fmt_Io_Cnst
('t', 14); -- reset exclusive use of tty
Tiocflush : constant Integer :=
Fmt_Iow_Cnst ('t', 16, Integer'Size / 8); -- flush buffers
Tiocsetc : constant Integer :=
Fmt_Iow_Cnst ('t', 17, Tty_Sizes.Tchars_Size);-- set special chars
Tiocgetc : constant Integer :=
Fmt_Ior_Cnst ('t', 18, Tty_Sizes.Tchars_Size);-- get special chars
Tandem : constant Integer := 16#00000001#; -- send stopc on out q full
Cbreak : constant Integer := 16#00000002#; -- half-cooked mode
Lcase : constant Integer := 16#00000004#; -- simulate lower case
Echo : constant Integer := 16#00000008#; -- echo input
Crmod : constant Integer := 16#00000010#; -- map \r to \r\n on output
Raw : constant Integer := 16#00000020#; -- no i/o processing
Oddp : constant Integer := 16#00000040#; -- get/send odd parity
Evenp : constant Integer := 16#00000080#; -- get/send even parity
Anyp : constant Integer := 16#000000C0#; -- get any parity/send none
Nldelay : constant Integer := 16#0000C000#; -- \n delay
Nl0 : constant Integer := 16#00000000#;
Nl1 : constant Integer := 16#00004000#; -- tty 37
Nl2 : constant Integer := 16#00008000#; -- vt05
Nl3 : constant Integer := 16#0000C000#;
Tbdelay : constant Integer := 16#00000C00#; -- horizontal tab delay
Tab0 : constant Integer := 16#00000000#;
Tab1 : constant Integer := 16#00000400#; -- tty 37
Tab2 : constant Integer := 16#00000800#;
Xtabs : constant Integer := 16#00000C00#; -- expand tabs on output
Crdelay : constant Integer := 16#00000300#; -- \r delay
Cr0 : constant Integer := 16#00000000#;
Cr1 : constant Integer := 16#00000100#; -- tn 300
Cr2 : constant Integer := 16#00000200#; -- tty 37
Cr3 : constant Integer := 16#00000300#; -- concept 100
Vtdelay : constant Integer := 16#00002000#; -- vertical tab delay
Ff0 : constant Integer := 16#00000000#;
Ff1 : constant Integer := 16#00002000#; -- tty 37
Bsdelay : constant Integer := 16#00001000#; -- \b delay
Bs0 : constant Integer := 16#00000000#;
Bs1 : constant Integer := 16#00001000#;
Alldelay : constant Integer :=
(Nldelay + Tbdelay + Crdelay + Vtdelay + Bsdelay);
Tostop : constant Integer := 16#00010000#; -- SIGSTOP on background output
Prtera : constant Integer := 16#00020000#; -- \ ... / erase
Crtera : constant Integer := 16#00040000#; -- " \b " to wipe out char
Tilde : constant Integer := 16#00080000#; -- hazeltine tilde kludge
Flusho : constant Integer := 16#00100000#; -- flush output to terminal
Litout : constant Integer := 16#00200000#; -- literal output
Crtbs : constant Integer := 16#00400000#; -- do backspacing for crt
Mdmbuf : constant Integer :=
16#00800000#; -- start/stop output on carrier intr
Nohang : constant Integer := 16#01000000#; -- no SIGHUP on carrier drop
L001000 : constant Integer := 16#02000000#;
Crtkil : constant Integer := 16#04000000#; -- kill line with " \b "
Pass8 : constant Integer := 16#08000000#;
Ctlech : constant Integer := 16#10000000#; -- echo control chars as ^X
Pendin : constant Integer := 16#20000000#; -- tp->t_rawq needs reread
Decctq : constant Integer := 16#40000000#; -- only ^Q starts after ^S
Noflsh : constant Integer := -16#7FFFFFFF# - 1; -- no output flush on signal
-- locals, from 127 down
Tioclbis : constant Integer :=
Fmt_Iow_Cnst ('t', 127, Integer'Size / 8); -- bis local mode bits
Tioclbic : constant Integer :=
Fmt_Iow_Cnst ('t', 126, Integer'Size / 8); -- bic local mode bits
Tioclset : constant Integer :=
Fmt_Iow_Cnst ('t', 125, Integer'Size / 8); -- set entire local mode word
Tioclget : constant Integer :=
Fmt_Ior_Cnst ('t', 124, Integer'Size / 8); -- get local modes
Lcrtbs : constant Integer := (Crtbs / (2 ** 16));
Lprtera : constant Integer := (Prtera / (2 ** 16));
Lcrtera : constant Integer := (Crtera / (2 ** 16));
Ltilde : constant Integer := (Tilde / (2 ** 16));
Lmdmbuf : constant Integer := (Mdmbuf / (2 ** 16));
Llitout : constant Integer := (Litout / (2 ** 16));
Ltostop : constant Integer := (Tostop / (2 ** 16));
Lflusho : constant Integer := (Flusho / (2 ** 16));
Lnohang : constant Integer := (Nohang / (2 ** 16));
Lcrtkil : constant Integer := (Crtkil / (2 ** 16));
Lpass8 : constant Integer := (Pass8 / (2 ** 16));
Lctlech : constant Integer := (Ctlech / (2 ** 16));
Lpendin : constant Integer := (Pendin / (2 ** 16));
Ldecctq : constant Integer := (Decctq / (2 ** 16));
Lnoflsh : constant Integer := (Noflsh / (2 ** 16));
Tiocsbrk : constant Integer := Fmt_Io_Cnst ('t', 123); -- set break bit
Tioccbrk : constant Integer := Fmt_Io_Cnst ('t', 122); -- clear break bit
Tiocsdtr : constant Integer := Fmt_Io_Cnst
('t', 121); -- set data terminal ready
Tioccdtr : constant Integer := Fmt_Io_Cnst
('t', 120); -- clear data terminal ready
Tiocgpgrp : constant Integer :=
Fmt_Ior_Cnst ('t', 119, Integer'Size / 8); -- get pgrp of tty
Tiocspgrp : constant Integer :=
Fmt_Iow_Cnst ('t', 118, Integer'Size / 8); -- set pgrp of tty
Tiocsltc : constant Integer :=
Fmt_Iow_Cnst ('t', 117, Tty_Sizes.
Ltchars_Size);-- set local special chars
Tiocgltc : constant Integer :=
Fmt_Ior_Cnst ('t', 116, Tty_Sizes.
Ltchars_Size);-- get local special chars
Tiocoutq : constant Integer :=
Fmt_Ior_Cnst ('t', 115, Integer'Size / 8); -- output queue size
Tiocsti : constant Integer :=
Fmt_Iow_Cnst ('t', 114, Character'Size / 8); -- simulate terminal input
Tiocnotty : constant Integer := Fmt_Io_Cnst
('t', 113); -- void tty association
Tiocpkt : constant Integer :=
Fmt_Iow_Cnst ('t', 112, Integer'Size / 8); --pty: set/clear packet mode
Tiocpkt_Data : constant Integer := 16#00#; -- data packet
Tiocpkt_Flushread : constant Integer := 16#01#; -- flush packet
Tiocpkt_Flushwrite : constant Integer := 16#02#; -- flush packet
Tiocpkt_Stop : constant Integer := 16#04#; -- stop output
Tiocpkt_Start : constant Integer := 16#08#; -- start output
Tiocpkt_Nostop : constant Integer := 16#10#; -- no more ^S, ^Q
Tiocpkt_Dostop : constant Integer := 16#20#; -- now do ^S ^Q
Tiocstop : constant Integer := Fmt_Io_Cnst
('t', 111); -- stop output, like ^S
Tiocstart : constant Integer := Fmt_Io_Cnst
('t', 110); -- start output, like ^Q
Tiocmset : constant Integer :=
Fmt_Iow_Cnst ('t', 109, Integer'Size / 8); -- set all modem bits
Tiocmbis : constant Integer :=
Fmt_Iow_Cnst ('t', 108, Integer'Size / 8); -- bis modem bits
Tiocmbic : constant Integer :=
Fmt_Iow_Cnst ('t', 107, Integer'Size / 8); -- bic modem bits
Tiocmget : constant Integer :=
Fmt_Ior_Cnst ('t', 106, Integer'Size / 8); -- get all modem bits
Tiocremote : constant Integer :=
Fmt_Iow_Cnst ('t', 105, Integer'Size / 8); -- remote input editing
Tiocgwinsz : constant Integer :=
Fmt_Ior_Cnst ('t', 104, Tty_Sizes.Winsize_Size); -- get window size
Tiocswinsz : constant Integer :=
Fmt_Iow_Cnst ('t', 103, Tty_Sizes.Winsize_Size); -- set window size
Tiocucntl : constant Integer :=
Fmt_Iow_Cnst ('t', 102, Integer'Size / 8); -- pty: set/clr usr cntl mode
Ottydisc : constant Integer := 0; -- old, v7 std tty driver
Netldisc : constant Integer := 1; -- line discip for berk net
Nttydisc : constant Integer := 2; -- new tty discipline
Tabldisc : constant Integer := 3; -- tablet discipline
Slipdisc : constant Integer := 4; -- serial IP discipline
Fioclex : constant Integer := Fmt_Io_Cnst
('f', 1); -- set exclusive use on fd
Fionclex : constant Integer := Fmt_Io_Cnst
('f', 2); -- remove exclusive use
-- another local
Fionread : constant Integer :=
Fmt_Ior_Cnst ('f', 127, Integer'Size / 8); -- get # bytes to read
Fionbio : constant Integer :=
Fmt_Iow_Cnst ('f', 126, Integer'Size / 8); -- set/clear non-blocking io
Fioasync : constant Integer :=
Fmt_Iow_Cnst ('f', 125, Integer'Size / 8); -- set/clear async i/o
Fiosetown : constant Integer :=
Fmt_Iow_Cnst ('f', 124, Integer'Size / 8); -- set owner
Fiogetown : constant Integer :=
Fmt_Ior_Cnst ('f', 123, Integer'Size / 8); -- get owner
-- socket i/o controls
Siocshiwat : constant Integer :=
Fmt_Iow_Cnst ('s', 0, Integer'Size / 8); -- set high watermark
Siocghiwat : constant Integer :=
Fmt_Ior_Cnst ('s', 1, Integer'Size / 8); -- get high watermark
Siocslowat : constant Integer :=
Fmt_Iow_Cnst ('s', 2, Integer'Size / 8); -- set low watermark
Siocglowat : constant Integer :=
Fmt_Ior_Cnst ('s', 3, Integer'Size / 8); -- get low watermark
Siocatmark : constant Integer :=
Fmt_Ior_Cnst ('s', 7, Integer'Size / 8); -- at oob mark?
Siocspgrp : constant Integer :=
Fmt_Iow_Cnst ('s', 8, Integer'Size / 8); -- set process group
Siocgpgrp : constant Integer :=
Fmt_Ior_Cnst ('s', 9, Integer'Size / 8); -- get process group
function Ioctl (Fd : Os_Files.File_Descriptor;
Action : Integer;
Result : System.Address) return Integer;
pragma Interface (C, Ioctl);
end Ioctl;
nblk1=d
nid=0
hdr6=1a
[0x00] rec0=20 rec1=00 rec2=01 rec3=006
[0x01] rec0=11 rec1=00 rec2=02 rec3=006
[0x02] rec0=10 rec1=00 rec2=03 rec3=06c
[0x03] rec0=11 rec1=00 rec2=04 rec3=034
[0x04] rec0=11 rec1=00 rec2=05 rec3=032
[0x05] rec0=10 rec1=00 rec2=06 rec3=088
[0x06] rec0=12 rec1=00 rec2=07 rec3=046
[0x07] rec0=11 rec1=00 rec2=08 rec3=076
[0x08] rec0=11 rec1=00 rec2=09 rec3=00a
[0x09] rec0=11 rec1=00 rec2=0a rec3=042
[0x0a] rec0=13 rec1=00 rec2=0b rec3=080
[0x0b] rec0=16 rec1=00 rec2=0c rec3=008
[0x0c] rec0=06 rec1=00 rec2=0d rec3=000
tail 0x21757fab6878e7852ba6a 0x42a00088462060003