home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved.
- *
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE
- * SANTA CRUZ OPERATION INC.
- *
- * The copyright notice above does not evidence any actual or intended
- * publication of such source code.
- */
-
- /* $Novell-NWU: $Header: /proj6/ncps/nwu_top/nws/include/sys/ncpipx_app.h,v 1.2 1996/04/05 22:58:14 vtag Exp $ */
- /*
- * Copyright 1991, 1992 Novell, Inc.
- * All Rights Reserved.
- *
- * This work is subject to U.S. and International copyright laws and
- * treaties. No part of this work may be used, practiced, performed,
- * copied, distributed, revised, modified, translated, abridged,
- * condensed, expanded, collected, compiled, linked, recast,
- * transformed or adapted without the prior written consent
- * of Novell. Any use or exploitation of this work without
- * authorization could subject the perpetrator to criminal and
- * civil liability.
- */
-
- #ifndef _NCPIPX_APP_H
- #define _NCPIPX_APP_H
-
- #ident "@(#)ncpipx_app.h 1.2"
-
- #ifdef _KERNEL_HEADERS
- #include <util/types.h>
- #include <nwu/nwnet/include/ipx_app.h>
- #else
- #include <sys/types.h>
- #include "sys/ipx_app.h"
- #endif
-
- /*
- ** Data returned in response to NMX_PSI_INFO Ioctl request
- */
- typedef struct {
- time_t IStartTime; /* Time module loaded */
- uint32 IHashSize; /* Number of hash table/client entries */
- uint32 INumClients; /* Number of active client entries */
- uint32 IMaxClients; /* Maximum Clients active at one time */
- uint32 IDownMsgTotal; /* Total Number of Down Stream Messages */
- uint32 IDownMsgResp; /* Number of Down Stream Message Responses */
- uint32 IDownMsgCont; /* Number of Down Stream Message Continue */
- uint32 IDownMsgEnd; /* Number of Down Stream Message No Data */
- uint32 IDownUnsol; /* Number of Down Stream Message Unsolitied */
- uint32 IDownDropped; /* Number of Down Stream Message Dropped */
- uint32 IIoctl; /* Number of Ioctl Commands */
- uint32 IUpMsgs; /* Number of Upstream Messages received */
- uint32 IUpMsgsPulledup;/* Number of Upstream Messages pulled up */
- uint32 IUpMsgsDropped; /* Number of Upstream Messages Dropped */
- uint32 IUpBurstDropped;/* Number of Upstream Packet Burst Dropped */
- uint32 IUpBurstClientBusy;/* Number of Upstream Packet read/sys msgs */
- /* dropped because client already processing msg */
- uint32 IUpBurstEngineBusy;/* Number of Upstream Packet Burst begin write */
- /* msgs dropped because no engines available */
- uint32 IUpNCPSent; /* Number of NCP Messages Sent Upstream */
- uint32 IUpBurstSysSent;/* Number of Burst System Requests Sent Upstream */
- uint32 IUpBurstReadSent;/* Number of Burst Read Requests Sent Upstream */
- uint32 IUpBurstWriteSent;/* Number of Burst Write Requests Sent Upstream */
- uint32 IUpBurstFragsSent;/* Number of Burst Write Fragments Sent Upstrm */
- uint32 IUpBurstExpedite;/* Number Pkt Burst Messages Expedited Upstream */
- uint32 IHashEntries; /* Number of Entries made in hash table */
- uint32 IHashMissed; /* Number of Entries made, not first in hash table*/
- uint32 IClientBusy; /* Number of Client Busy responses sent */
- uint32 INemuxBusy; /* Number of Nemux Busy responses sent */
- uint32 IBurstNemuxBusy;/* Number of Nemux Busy begin burst write dropped */
- uint32 IStatNoBegin; /* Stats enabled - Number of end NCP w/o begin */
- uint32 INumInfoClients;/* # of client struct returned by CLIENT_INFO ioctl */
- } NxInfo_t;
-
- /*
- * Data returned in response to NXI_CLIENT_INFO Ioctl request
- */
- typedef struct {
- ipxAddr_t NClientAddress; /* Client Source IPX Address */
- uint8 NMsgType; /* Message Type */
- uint8 NFlags; /* Flag bits */
- int16 NHash; /* Hash Index for this entry */
- uint16 NBurstNumber; /* Current Unique Burst Number */
- uint16 NSendDelay; /* Pkt Brst Read send delay in ticks */
- void *Nmpt; /* MPT Token from NEMUX */
- } NxClInfo_t;
-
- #ifdef XIOC
- #undef XIOC
- #endif
- #define XIOC(t) (('n' << 8) | t)
-
- #define NXI_INITIALIZE XIOC(1) /* Initialize */
- #define NXI_CLIENT_INFO XIOC(2) /* Get Client Structures */
- /*
- ** Structure to set initialization parameters
- */
- typedef struct {
- int IMaxProcesses; /* Number of Max NWU Processes */
- int IMaxLicensedConn; /* Number of Licensed Connections */
- } NxInit_t;
-
- /*
- ** Enable/Disable statistics - requires no data structure
- */
- #define NXI_STATISTICS_ON XIOC(3) /* Enable Statistics, no ncpipx Q */
- #define NXI_STATISTICS_ONQ XIOC(4) /* Enable Statistics, ncpipx Q */
-
- #define NXI_STATISTICS_OFF XIOC(5) /* Disable Statistics */
-
- #define NXI_STATISTICS XIOC(6) /* Get Statistics */
- /*
- ** Structure for statistics of an individual NCP. All results are in
- ** nanoseconds
- **
- ** To compute processing time mean for an NCP
- **
- ** double ncpMean( nxNcpStat_t *statbuf)
- ** {
- ** if( statbuf->Count == 0)
- ** return( statbuf->TimeSum);
- ** else
- ** return( statbuf->TimeSum / statbuf->Count);
- ** }
- **
- ** To compute processing time standard deviation for an NCP
- **
- ** double ncpStandardDeviation( nxNcpStat_t *statbuf)
- ** {
- ** if( statbuf->Count <= 1)
- ** return( 0.0);
- ** else
- ** return( sqrt((statbuf->TimeSum2
- ** - ((statbuf->TimeSum * statbuf->TimeSum) / statbuf->Count))
- ** / (statbuf->Count - 1)));
- ** }
- */
- typedef struct {
- uint16 RequestType; /* NCP request type */
- uint8 Function; /* NCP request function */
- uint8 SubFunction; /* NCP request subfunction */
- uint32 Count; /* Count of NCPs processed */
- uint32 TimeSum; /* Sum of all delta elapsed time processing NCPs */
- uint32 TimeSum2; /* Sum delta elapsed time processing NCPs squared */
- } NxNcpStat_t;
-
- /*
- ** When sending an NXI_STATISTICS ioctl request via the nemux NMXI_IOCTL
- ** request, the NxStats_t structure is returned with filled nxNcpStat
- ** structures. NNXI_STATISTICS forms nxStats_t size message blocks,
- ** fills each with complete NxNcpStat_t structures, and sends them up stream
- ** as data until the all statistics have been sent upstream to the calling
- ** process. It then returns from the ioctl with no errors.
- **
- ** If a failure occurs, the functon returns a -1 and the ioctl fails.
- ** If data blocks were sent, the entry after the last NxNcpStat_t entry
- ** will be have RequestType set to 0xFFFF, indicating end of data sent.
- **
- ** After the calling process receives the ioctl status, and if the ioctl was
- ** successful, it retrieves the data with the read or getmsg system calls.
- */
-
- #define MAX_NCP_STATS 70
-
- typedef struct {
- NxNcpStat_t NcpStats[MAX_NCP_STATS];
- } NxStats_t;
-
- /*
- ** Values for PsInfo for the NCP protocol
- */
- /*
- ** Request Msgs (Upstream, set by NCPIPX)
- */
- #define NCP_REQUEST (1<<1) /* NCP request msg */
- #define NCP_BURST_READ (1<<2) /* NCP burst read msg */
- #define NCP_BURST_WRITE (1<<3) /* NCP burst write, or sys during write */
- #define NCP_BURST_SYSTEM (1<<4) /* NCP system msg, has own msg context */
- #define NCP_WBURST_DUP_REQ (1<<5) /* NCP duplicate burst write request pkt */
- #define NCP_GOT_CHKSUM (1<<7) /* Msg had a valid checksum */
- /*
- ** Response Msgs (Downstream, set by user process)
- */
- #define NCP_RESP_DATA_END (1<<1) /* Msg response w/data, end of msg */
- #define NCP_RESP_NODATA_END (1<<2) /* Msg response no/data, end of msg */
- #define NCP_RESP_DATA_CONT (1<<3) /* Msg response w/data, continue msg */
- #define NCP_UNSOL_DATA (1<<4) /* Unsolicited msg */
- #define NCP_KILL_CLIENT (1<<5) /* Client Terminated */
- #define NCP_DO_CHKSUM (1<<7) /* Generate checksum on msg */
-
- #endif /* _NCPIPX_APP_H */
-