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

Re: SOCK_STREAM definition

To: "Bradley D. LaRonde" <brad@ltc.com>
Subject: Re: SOCK_STREAM definition
From: Andreas Jaeger <aj@suse.de>
Date: 13 Mar 2000 16:36:30 +0100
Cc: <linux-mips@vger.rutgers.edu>, <linux-mips@fnet.fr>
In-reply-to: "Bradley D. LaRonde"'s message of "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> <00c201bf8d00$e8ce8bf0$b8119526@ltc.com>
Sender: aj@suse.de
User-agent: Gnus/5.0804 (Gnus v5.8.4) XEmacs/21.1 (Bryce Canyon)
>>>>> Bradley D LaRonde writes:

Brad> OK, thanks.
Brad> How about RLIM_INFINITY?  This blows up in resourcebits.h due to conflict
Brad> with asm/resource.h.

Remove the inclusion of asm/resource.h from resourcebits.h.

Andreas

Brad> Regards,
Brad> Brad

Brad> ----- Original Message -----
Brad> From: "Andreas Jaeger" <aj@suse.de>
Brad> To: "Bradley D. LaRonde" <brad@ltc.com>; <linux-mips@vger.rutgers.edu>;
Brad> <linux-mips@fnet.fr>
Brad> Sent: Monday, March 13, 2000 10:07 AM
Brad> 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__.
Brad> That
>> > #ifdef is relatively new, put in CVS on 2000/02/25 with comment "Bits
Brad> 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.
Brad> */
>> #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



-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

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