Intro(7mdi)
Intro --
MDI ioctl commands
Synopsis
#include <sys/stream.h>
#include <sys/mdi.h>
Description
The SCO
MDI ioctls
are used with
the I_STR STREAM ioctl;
see the
streamio(HW)
manual page for synopsis and description.
MDI ioctls are used
to change the operation of and get information about
the network adapter being driven
by the MDI driver.
They are sent by the MAC user
in STREAMS messages of type
M_IOCTL(D7str),
with any associated data passed in a
M_DATA(D7str)
message type.
Address control
These ioctl commands are used to
get and control MDI addresses; see also
``MAC addresses'' in HDK Technical Reference:
MACIOC_GETADDR(MDI)-
return current MAC address
MACIOC_SETADDR(MDI)-
set MAC address
MACIOC_GETRADDR(MDI)-
get factory MAC address
Frame control
These ioctl commands
control the address to which frames are sent:
MACIOC_SETMCA(MDI)-
begin receiving frames to requested MAC address
MACIOC_DELMCA(MDI)-
stop receiving frames sent to a MAC address
MACIOC_SETALLMCA(MDI)-
begin receiving frames to all MAC addresses
MACIOC_DELALLMCA(MDI)-
stop receiving frames sent to all MAC addresses
MACIOC_GETMCA(MDI)-
return current set of active multicast addresses (MDI
version 1 only)
MACIOC_GETMCSIZ(MDI)-
return size of multicast address table (MDI version 1
only)
Statistics
These ioctl commands
collect media-specific statistics:
MACIOC_GETSTAT(MDI)-
return media-specific statistics
MACIOC_SETSTAT(MDI)-
modify MIB settable attributes
MACIOC_CLRSTAT(MDI)-
clear all info in statistic structure
Promiscuous mode
-
MACIOC_PROMISC(MDI)-
enable promiscuous mode on the adapter
Differences between versions
The SCO OpenServer MDI supports the following primitives
that are not supported by MDI version 2:
MACIOC_GETMCSIZ(MDI)
and
MACIOC_GETMCA(MDI),
as well as the
MDI_NMCADDR macro.
SCO OpenServer and UnixWare 7 systems provide different mechanisms
for limiting sensitive driver operations to a privileged
process. When processing an
M_IOCTL(D7str)
message on an SCO OpenServer system, it is sufficient to check for
uid0, thus granting process privileges to the
root user only. However, UnixWare 7 drivers should
not explicitly use ioc_uid. Rather, they should call
drv_priv(D3)
to determine if the credentials accompanying the
M_IOCTL are privileged. For example:
drv_priv(iocp->ioc_cr)
See also
``Administering privilege'' in Managing system security.
Files
/dev/mdi/*
References
mdi(HW)
Section D2mdi manual pages in Section D2mdi manual pages,
Section D3mdi manual pages in Section D3mdi manual pages,
Section D4mdi manual pages in Section D4mdi manual pages,
Section DMDI manual pages in Section DMDI manual pages,
Developing MDI network adapter drivers in Developing MDI network adapter drivers
``MDI ioctls'' in HDK Technical Reference
Developing STREAMS modules and drivers in Developing STREAMS modules and drivers.
02 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
HDK 7.1.0b - 15 March 2000