<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=GB2312" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
[17:08:27]orchar:/ # grep 9 /usr/include/sys/dlpi.h<br>
/*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&amp;T */<br>
&nbsp;* Refer to document: "STREAMS DLPI Spec", 800-6915-01.<br>
#pragma ident&nbsp;&nbsp; "@(#)dlpi.h&nbsp;&nbsp;&nbsp;&nbsp; 1.45&nbsp;&nbsp;&nbsp; 05/12/09 SMI"&nbsp;&nbsp; /* SVr4.0 1.2&nbsp;&nbsp;
*/<br>
#define DL_VERSION_2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x02&nbsp;&nbsp;&nbsp; /* version of dlpi March 12,
1991 */<br>
#define DL_UDERROR_IND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x09&nbsp;&nbsp;&nbsp; /* datagram error indication */<br>
#define DL_RESET_RES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x19&nbsp;&nbsp;&nbsp; /* Complete reset processing */<br>
#define DL_XID_REQ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x29&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Request to send an XID PDU */<br>
#define DL_INCON_PENDING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x09&nbsp;&nbsp;&nbsp; /* awaiting DL_CONN_RES */<br>
#define DL_DISCON9_PENDING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x10&nbsp;&nbsp;&nbsp; /* Waiting ack of DL_DISC_REQ */<br>
#define DL_BADPRIM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x09&nbsp;&nbsp;&nbsp; /* Primitive received not known by
provider */<br>
#define DL_XIDAUTO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x19&nbsp;&nbsp;&nbsp; /* Automatic handling of XID response */<br>
#define DL_100BT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x19&nbsp;&nbsp;&nbsp; /* 100 Base T */<br>
#define DL_OTHER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x09&nbsp;&nbsp;&nbsp; /* Any other medium not listed above */<br>
#define DL_DISC_PERMANENT_CONDITION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0809<br>
#define DL_RESET_FLOW_CONTROL&nbsp;&nbsp; 0x0900<br>
#define DL_RESET_LINK_ERROR&nbsp;&nbsp;&nbsp;&nbsp; 0x0901<br>
#define DL_RESET_RESYNCH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x0902<br>
#define DL_CMD_UN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x09&nbsp;&nbsp;&nbsp; /* Resources temporarily unavailable */<br>
#define DL_RSP_UN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x90&nbsp;&nbsp;&nbsp; /* Resources temporarily unavailable */<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_uscalar_t&nbsp;&nbsp;&nbsp;&nbsp; reserved[9];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* reserved fields */<br>
<br>
<br>
<br>
Rick Jones ÒÑдÈë:
<blockquote cite="mid44D22AC0.1010307@hp.com" type="cite">
  <blockquote type="cite">
    <pre wrap="">Thanks Rick:
  As you said, I add a option to specify a different file.
  But I got another error:
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Does it show that the DLPI stuff doesn't get much exposure?-)

  </pre>
  <blockquote type="cite">
    <pre wrap="">/usr/local/bin # ./netperf -H 11.0.1.105 -t DLCO_STREAM -- -D /dev/xge
DLPI CO STREAM TEST
Recv   Send    Send
Window Window  Message  Elapsed
Size   Size    Size     Time     Throughput
frames frames  bytes    secs.    10^6bits/sec

put_control: acknowledgement error wanted 6 got 5
             dl_error_primitive: 11
             dl_errno:           4
             dl_unix_errno       22
netperf: dl_open: could not send control message, errno = 0
netperf: send_dlpi_co_stream: dlpi stream data descriptor: Error 0
    </pre>
  </blockquote>
  <pre wrap=""><!---->
So, falling-back to grepping errno again, we have:

$ grep 22 /usr/include/sys/errno.h
#define EINVAL          22      /* Invalid argument             */

and expanding that to try to decode the dl_errno:

$ grep 4 /usr/include/sys/dlpi.h
#define DL_BIND_ACK             0x04    /* Dlsap address bound, */
#define DL_DISCONNECT_IND       0x14    /* Disconnect indication */
#define DL_REPLY_REQ            0x24    /* Request a DLSDU from the
remote */
#define DL_GET_STATISTICS_REQ   0x34    /* Request to get statistics */
#define DL_UNATTACHED           0x04    /* PPA not attached */

which suggests an issue with the PPA - I don't recall what netperf
assumes for the PPA or if it tries to strip it from the device name.  It
has been a _long_ time :)

  </pre>
  <blockquote type="cite">
    <pre wrap="">/usr/local/bin # ./netperf -H 11.0.1.105 -t DLCO_STREAM -- -D /dev/xge0
DLPI CO STREAM TEST
Recv   Send    Send
Window Window  Message  Elapsed
Size   Size    Size     Time     Throughput
frames frames  bytes    secs.    10^6bits/sec

put_control: acknowledgement error wanted 6 got 5
             dl_error_primitive: 11
             dl_errno:           9
             dl_unix_errno       0
netperf: dl_open: could not send control message, errno = 0
netperf: send_dlpi_co_stream: dlpi stream data descriptor: Error 0
    </pre>
  </blockquote>
  <pre wrap=""><!---->
So, this one had no unix errno number, but did have a DLPI error number,
which we can look for in the include file(s):

$ grep 9 /usr/include/sys/dlpi.h
#define DL_VERSION_2            0x02    /* version of dlpi March 12,1991 */
#define DL_UDERROR_IND          0x09    /* datagram error indication, */
#define DL_RESET_RES            0x19    /* Complete reset processing */
#define DL_XID_REQ      0x29            /* Request to send an XID PDU */
#define DL_INCON_PENDING        0x09    /* incoming connection, awaiting */
#define DL_DISCON9_PENDING      0x10    /* Waiting ack of DL_DISC_REQ
when in */
#define DL_BADPRIM      0x09    /* Primitive received is not known by DLS */
#define DL_XIDAUTO      0x19    /* Automatic handling of XID response */
#define DL_OTHER        0x09    /* Any other medium not listed above */
#define DL_DISC_PERMANENT_CONDITION             0x0809
#define DL_RESET_FLOW_CONTROL   0x0900
#define DL_RESET_LINK_ERROR     0x0901
#define DL_RESET_RESYNCH        0x0902
#define DL_CMD_UN       0x09    /* Resources temporarily unavailable */
#define DL_RSP_UN       0x90    /* Resources temporarily unavailable */

I'm not sure which of those 9's is the applicable one though.  I am
pretty sure the dl_errno is standardised by DLPI but it wouldn't hurt to
double-check in the Solaris dlpi.h file.

rick
  </pre>
</blockquote>
<br>
</body>
</html>