linux-mips-fnet
[Top] [All Lists]

Re: SOCK_STREAM definition

To: <linux-mips@vger.rutgers.edu>, <linux-mips@fnet.fr>, "Andreas Jaeger" <aj@suse.de>
Subject: Re: SOCK_STREAM definition
From: "Bradley D. LaRonde" <brad@ltc.com>
Date: Mon, 13 Mar 2000 10:29:23 -0500
References: <XFMail.000312222334.Harald.Koerfgen@home.ivm.de> <0b2401bf8c8b$fb341320$b8119526@ltc.com> <hor9dedi28.fsf@maclaurin.suse.de>
OK, thanks.

How about RLIM_INFINITY?  This blows up in resourcebits.h due to conflict
with asm/resource.h.

Regards,
Brad

----- Original Message -----
From: "Andreas Jaeger" <aj@suse.de>
To: "Bradley D. LaRonde" <brad@ltc.com>; <linux-mips@vger.rutgers.edu>;
<linux-mips@fnet.fr>
Sent: Monday, March 13, 2000 10:07 AM
Subject: Re: SOCK_STREAM definition


> >>>>> Bradley D LaRonde writes:
>
>  > Using kernel 2.3.47.  SOCK_STREAM is not defined anywhere my
>  > /usr/mipsel-linux/include.  The only place I can find it is in
>  > asm-mips/socket.h, but there it is protected by #ifdef __KERNEL__.
That
>  > #ifdef is relatively new, put in CVS on 2000/02/25 with comment "Bits
for
>  > libc.".
>
>  > So what is the correct way to get SOCK_STREAM to userland?
>
> They should be defined in <socketbits.h> - but apparently they aren't.
>
> Here's the definition, just add it to <socketbits.h>:
>
> /* Types of sockets.  */
> enum __socket_type
> {
>   SOCK_DGRAM = 1,               /* Connectionless, unreliable datagrams
>                                    of fixed maximum length.  */
> #define SOCK_DGRAM SOCK_DGRAM
>   SOCK_STREAM = 2,              /* Sequenced, reliable, connection-based
>                                    byte streams.  */
> #define SOCK_STREAM SOCK_STREAM
>   SOCK_RAW = 3,                 /* Raw protocol interface.  */
> #define SOCK_RAW SOCK_RAW
>   SOCK_RDM = 4,                 /* Reliably-delivered messages.  */
> #define SOCK_RDM SOCK_RDM
>   SOCK_SEQPACKET = 5,           /* Sequenced, reliable, connection-based,
>                                    datagrams of fixed maximum length.  */
> #define SOCK_SEQPACKET SOCK_SEQPACKET
>   SOCK_PACKET = 10              /* Linux specific way of getting packets
>                                    at the dev level.  For writing rarp and
>                                    other similar things on the user level.
*/
> #define SOCK_PACKET SOCK_PACKET
> };
>
> This is a bug in the MIPS glibc 2.0.x package.
>
> I've asked Ralf to add an #ifdef __KERNEL__ for asm/socket.h - but
> this is not the final solution AFAIK.  No architecture (except MIPS)
> export SOCK_STREAM etc to userspace from the kernel.
>
> This will work with the glibc I'm working on - and it will work the
> same way as for other architectures.
>
> Andreas
> --
>  Andreas Jaeger
>   SuSE Labs aj@suse.de
>    private aj@arthur.rhein-neckar.de

<Prev in Thread] Current Thread [Next in Thread>