Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netbt add (SOL_SOCKET, SO_TIMESTAMP) messages if requested



details:   https://anonhg.NetBSD.org/src/rev/6b69ea6df76d
branches:  trunk
changeset: 761503:6b69ea6df76d
user:      plunky <plunky%NetBSD.org@localhost>
date:      Sun Jan 30 17:23:23 2011 +0000

description:
add (SOL_SOCKET, SO_TIMESTAMP) messages if requested

diffstat:

 sys/netbt/hci_socket.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 33783db3a815 -r 6b69ea6df76d sys/netbt/hci_socket.c
--- a/sys/netbt/hci_socket.c    Sun Jan 30 16:31:42 2011 +0000
+++ b/sys/netbt/hci_socket.c    Sun Jan 30 17:23:23 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hci_socket.c,v 1.19 2009/08/10 20:22:06 plunky Exp $   */
+/*     $NetBSD: hci_socket.c,v 1.20 2011/01/30 17:23:23 plunky Exp $   */
 
 /*-
  * Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.19 2009/08/10 20:22:06 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.20 2011/01/30 17:23:23 plunky Exp $");
 
 /* load symbolic names */
 #ifdef BLUETOOTH_DEBUG
@@ -825,6 +825,16 @@
                        if (*ctl != NULL)
                                ctl = &((*ctl)->m_next);
                }
+               if (pcb->hp_socket->so_options & SO_TIMESTAMP) {
+                       struct timeval tv;
+
+                       microtime(&tv);
+                       *ctl = sbcreatecontrol(&tv, sizeof(tv),
+                           SCM_TIMESTAMP, SOL_SOCKET);
+
+                       if (*ctl != NULL)
+                               ctl = &((*ctl)->m_next);
+               }
 
                /*
                 * copy to socket



Home | Main Index | Thread Index | Old Index