From: "Rémi Denis-Courmont" <remi.denis-courmont@nokia.com>
To: ext Jan Engelhardt <jengelh@medozas.de>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH 1/2] net: implement a SO_PROTOCOL getsockoption
Date: Wed, 5 Aug 2009 09:35:03 +0300 [thread overview]
Message-ID: <200908050935.03272.remi.denis-courmont@nokia.com> (raw)
In-Reply-To: <1249406909-24161-1-git-send-email-jengelh@medozas.de>
On Tuesday 04 August 2009 20:28:28 ext Jan Engelhardt wrote:
> Similar to SO_TYPE returning the socket type, SO_PROTOCOL allows to
> retrieve the protocol used with a given socket.
You can easily infer the protocol family from the address family from
getsockname().
As for the protocol, at least for raw IP sockets, you can get it from
sin_port/sin6_port, but I agree that SO_PROTOCOL is more generic.
--
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki
next prev parent reply other threads:[~2009-08-05 6:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-04 17:28 [PATCH 1/2] net: implement a SO_PROTOCOL getsockoption Jan Engelhardt
2009-08-04 17:28 ` [PATCH 2/2] net: implement a SO_DOMAIN getsockoption Jan Engelhardt
2009-08-05 20:04 ` David Miller
2009-08-05 6:35 ` Rémi Denis-Courmont [this message]
2009-08-05 8:45 ` [PATCH 1/2] net: implement a SO_PROTOCOL getsockoption Jan Engelhardt
2009-08-05 9:28 ` Rémi Denis-Courmont
2009-08-05 20:04 ` David Miller
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=200908050935.03272.remi.denis-courmont@nokia.com \
--to=remi.denis-courmont@nokia.com \
--cc=jengelh@medozas.de \
--cc=netdev@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