Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!brolga!citrus.citr.uq.oz.au!gottsc From: gottsc@citrus.citr.uq.oz.au (John Gottschalk) Newsgroups: comp.unix.questions Subject: accept () question Message-ID: <1991Mar25.003917.12347@brolga.cc.uq.oz.au> Date: 25 Mar 91 00:39:17 GMT Sender: news@brolga.cc.uq.oz.au Reply-To: gottsc@citrus.citr.uq.oz.au (John Gottschalk) Organization: CiTR, University of Queensland, Brisbane, Australia Lines: 35 Nntp-Posting-Host: citrus.citr.uq.oz.au Hello, I have a question on the accept() system function. The function and its parameters are defined as follows: int accept(s, addr, addrlen) int s; struct sockaddr *addr; int *addrlen; where addr is filled in with the address of the connecting entity, and addrlen is the length of the address. In the tutorial on sockets in the SUN manual there are examples where null-pointers are supplied as the last two parameters, yet none of the manuals I have read state that these parameters are optional, in fact there is an error defined, EFAULT, which is used if the addr parameter is not is a writable part of the user address space. Can anybody tell me if null-pointers can be supplied for these parameters, or not? -- thanks in advance, John Gottschalk ===================================================================== John Gottschalk (gottsc@citrus.uq.oz) Center for Information Technology Research, University of Queensland, St Lucia, 4072, Queensland, Australia, +61 7 365 4321 (phone), +61 7 371 3044 (fax) =====================================================================