DL_BIND_REQ(7dlpi) DL_BIND_REQ(7dlpi)
NAME
DL_BIND_REQ - Message Type
SYNOPSIS
The message consists of one M_PROTO message block, which
contains the following structure.
typedef struct {
ulong dl_primitive;
ulong dl_sap;
ulong dl_max_conind;
ushort dl_service_mode;
ushort dl_conn_mgmt;
ulong dl_xidtest_flg;
} dl_bind_req_t;
DESCRIPTION
Requests the DLS provider bind a DLSAP to the stream. The DLS
user must identify the address of the DLSAP to be bound to the
stream. For connection-mode service, the DLS user also
indicates whether it will accept incoming connection requests
on the stream. Finally, the request directs the DLS provider
to activate the stream associated with the DLSAP.
A stream is viewed as active when the DLS provider may
transmit and receive protocol data units destined to or
originating from the stream. The PPA associated with each
stream must be initialized on completion of the processing of
the DL_BIND_REQ. More specifically, the DLS user is ensured
that the PPA is initialized when the DL_BIND_ACK is received.
If the PPA cannot be initialized, the DL_BIND_REQ will fail.
A stream may be bound as a connection management stream, such
that it will receive all connect requests that arrive through
a given PPA. In this example, the DLSAP address will be
ignored.
Parameters
dl_primitive
conveys DL_BIND_REQ.
dl_sap conveys sufficient information to identify the
DLSAP that will be bound to the DLPI stream. See
DLPI Addressing for a description of DLSAP
addresses. The format of this information is
specific to a given DLS provider, and may contain
Copyright 1994 Novell, Inc. Page 1
DL_BIND_REQ(7dlpi) DL_BIND_REQ(7dlpi)
the full DLSAP address or some portion of that
address sufficient to uniquely identify the DLSAP
in question. The full address of the bound DLSAP
will be returned in the DL_BIND_ACK.
The following rules are used by the DLS provider
when binding a DLSAP address.
The DLS provider must define and manage its
DLSAP address space.
DLPI allows the same DLSAP to be bound to
multiple streams, but a given DLS provider
may need to restrict its address space to
allow one stream per DLSAP.
The DLS provider may not be able to bind the
specified DLSAP address for the following
reasons:
the DLS provider may statically
associate a specific DLSAP with each
stream; or
the DLS provider may only support one
stream per DLSAP and the DLS user
attempted to bind a DLSAP that was
already bound to another stream.
In the first item, the value of dl_sap is ignored
by the DLS provider and the DL_BIND_ACK returns
the DLSAP address that is already associated with
the stream. In the second item, if the DLS
provider cannot bind the given DLSAP to the
stream, it may attempt to choose an alternate
DLSAP and return that on the DL_BIND_ACK. If an
alternate DLSAP cannot be chosen, the DLS provider
will return a DL_ERROR_ACK and set dl_errno to
DL_NOADDR.
Because of the provider-specific nature of the
DLSAP address, DLS user software that is to be
protocol independent should avoid hard-coding this
value. The DLS user should retrieve the necessary
DLSAP address from some other entity (such as a
management entity or higher layer protocol entity)
Copyright 1994 Novell, Inc. Page 2
DL_BIND_REQ(7dlpi) DL_BIND_REQ(7dlpi)
and insert it without inspection into the
DL_BIND_REQ.
dl_max_conind
Conveys the maximum number of outstanding
DL_CONNECT_IND messages allowed on the DLPI
stream. If the value is zero, the stream cannot
accept any DL_CONNECT_IND messages. If greater
than zero, the DLS user will accept DL_CONNECT_IND
messages up to the given value before having to
respond with a DL_CONNECT_RES or a
DL_DISCONNECT_REQ. The DLS provider may not be
able to support the value supplied in
dl_max_conind, as specified by the following
rules.
If the provider cannot support the specified
number of outstanding connect indications,
it should set the value down to a number it
can support.
Only one stream that is bound to the
indicated DLSAP may have an allowed number
of maximum outstanding connect indications
greater than zero. If a DL_BIND_REQ
specifies a value greater than zero, but
another stream has already bound itself to
the DLSAP with a value greater than zero,
the DLS provider will fail the request,
setting dl_errno to DL_BOUND on the
DL_ERROR_ACK.
If a stream with dl_max_conind greater than
zero is used to accept a connection, the
stream will be found busy during the
duration of the connection, and no other
streams may be bound to the same DLSAP with
a value of dl_max_conind greater than zero.
This restriction prevents more than one
stream bound to the same DLSAP from
receiving connect indications and accepting
connections. Accepting a connection on such
a stream is only allowed if there is just a
single outstanding connect indication being
processed.
Copyright 1994 Novell, Inc. Page 3
DL_BIND_REQ(7dlpi) DL_BIND_REQ(7dlpi)
A DLS user should always be able to request
a dl_max_conind value of zero, since this
indicates to the DLS provider that the
stream will only be used to originate
connect requests.
A stream with a negotiated value of
dl_max_conind that is greater than zero may
not originate connect requests. This field
is ignored in connectionless-mode service.
dl_service_mode
conveys the desired mode of service for this
stream, and may contain one of the following:
DL_CODLS connection-oriented data link service
DL_CLDLS connectionless data link service
DL_ACLDLS acknowledged connectionless data link
service.
If the DLS provider does not support the requested
service mode, a DL_ERROR_ACK will be generated,
specifying DL_UNSUPPORTED.
dl_conn_mgmt
if non-zero, indicates that the stream is the
connection management stream for the PPA to which
the stream is attached. When an incoming connect
request arrives, the DLS provider will first look
for a stream bound with dl_max_conind greater than
zero that is associated with the destination
DLSAP. If such a stream is found, the connect
indication will be issued on that stream.
Otherwise, the DLS provider will issue the connect
indication on the connection management stream for
that PPA, if one exists. Only one connection
management stream is allowed per PPA, so an
attempt to bind a second connection management
stream on a PPA will fail with the DLPI error set
to DL_BOUND. When dl_conn_mgmt is non-zero, the
value of dl_sap will be ignored. In
connectionless-mode service, dl_conn_mgmt is
ignored by the DLS provider.
Copyright 1994 Novell, Inc. Page 4
DL_BIND_REQ(7dlpi) DL_BIND_REQ(7dlpi)
dl_xidtest_flg
indicates to the DLS Provider that XID and/or TEST
responses for this stream are to be automatically
generated by the DLS Provider. The DLS Provider
will not generate DL_XID_IND and/or DL_TEST_IND,
and will error a DL_XID_REQ and/or DL_TEST_REQ. If
the DLS Provider does not support automatic
handling of XID and/or TEST responses, a
DL_ERROR_ACK will be generated, specifying
DL_NOAUTO, DL_NOXIDAUTO or DL_NOTESTAUTO. If the
Provider receives an XID or TEST request from the
DLS User, a DL_ERROR_ACK will be generated
specifying DL_XIDAUTO or DL_TESTAUTO respectively.
The dl_xidtest_flg contains a bit-mask specifying
zero or more of the following values:
DL_AUTO_XID
Automatically respond to XID commands.
DL_AUTO_TEST
Automatically respond to TEST commands.
State
The message is valid in state DL_UNBOUND.
New State
The resulting state is DL_BIND_PENDING.
Response
If the bind request is successful, DL_BIND_ACK is sent to the
DLS user resulting in state DL_IDLE.
If the request fails, message DL_ERROR_ACK is returned and the
resulting state is unchanged.
Reasons for Failure
DL_BADADDR The DLSAP address information was invalid or was in
an incorrect format.
DL_INITFAILED
Automatic initialization of the PPA failed.
DL_NOTINIT The PPA had not been initialized before this
request.
Copyright 1994 Novell, Inc. Page 5
DL_BIND_REQ(7dlpi) DL_BIND_REQ(7dlpi)
DL_ACCESS The DLS user did not have proper permission to use
the requested DLSAP address.
DL_BOUND The DLS user attempted to bind a second stream to a
DLSAP with dl_max_conind greater than zero, or the
DLS user attempted to bind a second connection
management stream to a PPA.
DL_OUTSTATE The primitive was issued from an invalid state.
DL_NOADDR The DLS provider could not allocate a DLSAP address
for this stream.
DL_UNSUPPORTED
The DLS provider does not support requested
service mode on this stream.
DL_SYSERR A system error has occurred and the UNIX system
error is indicated in the DL_ERROR_ACK.
DL_NOAUTO Automatic handling of XID and TEST responses not
supported.
DL_NOXIDAUTO
Automatic of XID response not supported.
DL_NOTESTAUTO
Automatic of TEST response not supported.
Category
Local Management.
REFERENCES
the section ``PPA Initialization / De-initialization'' of the
book STREAMS Modules and Drivers
the section ``The Connection Management Stream'' of the book
STREAMS Modules and Drivers
the section ``Connection Establishment'' of the book STREAMS
Modules and Drivers has details on how dl_max_conind is used
to support multi-threaded connect processing.
Copyright 1994 Novell, Inc. Page 6