Diff for /src/sys/netproto/ns/ns_pcb.c between versions 1.8 and 1.9

version 1.8, 2004/06/02 14:43:03 version 1.9, 2004/06/04 01:46:49
Line 54  struct ns_addr zerons_addr; Line 54  struct ns_addr zerons_addr;
 struct nspcb nspcb;             /* head of list */  struct nspcb nspcb;             /* head of list */
   
 int  int
ns_pcballoc(so, head)ns_pcballoc(struct socket *so, struct nspcb *head)
        struct socket *so; 
        struct nspcb *head; 
 {  {
         struct mbuf *m;          struct mbuf *m;
         struct nspcb *nsp;          struct nspcb *nsp;
Line 72  ns_pcballoc(so, head) Line 70  ns_pcballoc(so, head)
 }  }
   
 int  int
ns_pcbbind(nsp, nam)ns_pcbbind(struct nspcb *nsp, struct mbuf *nam)
        struct nspcb *nsp; 
        struct mbuf *nam; 
 {  {
         struct sockaddr_ns *sns;          struct sockaddr_ns *sns;
         u_short lport = 0;          u_short lport = 0;
Line 126  noname: Line 122  noname:
  * then pick one.   * then pick one.
  */   */
 int  int
ns_pcbconnect(nsp, nam)ns_pcbconnect(struct nspcb *nsp, struct mbuf *nam)
        struct nspcb *nsp; 
        struct mbuf *nam; 
 {  {
         struct ns_ifaddr *ia;          struct ns_ifaddr *ia;
         struct sockaddr_ns *sns = mtod(nam, struct sockaddr_ns *);          struct sockaddr_ns *sns = mtod(nam, struct sockaddr_ns *);
Line 226  ns_pcbconnect(nsp, nam) Line 220  ns_pcbconnect(nsp, nam)
 }  }
   
 void  void
ns_pcbdisconnect(nsp)ns_pcbdisconnect(struct nspcb *nsp)
        struct nspcb *nsp; 
 {  {
   
         nsp->nsp_faddr = zerons_addr;          nsp->nsp_faddr = zerons_addr;
         if (nsp->nsp_socket->so_state & SS_NOFDREF)          if (nsp->nsp_socket->so_state & SS_NOFDREF)
                 ns_pcbdetach(nsp);                  ns_pcbdetach(nsp);
 }  }
   
 void  void
ns_pcbdetach(nsp)ns_pcbdetach(struct nspcb *nsp)
        struct nspcb *nsp; 
 {  {
         struct socket *so = nsp->nsp_socket;          struct socket *so = nsp->nsp_socket;
   
Line 250  ns_pcbdetach(nsp) Line 241  ns_pcbdetach(nsp)
 }  }
   
 void  void
ns_setsockaddr(nsp, nam)ns_setsockaddr(struct nspcb *nsp, struct mbuf *nam)
        struct nspcb *nsp; 
        struct mbuf *nam; 
 {  {
         struct sockaddr_ns *sns = mtod(nam, struct sockaddr_ns *);          struct sockaddr_ns *sns = mtod(nam, struct sockaddr_ns *);
   
Line 265  ns_setsockaddr(nsp, nam) Line 254  ns_setsockaddr(nsp, nam)
 }  }
   
 void  void
ns_setpeeraddr(nsp, nam)ns_setpeeraddr(struct nspcb *nsp, struct mbuf *nam)
        struct nspcb *nsp; 
        struct mbuf *nam; 
 {  {
         struct sockaddr_ns *sns = mtod(nam, struct sockaddr_ns *);          struct sockaddr_ns *sns = mtod(nam, struct sockaddr_ns *);
   
Line 287  ns_setpeeraddr(nsp, nam) Line 274  ns_setpeeraddr(nsp, nam)
  * be a parameter list!)   * be a parameter list!)
  */   */
 void  void
ns_pcbnotify(dst, errno, notify, param)ns_pcbnotify(struct ns_addr *dst, int errno,
        struct ns_addr *dst;            void (*notify)(struct nspcb *), long param)
        long param; 
        void (*notify)(struct nspcb *); 
        int errno; 
 {  {
         struct nspcb *nsp, *oinp;          struct nspcb *nsp, *oinp;
         int s = splimp();          int s = splimp();
Line 319  ns_pcbnotify(dst, errno, notify, param) Line 303  ns_pcbnotify(dst, errno, notify, param)
  * After a routing change, flush old routing   * After a routing change, flush old routing
  * and allocate a (hopefully) better one.   * and allocate a (hopefully) better one.
  */   */
ns_rtchange(nsp)ns_rtchange(struct nspcb *nsp)
        struct nspcb *nsp; 
 {  {
         if (nsp->nsp_route.ro_rt) {          if (nsp->nsp_route.ro_rt) {
                 rtfree(nsp->nsp_route.ro_rt);                  rtfree(nsp->nsp_route.ro_rt);
Line 335  ns_rtchange(nsp) Line 318  ns_rtchange(nsp)
 #endif  #endif
   
 struct nspcb *  struct nspcb *
ns_pcblookup(faddr, lport, wildp)ns_pcblookup(struct ns_addr *faddr, u_short lport, int wildp)
        struct ns_addr *faddr; 
        u_short lport; 
 {  {
         struct nspcb *nsp, *match = 0;          struct nspcb *nsp, *match = 0;
         int matchwild = 3, wildcard;          int matchwild = 3, wildcard;

Removed from v.1.8  
changed lines
  Added in v.1.9