[BACK]Return to uipc_socket.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/uipc_socket.c between version 1.168 and 1.177.4.3

version 1.168, 2008/06/18 09:06:27 version 1.177.4.3, 2009/05/03 13:18:55
Line 1 
Line 1 
 /*      $NetBSD$        */  /*      $NetBSD$        */
   
 /*-  /*-
  * Copyright (c) 2002, 2007, 2008 The NetBSD Foundation, Inc.   * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
  * All rights reserved.   * All rights reserved.
  *   *
  * This code is derived from software contributed to The NetBSD Foundation   * This code is derived from software contributed to The NetBSD Foundation
  * by Jason R. Thorpe of Wasabi Systems, Inc.   * by Jason R. Thorpe of Wasabi Systems, Inc, and by Andrew Doran.
  *   *
  * Redistribution and use in source and binary forms, with or without   * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions   * modification, are permitted provided that the following conditions
Line 76  __KERNEL_RCSID(0, "$NetBSD$");
Line 76  __KERNEL_RCSID(0, "$NetBSD$");
 #include <sys/proc.h>  #include <sys/proc.h>
 #include <sys/file.h>  #include <sys/file.h>
 #include <sys/filedesc.h>  #include <sys/filedesc.h>
 #include <sys/malloc.h>  #include <sys/kmem.h>
 #include <sys/mbuf.h>  #include <sys/mbuf.h>
 #include <sys/domain.h>  #include <sys/domain.h>
 #include <sys/kernel.h>  #include <sys/kernel.h>
Line 85  __KERNEL_RCSID(0, "$NetBSD$");
Line 85  __KERNEL_RCSID(0, "$NetBSD$");
 #include <sys/socketvar.h>  #include <sys/socketvar.h>
 #include <sys/signalvar.h>  #include <sys/signalvar.h>
 #include <sys/resourcevar.h>  #include <sys/resourcevar.h>
   #include <sys/uidinfo.h>
 #include <sys/event.h>  #include <sys/event.h>
 #include <sys/poll.h>  #include <sys/poll.h>
 #include <sys/kauth.h>  #include <sys/kauth.h>
Line 418  getsombuf(struct socket *so, int type)
Line 419  getsombuf(struct socket *so, int type)
         return m;          return m;
 }  }
   
 struct mbuf *  
 m_intopt(struct socket *so, int val)  
 {  
         struct mbuf *m;  
   
         m = getsombuf(so, MT_SOOPTS);  
         m->m_len = sizeof(int);  
         *mtod(m, int *) = val;  
         return m;  
 }  
   
 void  void
 soinit(void)  soinit(void)
 {  {
Line 624  sofree(struct socket *so)
Line 614  sofree(struct socket *so)
         KASSERT(!cv_has_waiters(&so->so_snd.sb_cv));          KASSERT(!cv_has_waiters(&so->so_snd.sb_cv));
         sorflush(so);          sorflush(so);
         refs = so->so_aborting; /* XXX */          refs = so->so_aborting; /* XXX */
           /* Remove acccept filter if one is present. */
           if (so->so_accf != NULL)
                   (void)accept_filt_clear(so);
         sounlock(so);          sounlock(so);
         if (refs == 0)          /* XXX */          if (refs == 0)          /* XXX */
                 soput(so);                  soput(so);
Line 644  soclose(struct socket *so)
Line 637  soclose(struct socket *so)
         error = 0;          error = 0;
         solock(so);          solock(so);
         if (so->so_options & SO_ACCEPTCONN) {          if (so->so_options & SO_ACCEPTCONN) {
                 do {                  for (;;) {
                         if ((so2 = TAILQ_FIRST(&so->so_q0)) != 0) {                          if ((so2 = TAILQ_FIRST(&so->so_q0)) != 0) {
                                 KASSERT(solocked2(so, so2));                                  KASSERT(solocked2(so, so2));
                                 (void) soqremque(so2, 0);                                  (void) soqremque(so2, 0);
Line 661  soclose(struct socket *so)
Line 654  soclose(struct socket *so)
                                 solock(so);                                  solock(so);
                                 continue;                                  continue;
                         }                          }
                 } while (0);                          break;
                   }
         }          }
         if (so->so_pcb == 0)          if (so->so_pcb == 0)
                 goto discard;                  goto discard;
