DLioctl(3dlpi) DLioctl(3dlpi)
NAME
DLioctl - device control and status operations
SYNOPSIS
DLioctl(queue_t *q, mblk_t *mp)
Parameters
q pointer to the write queue
mp message pointer
DESCRIPTION
All ioctls except those for getting the Ethernet address and
getting the MIB can only be performed by a privileged user.
If a privilege violation is found for these ioctls, the input
message is returned with the type field of the input message
changed to M_IOCNAK and the ioc_error field of the input ioctl
structure set to EPERM.
The ioctls for get (& set) MIB, get (& set) Ethernet address,
and add (& delete) multicast address require buffer space. If
there is no buffer space supplied by the user, the input
message is returned with the type field of the input message
changed to M_IOCNAK and the ioc_error field of the input ioctl
structure set to EINVAL.
In processing the ioctls, DLioctl() sends back only the
requested amount of data (specified in the ioc_count field of
input message). Functions in Hardware Dependent Layer are
called for toggling the promiscuous state, adding or deleting
multicast addresses, changing the Ethernet addresses, and for
enabling, disabling or resetting the controller. The current
Ethernet address is set in the board configuration structure
by the Hardware Dependent Layer during initialization. This
value is used to satisfy the ioctl for getting the Ethernet
address.
The input message is returned with M_IOCNAK and EINVAL fields
set in the following cases:
The ioctl for setting the Ethernet address can be turned
off by undefining ALLOW_SET_EADDR
When ALLOW_SET_EADDR is defined but more bytes are
present in the data than the size of the Ethernet
address structure
Copyright 1994 Novell, Inc. Page 1
DLioctl(3dlpi) DLioctl(3dlpi)
When the Hardware Dependent Layer returns a non-zero
value (this is true in all ioctls that interact with the
Hardware Dependent Layer).
The various ioctls are described below.
Response
status errors are returned in the form of NAK messages.
Commands
DLIOCGMIB
Description
Returns the DL_mib_t structure, which contains the
MIB. The MIB holds the Ethernet statistics that
are kept in the driver. The values in the MIB are
compatible with those needed by the SNMP protocol.
Privilege Needed
No
Hardware Dependent Layer Functions Called
None
DLIOCCSMACDMODE
Description
Switches the sap type of the controlling SAP from
just a plain DL_CSMACD sap to a RAW SAP.
Privilege Needed
Yes
Hardware Dependent Layer Functions Called
None
DLIOCGETMULTI
Description
Retrieves the list of multicast addresses that are
valid for the given board/adapter.
Copyright 1994 Novell, Inc. Page 2
DLioctl(3dlpi) DLioctl(3dlpi)
Privilege Needed
No
Hardware Dependent Layer Functions Called
DLget_multicast()
DLIOCSMIB
Description
Initializes the values in the MIB or the DL_mib_t
structure. A process cannot use this ioctl to
change the ifPhyAddress, the ifDescrLen, or the
text of the description fields.
Privilege Needed
Yes
Hardware Dependent Layer Functions Called
None
DLIOCGENADDR
Description
Returns the Ethernet address in network order.
Privilege Needed
No
Hardware Dependent Layer Functions Called
None
DLIOCGLPCFLG
Description
Returns the state of the local packet copy flag in
the ioc_rval of the iocblk structure. The local
copy flag determines if packets looped back by the
driver should also be sent to the network. A
non-zero value indicates that frames should also
be sent to the network after being looped back.
The default value of this flag is zero.
Copyright 1994 Novell, Inc. Page 3
DLioctl(3dlpi) DLioctl(3dlpi)
Privilege Needed
No
Hardware Dependent Layer Functions Called
None
DLIOCSLPCFLG
Description
Sets the local packet copy flag causing all
packets looped back by the driver to be sent to
the network also.
Privilege Needed
Yes
Hardware Dependent Layer Functions Called
None
DLIOCGPROMISC
Description
Returns the value of the promiscuous flag in the
ioc_rval of the iocblk structure. A non-zero
value indicates that the Ethernet interface will
receive all frames on the network. The default
value of this flag is zero.
Privilege Needed
No
Hardware Dependent Layer Functions Called
None
DLIOCSPROMISC
Description
Toggles the current state of the promiscuous flag.
When the flag is set, the driver captures all
frames from the network. Processes that are bound
to a promiscuous SAP, or to a SAP that matches the
type field of the received frame, receive a copy
of the frame.
Copyright 1994 Novell, Inc. Page 4
DLioctl(3dlpi) DLioctl(3dlpi)
Privilege Needed
Yes
Hardware Dependent Layer Functions Called
DLpromisc_off()
DLpromisc_on()
DLIOCSENADDR
Description
Changes the Ethernet address.
Privilege Needed
Yes
Hardware Dependent Layer Functions Called
DLset_eaddr()
DLIOCADDMULTI
Description
Adds a multicast address.
Privilege Needed
Yes
Hardware Dependent Layer Functions Called
DLadd_multicast()
DLIOCDELMULTI
Description
Deletes a multicast address.
Privilege Needed
Yes
Hardware Dependent Layer Functions Called
DLdel_multicast()
Copyright 1994 Novell, Inc. Page 5
DLioctl(3dlpi) DLioctl(3dlpi)
DLIOCRESET
Description
Resets the controller.
Privilege Needed
Yes
Hardware Dependent Layer Functions Called
DLreset()
DLIOCENABLE
Description
Enables the controller.
Privilege Needed
Yes
Hardware Dependent Layer Functions Called
DLenable()
DLIOCDISABLE
Description
Disables the controller.
Privilege Needed
Yes
Hardware Dependent Layer Functions Called
DLdisable()
Layer
Hardware Independent.
REFERENCES
Hardware Independent Layer Functions Called
none
Hardware Dependent Layer Functions Called
Copyright 1994 Novell, Inc. Page 6
DLioctl(3dlpi) DLioctl(3dlpi)
DLpromisc_off()
DLpromisc_on()
DLenable()
DLdisable()
DLreset()
DLadd_multicast()
DLget_multicast()
DLdel_multicast()
DLset_eaddr()
Copyright 1994 Novell, Inc. Page 7