Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000840 [1003.1(2013)/Issue7+TC1] System Interfaces Editorial Enhancement Request 2014-05-23 16:00 2020-03-25 16:07
Reporter xroche View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Applied  
Name Xavier Roche
Organization
User Reference
Section 2.10.16 Use of Options
Page Number 528
Line Number 18250-18279
Interp Status ---
Final Accepted Text See Note: 0002263
Summary 0000840: Add SO_DOMAIN and SO_PROTOCOL options for getsockopt()
Description Following the discussion "SO_DOMAIN and SO_PROTOCOL options for getsockopt()" on the austin-group-l mailing-list, I am suggesting the addition of two new features for getsockopt() to be used with sockets.

POSIX has a SO_TYPE option for getsockopt() to retrieve the socket type of a given (socket) file descriptor.

The socket type is typically set when creating it through a call to:
  int socket(int domain, int type, int protocol);

Unfortunately, there are no (standardized) options to fetch the first domain attribute, or the last protocol attribute.

Linux has such options: (http://man7.org/linux/man-pages/man7/socket.7.html) [^]
       SO_DOMAIN (since Linux 2.6.32)
              Retrieves the socket domain as an integer, returning a value
              such as AF_INET6. See socket(2) for details. This socket
              option is read-only.

       SO_PROTOCOL (since Linux 2.6.32)
              Retrieves the socket protocol as an integer, returning a value
              such as IPPROTO_SCTP. See socket(2) for details. This socket
              option is read-only.

And Solaris has also a SO_DOMAIN option and a bit different SO_PROTOTYPE one: (http://docs.oracle.com/cd/E26505_01/html/816-5170/getsockopt-3socket.html#REFMAN3Bgetsockopt-3socket) [^]
SO_DOMAIN
    get the domain used in the socket (get only)

SO_PROTOTYPE
    for socket in domains PF_INET and PF_INET6, get the underlying protocol number used in the socket. For socket in domain PF_ROUTE, get the address family used in the socket.

At last, FreeBSD has a SO_PROTOCOL (no SO_DOMAIN currently)
 (http://www.freebsd.org/cgi/man.cgi?query=setsockopt&sektion=2) [^]

SO_PROTOCOL
  get the protocol number for the socket (get only)
Desired Action (1) add a SO_DOMAIN options for getsockopt() (invalid for setsockopt()) described as:
Retrieve the communications domain in which the socket was created

(2) add a SO_PROTOCOL options for getsockopt() (invalid for setsockopt()) described as:
Retrieve the protocol to be used with the socket
Tags issue8
Attached Files

- Relationships

-  Notes
(0002263)
nick (manager)
2014-06-12 15:41
edited on: 2014-06-12 15:48

On page 387 after line 12967 insert:


SO_DOMAIN Socket domain



On page 387 after line 12972 insert:


SO_PROTOCOL Socket protocol



On page 528 after line 18257 insert:


SO_DOMAIN  int  Identify socket domain (getsockopt() only)



On page 528 after line 18268 insert:


SO_PROTOCOL  int  Identify socket protocol (getsockopt() only)



On page 528 after line 18290 insert:

The SO_DOMAIN option is used only on getsockopt(). When this option
is specified, getsockopt() shall return the domain of the socket (for
example, AF_INET6). SO_DOMAIN has no default value.


On page 529 after line 18318 insert:


The SO_PROTOCOL option is used only on getsockopt(). When this option
is specified, getsockopt() shall return the socket protocol (for example,
IPPROTO_TCP). SO_PROTOCOL has no default value.



- Issue History
Date Modified Username Field Change
2014-05-23 16:00 xroche New Issue
2014-05-23 16:00 xroche Name => Xavier Roche
2014-05-24 17:46 msbrown Project Aardvark Bugs => 1003.1(2013)/Issue7+TC1
2014-06-12 15:41 nick Note Added: 0002263
2014-06-12 15:43 nick Section => 2.10.16 Use of Options
2014-06-12 15:43 nick Page Number => 528
2014-06-12 15:43 nick Line Number => 12850-12879
2014-06-12 15:43 nick Interp Status => ---
2014-06-12 15:43 nick Final Accepted Text => See Note: 0002263
2014-06-12 15:43 nick Status New => Resolved
2014-06-12 15:43 nick Resolution Open => Accepted As Marked
2014-06-12 15:44 nick Tag Attached: issue8
2014-06-12 15:46 nick Note Edited: 0002263
2014-06-12 15:47 nick Category Aardvark Mk III => System Interfaces
2014-06-12 15:48 nick Note Edited: 0002263
2014-06-12 15:50 nick Line Number 12850-12879 => 18250-18279
2020-03-25 16:07 geoffclare Status Resolved => Applied


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker