Netdev List
 help / color / mirror / Atom feed
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 12:28:49 +0300	[thread overview]
Message-ID: <200908051228.50082.remi.denis-courmont@nokia.com> (raw)
In-Reply-To: <alpine.LSU.2.00.0908051042180.28374@fbirervta.pbzchgretzou.qr>

On Wednesday 05 August 2009 11:45:29 ext Jan Engelhardt wrote:
> On Wednesday 2009-08-05 08:35, Rémi Denis-Courmont wrote:
> >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 far as I remember, what you can get from getsockname is the
> domain type (AF_*/PF_*) through struct sockaddr->sa_family.
> Did you mean that?

Yes. It's almost like SO_DOMAIN but more portable and uglier.

> Though SO_PROTOCOL and SO_DOMAIN go nicely along with SO_TYPE.

-- 
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki


  reply	other threads:[~2009-08-05  9:29 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 ` [PATCH 1/2] net: implement a SO_PROTOCOL getsockoption Rémi Denis-Courmont
2009-08-05  8:45   ` Jan Engelhardt
2009-08-05  9:28     ` Rémi Denis-Courmont [this message]
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=200908051228.50082.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