[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.54.2.10 and 1.59

version 1.54.2.10, 2002/04/17 00:06:19 version 1.59, 2001/11/12 15:25:32
Line 38 
Line 38 
 #include <sys/cdefs.h>  #include <sys/cdefs.h>
 __KERNEL_RCSID(0, "$NetBSD$");  __KERNEL_RCSID(0, "$NetBSD$");
   
   #include "opt_compat_sunos.h"
   
 #include <sys/param.h>  #include <sys/param.h>
 #include <sys/systm.h>  #include <sys/systm.h>
 #include <sys/lwp.h>  
 #include <sys/proc.h>  #include <sys/proc.h>
 #include <sys/file.h>  #include <sys/file.h>
 #include <sys/malloc.h>  #include <sys/malloc.h>
Line 64  soinit(void)
Line 65  soinit(void)
 {  {
   
         pool_init(&socket_pool, sizeof(struct socket), 0, 0, 0,          pool_init(&socket_pool, sizeof(struct socket), 0, 0, 0,
             "sockpl", NULL);              "sockpl", 0, NULL, NULL, M_SOCKET);
 }  }
   
 /*  /*
Line 83  socreate(int dom, struct socket **aso, i
Line 84  socreate(int dom, struct socket **aso, i
         struct socket   *so;          struct socket   *so;
         int             error, s;          int             error, s;
   
         p = curproc->l_proc;    /* XXX */          p = curproc;            /* XXX */
         if (proto)          if (proto)
                 prp = pffindproto(dom, proto, type);                  prp = pffindproto(dom, proto, type);
         else          else
Line 111  socreate(int dom, struct socket **aso, i
Line 112  socreate(int dom, struct socket **aso, i
                 splx(s);                  splx(s);
                 return (error);                  return (error);
         }          }
   #ifdef COMPAT_SUNOS
           {
                   extern struct emul emul_sunos;
                   if (p->p_emul == &emul_sunos && type == SOCK_DGRAM)
                           so->so_options |= SO_BROADCAST;
           }
   #endif
         splx(s);          splx(s);
         *aso = so;          *aso = so;
         return (0);          return (0);
Line 140  solisten(struct socket *so, int backlog)
Line 148  solisten(struct socket *so, int backlog)
                 splx(s);                  splx(s);
                 return (error);                  return (error);
         }          }
         if (TAILQ_EMPTY(&so->so_q))          if (so->so_q.tqh_first == NULL)
                 so->so_options |= SO_ACCEPTCONN;                  so->so_options |= SO_ACCEPTCONN;
         if (backlog < 0)          if (backlog < 0)
                 backlog = 0;                  backlog = 0;
Line 183  soclose(struct socket *so)
Line 191  soclose(struct socket *so)
         error = 0;          error = 0;
         s = splsoftnet();               /* conservative */          s = splsoftnet();               /* conservative */
         if (so->so_options & SO_ACCEPTCONN) {          if (so->so_options & SO_ACCEPTCONN) {
                 while ((so2 = TAILQ_FIRST(&so->so_q0)) != 0) {                  while ((so2 = so->so_q0.tqh_first) != 0) {
                         (void) soqremque(so2, 0);                          (void) soqremque(so2, 0);
                         (void) soabort(so2);                          (void) soabort(so2);
                 }                  }
                 while ((so2 = TAILQ_FIRST(&so->so_q)) != 0) {                  while ((so2 = so->so_q.tqh_first) != 0) {
                         (void) soqremque(so2, 1);                          (void) soqremque(so2, 1);
                         (void) soabort(so2);                          (void) soabort(so2);
                 }                  }
Line 268  soconnect(struct socket *so, struct mbuf
Line 276  soconnect(struct socket *so, struct mbuf
         struct proc     *p;          struct proc     *p;
         int             s, error;          int             s, error;
   
         p = curproc->l_proc;            /* XXX */          p = curproc;            /* XXX */
         if (so->so_options & SO_ACCEPTCONN)          if (so->so_options & SO_ACCEPTCONN)
                 return (EOPNOTSUPP);                  return (EOPNOTSUPP);
         s = splsoftnet();          s = splsoftnet();
Line 351  sosend(struct socket *so, struct mbuf *a
Line 359  sosend(struct socket *so, struct mbuf *a
         long            space, len, resid, clen, mlen;          long            space, len, resid, clen, mlen;
         int             error, s, dontroute, atomic;          int             error, s, dontroute, atomic;
   
         p = curproc->l_proc;            /* XXX */          p = curproc;            /* XXX */
         clen = 0;          clen = 0;
         atomic = sosendallatonce(so) || top;          atomic = sosendallatonce(so) || top;
         if (uio)          if (uio)

Legend:
Removed from v.1.54.2.10  
changed lines
  Added in v.1.59

CVSweb <webmaster@jp.NetBSD.org>