#
#       Copyright (c) 1995, 1996, Sun Microsystems, Inc.
#
# This software is provided by Sun ``AS IS'' and any express or implied
# warranties, including, but not limited to, the implied warranties of
# merchantability and fitness for a particular purpose are disclaimed.
# In no event shall Sun Microsystems be liable for any direct, indirect,
# incidental, special, exemplary, or consequential damages.
#
# This software is not a product, and is provided for evaluation purposes
# only.
#
# This software may not be resold without the express permission of
# Sun Microsystems.
#
# Feedback on this tool may be sent to packet-shell-owner@sunroof.eng.sun.com.
#
# Packet Shell
#
# ioctlmap info for use by sc.<fd>.pioctl and sc.ilookup.
#
# @(#)ioctl_array.tcl	1.2
scan n %c n
scan T %c T
scan S %c S
scan t %c t
scan L %c L
scan i %c i
scan I %c I
scan r %c r
scan P %c P
scan p %c p
scan D %c D
scan B %c B
scan N %c N

set STR [expr ( $S << 8)]
#value ('S' << 8)
set I_STR [expr ($STR | 010)]
set TELIOC      [expr ( $n << 8)]
set _TIOC       [expr ( $T << 8)]
set tIOC        [expr ( $t << 8)]
set TIMOD       $_TIOC
set TL_IOC       [expr (( $T << 16)|( $L << 8))]
set SIMOD       [expr ($I <<8)]
set SADIOC      [expr ($D <<8)]
set RLIOC       [expr ($r <<8)]
set PFIOC       [expr ($P <<8)]
set DLIOC       [expr ($D <<8)]
set SBIOC       [expr ($B <<8)]
set ND_BASE     [expr ($N <<8)]
set ISTRIP 0000040

