 |
Index for Section 9 |
|
 |
Alphabetical listing for I |
|
 |
Bottom of page |
|
if_detach(9r)
NAME
if_detach - Network: Removes an interface from the list of active
interfaces
SYNOPSIS
int if_detach(
struct ifnet *ifp );
ARGUMENTS
*ifp
Specifies a pointer to an ifnet data structure.
DESCRIPTION
The if_detach() routine removes an interface from the list of active
interfaces if it believes there are no more users of the interface. It
makes this determination based upon whether or not there are any interface
addresses still in use.
NOTES
Even after if_detach() decides to remove the interface from the list of
active interfaces, it still cannot know for certain whether or not there
are still users of the interface. So, to prevent undesirable calls to the
network driver from happening after the device has been removed from the
active interface list, if_detach() replaces the function pointers (for
example, if_start, if_ioctl) in the ifnet data structure with pointers to
harmless routines.
RETURN VALUES
EBUSY
The device is still in use.
ENODEV
The specified device was not found in the list of active interfaces.
ESUCCESS
The device was successfully detached.
SEE ALSO
Routines: if_alloc(9r), if_attach(9r), if_dealloc(9r)
Data Structures: ifnet(9s)
 |
Index for Section 9 |
|
 |
Alphabetical listing for I |
|
 |
Top of page |
|