From: "Libor Vanek" <libor.vanek@gmail.com>
To: "Evgeniy Polyakov" <johnpol@2ka.mipt.ru>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Connector - how to start?
Date: Thu, 20 Apr 2006 17:32:28 +0200 [thread overview]
Message-ID: <369a7ef40604200832w196f4093m4238544bf48fabb5@mail.gmail.com> (raw)
In-Reply-To: <20060420152524.GA14664@2ka.mipt.ru>
Hi,
On 4/20/06, Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:
> On Thu, Apr 20, 2006 at 05:12:33PM +0200, Libor Vanek (libor.vanek@gmail.com) wrote:
>
> > - When sending message from kernel, cn_netlink_send returns an error
> > in case when there is no reciever - BUT user space "send" doesn't
> > return an error when there is no reciever in kernel :-(
>
> Userspace sends it into kernel socket. Groups were created for
> userspace's sockets, so there is always a listener in kernelspace.
OK, I wanted to use this to check, if my module is loaded.
> > - How (if) can I do ACK (acknoledge received and processed message)?
>
> I put seq and ack fields into connector header, and described a simple
> protocol for it's usage, but it does require some work by driver author,
> it is impossible to generate automatic ack messages in netlink
> (well, it is possible to generate nlmsgerr message sending but generally
> it is not what people want with protocols designed over connector).
Problem is that there is no (easy) way how to confirm that message was
recieved and proccessed correctly... OK, I'll have to do it
asynchronous...
> Not a good style of allocating data from atomic pool without checks for
> return value.
Just an simple example...
> Btw, you do not need to allocate it dynamically,
> char msg[sizeof(struct cn_msg) + 32] will work too.
Thanks, I didn't know that one.
> In this example you will receive messages for groups 1, 2 (bind time
> gropus 0x3 is equal to (1<<(1-1)) | (1<<(2-1))) and group 3 (you
> have subscribed to that gropu explicitly).
Thx.
Libor Vanek
next prev parent reply other threads:[~2006-04-20 15:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-15 1:09 Libor Vanek
2006-04-15 2:26 ` Randy.Dunlap
2006-04-15 3:07 ` Matt Helsley
2006-04-15 9:18 ` Evgeniy Polyakov
[not found] ` <369a7ef40604150350x8e7dea1sbf1f83cb800dd1c3@mail.gmail.com>
2006-04-15 11:14 ` Evgeniy Polyakov
2006-04-15 12:18 ` Paul Collins
2006-04-15 12:38 ` Evgeniy Polyakov
[not found] ` <369a7ef40604150624n28da8895if158a2c13cac2b9e@mail.gmail.com>
2006-04-16 7:53 ` Evgeniy Polyakov
2006-04-16 17:09 ` Evgeniy Polyakov
[not found] ` <369a7ef40604160426s301dcd52r4c9826698d3d2f79@mail.gmail.com>
2006-04-16 11:40 ` Evgeniy Polyakov
[not found] ` <369a7ef40604160509xcf2caadi782b90da956639d5@mail.gmail.com>
2006-04-16 13:25 ` Evgeniy Polyakov
[not found] ` <369a7ef40604160632t16f6aab9u687a6b359997d7ea@mail.gmail.com>
2006-04-16 14:19 ` Evgeniy Polyakov
2006-04-18 6:07 ` Evgeniy Polyakov
[not found] ` <369a7ef40604190439v6e8f1bf6lf52cfab5af3a93af@mail.gmail.com>
2006-04-19 12:14 ` Evgeniy Polyakov
2006-04-20 15:12 ` Libor Vanek
2006-04-20 15:25 ` Evgeniy Polyakov
2006-04-20 15:32 ` Libor Vanek [this message]
2006-04-15 21:48 ` Jon Masters
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=369a7ef40604200832w196f4093m4238544bf48fabb5@mail.gmail.com \
--to=libor.vanek@gmail.com \
--cc=johnpol@2ka.mipt.ru \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®