Re: Different socket types ... no response!

From: David Richards <[email protected]>
Date: Fri, 27 Feb 1998 08:51:34 +1000 (EST)

Dancer,

        The actual code:

        if( ( udsocket = socket( AF_UNIX, SOCK_DGRAM, 0 ) ) < 0 ) {
                return( -1 );
        } else {
                strcpy( socketlist[ udsocket ], socketname );
        }

Thanks,

Dave.

-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
David Richards Ph: +61 7 3864 4347
Network Programmer Fax: +61 7 3864 5272
Computing Services E-mail: dj.richards@qut.edu.au
Queensland University of Technology
Brisbane, Australia
-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-

On Thu, 26 Feb 1998, Dancer wrote:

> I figured that was what you were trying to do. The kernel seems to think there's
> something wrong with it.
>
> What protocol are you specifying in the socket() call?
>
> D
>
>
> David Richards wrote:
>
> > No, i'm not using the wrong socket type. I want to use AF_UNIX!!!!
> >
> > I need to use AF_UNIX type sockets, to communicate to a process on the
> > same machine.
> >
> > Thanks,
> >
> > Dave.
> >
> > -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
> > David Richards Ph: +61 7 3864 4347
> > Network Programmer Fax: +61 7 3864 5272
> > Computing Services E-mail: dj.richards@qut.edu.au
> > Queensland University of Technology
> > Brisbane, Australia
> > -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
> >
> > On Thu, 26 Feb 1998, Dancer wrote:
> >
> > > Umm. Shouldn't it be AF_INET, SOCK_DGRAM? My gut instinct tells me you're
> > > using the wrong address family. Mind you, so does the error message.
> > >
> > > D
> > >
> > >
> > > David Richards wrote:
> > >
> > > > Hi,
> > > >
> > > > Some of you may be aware that I've been playing with squid, it the
> > > > authentication area. I have just tried to place into squid a socket of
> > > > the type AF_UNIX, SOCK_DGRAM.
> > > >
> > > > When I try and write to this socket using "sendto", an error is
> > > > generated errno equals 47 (EAFNOSUPPORT) which means :
> > > >
> > > > "Address family not supported by protocol family"
> > > >
> > > > Now what puzzles me is that the calls I am using have been proven
> > > > time and time again, because I have created a library of these calls.
> > > >
> > > > Why will these not work in squid??
> > > >
> > > > Thanks,
> > > >
> > > > Dave.
> > > >
> > > > -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
> > > > David Richards Ph: +61 7 3864 4347
> > > > Network Programmer Fax: +61 7 3864 5272
> > > > Computing Services E-mail: dj.richards@qut.edu.au
> > > > Queensland University of Technology
> > > > Brisbane, Australia
> > > > -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
> > >
> > >
> > >
> > > --
> > > Did you read the documentation AND the FAQ?
> > > If not, I'll probably still answer your question, but my patience will
> > > be limited, and you take the risk of sarcasm and ridicule.
> > >
> > >
>
>
>
> --
> Did you read the documentation AND the FAQ?
> If not, I'll probably still answer your question, but my patience will
> be limited, and you take the risk of sarcasm and ridicule.
>
>
Received on Thu Feb 26 1998 - 15:47:14 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:39:01 MST