>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:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to