netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Altering default SO_PRIORITY of a socket.
@ 2011-01-19 10:02 Janek Wrobel
  0 siblings, 0 replies; only message in thread
From: Janek Wrobel @ 2011-01-19 10:02 UTC (permalink / raw)
  To: netdev

Hi,

Does Linux allow to change default priority of listening or connected
sockets, without process ever calling setsockopt(..,SO_PRIORITY,..)?
In other words, in a following sequence of events, is it possible that
priority_a, or priority_b will ever be non 0 (assuming all calls
succeeded)?

sock = socket(AF_INET, SOCK_STREAM, 0);
bind(sock, some address)
listen(sock, ...)
int priority_a;
getsockopt(sock, SOL_SOCKET, SO_PRIORITY, &priority_a, sizeof(priority_a))

client_sock = accept(sock, ...);
int priority_b;
getsockopt(client_sock, SOL_SOCKET, SO_PRIORITY, &priority_b,
sizeof(priority_b))

thanks,
Janek

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-19 10:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-19 10:02 Altering default SO_PRIORITY of a socket Janek Wrobel

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).