From: Patrick McHardy <kaber@trash.net>
To: m m <olsajiri@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-net@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: netlink - notify when the socket gets closed
Date: Sun, 07 Dec 2008 17:04:31 +0100 [thread overview]
Message-ID: <493BF40F.6050307@trash.net> (raw)
In-Reply-To: <35476bd20812061010g145b6c19r282ae32a4ebfabb1@mail.gmail.com>
m m wrote:
> On Sat, Dec 6, 2008 at 3:58 PM, Patrick McHardy <kaber@trash.net> wrote:
>> That doesn't make sense. When you use multicast, multiple applications
>> can be listening to the messages. If you really need state for a single
>> listener and exchange messages in both directions, it sounds like you
>> should use unicast.
>>
>>
> My user app register in kernel for a data. When there is a first
> application request,
> kernel module creates an internal record and ask DATA subsystem for a data,
> which are then passed to the user application.
>
> The data are then delivered to the application as they are comming from
> the DATA subsystem.
>
> When there's another application requesting the same data type, kernel module
> just increase reference count in the internal record, and multicast delivers
> data to the other app.
>
> Now when one of those applications end, kernel module just decrease
> the reference count in the internal record.
>
> When the other application ends, kernel module needs to release the internal
> record and ask the DATA subsystem to stop delivering data.
>
> Hope this make sense... I could do some ascii art next time if needed :)
Thats an unusual way to use netlink, but it sounds reasonable.
Adding a notifier for multicast unsubscriptions should be easy.
Nothing in the kernel needs it though, so you need to carry the
patch to do this yourself until you submit your module.
prev parent reply other threads:[~2008-12-07 16:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <35476bd20812050017y70c3c729v450cdc3d0c1188de@mail.gmail.com>
2008-12-06 3:56 ` netlink - notify when the socket gets closed Andrew Morton
2008-12-06 14:58 ` Patrick McHardy
2008-12-06 18:10 ` m m
2008-12-07 16:04 ` Patrick McHardy [this message]
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=493BF40F.6050307@trash.net \
--to=kaber@trash.net \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olsajiri@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).