Advertisement
4da

NetBSD SO_TIMESTAMPNS option

4da
May 30th, 2011
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.62 KB | None | 0 0
  1. --- a/sys/netinet/ip_input.c
  2. +++ b/sys/netinet/ip_input.c
  3. @@ -1514,6 +1514,16 @@ void
  4.  ip_savecontrol(struct inpcb *inp, struct mbuf **mp, struct ip *ip,
  5.      struct mbuf *m)
  6.  {
  7. +       if (inp->inp_socket->so_options & SO_TIMESTAMPNS) {
  8. +               struct timespec tc;
  9. +
  10. +               nanotime(&tc);
  11. +               *mp = sbcreatecontrol((void *) &tc, sizeof(tc),
  12. +                                                         SCM_TIMESTAMPNS, SOL_SOCKET);
  13. +
  14. +               if (*mp)
  15. +                       mp = &(*mp)->m_next;
  16. +       }
  17.  
  18.         if (inp->inp_socket->so_options & SO_TIMESTAMP
  19.  #ifdef SO_OTIMESTAMP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement