All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Umair Ali <ali.umair@tut.fi>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] rtdm_socket() error -97 for sending UDP or RAW packets
Date: Fri, 29 Apr 2016 22:06:28 +0200	[thread overview]
Message-ID: <20160429200628.GS1881@hermes.click-hack.org> (raw)
In-Reply-To: <2396B4D2166B62479FBBE370D4A7C1F30A731FEF@mb2010-3.intra.tut.fi>

On Fri, Apr 29, 2016 at 01:45:53PM +0000, Umair Ali wrote:
> Hello there,
> 
> I am working to make a module which will uses the Rtnet module to
> send the UDP or RAW pakets. My aim is to use the interface
> 'rteth0' in kernel space same like in userspace. Therefore I think
> I should create the socket and then using the created socket link
> the interface rteth0 with it. But when I use the function
> 'rtdm_socket(PF_INET, SOCK_RAW,0)' or 'rtdm_socket(PF_PACKET,
> SOCK_RAW,0)' or 'rtdm_socket(PF_INET, SOCK_DGRAM,0)' or anything
> with available options i.e also with sock_stream. I got the error
> -97. Which I have looked in google means the family of protocol is
> not supported. Please tell me if it is possible to send the UDP
> packets from the kernel space using interface rteth0 and socket or
> not. Can u guide me how I can solve the error -97. Thanks in
> advance

Sorry, no, I never used RTnet interface in kernel-space. I seem to
recall not all functions may be called from all contexts (for
instance, calling socket may work from the init module, but not from
a real-time thread or vice versa), but apart from that, I have no
clue. The best answer at this point would be "use the source, Luke".

Regards.

-- 
					    Gilles.
https://click-hack.org


  reply	other threads:[~2016-04-29 20:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29 13:45 [Xenomai] rtdm_socket() error -97 for sending UDP or RAW packets Umair Ali
2016-04-29 20:06 ` Gilles Chanteperdrix [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-05-02 10:01 Umair Ali
2016-05-02 10:05 ` Gilles Chanteperdrix
2016-05-02 10:19   ` Umair Ali

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=20160429200628.GS1881@hermes.click-hack.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=ali.umair@tut.fi \
    --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.