Line 675  soclose(struct socket *so)
Line 669  soclose(struct socket *so)
                         if ((so->so_state & SS_ISDISCONNECTING) && so->so_nbio)                          if ((so->so_state & SS_ISDISCONNECTING) && so->so_nbio)
                                 goto drop;                                  goto drop;
                         while (so->so_state & SS_ISCONNECTED) {                          while (so->so_state & SS_ISCONNECTED) {
                                 error = sowait(so, so->so_linger * hz);                                  error = sowait(so, true, so->so_linger * hz);
                                 if (error)                                  if (error)
                                         break;                                          break;
                         }                          }
Line 1542  soshutdown(struct socket *so, int how)
Line 1536  soshutdown(struct socket *so, int how)
         return error;          return error;
 }  }
   
   int
   sodrain(struct socket *so)
   {
           int error;
   
           solock(so);
           so->so_state |= SS_ISDRAINING;
           cv_broadcast(&so->so_cv);
           error = soshutdown(so, SHUT_RDWR);
           sounlock(so);
   
           return error;
   }
   
 void  void
 sorflush(struct socket *so)  sorflush(struct socket *so)
 {  {
Line 1571  sorflush(struct socket *so)
Line 1579  sorflush(struct socket *so)
         sbrelease(&asb, so);          sbrelease(&asb, so);
 }  }
   
   /*
    * internal set SOL_SOCKET options
    */
 static int  static int
 sosetopt1(struct socket *so, int level, int optname, struct mbuf *m)  sosetopt1(struct socket *so, const struct sockopt *sopt)
 {  {
         int optval, val;          int error, optval;
         struct linger   *l;          struct linger l;
         struct sockbuf  *sb;          struct timeval tv;
         struct timeval *tv;  
   
         switch (optname) {          switch (sopt->sopt_name) {
   
         case SO_LINGER:          case SO_ACCEPTFILTER:
                 if (m == NULL || m->m_len != sizeof(struct linger))                  error = accept_filt_setopt(so, sopt);
                         return EINVAL;                  KASSERT(solocked(so));
                 l = mtod(m, struct linger *);  
                 if (l->l_linger < 0 || l->l_linger > USHRT_MAX ||  
                     l->l_linger > (INT_MAX / hz))  
                         return EDOM;  
                 so->so_linger = l->l_linger;  
                 if (l->l_onoff)  
                         so->so_options |= SO_LINGER;  
                 else  
                         so->so_options &= ~SO_LINGER;  
                 break;                  break;
   
           case SO_LINGER:
                   error = sockopt_get(sopt, &l, sizeof(l));
                   solock(so);
                   if (error)
                           break;
                   if (l.l_linger < 0 || l.l_linger > USHRT_MAX ||
                       l.l_linger > (INT_MAX / hz)) {
                           error = EDOM;
                           break;
                   }
                   so->so_linger = l.l_linger;
                   if (l.l_onoff)
                           so->so_options |= SO_LINGER;
                   else
                           so->so_options &= ~SO_LINGER;
                   break;
   
         case SO_DEBUG:          case SO_DEBUG:
         case SO_KEEPALIVE:          case SO_KEEPALIVE:
         case SO_DONTROUTE:          case SO_DONTROUTE:
Line 1604  sosetopt1(struct socket *so, int level, 
Line 1622  sosetopt1(struct socket *so, int level, 
         case SO_REUSEPORT:          case SO_REUSEPORT:
         case SO_OOBINLINE:          case SO_OOBINLINE:
         case SO_TIMESTAMP:          case SO_TIMESTAMP:
                 if (m == NULL || m->m_len < sizeof(int))                  error = sockopt_getint(sopt, &optval);
                         return EINVAL;                  solock(so);
                 if (*mtod(m, int *))                  if (error)
                         so->so_options |= optname;                          break;
                   if (optval)
                           so->so_options |= sopt->sopt_name;
                 else                  else
                         so->so_options &= ~optname;                          so->so_options &= ~sopt->sopt_name;
                 break;                  break;
   
         case SO_SNDBUF:          case SO_SNDBUF:
         case SO_RCVBUF:          case SO_RCVBUF:
         case SO_SNDLOWAT:          case SO_SNDLOWAT:
         case SO_RCVLOWAT:          case SO_RCVLOWAT:
                 if (m == NULL || m->m_len < sizeof(int))                  error = sockopt_getint(sopt, &optval);
                         return EINVAL;                  solock(so);
                   if (error)
                           break;
   
                 /*                  /*
                  * Values < 1 make no sense for any of these                   * Values < 1 make no sense for any of these
                  * options, so disallow them.                   * options, so disallow them.
                  */                   */
                 optval = *mtod(m, int *);                  if (optval < 1) {
                 if (optval < 1)                          error = EINVAL;
                         return EINVAL;                          break;
                   }
                 switch (optname) {  
   
                   switch (sopt->sopt_name) {
                 case SO_SNDBUF:                  case SO_SNDBUF:
                           if (sbreserve(&so->so_snd, (u_long)optval, so) == 0) {
                                   error = ENOBUFS;
                                   break;
                           }
                           so->so_snd.sb_flags &= ~SB_AUTOSIZE;
                           break;
   
                 case SO_RCVBUF:                  case SO_RCVBUF:
                         sb = (optname == SO_SNDBUF) ?                          if (sbreserve(&so->so_rcv, (u_long)optval, so) == 0) {
                             &so->so_snd : &so->so_rcv;                                  error = ENOBUFS;
                         if (sbreserve(sb, (u_long)optval, so) == 0)                                  break;
                                 return ENOBUFS;                          }
                         sb->sb_flags &= ~SB_AUTOSIZE;                          so->so_rcv.sb_flags &= ~SB_AUTOSIZE;
                         break;                          break;
   
                 /*                  /*
Line 1643  sosetopt1(struct socket *so, int level, 
Line 1672  sosetopt1(struct socket *so, int level, 
                  * the high-water.                   * the high-water.
                  */                   */
                 case SO_SNDLOWAT:                  case SO_SNDLOWAT:
                         so->so_snd.sb_lowat =                          if (optval > so->so_snd.sb_hiwat)
                             (optval > so->so_snd.sb_hiwat) ?                                  optval = so->so_snd.sb_hiwat;
                             so->so_snd.sb_hiwat : optval;  
                           so->so_snd.sb_lowat = optval;
                         break;                          break;
   
                 case SO_RCVLOWAT:                  case SO_RCVLOWAT:
                         so->so_rcv.sb_lowat =                          if (optval > so->so_rcv.sb_hiwat)
                             (optval > so->so_rcv.sb_hiwat) ?                                  optval = so->so_rcv.sb_hiwat;
                             so->so_rcv.sb_hiwat : optval;  
                           so->so_rcv.sb_lowat = optval;
                         break;                          break;
                 }                  }
                 break;                  break;
   
         case SO_SNDTIMEO:          case SO_SNDTIMEO:
         case SO_RCVTIMEO:          case SO_RCVTIMEO:
                 if (m == NULL || m->m_len < sizeof(*tv))                  error = sockopt_get(sopt, &tv, sizeof(tv));
                         return EINVAL;                  solock(so);
                 tv = mtod(m, struct timeval *);                  if (error)
                 if (tv->tv_sec > (INT_MAX - tv->tv_usec / tick) / hz)                          break;
                         return EDOM;  
                 val = tv->tv_sec * hz + tv->tv_usec / tick;                  if (tv.tv_sec > (INT_MAX - tv.tv_usec / tick) / hz) {
                 if (val == 0 && tv->tv_usec != 0)                          error = EDOM;
                         val = 1;                          break;
                   }
   
                 switch (optname) {                  optval = tv.tv_sec * hz + tv.tv_usec / tick;
                   if (optval == 0 && tv.tv_usec != 0)
                           optval = 1;
   
                   switch (sopt->sopt_name) {
                 case SO_SNDTIMEO:                  case SO_SNDTIMEO:
                         so->so_snd.sb_timeo = val;                          so->so_snd.sb_timeo = optval;
                         break;                          break;
                 case SO_RCVTIMEO:                  case SO_RCVTIMEO:
                         so->so_rcv.sb_timeo = val;                          so->so_rcv.sb_timeo = optval;
                         break;                          break;
                 }                  }
                 break;                  break;
   
         default:          default:
                 return ENOPROTOOPT;                  solock(so);
                   error = ENOPROTOOPT;
                   break;
         }          }
         return 0;          KASSERT(solocked(so));
           return error;
 }  }
   
 int  int
 sosetopt(struct socket *so, int level, int optname, struct mbuf *m)  sosetopt(struct socket *so, struct sockopt *sopt)
 {  {
         int error, prerr;          int error, prerr;
   
         solock(so);          if (sopt->sopt_level == SOL_SOCKET) {
         if (level == SOL_SOCKET)                  error = sosetopt1(so, sopt);
                 error = sosetopt1(so, level, optname, m);                  KASSERT(solocked(so));
         else          } else {
                 error = ENOPROTOOPT;                  error = ENOPROTOOPT;
                   solock(so);
           }
   
         if ((error == 0 || error == ENOPROTOOPT) &&          if ((error == 0 || error == ENOPROTOOPT) &&
             so->so_proto != NULL && so->so_proto->pr_ctloutput != NULL) {              so->so_proto != NULL && so->so_proto->pr_ctloutput != NULL) {
                 /* give the protocol stack a shot */                  /* give the protocol stack a shot */
                 prerr = (*so->so_proto->pr_ctloutput)(PRCO_SETOPT, so, level,                  prerr = (*so->so_proto->pr_ctloutput)(PRCO_SETOPT, so, sopt);
                     optname, &m);  
                 if (prerr == 0)                  if (prerr == 0)
                         error = 0;                          error = 0;
                 else if (prerr != ENOPROTOOPT)                  else if (prerr != ENOPROTOOPT)
                         error = prerr;                          error = prerr;
         } else if (m != NULL)          }
                 (void)m_free(m);  
         sounlock(so);          sounlock(so);
         return error;          return error;
 }  }
   
   /*
    * so_setsockopt() is a wrapper providing a sockopt structure for sosetopt()
    */
 int  int
 sogetopt(struct socket *so, int level, int optname, struct mbuf **mp)  so_setsockopt(struct lwp *l, struct socket *so, int level, int name,
       const void *val, size_t valsize)
   {
           struct sockopt sopt;
           int error;
   
           KASSERT(valsize == 0 || val != NULL);
   
           sockopt_init(&sopt, level, name, valsize);
           sockopt_set(&sopt, val, valsize);
   
           error = sosetopt(so, &sopt);
   
           sockopt_destroy(&sopt);
   
           return error;
   }
   
   /*
    * internal get SOL_SOCKET options
    */
   static int
   sogetopt1(struct socket *so, struct sockopt *sopt)
   {
           int error, optval;
           struct linger l;
           struct timeval tv;
   
           switch (sopt->sopt_name) {
   
           case SO_ACCEPTFILTER:
                   error = accept_filt_getopt(so, sopt);
                   break;
   
           case SO_LINGER:
                   l.l_onoff = (so->so_options & SO_LINGER) ? 1 : 0;
                   l.l_linger = so->so_linger;
   
                   error = sockopt_set(sopt, &l, sizeof(l));
                   break;
   
           case SO_USELOOPBACK:
           case SO_DONTROUTE:
           case SO_DEBUG:
           case SO_KEEPALIVE:
           case SO_REUSEADDR:
           case SO_REUSEPORT:
           case SO_BROADCAST:
           case SO_OOBINLINE:
           case SO_TIMESTAMP:
                   error = sockopt_setint(sopt,
                       (so->so_options & sopt->sopt_name) ? 1 : 0);
                   break;
   
           case SO_TYPE:
                   error = sockopt_setint(sopt, so->so_type);
                   break;
   
           case SO_ERROR:
                   error = sockopt_setint(sopt, so->so_error);
                   so->so_error = 0;
                   break;
   
           case SO_SNDBUF:
                   error = sockopt_setint(sopt, so->so_snd.sb_hiwat);
                   break;
   
           case SO_RCVBUF:
                   error = sockopt_setint(sopt, so->so_rcv.sb_hiwat);
                   break;
   
           case SO_SNDLOWAT:
                   error = sockopt_setint(sopt, so->so_snd.sb_lowat);
                   break;
   
           case SO_RCVLOWAT:
                   error = sockopt_setint(sopt, so->so_rcv.sb_lowat);
                   break;
   
           case SO_SNDTIMEO:
           case SO_RCVTIMEO:
                   optval = (sopt->sopt_name == SO_SNDTIMEO ?
                        so->so_snd.sb_timeo : so->so_rcv.sb_timeo);
   
                   tv.tv_sec = optval / hz;
                   tv.tv_usec = (optval % hz) * tick;
   
                   error = sockopt_set(sopt, &tv, sizeof(tv));
                   break;
   
           case SO_OVERFLOWED:
                   error = sockopt_setint(sopt, so->so_rcv.sb_overflowed);
                   break;
   
           default:
                   error = ENOPROTOOPT;
                   break;
           }
   
           return (error);
   }
   
   int
   sogetopt(struct socket *so, struct sockopt *sopt)
 {  {
         struct mbuf     *m;  
         int             error;          int             error;
   
         solock(so);          solock(so);
         if (level != SOL_SOCKET) {          if (sopt->sopt_level != SOL_SOCKET) {
                 if (so->so_proto && so->so_proto->pr_ctloutput) {                  if (so->so_proto && so->so_proto->pr_ctloutput) {
                         error = ((*so->so_proto->pr_ctloutput)                          error = ((*so->so_proto->pr_ctloutput)
                                   (PRCO_GETOPT, so, level, optname, mp));                              (PRCO_GETOPT, so, sopt));
                 } else                  } else
                         error = (ENOPROTOOPT);                          error = (ENOPROTOOPT);
         } else {          } else {
                 m = m_get(M_WAIT, MT_SOOPTS);                  error = sogetopt1(so, sopt);
                 m->m_len = sizeof(int);          }
           sounlock(so);
           return (error);
   }
   
                 switch (optname) {  /*
    * alloc sockopt data buffer buffer
    *      - will be released at destroy
    */
   static int
   sockopt_alloc(struct sockopt *sopt, size_t len, km_flag_t kmflag)
   {
   
                 case SO_LINGER:          KASSERT(sopt->sopt_size == 0);
                         m->m_len = sizeof(struct linger);  
                         mtod(m, struct linger *)->l_onoff =  
                             (so->so_options & SO_LINGER) ? 1 : 0;  
                         mtod(m, struct linger *)->l_linger = so->so_linger;  
                         break;  
   
                 case SO_USELOOPBACK:          if (len > sizeof(sopt->sopt_buf)) {
                 case SO_DONTROUTE:                  sopt->sopt_data = kmem_zalloc(len, kmflag);
                 case SO_DEBUG:                  if (sopt->sopt_data == NULL)
                 case SO_KEEPALIVE:                          return ENOMEM;
                 case SO_REUSEADDR:          } else
                 case SO_REUSEPORT:                  sopt->sopt_data = sopt->sopt_buf;
                 case SO_BROADCAST:  
                 case SO_OOBINLINE:  
                 case SO_TIMESTAMP:  
                         *mtod(m, int *) = (so->so_options & optname) ? 1 : 0;  
                         break;  
   
                 case SO_TYPE:          sopt->sopt_size = len;
                         *mtod(m, int *) = so->so_type;          return 0;
                         break;  }
   
                 case SO_ERROR:  /*
                         *mtod(m, int *) = so->so_error;   * initialise sockopt storage
                         so->so_error = 0;   *      - MAY sleep during allocation
                         break;   */
   void
   sockopt_init(struct sockopt *sopt, int level, int name, size_t size)
   {
   
                 case SO_SNDBUF:          memset(sopt, 0, sizeof(*sopt));
                         *mtod(m, int *) = so->so_snd.sb_hiwat;  
                         break;  
   
                 case SO_RCVBUF:          sopt->sopt_level = level;
                         *mtod(m, int *) = so->so_rcv.sb_hiwat;          sopt->sopt_name = name;
                         break;          (void)sockopt_alloc(sopt, size, KM_SLEEP);
   }
   
                 case SO_SNDLOWAT:  /*
                         *mtod(m, int *) = so->so_snd.sb_lowat;   * destroy sockopt storage
                         break;   *      - will release any held memory references
    */
   void
   sockopt_destroy(struct sockopt *sopt)
   {
   
                 case SO_RCVLOWAT:          if (sopt->sopt_data != sopt->sopt_buf)
                         *mtod(m, int *) = so->so_rcv.sb_lowat;                  kmem_free(sopt->sopt_data, sopt->sopt_size);
                         break;  
   
                 case SO_SNDTIMEO:          memset(sopt, 0, sizeof(*sopt));
                 case SO_RCVTIMEO:  }
                     {  
                         int val = (optname == SO_SNDTIMEO ?  
                              so->so_snd.sb_timeo : so->so_rcv.sb_timeo);  
   
                         m->m_len = sizeof(struct timeval);  
                         mtod(m, struct timeval *)->tv_sec = val / hz;  
                         mtod(m, struct timeval *)->tv_usec =  
                             (val % hz) * tick;  
                         break;  
                     }  
   
                 case SO_OVERFLOWED:  /*
                         *mtod(m, int *) = so->so_rcv.sb_overflowed;   * set sockopt value
                         break;   *      - value is copied into sockopt
    *      - memory is allocated when necessary, will not sleep
    */
   int
   sockopt_set(struct sockopt *sopt, const void *buf, size_t len)
   {
           int error;
   
                 default:          if (sopt->sopt_size == 0) {
                         sounlock(so);                  error = sockopt_alloc(sopt, len, KM_NOSLEEP);
                         (void)m_free(m);                  if (error)
                         return (ENOPROTOOPT);                          return error;
           }
   
           KASSERT(sopt->sopt_size == len);
           memcpy(sopt->sopt_data, buf, len);
           return 0;
   }
   
   /*
    * common case of set sockopt integer value
    */
   int
   sockopt_setint(struct sockopt *sopt, int val)
   {
   
           return sockopt_set(sopt, &val, sizeof(int));
   }
   
   /*
    * get sockopt value
    *      - correct size must be given
    */
   int
   sockopt_get(const struct sockopt *sopt, void *buf, size_t len)
   {
   
           if (sopt->sopt_size != len)
                   return EINVAL;
   
           memcpy(buf, sopt->sopt_data, len);
           return 0;
   }
   
   /*
    * common case of get sockopt integer value
    */
   int
   sockopt_getint(const struct sockopt *sopt, int *valp)
   {
   
           return sockopt_get(sopt, valp, sizeof(int));
   }
   
   /*
    * set sockopt value from mbuf
    *      - ONLY for legacy code
    *      - mbuf is released by sockopt
    *      - will not sleep
    */
   int
   sockopt_setmbuf(struct sockopt *sopt, struct mbuf *m)
   {
           size_t len;
           int error;
   
           len = m_length(m);
   
           if (sopt->sopt_size == 0) {
                   error = sockopt_alloc(sopt, len, KM_NOSLEEP);
                   if (error)
                           return error;
           }
   
           KASSERT(sopt->sopt_size == len);
           m_copydata(m, 0, len, sopt->sopt_data);
           m_freem(m);
   
           return 0;
   }
   
   /*
    * get sockopt value into mbuf
    *      - ONLY for legacy code
    *      - mbuf to be released by the caller
    *      - will not sleep
    */
   struct mbuf *
   sockopt_getmbuf(const struct sockopt *sopt)
   {
           struct mbuf *m;
   
           if (sopt->sopt_size > MCLBYTES)
                   return NULL;
   
           m = m_get(M_DONTWAIT, MT_SOOPTS);
           if (m == NULL)
                   return NULL;
   
           if (sopt->sopt_size > MLEN) {
                   MCLGET(m, M_DONTWAIT);
                   if ((m->m_flags & M_EXT) == 0) {
                           m_free(m);
                           return NULL;
                 }                  }
                 *mp = m;  
                 error = 0;  
         }          }
   
         sounlock(so);          memcpy(mtod(m, void *), sopt->sopt_data, sopt->sopt_size);
         return (error);          m->m_len = sopt->sopt_size;
   
           return m;
 }  }
   
 void  void
Line 1807  sohasoutofband(struct socket *so)
Line 2043  sohasoutofband(struct socket *so)
 {  {
   
         fownsignal(so->so_pgid, SIGURG, POLL_PRI, POLLPRI|POLLRDBAND, so);          fownsignal(so->so_pgid, SIGURG, POLL_PRI, POLLPRI|POLLRDBAND, so);
         selnotify(&so->so_rcv.sb_sel, POLLPRI | POLLRDBAND, 0);          selnotify(&so->so_rcv.sb_sel, POLLPRI | POLLRDBAND, NOTE_SUBMIT);
 }  }
   
 static void  static void

Legend:
Removed from v.1.168  
changed lines
  Added in v.1.177.4.3

CVSweb <webmaster@jp.NetBSD.org>