accept () question

John Gottschalk gottsc at citrus.citr.uq.oz.au
Mon Mar 25 10:39:17 AEST 1991



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 at 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)
 ===================================================================== 



More information about the Comp.unix.questions mailing list