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

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

Diff for /src/sys/net/if_tun.c between version 1.112 and 1.112.4.1

version 1.112, 2010/01/19 22:08:01 version 1.112.4.1, 2010/05/30 05:18:01
Line 215  tunattach0(struct tun_softc *tp)
Line 215  tunattach0(struct tun_softc *tp)
         IFQ_SET_READY(&ifp->if_snd);          IFQ_SET_READY(&ifp->if_snd);
         if_attach(ifp);          if_attach(ifp);
         if_alloc_sadl(ifp);          if_alloc_sadl(ifp);
         bpf_ops->bpf_attach(ifp, DLT_NULL, sizeof(uint32_t), &ifp->if_bpf);          bpf_attach(ifp, DLT_NULL, sizeof(uint32_t));
 }  }
   
 static int  static int
Line 251  tun_clone_destroy(struct ifnet *ifp)
Line 251  tun_clone_destroy(struct ifnet *ifp)
         if (tp->tun_flags & TUN_ASYNC && tp->tun_pgid)          if (tp->tun_flags & TUN_ASYNC && tp->tun_pgid)
                 fownsignal(tp->tun_pgid, SIGIO, POLL_HUP, 0, NULL);                  fownsignal(tp->tun_pgid, SIGIO, POLL_HUP, 0, NULL);
   
         bpf_ops->bpf_detach(ifp);          bpf_detach(ifp);
         if_detach(ifp);          if_detach(ifp);
   
         if (!zombie) {          if (!zombie) {
Line 520  tun_output(struct ifnet *ifp, struct mbu
Line 520  tun_output(struct ifnet *ifp, struct mbu
          */           */
         IFQ_CLASSIFY(&ifp->if_snd, m0, dst->sa_family, &pktattr);          IFQ_CLASSIFY(&ifp->if_snd, m0, dst->sa_family, &pktattr);
   
         if (ifp->if_bpf)          bpf_mtap_af(ifp, dst->sa_family, m0);
                 bpf_ops->bpf_mtap_af(ifp->if_bpf, dst->sa_family, m0);  
   
         switch(dst->sa_family) {          switch(dst->sa_family) {
 #ifdef INET6  #ifdef INET6
Line 935  tunwrite(dev_t dev, struct uio *uio, int
Line 934  tunwrite(dev_t dev, struct uio *uio, int
         top->m_pkthdr.len = tlen;          top->m_pkthdr.len = tlen;
         top->m_pkthdr.rcvif = ifp;          top->m_pkthdr.rcvif = ifp;
   
         if (ifp->if_bpf)          bpf_mtap_af(ifp, dst.sa_family, top);
                 bpf_ops->bpf_mtap_af(ifp->if_bpf, dst.sa_family, top);  
   
         s = splnet();          s = splnet();
         simple_lock(&tp->tun_lock);          simple_lock(&tp->tun_lock);

Legend:
Removed from v.1.112  
changed lines
  Added in v.1.112.4.1

CVSweb <webmaster@jp.NetBSD.org>