[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linux-ATM-General] Removal of atm_dev->vccs



Vincent Zweije wrote:
> I'll try to figure out if the ->vccs actually did anything.

Basically there used to be a linked-list of active vcc's for each ATM
device.  Now there's a single list with all of the vcc's on it instead (for
various reasons)  Basically to loop through all of the entries on the device
you'll need to do something like:

  struct sock *sk;
  struct atm_vcc *vcc;

  read_lock(&vcc_sklist_lock);
  for (sk = vcc_sklist; sk != NULL; sk = sk->next) {
    vcc = sk->protinfo.af_atm;
    if (vcc->dev != dev)
      continue;			/* Nope, this VCC on some other device */
    /* Do whatever with "vcc" here */
  }
  read_unlock(&vcc_sklist_lock);

-Mitch


-------------------------------------------------------
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
_______________________________________________
Linux-atm-general mailing list
Linux-atm-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-atm-general