• Home
  • Raw
  • Download

Lines Matching refs:vcc

17 extern int atm_init_aal5(struct atm_vcc *vcc); /* "raw" AAL5 transport */
24 struct atm_vcc *vcc; /* control VCC; NULL if detached */ member
42 static int atmtcp_send_control(struct atm_vcc *vcc,int type, in atmtcp_send_control() argument
52 out_vcc = PRIV(vcc->dev) ? PRIV(vcc->dev)->vcc : NULL; in atmtcp_send_control()
57 out_vcc = PRIV(vcc->dev) ? PRIV(vcc->dev)->vcc : NULL; in atmtcp_send_control()
67 memset(&new_msg->vcc,0,sizeof(atm_kptr_t)); in atmtcp_send_control()
68 *(struct atm_vcc **) &new_msg->vcc = vcc; in atmtcp_send_control()
69 old_test = test_bit(flag,&vcc->flags); in atmtcp_send_control()
71 add_wait_queue(sk_sleep(sk_atm(vcc)), &wait); in atmtcp_send_control()
72 while (test_bit(flag,&vcc->flags) == old_test) { in atmtcp_send_control()
74 out_vcc = PRIV(vcc->dev) ? PRIV(vcc->dev)->vcc : NULL; in atmtcp_send_control()
83 remove_wait_queue(sk_sleep(sk_atm(vcc)), &wait); in atmtcp_send_control()
90 struct atm_vcc *vcc = *(struct atm_vcc **) &msg->vcc; in atmtcp_recv_control() local
92 vcc->vpi = msg->addr.sap_addr.vpi; in atmtcp_recv_control()
93 vcc->vci = msg->addr.sap_addr.vci; in atmtcp_recv_control()
94 vcc->qos = msg->qos; in atmtcp_recv_control()
95 sk_atm(vcc)->sk_err = -msg->result; in atmtcp_recv_control()
98 change_bit(ATM_VF_READY,&vcc->flags); in atmtcp_recv_control()
101 change_bit(ATM_VF_ADDR,&vcc->flags); in atmtcp_recv_control()
108 wake_up(sk_sleep(sk_atm(vcc))); in atmtcp_recv_control()
119 static int atmtcp_v_open(struct atm_vcc *vcc) in atmtcp_v_open() argument
123 short vpi = vcc->vpi; in atmtcp_v_open()
124 int vci = vcc->vci; in atmtcp_v_open()
134 msg.qos = vcc->qos; in atmtcp_v_open()
135 set_bit(ATM_VF_ADDR,&vcc->flags); in atmtcp_v_open()
136 clear_bit(ATM_VF_READY,&vcc->flags); /* just in case ... */ in atmtcp_v_open()
137 error = atmtcp_send_control(vcc,ATMTCP_CTRL_OPEN,&msg,ATM_VF_READY); in atmtcp_v_open()
139 return -sk_atm(vcc)->sk_err; in atmtcp_v_open()
143 static void atmtcp_v_close(struct atm_vcc *vcc) in atmtcp_v_close() argument
149 msg.addr.sap_addr.vpi = vcc->vpi; in atmtcp_v_close()
150 msg.addr.sap_addr.vci = vcc->vci; in atmtcp_v_close()
151 clear_bit(ATM_VF_READY,&vcc->flags); in atmtcp_v_close()
152 (void) atmtcp_send_control(vcc,ATMTCP_CTRL_CLOSE,&msg,ATM_VF_ADDR); in atmtcp_v_close()
159 struct atm_vcc *vcc; in atmtcp_v_ioctl() local
175 vcc = atm_sk(s); in atmtcp_v_ioctl()
176 if (vcc->dev != dev) in atmtcp_v_ioctl()
178 if ((vcc->vpi >> ci.vpi_bits) || in atmtcp_v_ioctl()
179 (vcc->vci >> ci.vci_bits)) { in atmtcp_v_ioctl()
191 static int atmtcp_v_send(struct atm_vcc *vcc,struct sk_buff *skb) in atmtcp_v_send() argument
199 if (vcc->qos.txtp.traffic_class == ATM_NONE) { in atmtcp_v_send()
200 if (vcc->pop) vcc->pop(vcc,skb); in atmtcp_v_send()
204 dev_data = PRIV(vcc->dev); in atmtcp_v_send()
205 if (dev_data) out_vcc = dev_data->vcc; in atmtcp_v_send()
207 if (vcc->pop) vcc->pop(vcc,skb); in atmtcp_v_send()
210 atomic_inc(&vcc->stats->tx_err); in atmtcp_v_send()
216 if (vcc->pop) vcc->pop(vcc,skb); in atmtcp_v_send()
218 atomic_inc(&vcc->stats->tx_err); in atmtcp_v_send()
222 hdr->vpi = htons(vcc->vpi); in atmtcp_v_send()
223 hdr->vci = htons(vcc->vci); in atmtcp_v_send()
226 if (vcc->pop) vcc->pop(vcc,skb); in atmtcp_v_send()
229 atomic_inc(&vcc->stats->tx); in atmtcp_v_send()
242 dev_data->vcc ? "" : "dis"); in atmtcp_v_proc()
246 static void atmtcp_c_close(struct atm_vcc *vcc) in atmtcp_c_close() argument
251 atmtcp_dev = (struct atm_dev *) vcc->dev_data; in atmtcp_c_close()
253 dev_data->vcc = NULL; in atmtcp_c_close()
258 vcc->dev_data = NULL; in atmtcp_c_close()
266 struct atm_vcc *vcc; in find_vcc() local
273 vcc = atm_sk(s); in find_vcc()
274 if (vcc->dev == dev && in find_vcc()
275 vcc->vci == vci && vcc->vpi == vpi && in find_vcc()
276 vcc->qos.rxtp.traffic_class != ATM_NONE) { in find_vcc()
277 return vcc; in find_vcc()
284 static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb) in atmtcp_c_send() argument
293 dev = vcc->dev_data; in atmtcp_c_send()
304 atomic_inc(&vcc->stats->tx_err); in atmtcp_c_send()
316 atomic_inc(&vcc->stats->tx); in atmtcp_c_send()
319 if (vcc->pop) vcc->pop(vcc,skb); in atmtcp_c_send()
377 PRIV(dev)->vcc = NULL; in atmtcp_create()
384 static int atmtcp_attach(struct atm_vcc *vcc,int itf) in atmtcp_attach() argument
395 if (PRIV(dev)->vcc) { in atmtcp_attach()
406 PRIV(dev)->vcc = vcc; in atmtcp_attach()
407 vcc->dev = &atmtcp_control_dev; in atmtcp_attach()
408 vcc_insert_socket(sk_atm(vcc)); in atmtcp_attach()
409 set_bit(ATM_VF_META,&vcc->flags); in atmtcp_attach()
410 set_bit(ATM_VF_READY,&vcc->flags); in atmtcp_attach()
411 vcc->dev_data = dev; in atmtcp_attach()
412 (void) atm_init_aal5(vcc); /* @@@ losing AAL in transit ... */ in atmtcp_attach()
413 vcc->stats = &atmtcp_control_dev.stats.aal5; in atmtcp_attach()
438 if (PRIV(dev)->vcc) return 0; in atmtcp_remove_persistent()
448 struct atm_vcc *vcc = ATM_SD(sock); in atmtcp_ioctl() local
458 err = atmtcp_attach(vcc, (int) arg); in atmtcp_ioctl()