In article <local.mail.freebsd-net/[EMAIL PROTECTED]> you 
write:
>If I have an inpcb and an packet what's the best way to send
>out the packet via the inpcb's interface?  I think I want to
>call ether_output_frame, but I can't figure out how to get
>the ifp from the inpcb.

PCB's don't have interfaces, but (depending on the protocol), they
may have routes.  For TCP, for example, you may be able to use the
cached route in the PCB (if it exists) in order to send the packet:

        struct tcpcb *tp;
        struct route *ro;

        ro = &tp->t_inpcb->inp_route;

        ip_output(m, NULL, ro, ipflags, NULL);

-- 
Jonathan

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to