patch-2.4.21 linux-2.4.21/net/atm/proc.c
Next file: linux-2.4.21/net/atm/raw.c
Previous file: linux-2.4.21/net/atm/pppoatm.c
Back to the patch index
Back to the overall index
- Lines: 138
- Date:
2003-06-13 07:51:39.000000000 -0700
- Orig file:
linux-2.4.20/net/atm/proc.c
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.20/net/atm/proc.c linux-2.4.21/net/atm/proc.c
@@ -135,7 +135,7 @@
unsigned char *ip;
int svc,off,ip_len;
- svc = !clip_vcc || clip_vcc->vcc->family == AF_ATMSVC;
+ svc = !clip_vcc || clip_vcc->vcc->sk->family == AF_ATMSVC;
off = sprintf(buf,"%-6s%-4s%-4s%5ld ",dev->name,svc ? "SVC" : "PVC",
!clip_vcc || clip_vcc->encap ? "LLC" : "NULL",
(jiffies-(clip_vcc ? clip_vcc->last_use : entry->neigh->used))/
@@ -210,7 +210,7 @@
if (!vcc->dev) here += sprintf(here,"Unassigned ");
else here += sprintf(here,"%3d %3d %5d ",vcc->dev->number,vcc->vpi,
vcc->vci);
- switch (vcc->family) {
+ switch (vcc->sk->family) {
case AF_ATMPVC:
here += sprintf(here,"PVC");
break;
@@ -218,12 +218,12 @@
here += sprintf(here,"SVC");
break;
default:
- here += sprintf(here,"%3d",vcc->family);
+ here += sprintf(here,"%3d",vcc->sk->family);
}
here += sprintf(here," %04lx %5d %7d/%7d %7d/%7d\n",vcc->flags.bits,
vcc->reply,
- atomic_read(&vcc->tx_inuse),vcc->sk->sndbuf,
- atomic_read(&vcc->rx_inuse),vcc->sk->rcvbuf);
+ atomic_read(&vcc->sk->wmem_alloc),vcc->sk->sndbuf,
+ atomic_read(&vcc->sk->rmem_alloc),vcc->sk->rcvbuf);
}
@@ -303,6 +303,7 @@
static int atm_devices_info(loff_t pos,char *buf)
{
struct atm_dev *dev;
+ struct list_head *p;
int left;
if (!pos) {
@@ -310,10 +311,14 @@
"AAL(TX,err,RX,err,drop) ...\n");
}
left = pos-1;
- for (dev = atm_devs; dev && left; dev = dev->next) left--;
- if (!dev) return 0;
- dev_info(dev,buf);
- return strlen(buf);
+ list_for_each(p, &atm_devs) {
+ dev = list_entry(p, struct atm_dev, dev_list);
+ if (left-- == 0) {
+ dev_info(dev,buf);
+ return strlen(buf);
+ }
+ }
+ return 0;
}
/*
@@ -324,6 +329,7 @@
static int atm_pvc_info(loff_t pos,char *buf)
{
struct atm_dev *dev;
+ struct list_head *p;
struct atm_vcc *vcc;
int left;
@@ -332,13 +338,15 @@
"TX(PCR,Class)\n");
}
left = pos-1;
- for (dev = atm_devs; dev; dev = dev->next)
+ list_for_each(p, &atm_devs) {
+ dev = list_entry(p, struct atm_dev, dev_list);
for (vcc = dev->vccs; vcc; vcc = vcc->next)
- if (vcc->family == PF_ATMPVC &&
+ if (vcc->sk->family == PF_ATMPVC &&
vcc->dev && !left--) {
pvc_info(vcc,buf);
return strlen(buf);
}
+ }
return 0;
}
@@ -346,6 +354,7 @@
static int atm_vc_info(loff_t pos,char *buf)
{
struct atm_dev *dev;
+ struct list_head *p;
struct atm_vcc *vcc;
int left;
@@ -354,12 +363,14 @@
"Address"," Itf VPI VCI Fam Flags Reply Send buffer"
" Recv buffer\n");
left = pos-1;
- for (dev = atm_devs; dev; dev = dev->next)
+ list_for_each(p, &atm_devs) {
+ dev = list_entry(p, struct atm_dev, dev_list);
for (vcc = dev->vccs; vcc; vcc = vcc->next)
if (!left--) {
vc_info(vcc,buf);
return strlen(buf);
}
+ }
for (vcc = nodev_vccs; vcc; vcc = vcc->next)
if (!left--) {
vc_info(vcc,buf);
@@ -373,20 +384,23 @@
static int atm_svc_info(loff_t pos,char *buf)
{
struct atm_dev *dev;
+ struct list_head *p;
struct atm_vcc *vcc;
int left;
if (!pos)
return sprintf(buf,"Itf VPI VCI State Remote\n");
left = pos-1;
- for (dev = atm_devs; dev; dev = dev->next)
+ list_for_each(p, &atm_devs) {
+ dev = list_entry(p, struct atm_dev, dev_list);
for (vcc = dev->vccs; vcc; vcc = vcc->next)
- if (vcc->family == PF_ATMSVC && !left--) {
+ if (vcc->sk->family == PF_ATMSVC && !left--) {
svc_info(vcc,buf);
return strlen(buf);
}
+ }
for (vcc = nodev_vccs; vcc; vcc = vcc->next)
- if (vcc->family == PF_ATMSVC && !left--) {
+ if (vcc->sk->family == PF_ATMSVC && !left--) {
svc_info(vcc,buf);
return strlen(buf);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)