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.
Result: true if the controller was accepted, false otherwise (which will cause the controller to be closed).
Name Description controller The controller object.
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.
Name Description controller The currently opened controller object.
protected:
virtual void free();
Frees the IOEthernetInterface instance. The memory allocated for the arpcom structure is released.
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.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.public:
virtual bool init(OSDictionary * properties = 0);
Initialize an IOEthernetInterface instance.
Result: true if initialized successfully, false otherwise.
Name Description properties A property dictionary.
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.
Result: true if successful, false otherwise.
Name Description ifp Pointer to the ifnet structure to be initialized.
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.
Result: An error code defined in errno.h (BSD).
Name Description controller Our controller object. cmd The command code. arg0 Command argument. arg1 Command argument.
public:
virtual void publishParameters(OSDictionary * dict) const;
Add Ethernet specific IONetworkParameter objects to the dictionary provided.
Name Description dict A dictionary containing IONetworkParameter objects.
© 2000 Apple Computer, Inc. (Last Updated 2/23/2000)