DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

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(7) 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(7mdi)
return current MAC address

MACIOC_SETADDR(7mdi)
set MAC address

MACIOC_GETRADDR(7mdi)
get factory MAC address

Frame control

These ioctl commands control the address to which frames are sent:

MACIOC_SETMCA(7mdi)
begin receiving frames to requested MAC address

MACIOC_DELMCA(7mdi)
stop receiving frames sent to a MAC address

MACIOC_SETALLMCA(7mdi)
begin receiving frames to all MAC addresses

MACIOC_DELALLMCA(7mdi)
stop receiving frames sent to all MAC addresses

MACIOC_GETMCA(7mdi)
return current set of active multicast addresses (MDI version 1 only)

MACIOC_GETMCSIZ(7mdi)
return size of multicast address table (MDI version 1 only)

Statistics

These ioctl commands collect media-specific statistics:

MACIOC_GETSTAT(7mdi)
return media-specific statistics

MACIOC_SETSTAT(7mdi)
modify MIB settable attributes

MACIOC_CLRSTAT(7mdi)
clear all info in statistic structure

Promiscuous mode



MACIOC_PROMISC(7mdi)
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(7mdi) and MACIOC_GETMCA(7mdi), 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(7)

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 D7mdi manual pages in Section D7mdi 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.


25 April 2004
© 2004 The SCO Group, Inc. All rights reserved.
HDK 7.1.0b - 15 March 2000