Re: adding if_dev member to struct ifnet

From: Vincent Jardin (vjardin_at_wanadoo.fr)
Date: 10/01/03

  • Next message: Brooks Davis: "Re: adding if_dev member to struct ifnet"
    To: Brooks Davis <brooks@one-eyed-alien.net>, Harti Brandt <brandt@fokus.fraunhofer.de>
    Date: Wed, 1 Oct 2003 20:38:13 +0200
    
    

    > > messier BD>example is in the new ATM code where interfaces are looked up
    > > by name.
    > >
    > > Where is this?
    >
    > One example would be in sys/netatm/atm_if.c around line 1081.

    Do you mean pif_name and pif_unit ?

    This code could be updated. It uses pif_unit and pif_name that could become
    pif_xname.

         for (pip = atm_interface_head; pip; pip = pip->pif_next) {
                 if (strcmp(pip->pif_xname, n) == 0)
                         break;
         }

    instead of
         for (pip = atm_interface_head; pip; pip = pip->pif_next) {
                 if ((pip->pif_unit == unit) && (strcmp(pip->pif_name, n) == 0))
                         break;
         }

    Moreover, a PIF (Physical IF) is not an ifnet. It is the ATM device. The ATM
    PVC are the NIF (Network IF -> ifnet). They are many NIF (PVC) over a single
    PIF (ATM device).

    With the ATM stack, the main issue is related to AIOCS_SET_NIF. It sets the
    ifp's if_name to the NIF's nif_name and the ifp's if_unit to a regular
    counter.

    In fact we could change the following code
                        strcpy ( nip->nif_name, asr->asr_nif_pref );
                        nip->nif_sel = count;

                        ifp->if_name = nip->nif_name;
                        ifp->if_unit = count;

       to

                        snprintf(nip->nif_xname, sizeof(nip->nif_xname), "%s%d",
                           asr->asr_nif_pref, count);
                        nip->nif_sel = count; /* we need to keep a selector to
    build the UNI ATM address */

                        ifp->if_xname = nip->nif_xname;
    #if 0
                        ifp->if_unit = count; /* it is not required anymore */
    #endif

    Regards,
      Vincent

    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"


  • Next message: Brooks Davis: "Re: adding if_dev member to struct ifnet"

    Relevant Pages

    • Re: QoS on UBR ATM PVC (DSL)? $100 paypal bounty!
      ... Each DSL subscriber connects to us, via the ILEC's DSLAM and ATM ... with an UBR PVC using RBE. ... I have a VoIP Proxy server on the LAN connected to a FastE interface on ...
      (comp.dcom.sys.cisco)
    • Re: Traffic bursts when using ATM PVC
      ... client circuit --> client PC. ... Since the server NIC is 100Mb and it traverses a T1, ... Not sure - but it may depend on what type of PVC setup you have. ... Are you shaping the traffic to the ATM 128 K PVC or are you just ...
      (comp.dcom.sys.cisco)
    • Re: Traffic bursts when using ATM PVC
      ... client circuit --> client PC. ... Not sure - but it may depend on what type of PVC setup you have. ... Are you shaping the traffic to the ATM 128 K PVC or are you just ... Is the connection using a protocol that just blasts traffic in big ...
      (comp.dcom.sys.cisco)
    • Re: HWIC-4SHDSL for 32 PVC
      ... ATM Interface) and I can create maximum of 8 ATM sub-interface (PVC ... usually there will be an IP or similar "cloud" behind the DSLAM, ...
      (comp.dcom.sys.cisco)
    • Re: HWIC-4SHDSL for 32 PVC
      ... permanent virtual circuits (PVC) perHWIC-4SHDSLif it is feasible. ... It should just be a matter of going through with ATM subinterfaces.. ... ATM Interface) and I can create maximum of 8 ATM sub-interface (PVC ... I want to connect 64 branch offices to my HQ office. ...
      (comp.dcom.sys.cisco)