Functions



controllerDidOpen

protected:

virtual bool controllerDidOpen(IONetworkController * controller);

This method will be called by our superclass after a network controller has accepted an open from this interface. IOEthernetInterface uses this method to qualify the controller and to cache certain controller properties, such as its hardware address, and its set of supported packet filters.

Parameters

NameDescription
controllerThe controller object.
Result: true if the controller was accepted, false otherwise (which will cause the controller to be closed).

controllerWillClose

protected:

virtual void controllerWillClose(IONetworkController * controller);

When the last close from our client is received, the interface object will close its controller. But before the controller is closed, this method will be called by our superclass to perform any necessary cleanup. IOEthernetInterface will ensure that the controller is disabled before it is closed.

Parameters

NameDescription
controllerThe currently opened controller object.

free

protected:

virtual void free();

Frees the IOEthernetInterface instance. The memory allocated for the arpcom structure is released.


getIfnet

protected:

virtual struct ifnet * getIfnet() const;

This method returns a pointer to an ifnet structure maintained by the family specific interface. IOEthernetInterface allocates an arpcom structure during initialization, and returns a pointer to this structure when this method is called.

Result: Pointer to an ifnet structure.

getNamePrefix

public:

virtual const char * getNamePrefix() const;

The name of the interface advertised to the network layer is generated by concatenating the string returned by this method, and an integer unit number assigned by an external entity.

Result: A pointer to a constant string "en". Thus the network layer will see Ethernet interfaces named as en0, en1, etc.

init

public:

virtual bool init(OSDictionary * properties = 0);

Initialize an IOEthernetInterface instance.

Parameters

NameDescription
propertiesA property dictionary.
Result: true if initialized successfully, false otherwise.

initIfnet

protected:

virtual bool initIfnet(struct ifnet * ifp);

Initialize the ifnet structure. The argument specified is a pointer to an ifnet structure obtained through getIfnet(). IOEthernetInterface will initialize this structure in a manner that is appropriate for Ethernet interfaces, then call super::initIfnet() to allow the superclass to perform family independent initialization.

Parameters

NameDescription
ifpPointer to the ifnet structure to be initialized.
Result: true if successful, false otherwise.

performCommand

protected:

virtual SInt performCommand(IONetworkController * controller, UInt32 cmd, void * arg0, void * arg1);

The handler for ioctl commands sent from the network stack. Commands not handled by this method are passed to our superclass. The ioctl commands handled are SIOCSIFADDR, SIOCSIFFLAGS, SIOCADDMULTI, and SIOCDELMULTI.

Parameters

NameDescription
controllerOur controller object.
cmdThe command code.
arg0Command argument.
arg1Command argument.
Result: An error code defined in errno.h (BSD).

publishParameters

public:

virtual void publishParameters(OSDictionary * dict) const;

Add Ethernet specific IONetworkParameter objects to the dictionary provided.

Parameters

NameDescription
dictA dictionary containing IONetworkParameter objects.

© 2000 Apple Computer, Inc. — (Last Updated 2/23/2000)