: # # # gennttab generates ntcontab.o # usage: gennttab [ -n protocol-name ... ] # -n: do not include protocol adapters with given names # # generates .s file for SunOS 5, AIXRIOS, SVR4_386, NCR # .c file for all others # if [ "$ORACLE_TRACE" ]; then set -x fi UNAME=/bin/uname PLATFORM=`$UNAME` if [ $PLATFORM = "SunOS" ] || [ $PLATFORM = "SOL" ]; then NM=/usr/ccs/bin/nm SED=/usr/bin/sed AWK=/usr/bin/awk GREP=/usr/bin/grep EXPR=/usr/bin/expr LN=/usr/bin/ln ECHO=/usr/bin/echo elif [ $PLATFORM = "Linux" ]; then NM=/usr/bin/nm SED=/bin/sed AWK=/usr/bin/awk GREP=/bin/grep EXPR=/usr/bin/expr LN=/bin/ln ECHO=/bin/echo else NM=/usr/bin/nm SED=/usr/bin/sed AWK=/usr/bin/awk GREP=/usr/bin/grep EXPR=/usr/bin/expr LN=/usr/bin/ln ECHO=/usr/bin/echo fi if [ ! -d "$TMPDIR" ] ; then TMPDIR=/tmp fi VER=11 ################################## NMOPTS= NMOPTS=-X32_64 ################################## if [ "x$1" = "x-64" ] ; then LIB=lib64 else LIB=lib fi LIBPATH=${ORACLE_HOME}/${LIB} LIBNET="libn${VER}" LIBNETPATH=${LIBPATH}/${LIBNET} TRANSPORTS="US TCP BEQ TCPS DCE NMP RAW SDP" TtoINI="US:ntusini TCP:nttini BEQ:ntpini TCPS:ntzini DCE:ntodrini NMP:ntnini RAW:ntrini SDP:nttsdpini" TtoBAS="US:ntus TCP:ntt BEQ:ntp TCPS:ntz DCE:ntodr NMP:ntn RAW:ntr SDP:ntt" TtoNAM="US:IPC TCP:TCP/IP BEQ:BEQueath TCPS:SSL DCE:DCE NMP:NamedPipes RAW:RAW SDP:SDP" TtoLIB="US:us TCP:tcp BEQ:beq TCPS:tcps DCE:dce NMP:nmp RAW:raw SDP:tcp" trap 'rm -f ${TMPDIR}/net$$; for T in $TRANSPORTS; do ; rm -f ${TMPDIR}/${T}$$; done ; exit 0' 1 2 15 $NM $NMOPTS ${LIBNETPATH}.* > $TMPDIR/net$$ 2> /dev/null for T in $TRANSPORTS; do # Default is to use all available drivers eval NTUSE$T="true" LIB=`$ECHO ${TtoLIB} | $SED 's/ /\\ /g' | $GREP "^${T}:" | $AWK -F: '{print $2}'` INI=`$ECHO ${TtoINI} | $SED 's/ /\\ /g' | $GREP "^${T}:" | $AWK -F: '{print $2}'` BAS=`$ECHO ${TtoBAS} | $SED 's/ /\\ /g' | $GREP "^${T}:" | $AWK -F: '{print $2}'` if [ -z "${LIB}" ] ; then $LN -s $TMPDIR/net$$ $TMPDIR/${T}$$ else $NM $NMOPTS ${LIBPATH}/libn${LIB}${VER}.* > ${TMPDIR}/${T}$$ 2> /dev/null fi if [ "`$GREP ${INI} ${TMPDIR}/${T}$$ 2> /dev/null`" = "" ]; then eval NTUSE${T}="false" fi done # clean up temp files rm -f ${TMPDIR}/net$$ for T in $TRANSPORTS; do rm -f ${TMPDIR}/${T}$$ done # # Now begins the big divide between SunOS 5 and the rest of the world... # # # Now begins the big divide between AIXRIOS and the rest of the world... # LONG=".llong" $ECHO '#' $ECHO '# This File Is GENERATED By gennttab on AIXRIOS.' $ECHO '#' $ECHO '' $ECHO ' .rename H.12.NO_SYMBOL{RO},""' $ECHO '' $ECHO ' .lglobl H.12.NO_SYMBOL{RO} ' $ECHO ' .globl ntcontab{RW} ' $ECHO ' .extern ntusini{DS} ' $ECHO ' .extern ntrini{DS} ' if [ "${NTUSEIOSI}" = "true" ] then $ECHO ' .extern ntio4ini{DS} ' fi if [ "${NTUSELU62}" = "true" ] then $ECHO ' .extern ntlini{DS} ' fi if [ "${NTUSEDNT}" = "true" ] then $ECHO ' .extern ntdini{DS} ' fi if [ "${NTUSEISPX}" = "true" ] then $ECHO ' .extern ntsini{DS} ' fi if [ "${NTUSETCP}" = "true" ] then $ECHO ' .extern nttini{DS} ' fi if [ "${NTUSETCPS}" = "true" ]; then $ECHO ' .extern ntzini{DS} ' fi if [ "${NTUSEDCE}" = "true" ] then $ECHO ' .extern ntodrini{DS} ' fi $ECHO ' .extern ntpini{DS} ' $ECHO ' .globl ntconent{RO} ' $ECHO '' $ECHO '' count=0 tcp_f="false" tcps_f="false" sdp_f="false" $ECHO ' .csect ntcontab{RW}, 3 ' $ECHO " $LONG b1 " $ECHO " $LONG ntpini{DS} " $ECHO " $LONG b2 " $ECHO " $LONG b3 " $ECHO " $LONG t1 " base=16 if [ "${NTUSETCP}" = "true" ] then $ECHO " $LONG nttini{DS} " $ECHO " $LONG t2 " $ECHO " $LONG t3 " $ECHO " $LONG z1 " count=`$EXPR $count + 1` tcp_f="true" fi if [ "${NTUSETCPS}" = "true" ] then $ECHO " $LONG ntzini{DS} " $ECHO " $LONG z2 " $ECHO " $LONG z3 " $ECHO " $LONG r1 " count=`$EXPR $count + 1` tcps_f="true" fi if [ "${NTUSESDP}" = "true" ] then $ECHO " $LONG s1 " $ECHO " $LONG nttsdpini{DS} " $ECHO " $LONG s2 " $ECHO " $LONG s3 " count=`$EXPR $count + 1` sdp_f="true" fi if [ "${NTUSEDCE}" = "true" ] then $ECHO " $LONG ntodrini{DS} " base=`$EXPR $base + 4` $ECHO " $LONG H.12.NO_SYMBOL{RO}+ $base" base=`$EXPR $base + 10` $ECHO " $LONG H.12.NO_SYMBOL{RO}+ $base" base=`$EXPR $base + 5` $ECHO " $LONG H.12.NO_SYMBOL{RO}+ $base" count=`$EXPR $count + 1` dce_f="true" fi $ECHO " $LONG ntrini{DS} " $ECHO " $LONG r2 " $ECHO " $LONG r3 " $ECHO " $LONG i1 " $ECHO " $LONG ntusini{DS} " $ECHO " $LONG i2 " $ECHO " $LONG i3 " $ECHO " $LONG 0x00000000 " $ECHO " $LONG 0x00000000 " $ECHO " $LONG 0x00000000 " $ECHO " $LONG 0x00000000 " $ECHO '# End csect ntcontab{RW}' $ECHO '' $ECHO ' .csect ntconent{RO} ' count=`$EXPR $count + 3` $ECHO " .long $count" $ECHO '# End csect ntconent{RO}' $ECHO '' $ECHO '' $ECHO ' .csect H.12.NO_SYMBOL{RO}, 3 ' $ECHO 'b1: .string "beq"' $ECHO 'b2: .string "ntpini" #_NTPINI' $ECHO 'b3: .string "nbeq"' if [ "$tcp_f" = "true" ] then $ECHO 't1: .string "tcp"' $ECHO 't2: .string "nttini" #_NTTINI' $ECHO 't3: .string "ntcp"' fi if [ "$tcps_f" = "true" ] then $ECHO 'z1: .string "tcps"' $ECHO 'z2: .string "ntzini" #NTZINI' $ECHO 'z3: .string "ntcps"' fi if [ "$spx_f" = "true" ] then $ECHO ' .string "spx"' $ECHO ' .string "_NTSINI"' $ECHO ' .string "nspx"' fi if [ "$dec_f" = "true" ] then $ECHO ' .string "decnet"' $ECHO ' .string "_NTDINI"' $ECHO ' .string "ndec"' fi if [ "$lu62_f" = "true" ] then $ECHO ' .string "lu62"' $ECHO ' .string "_ntlini"' $ECHO ' .string "nlu62"' fi if [ "$dce_f" = "true" ] then $ECHO ' .string "dce"' $ECHO ' .string "_ntodrini"' $ECHO ' .string "ndce"' fi if [ "$osi4_f" = "true" ] then $ECHO ' .string "osi4"' $ECHO ' .string "_ntio4ini"' $ECHO ' .string "nto4"' fi $ECHO 'r1: .string "raw"' $ECHO 'r2: .string "ntrini" #NTRINI' $ECHO 'r3: .string "ntr"' $ECHO 'i1: .string "ipc"' $ECHO 'i2: .string "ntusini" #_NTUSINI' $ECHO 'i3: .string "nus"' $ECHO ''