Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!netnews.upenn.edu!dsinc!spool.mu.edu!howland.reston.ans.net!swrinde!elroy.jpl.nasa.gov!decwrl!purdue!mozo.cc.purdue.edu!staff.cc.purdue.edu!bj From: bj@staff.cc.purdue.edu (Ben Jackson) Newsgroups: comp.os.386bsd.questions Subject: Re: socket(2)-Problem under FreeBSD Date: 30 Sep 1994 00:49:20 GMT Organization: Purdue University Lines: 15 Message-ID: <36fnag$7o8@mozo.cc.purdue.edu> References: <36fj97$can@agate.berkeley.edu> NNTP-Posting-Host: staff.cc.purdue.edu In article <36fj97$can@agate.berkeley.edu>, Johannes Faerber <faerber@ICSI.Berkeley.EDU> wrote: >I try to transmit UDP-packets via my SLIP connection but I can't >bind a socket and thus only send packets, not receive them. > >sin.sin_family = AF_INET; >sin.sin_addr.s_addr = INADDR_ANY; ^^^^^^^^^^ >sin.sin_port = htons(port); I didn't read the rest of this (so there may be other errors), but this constant is in HOST byte order. Wrap a htonl() around it. -- Ben Jackson