On Fri, Sep 14, 2001 at 04:55:33PM -0400, Barney Wolff wrote:
> You're using htons on an int. Try not doing that.
> Barney Wolff
Oops. Then that's a bug in samplicator-1.2.1, from which I took the code.
But after changing fport to an u_short it still does not work.
> On Fri, Sep 14, 2001 at 12:23:57PM -0700, Jos Backus wrote:
> > struct sock {
> > int fport;
> > int fsockfd;
> > long sockbuflen;
> > };
> >
> > static int
> > init_sock(ctx)
> > struct sock *ctx;
> > {
> > struct sockaddr_in local_address;
> >
> > bzero(&local_address, sizeof local_address);
> > local_address.sin_family = AF_INET;
> > local_address.sin_addr.s_addr = htonl(INADDR_ANY);
> > local_address.sin_port = htons(ctx->fport);
Thanks,
--
Jos Backus _/ _/_/_/ Santa Clara, CA
_/ _/ _/
_/ _/_/_/
_/ _/ _/ _/
[EMAIL PROTECTED] _/_/ _/_/_/ use Std::Disclaimer;
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message