Contents

ifnet_output

Declaration

errno_t ifnet_output(ifnet_t interface, protocol_family_t protocol_family, mbuf_t packet, void *route, const struct sockaddr *dest);

Parameters

  • interface:

    The interface.

  • protocol_family:

    The family of the protocol generating this packet (i.e. AF_INET).

  • packet:

    The packet to be transmitted.

  • route:

    A pointer to a routing structure for this packet. The preoutput function determines whether this value may be NULL or not.

  • dest:

    The destination address of protocol_family type. This will be passed to the preoutput function. If the preoutput function does not require this value, you may pass NULL.

Return Value

0 on success otherwise the errno error.

Discussion

Handles an outbound packet on the interface by calling any filters, a protocol preoutput function, the interface framer function, and finally the interface's output function. The protocol_family will be used to apply protocol filters and determine which preoutput function to call. The route and dest parameters will be passed to the preoutput function defined for the attachment of the specified protocol to the specified interface. ifnet_output will always free the mbuf chain.

See Also

Network Kernel Extensions