How to make pipe on RTEMS?

Eric Norum eric.norum at usask.ca
Mon Sep 23 16:15:25 UTC 2002


On Monday, September 23, 2002, at 09:40 AM, Vladimir Nesic wrote:

> On Friday 20 September 2002 18:18, Eric Norum wrote:
>> I've attached the little test program I wrote to verify the network
>> stack code without using a network interface.  Perhaps it may be of
>> some help to you.
>
> When I was first answering this message on friday if was Friday, too
> late for work :(
>
> Today I have checked out the code You sent to me, and did some more
> digging throug RTEMS source code and have two questions:
>
> 1. Is it possible to connect two sockets without driving them through
>    ports?

I'm not quite sure what you're asking, but I think the answer to your 
question is no.

Before a socket can be passed to connect() or accept() it must be bound 
to an address.  The RTEMS port of the BSD stack supports only AF_INET 
addresses which are defined by an IP number and a port number.  You can 
have the system pick a port number for you (the example code does this).

>    2. Is it possible to connect two socekts without without starting  
> another thread?

I suppose so,  but I thought you wanted to use these pipes (sockets) 
for interthread communication.

> -- or --
> 1. If I implement pipe without using sockets, how much work does it 
> take
>    to make select() function respond to it?

I think that implementing select() on top of something like RTEMS 
message queues would be difficult,  especially if you wanted to be able 
to simultaneously select on socket descriptors as well.

-- 
Eric Norum <eric.norum at usask.ca>
Department of Electrical Engineering
University of Saskatchewan
Saskatoon, Canada.
Phone: (306) 966-5394   FAX:   (306) 966-5407




More information about the users mailing list