All of lore.kernel.org
 help / color / mirror / Atom feed
From: Per Oberg <pero@wolfram.com>
To: xenomai <xenomai@xenomai.org>
Subject: Is it possible to tell whether a network socket is/will be a real time socket or a regular socket runtime?
Date: Thu, 1 Oct 2020 02:41:26 -0500 (CDT)	[thread overview]
Message-ID: <180268575.3119360.1601538086890.JavaMail.zimbra@wolfram.com> (raw)

Hi list

Is there a way that I can tell if a network socket is a real time socket or a regular socket runtime ?
Usually I always know beforehand whether something is going to be a real time socket or a std posix socket. Now it will depend on the host-address. 

I have this posix-skin application that can be both real time and non real time depending on available network hardware. Because of the differences between RTNet and regular posix net implementation i sometimes have to choose between setsockopt/ioctl when setting the properties. Therefore I need to handle a few lines of code differently depending on the situation.

This brings up another issue I have been struggling with for the posix-skin. 
When, in this snippet of code, is it decided whether __std or __cobolt functions are executed ? 

Is it run-time or compile time ? If runtime, is it during the connect or during the sendto ? 

serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = inet_addr(host_name);
serv_addr.sin_port = htons( portno );
sockfd = socket(AF_INET, SOCK_DGRAM,0);
connect( sockfd, ( struct sockaddr * ) &serv_addr, sizeof( serv_addr))
sendto(sockfd, (char*) &packet, sizeof( packetType ), MSG_DONTWAIT, NULL, sizeof( serv_addr ));

Regards
Per Öberg 


             reply	other threads:[~2020-10-01  7:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01  7:41 Per Oberg [this message]
2020-10-01 11:19 ` Is it possible to tell whether a network socket is/will be a real time socket or a regular socket runtime? Per Oberg

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=180268575.3119360.1601538086890.JavaMail.zimbra@wolfram.com \
    --to=pero@wolfram.com \
    --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.