Contents

ifnet_attach

Declaration

errno_t ifnet_attach(ifnet_t interface, const struct sockaddr_dl *ll_addr);

Parameters

  • interface:

    The interface to attach.

  • ll_addr:

    The link layer address of the interface. This is used to fill out the first ifaddr in the list of addresses for the interface. This parameter is not required for interfaces such as PPP that have no link-layer address.

Return Value

Will return an error if there is anything wrong with the interface.

Discussion

Attaches an interface to the global interface list. The interface must be setup properly before calling attach. The stack will take a reference on the interface and hold it until ifnet_detach is called.

This function is intended to be called by the driver. A kext must not call this function on an interface the kext does not own.

See Also

Network Kernel Extensions