lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 5 Aug 2009 09:35:03 +0300
From:	"Rémi Denis-Courmont" 
	<remi.denis-courmont@...ia.com>
To:	ext Jan Engelhardt <jengelh@...ozas.de>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH 1/2] net: implement a SO_PROTOCOL getsockoption

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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