Once your IP layer has completely built a packet and has determined which interface the packet should be sent out on, the IP layer can send this packet by calling the if_start() routine of the appropriate interface. Note that if_start() will free the pbuf of a packet after transmitting the packet. For example, if your routing table indicates that a packet should go out interface 1, you would do the following:
struct ifnet *ifp; struct pbuf *p; /* packet to be sent */ /* ifp = code to find interface 1 here */ ifp->if_start(ifp, p); /* send the packet */