Lines Matching +full:pk +full:- +full:pk

1 // SPDX-License-Identifier: GPL-2.0
2 /* net/atm/proc.c - ATM /proc interface
4 * Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA
34 #include "signaling.h" /* to get sigd - ugly too */
48 atomic_read(&stats->tx), atomic_read(&stats->tx_err), in add_stats()
49 atomic_read(&stats->rx), atomic_read(&stats->rx_err), in add_stats()
50 atomic_read(&stats->rx_drop)); in add_stats()
57 seq_printf(seq, "%3d %-8s", dev->number, dev->type); in atm_dev_info()
59 seq_printf(seq, "%02x", dev->esi[i]); in atm_dev_info()
61 add_stats(seq, "0", &dev->stats.aal0); in atm_dev_info()
63 add_stats(seq, "5", &dev->stats.aal5); in atm_dev_info()
64 seq_printf(seq, "\t[%d]", refcount_read(&dev->refcnt)); in atm_dev_info()
75 return !family || (sk->sk_family == family); in compare_family()
90 l--; in __vcc_walk()
94 l -= compare_family(sk, family); in __vcc_walk()
110 struct vcc_state *state = seq->private; in vcc_walk()
111 int family = (uintptr_t)(pde_data(file_inode(seq->file))); in vcc_walk()
113 return __vcc_walk(&state->sk, family, &state->bucket, l) ? in vcc_walk()
120 struct vcc_state *state = seq->private; in vcc_seq_start()
124 state->sk = SEQ_START_TOKEN; in vcc_seq_start()
146 "---", "1", "2", "3/4", /* 0- 3 */ in pvc_info()
147 "???", "5", "???", "???", /* 4- 7 */ in pvc_info()
148 "???", "???", "???", "???", /* 8-11 */ in pvc_info()
149 "???", "0", "???", "???"}; /* 12-15 */ in pvc_info()
151 seq_printf(seq, "%3d %3d %5d %-3s %7d %-5s %7d %-6s", in pvc_info()
152 vcc->dev->number, vcc->vpi, vcc->vci, in pvc_info()
153 vcc->qos.aal >= ARRAY_SIZE(aal_name) ? "err" : in pvc_info()
154 aal_name[vcc->qos.aal], vcc->qos.rxtp.min_pcr, in pvc_info()
155 class_name[vcc->qos.rxtp.traffic_class], in pvc_info()
156 vcc->qos.txtp.min_pcr, in pvc_info()
157 class_name[vcc->qos.txtp.traffic_class]); in pvc_info()
158 if (test_bit(ATM_VF_IS_CLIP, &vcc->flags)) { in pvc_info()
162 dev = clip_vcc->entry ? clip_vcc->entry->neigh->dev : NULL; in pvc_info()
164 dev ? dev->name : "none?"); in pvc_info()
165 seq_printf(seq, "%s", clip_vcc->encap ? "LLC/SNAP" : "None"); in pvc_info()
174 return map[ATM_VF2VS(vcc->flags)]; in vcc_state()
181 seq_printf(seq, "%pK ", vcc); in vcc_info()
182 if (!vcc->dev) in vcc_info()
185 seq_printf(seq, "%3d %3d %5d ", vcc->dev->number, vcc->vpi, in vcc_info()
186 vcc->vci); in vcc_info()
187 switch (sk->sk_family) { in vcc_info()
195 seq_printf(seq, "%3d", sk->sk_family); in vcc_info()
198 vcc->flags, sk->sk_err, in vcc_info()
199 sk_wmem_alloc_get(sk), sk->sk_sndbuf, in vcc_info()
200 sk_rmem_alloc_get(sk), sk->sk_rcvbuf, in vcc_info()
201 refcount_read(&sk->sk_refcnt)); in vcc_info()
206 if (!vcc->dev) in svc_info()
208 "N/A@%pK%10s" : "N/A@%pK%2s", vcc, ""); in svc_info()
211 vcc->dev->number, vcc->vpi, vcc->vci); in svc_info()
212 seq_printf(seq, "%-10s ", vcc_state(vcc)); in svc_info()
213 seq_printf(seq, "%s%s", vcc->remote.sas_addr.pub, in svc_info()
214 *vcc->remote.sas_addr.pub && *vcc->remote.sas_addr.prv ? "+" : ""); in svc_info()
215 if (*vcc->remote.sas_addr.prv) { in svc_info()
219 seq_printf(seq, "%02x", vcc->remote.sas_addr.prv[i]); in svc_info()
255 struct vcc_state *state = seq->private; in pvc_seq_show()
256 struct atm_vcc *vcc = atm_sk(state->sk); in pvc_seq_show()
273 seq_printf(seq, sizeof(void *) == 4 ? "%-8s%s" : "%-16s%s", in vcc_seq_show()
277 struct vcc_state *state = seq->private; in vcc_seq_show()
278 struct atm_vcc *vcc = atm_sk(state->sk); in vcc_seq_show()
300 struct vcc_state *state = seq->private; in svc_seq_show()
301 struct atm_vcc *vcc = atm_sk(state->sk); in svc_seq_show()
326 return -ENOMEM; in proc_dev_atm_read()
328 if (!dev->ops->proc_read) in proc_dev_atm_read()
329 length = -EINVAL; in proc_dev_atm_read()
331 length = dev->ops->proc_read(dev, pos, (char *)page); in proc_dev_atm_read()
333 length = -EINVAL; in proc_dev_atm_read()
337 length = -EFAULT; in proc_dev_atm_read()
353 if (!dev->ops->proc_read) in atm_proc_dev_register()
356 error = -ENOMEM; in atm_proc_dev_register()
357 dev->proc_name = kasprintf(GFP_KERNEL, "%s:%d", dev->type, dev->number); in atm_proc_dev_register()
358 if (!dev->proc_name) in atm_proc_dev_register()
361 dev->proc_entry = proc_create_data(dev->proc_name, 0, atm_proc_root, in atm_proc_dev_register()
363 if (!dev->proc_entry) in atm_proc_dev_register()
368 kfree(dev->proc_name); in atm_proc_dev_register()
375 if (!dev->ops->proc_read) in atm_proc_dev_deregister()
378 remove_proc_entry(dev->proc_name, atm_proc_root); in atm_proc_dev_deregister()
379 kfree(dev->proc_name); in atm_proc_dev_deregister()
386 return -ENOMEM; in atm_proc_init()