All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] rtdm_socket() error -97 for sending UDP or RAW packets
@ 2016-04-29 13:45 Umair Ali
  2016-04-29 20:06 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 5+ messages in thread
From: Umair Ali @ 2016-04-29 13:45 UTC (permalink / raw)
  To: xenomai@xenomai.org

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

Regards
Ali


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: [Xenomai] rtdm_socket() error -97 for sending UDP or RAW packets
@ 2016-05-02 10:01 Umair Ali
  2016-05-02 10:05 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 5+ messages in thread
From: Umair Ali @ 2016-05-02 10:01 UTC (permalink / raw)
  To: xenomai@xenomai.org



Hello Gilles,

Thanks for the reply.


** may work from the init module, but not from a real-time thread or vice versa I am calling rtdm_socket() in init module of the kernel app.

Can you tell me what kind of portocls are supported by rtdm_socket()


Thanks & Regards
Ali
-----Original Message-----
From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org]
Sent: April-29-16 11:06 PM
To: Umair Ali
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] rtdm_socket() error -97 for sending UDP or RAW packets

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-02 10:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- 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

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.