Date: Thu, 16 Aug 2001 01:08:02 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Joe Clarke <marcus@marcuscom.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Writing a packet alias translator, need help Message-ID: <3B7B7F62.70B37F2E@mindspring.com> References: <20010813124054.F13703-100000@shumai.marcuscom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Joe Clarke wrote: > > I'm trying to write a packet alias translator for a protocol that uses TCP > to setup a UDP streaming session (much like the smedia driver that's > already there). I'm having a problem getting the translated port to mesh > with the actual port. Here's what I've done: > > /* msg is a TCP setup packet > struct msg { > u_int32_t ipAddr; > u_int32_t portNumber; > }; > */ One obvious thing is that ports are 16 bits, not 32.... but... > is UDP 16704, but the translation puts 50535 in the packet. The bit patterns these make are not even remotely similar, meaning that this isn't a byte order issue; I think you will need to run the code in a debugger (or add printf's). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B7B7F62.70B37F2E>