set ioctl_map(TEL_IOC_ENABLE)       [expr ($TELIOC|2)]
set ioctl_map(TEL_IOC_MODE) [expr ($TELIOC|3)]
set ioctl_map(TEL_IOC_GETBLK)       [expr ($TELIOC|4)]
set ioctl_map(TCGETA)       [expr ($_TIOC|1)]
set ioctl_map(TCSETA)       [expr ($_TIOC|2)]
set ioctl_map(TCSETAW)      [expr ($_TIOC|3)]
set ioctl_map(TCSETAF)      [expr ($_TIOC|4)]
set ioctl_map(TCSBRK)       [expr ($_TIOC|5)]
set ioctl_map(TCXONC)       [expr ($_TIOC|6)]
set ioctl_map(TCFLSH)       [expr ($_TIOC|7)]
set ioctl_map(TIOCKBON)     [expr ($_TIOC|8)]
set ioctl_map(TCGETS)       [expr ($_TIOC|13)]
set ioctl_map(TCSETS)       [expr ($_TIOC|14)]
set ioctl_map(TCSETSW)      [expr ($_TIOC|15)]
set ioctl_map(TCSETSF)      [expr ($_TIOC|16)]
set ioctl_map(TIOCGPPS)     [expr ($_TIOC|125)]
set ioctl_map(TIOCSPPS)     [expr ($_TIOC|126)]
set ioctl_map(TIOCGPPSEV)   [expr ($_TIOC|127)]
set ioctl_map(TIOCGETD)     [expr ($tIOC|0)]
set ioctl_map(TIOCSETD)     [expr ($tIOC|1)]
set ioctl_map(TIOCHPCL)     [expr ($tIOC|2)]
set ioctl_map(TIOCGETP)     [expr ($tIOC|8)]
set ioctl_map(TIOCSETN)     [expr ($tIOC|10)]
set ioctl_map(TIOCEXCL)     [expr ($tIOC|13)]
set ioctl_map(TIOCNXCL)     [expr ($tIOC|14)]
set ioctl_map(TIOCFLUSH)    [expr ($tIOC|16)]
set ioctl_map(TIOCSETC)     [expr ($tIOC|17)]
set ioctl_map(TIOCGETC)     [expr ($tIOC|18)]
set ioctl_map(TIOCLBIS)     [expr ($tIOC|127)]
set ioctl_map(TIOCLBIC)     [expr ($tIOC|126)]
set ioctl_map(TIOCLSET)     [expr ($tIOC|125)]
set ioctl_map(TIOCLGET)     [expr ($tIOC|124)]
set ioctl_map(TIOCSBRK)     [expr ($tIOC|123)]
set ioctl_map(TIOCCBRK)     [expr ($tIOC|122)]
set ioctl_map(TIOCSDTR)     [expr ($tIOC|121)]
set ioctl_map(TIOCCDTR)     [expr ($tIOC|120)]
set ioctl_map(TIOCSLTC)     [expr ($tIOC|117)]
set ioctl_map(TIOCGLTC)     [expr ($tIOC|116)]
set ioctl_map(TIOCOUTQ)     [expr ($tIOC|115)]
set ioctl_map(TIOCNOTTY)    [expr ($tIOC|113)]
set ioctl_map(TIOCSTOP)     [expr ($tIOC|111)]
set ioctl_map(TIOCSTART)    [expr ($tIOC|110)]
set ioctl_map(TIOCGPGRP)    [expr ($tIOC|20)]
set ioctl_map(TIOCSPGRP)    [expr ($tIOC|21)]
set ioctl_map(TIOCGSID)     [expr ($tIOC|22)]
set ioctl_map(TIOCSSID)     [expr ($tIOC|24)]
set ioctl_map(TIOCSTI)      [expr ($tIOC|23)]
set ioctl_map(TIOCMSET)     [expr ($tIOC|26)]
set ioctl_map(TIOCMBIS)     [expr ($tIOC|27)]
set ioctl_map(TIOCMBIC)     [expr ($tIOC|28)]
set ioctl_map(TIOCMGET)     [expr ($tIOC|29)]
set ioctl_map(TIOCREMOTE)   [expr ($tIOC|30)]
set ioctl_map(TIOCSIGNAL)   [expr ($tIOC|31)]
set ioctl_map(TI_GETINFO)   [expr ($TIMOD|140)]
set ioctl_map(TI_OPTMGMT)   [expr ($TIMOD|141)]
set ioctl_map(TI_BIND)      [expr ($TIMOD|142)]
set ioctl_map(TI_UNBIND)    [expr ($TIMOD|143)]
set ioctl_map(TI_GETMYNAME) [expr ($TIMOD|144)]
set ioctl_map(TI_GETPEERNAME)       [expr ($TIMOD|145)]
set ioctl_map(TI_SETMYNAME) [expr ($TIMOD|146)]
set ioctl_map(TI_SETPEERNAME)       [expr ($TIMOD|147)]
set ioctl_map(TI_SYNC)      [expr ($TIMOD|148)]
set ioctl_map(TI_GETADDRS)  [expr ($TIMOD|149)]
set ioctl_map(TL_IOC_CREDOPT)       [expr ($TL_IOC|001)]
set ioctl_map(TL_IOC_SOCKET)        [expr ($TL_IOC|002)]
set ioctl_map(IP_IOCTL)     [expr (( $i <<8)|$p)]
set ioctl_map(ND_GET)       [expr ($ND_BASE + 0)]
set ioctl_map(ND_SET)       [expr ($ND_BASE + 1)]
set ioctl_map(TCP_IOC_DEFAULT_Q)    [expr (( $T << 8) + 51)]
set ioctl_map(SBIOCSTIME)   [expr ($SBIOC|1)]
set ioctl_map(SBIOCGTIME)   [expr ($SBIOC|2)]
set ioctl_map(SBIOCCTIME)   [expr ($SBIOC|3)]
set ioctl_map(SBIOCSCHUNK)  [expr ($SBIOC|4)]
set ioctl_map(SBIOCGCHUNK)  [expr ($SBIOC|5)]
set ioctl_map(SBIOCSSNAP)   [expr ($SBIOC|6)]
set ioctl_map(SBIOCGSNAP)   [expr ($SBIOC|7)]
set ioctl_map(SBIOCSFLAGS)  [expr ($SBIOC|8)]
set ioctl_map(SBIOCGFLAGS)  [expr ($SBIOC|9)]
set ioctl_map(DLIOC)        [expr ( $D << 8)]
set ioctl_map(DLIOCRAW)     [expr ($DLIOC|1)]
set ioctl_map(DL_IOC_HDR_INFO)      [expr ($DLIOC|10)]
set ioctl_map(LOGDMX_IOC_QEXCHANGE) [expr ($TELIOC|1)]
set ioctl_map(PFIOC)        [expr ( $P << 8)]
set ioctl_map(PFIOCSETF)    [expr ($PFIOC|1)]
set ioctl_map(RLIOC)        [expr ( $r << 8)]
set ioctl_map(RL_IOC_ENABLE)        [expr ($RLIOC|1)]
set ioctl_map(SADIOC)       [expr ( $D<<8)]
set ioctl_map(SAD_SAP)      [expr ($SADIOC|01)]
set ioctl_map(SAD_GAP)      [expr ($SADIOC|02)]
set ioctl_map(SAD_VML)      [expr ($SADIOC|03)]
set ioctl_map(O_SI_GETUDATA)        [expr ($SIMOD|101)]
set ioctl_map(SI_SHUTDOWN)  [expr ($SIMOD|102)]
set ioctl_map(SI_LISTEN)    [expr ($SIMOD|103)]
set ioctl_map(SI_SETMYNAME) [expr ($SIMOD|104)]
set ioctl_map(SI_SETPEERNAME)       [expr ($SIMOD|105)]
set ioctl_map(SI_GETINTRANSIT)      [expr ($SIMOD|106)]
set ioctl_map(SI_TCL_LINK)  [expr ($SIMOD|107)]
set ioctl_map(SI_TCL_UNLINK)        [expr ($SIMOD|108)]
set ioctl_map(SI_SOCKPARAMS)        [expr ($SIMOD|109)]
set ioctl_map(SI_GETUDATA)  [expr ($SIMOD|110)]
set ioctl_map(I_NREAD)      [expr ($STR|01)]
set ioctl_map(I_PUSH)       [expr ($STR|02)]
set ioctl_map(I_POP)        [expr ($STR|03)]
set ioctl_map(I_LOOK)       [expr ($STR|04)]
set ioctl_map(I_FLUSH)      [expr ($STR|05)]
set ioctl_map(I_SRDOPT)     [expr ($STR|06)]
set ioctl_map(I_GRDOPT)     [expr ($STR|07)]
set ioctl_map(I_STR)        [expr ($STR|010)]
set ioctl_map(I_SETSIG)     [expr ($STR|011)]
set ioctl_map(I_GETSIG)     [expr ($STR|012)]
set ioctl_map(I_FIND)       [expr ($STR|013)]
set ioctl_map(I_LINK)       [expr ($STR|014)]
set ioctl_map(I_UNLINK)     [expr ($STR|015)]
set ioctl_map(I_PEEK)       [expr ($STR|017)]
set ioctl_map(I_FDINSERT)   [expr ($STR|020)]
set ioctl_map(I_SENDFD)     [expr ($STR|021)]
set ioctl_map(I_RECVFD)     [expr ($STR|022)]
set ioctl_map(I_E_RECVFD)   [expr ($STR|016)]
set ioctl_map(I_SWROPT)     [expr ($STR|023)]
set ioctl_map(I_GWROPT)     [expr ($STR|024)]
set ioctl_map(I_LIST)       [expr ($STR|025)]
set ioctl_map(I_PLINK)      [expr ($STR|026)]
set ioctl_map(I_PUNLINK)    [expr ($STR|027)]
set ioctl_map(I_FLUSHBAND)  [expr ($STR|034)]
set ioctl_map(I_CKBAND)     [expr ($STR|035)]
set ioctl_map(I_GETBAND)    [expr ($STR|036)]
set ioctl_map(I_ATMARK)     [expr ($STR|037)]
set ioctl_map(I_SETCLTIME)  [expr ($STR|040)]
set ioctl_map(I_GETCLTIME)  [expr ($STR|041)]
set ioctl_map(I_CANPUT)     [expr ($STR|042)]
set ioctl_map(I_SERROPT)    [expr ($STR|043)]
set ioctl_map(I_GERROPT)    [expr ($STR|044)]
set ioctl_map(I_ESETSIG)    [expr ($STR|045)]
set ioctl_map(I_EGETSIG)    [expr ($STR|046)]


