All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: roland Tollenaar <rolandtollenaar@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] newby question, can/socket stuff
Date: Mon, 26 Feb 2007 21:16:20 +0100	[thread overview]
Message-ID: <45E34014.6080105@domain.hid> (raw)
In-Reply-To: <bc4264770702261206v1e3d84cbhe94b923540dbaae6@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 2287 bytes --]

roland Tollenaar wrote:
> Hi,
> 
> 
> You must all be getting very exasperated with me. :)

How did you guess this? ;)

> 
>> > I know too little of the basic socket programming. Not even sure my
>> > wording in the previous sentence is capturing the correct area of
>> > ignorance.
>>
>> There are plenty text books on BSD socket programming and the rational
>> behind it.
> These are the ones I need. But without the time to get hold of them I
> will have to search the net.

"man" is your friend (if installed on your linux distro). E.g.

# man recvmsg

Then there is the OpenGroups spec:

http://www.opengroup.org/onlinepubs/009695399/

But I thing before diving too deep into this, rather apply the
Chinaman's tactic.

> 
>> > ret = rt_dev_ioctl(can_fd, SIOCGIFINDEX, &ifr);
>> >
>> > and
>> > ret = rt_dev_ioctl(can_fd, SIOCSCANBAUDRATE, &ifr);
>> >
>> > But exactly what is happening is beyond me at the moment.
>>
>> SIOCGIFINDEX gets the interface index for a named device and
>> SIOCSCANBAUDRATE allows to set the baudrate. The RT-Socket-CAN utilities
> 
> My email must have been very bad. I realize roughly what SIOCGIFINDEX
> and  SIOCSCANBAUDRATE do. This is described very nicely in your
> documentation or rather the documentation that refers to you and which
> Gilles kindly also pointed out to me but which I already knew about.
> 
> No my problem is with the
> rt_dev_ioctl
> 
> part. I would like to have a better understanding of the part that
> these functions play.

Add 1 to 1: The CAN profile describes what IOCTLs are available for CAN
sockets. rt_dev_ioctl() (or ioctl() with the POSIX skin) is the way to
pass these IOCTLs down to the CAN stack.

I think this should be visible when making one step back, looking at the
whole picture of the documentation pieces and the examples, no?

> 
>> are now even hyperlinked with the API doc (still not 100% perfect yet)
>> e.g.:
>>
>> http://www.xenomai.org/documentation/trunk/html/api/rtcanconfig_8c-example.html
>>
> 
> And by tremendous chance this was also the code I was studying when I
> posted my email.
> 
> Sorry to be such a nuisance. I'll see if I can google for some info on
> rt_dev_ioctl.
> 
> Regards,
> 
> Roland
> 

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2007-02-26 20:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-26 19:08 [Xenomai-help] newby question, can/socket stuff roland Tollenaar
2007-02-26 19:18 ` Gilles Chanteperdrix
2007-02-26 19:58   ` roland Tollenaar
2007-02-26 20:13     ` Wolfgang Grandegger
2007-02-26 20:13     ` Gilles Chanteperdrix
2007-02-26 19:57 ` Wolfgang Grandegger
2007-02-26 20:06   ` roland Tollenaar
2007-02-26 20:16     ` Jan Kiszka [this message]
2007-02-26 20:37       ` roland Tollenaar
2007-02-26 21:13         ` Paul
2007-02-26 21:34         ` Jan Kiszka
     [not found]           ` <45E3F83B.4070702@domain.hid>
     [not found]             ` <45E3FDD5.4070308@domain.hid>
2007-02-27 10:03               ` Roland Tollenaar
2007-02-26 20:25     ` Wolfgang Grandegger
2007-02-26 20:42       ` roland Tollenaar

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=45E34014.6080105@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=rolandtollenaar@domain.hid \
    --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.