Contents

performCommand

Handles an ioctl command sent to the network interface.

Declaration

virtual SInt32 performCommand( 
 IONetworkController *controller, 
 unsigned longcmd, 
 void *arg0, 
 void *arg1 );

Parameters

  • controller:

    The controller object.

  • cmd:

    The ioctl command code.

  • arg0:

    Command argument 0. Generally a pointer to an ifnet structure associated with the interface.

  • arg1:

    Command argument 1.

Return Value

Returns a BSD return value defined in bsd/sys/errno.h.

Overview

This method handles socket ioctl commands sent to the network interface from DLIL. IONetworkInterface handles commands that are common for all network interface types. A subclass of IONetworkInterface may override this method to override the command handling in IONetworkInterface, or to extend the command processing to handle additional commands. The ioctl commands handled by IONetworkInterface are SIOCGIFMTU (Get interface MTU size), SIOCSIFMTU (Set interface MTU size), SIOCSIFMEDIA (Set media), and SIOCGIFMEDIA (Get media and link status).

See Also

Miscellaneous