Lines Matching refs:channel_fd
76 static int pcp_get_prop(int channel_fd, int prop, unsigned int *val);
85 static int pcp_cleanup(int channel_fd);
191 int channel_fd; in pcp_init() local
212 if ((channel_fd = open(dev_path, O_RDWR|O_EXCL)) < 0) { in pcp_init()
229 if (ioctl(channel_fd, VLDC_IOCTL_OPT_OP, &op) != 0) { in pcp_init()
230 (void) close(channel_fd); in pcp_init()
240 if (pcp_get_prop(channel_fd, GLVC_XPORT_OPT_MTU_SZ, in pcp_init()
242 (void) close(channel_fd); in pcp_init()
268 (void) close(channel_fd); in pcp_init()
272 return (channel_fd); in pcp_init()
283 pcp_close(int channel_fd) in pcp_close() argument
286 if (channel_fd >= 0) { in pcp_close()
288 (void) pcp_cleanup(channel_fd); in pcp_close()
289 (void) close(channel_fd); in pcp_close()
350 pcp_send_recv(int channel_fd, pcp_msg_t *req_msg, pcp_msg_t *resp_msg, in pcp_send_recv() argument
362 if (channel_fd < 0) { in pcp_send_recv()
367 chnl_fd = channel_fd; in pcp_send_recv()
543 pcp_get_prop(int channel_fd, int prop, unsigned int *val) in pcp_get_prop() argument
554 if ((ret = ioctl(channel_fd, GLVC_XPORT_IOCTL_OPT_OP, in pcp_get_prop()
1314 pcp_cleanup(int channel_fd) in pcp_cleanup() argument
1344 if ((ret = ioctl(channel_fd, GLVC_XPORT_IOCTL_DATA_PEEK, in pcp_cleanup()
1364 if ((ret = read(channel_fd, buf, n)) < 0) { in pcp_cleanup()