#!/bin/ksh93
# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# 61haes_r714 src/43haes/usr/sbin/cluster/utilities/cl_netstat.sh 1.1 
#  
# Licensed Materials - Property of IBM 
#  
# COPYRIGHT International Business Machines Corp. 2006 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 
# @(#)07	1.1 src/43haes/usr/sbin/cluster/utilities/cl_netstat.sh, hacmp.utils, 61haes_r714 4/20/06 06:12:14
#
# A simple wrapper for /usr/bin/netstat.  For AIX just call the real netstat command
# passing all arguments in $*.  For other platforms run special handling to translate
# the inputs and output of netstat to be more like the version.
#
# Currently only AIX and Linux are expected platforms, and we will exit with an error
# on Linux.
#

NETSTAT="/usr/bin/netstat"

UNAME=$(uname -m)
case $UNAME in
    ppc* | i* )
        export PLATFORM="__LINUX__"
        ;;
    * )
        export PLATFORM="__AIX__"
        ;;
esac

if [[ "$PLATFORM" == "__AIX__" ]]; then
   $NETSTAT $*
   exit $?
else
   dspmsg -s 2 scripts.cat 53 "Utility $0 has not been implemented for Linux." $0
   exit 1;
fi