I'm trying to get the destination port from a UDP packet that's been ipfw
fwd'ed to my code. Getting the destination IP address works fine with *
setsockopt(...,IP_RECVDSTADDR,...)* and then *recvfrom*, but there doesn't
seem to be a way to get the port.

For TCP I could just use
getsockname(2)<http://man.freebsd.org/getsockname/2>and
getpeername(2) <http://man.freebsd.org/getpeername/2> for all the IP
address info but this only returns the locally bound address and port, not
the actual destination.

Is there an elegant way to get the destination IP port from an ipfw fwd'ed
packet?

Thanks
_______________________________________________
freebsd-ipfw@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
To unsubscribe, send any mail to "freebsd-ipfw-unsubscr...@freebsd.org"

Reply via email to