Date: Wed, 6 Feb 2013 14:28:35 +0200 From: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> To: FreeBSD-gnats-submit@freebsd.org Subject: kern/175883: Add support for SCM_BINTIME for PF_LOCAL sockets Message-ID: <20130206122835.GA74795@pm513-1.comsys.ntu-kpi.kiev.ua> Resent-Message-ID: <201302061230.r16CU1Z0019577@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 175883 >Category: kern >Synopsis: Add support for SCM_BINTIME for PF_LOCAL sockets >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Feb 06 12:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Andrey Simonenko >Release: FreeBSD 10-CURRENT >Organization: >Environment: >Description: The following change adds support of SCM_BINTIME ancillary data object for PF_LOCAL sockets. The style of the following change follows the style of SCM_TIMESTAMP support. >How-To-Repeat: >Fix: --- uipc_usrreq.c.orig 2012-12-10 13:20:29.000000000 +0200 +++ uipc_usrreq.c 2013-02-06 13:53:03.000000000 +0200 @@ -1802,6 +1802,7 @@ unp_internalize(struct mbuf **controlp, struct cmsgcred *cmcred; struct file **rp; struct file *fp; + struct bintime *bt; struct timeval *tv; int i, fd, *fdp; void *data; @@ -1906,6 +1907,18 @@ unp_internalize(struct mbuf **controlp, microtime(tv); break; + case SCM_BINTIME: + *controlp = sbcreatecontrol(NULL, sizeof(*bt), + SCM_BINTIME, SOL_SOCKET); + if (*controlp == NULL) { + error = ENOBUFS; + goto out; + } + bt = (struct bintime *) + CMSG_DATA(mtod(*controlp, struct cmsghdr *)); + bintime(bt); + break; + default: error = EINVAL; goto out; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130206122835.GA74795>