* Could anybody help to reslove the question about _RTIOC_LISTEN?
@ 2020-05-11 5:59 孙世龙
2020-05-11 6:48 ` Jan Kiszka
0 siblings, 1 reply; 2+ messages in thread
From: 孙世龙 @ 2020-05-11 5:59 UTC (permalink / raw)
To: xenomai
Hi,
As per the source code(
https://gitlab.denx.de/Xenomai/xenomai/-/blob/v3.0.9/kernel/drivers/net/stack/ipv4/tcp/tcp.c),
I could see that some code have relation to _RTIOC_LISTEN.For details, see
below.
*/*** * rt_tcp_ioctl */static int rt_tcp_ioctl(struct rtdm_fd *fd,
unsigned int request, void __user *arg){ ... case _RTIOC_LISTEN: val =
rtnet_get_arg(fd, &_val, arg, sizeof(long)); if (IS_ERR(val)) return
PTR_ERR(val); return rt_tcp_listen(ts, *val); case ...}*
There is also some code about *_RTIOC_LISTEN in the drivers of IDDP
and XDDP.*You could see it in the url(
https://gitlab.denx.de/Xenomai/xenomai/-/blob/v3.0.9/kernel/drivers/ipc/xddp.c).For
details, see below.
*static int __xddp_ioctl(struct rtdm_fd *fd, unsigned int request, void
*arg){ ... case _RTIOC_LISTEN: COMPAT_CASE(_RTIOC_ACCEPT): ret =
-EOPNOTSUPP; break; ...}*
*Does these _RTIOC_LISTEN showed above in the two source code files
have some relations?* I don't think so.
* There really exist some api relation to XDDP and IDDP.*For instance,
socket, bind, connect,etc.
*And when you transport your messages through tcp or udp, you also use
the apis with the same name.*
* So, i am a little confused.*
Thank you for your attention.
Look forward to hearing from you.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Could anybody help to reslove the question about _RTIOC_LISTEN?
2020-05-11 5:59 Could anybody help to reslove the question about _RTIOC_LISTEN? 孙世龙
@ 2020-05-11 6:48 ` Jan Kiszka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2020-05-11 6:48 UTC (permalink / raw)
To: 孙世龙, xenomai
On 11.05.20 07:59, 孙世龙 via Xenomai wrote:
> Hi,
> As per the source code(
> https://gitlab.denx.de/Xenomai/xenomai/-/blob/v3.0.9/kernel/drivers/net/stack/ipv4/tcp/tcp.c),
> I could see that some code have relation to _RTIOC_LISTEN.For details, see
> below.
>
lib/cobalt/rtdm.c, COBALT_IMPL(int, listen, (int fd, int backlog)). So,
if you wrap your posix application, it will first try _RTIOC_LISTEN via
Xenomai on an fd and then fall back to regular listen. If the fd
happened to be an rt-tcp socket, that driver above will be called.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-11 6:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 5:59 Could anybody help to reslove the question about _RTIOC_LISTEN? 孙世龙
2020-05-11 6:48 ` Jan Kiszka
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.