Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!pumpkin.pangea.ca!www.nntp.primenet.com!nntp.primenet.com!news.maxwell.syr.edu!news-xfer.cybernet.dk!news.onramp.net!newshost.cyberramp.net!news-in.iadfw.net!news.gymnet.com!LSNT1!lsbsdi6.lightspeed.net!news3.crl.com!nntp2.crl.com!data.ramona.vix.com!news1.digital.com!su-news-hub1.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!news.apfel.de!univ-lyon1.fr!fdn.fr!r2d2.fdn.org!sphynx.fdn.fr!causse From: causse@sphynx.fdn.fr (Philippe Causse) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Accept()-ing a connection from a specific IP address... Date: Tue, 27 May 1997 21:55:38 GMT Organization: individual - paris - france Lines: 30 Message-ID: <3DAA62ECEDA6E61E.536BE1E4C1799F4A.1EC8E0DB5A7938D3@library-proxy.airnews.net> X-Orig-Message-ID: <EAv0wr.ts@sphynx.fdn.fr> References: <864144757.18711@dejanews.com> <EAHuuM.129@sphynx.fdn.fr> <5mbbbj$ngq@uriah.heep.sax.de> NNTP-Proxy-Relay: library.airnews.net NNTP-Posting-Host: biceps.gymnet.com X-Newsreader: TIN [version 1.2 PL2] Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:42132 J Wunsch (j@uriah.heep.sax.de) wrote: [snip] : Right, but confirmation of the connection is actually only achieved by : reading the first data portion. You can still reject the connection : at this step. Except of the delay in the handling, this should be : indistingiushible from a server not running at all. J"org, Thanks for the pointing me to the accept(2) manpage but I couldn't guess what to put in the control message! I'll still spook arround in Comer's books to get the answer but, for the moment, I don't have any clue about what should be written in the struct cmsghdr :( The manpage also says that the same result could be achieved with a getsockopt(), however I didn't find any socket option which does the job. At best, it returns the "next hop IP address", which is not what we want in this case. We need the source IP address, not the gateway's addr. I'm still puzzled.... If you have a working code sample, could you please post it ? Thanks. [snip] -- ------------------------------------------------------------------- P. Causse http://www.fdn.fr/~pcausse 4.4BSD/X11R6/Motif-2.0/C++ mailto:causse@sphynx.fdn.fr (UUCP)