All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Philippe Gerum <rpm@xenomai.org>
Cc: xenomai@xenomai.org, Sergi Ruiz Parra <sergi.ruiz.parra@upc.edu>
Subject: Re: [Xenomai] Xddp and socket: Address family not supported by protocol
Date: Thu, 06 Feb 2014 12:32:05 +0100	[thread overview]
Message-ID: <52F372B5.9050909@xenomai.org> (raw)
In-Reply-To: <52F36D64.7000109@xenomai.org>

On 02/06/2014 12:09 PM, Philippe Gerum wrote:
> On 02/06/2014 11:58 AM, Leopold Palomo-Avellaneda wrote:
>> Hi all,
>>
>> we are trying to develop an application using xddp protocol. We use as base,
>> the xddp-label exaample that compiles and run perfectly in our system
>> (Xenomai-2.6.3 with Linux 3.8.13).
>>
>> Our app is different from the xddp example because we have encapsulated the
>> realtime thread in a task, that it's in a library. We can run the task,called
>> from another part, and it rus.
>>
>> Our task create two sockets, one to receive from the NRT and another to send.
>> Yes, I know that we could do it in just one socket, but by design we must do
>> it in the way.
>>
>> Our main problem is when the RT task try to open the socket, the ipc
>> device isn't created. The error that appears is:"socket: Address family not
>> supported by protocol". I attach the real-time task code below.
>>
>> The xddp works, because the examples works. We have several /dev/rtpX and when
>> we run the example the /proc/xenomai/registry/rtipc/xddp/xddp-label is
>> created.
>>
>> Someone could give us some idea about what are we doing wrong?
>>
> 
> Your application is likely not wrapping POSIX symbols properly, calling 
> regular socket() instead of the Xenomai implementation. Check 
> examples/rtdm/profiles/ipc/Makefile for LDLIBS. You must have --wrap or 
> -Wl,@/some/path/posix.wrappers appearing in your link flags, for the 
> wrapping to take place properly.

See also:
https://www.xenomai.org/index.php/Porting_POSIX_applications_to_Xenomai#Compilation_flags

-- 
                                                                Gilles.


  reply	other threads:[~2014-02-06 11:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-06 10:58 [Xenomai] Xddp and socket: Address family not supported by protocol Leopold Palomo-Avellaneda
2014-02-06 11:09 ` Philippe Gerum
2014-02-06 11:32   ` Gilles Chanteperdrix [this message]
2014-02-06 12:28     ` Leopold Palomo-Avellaneda
2014-02-06 12:48       ` Gilles Chanteperdrix
2014-02-06 15:27         ` Leopold Palomo-Avellaneda
2014-02-06 21:49           ` Gilles Chanteperdrix
2014-02-06 22:46             ` Leopold Palomo-Avellaneda
  -- strict thread matches above, loose matches on Subject: below --
2018-05-17 12:23 Libin Zhao
2018-05-17 13:18 ` Greg Gallagher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52F372B5.9050909@xenomai.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=rpm@xenomai.org \
    --cc=sergi.ruiz.parra@upc.edu \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.