Lines Matching refs:channel_fd
63 * int pcp_send_recv(int channel_fd, pcp_msg_t *req_msg, pcp_msg_t *resp_msg,
65 * int pcp_close(int 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;
212 if ((channel_fd = open(dev_path, O_RDWR|O_EXCL)) < 0) {
229 if (ioctl(channel_fd, VLDC_IOCTL_OPT_OP, &op) != 0) {
230 (void) close(channel_fd);
240 if (pcp_get_prop(channel_fd, GLVC_XPORT_OPT_MTU_SZ,
242 (void) close(channel_fd);
268 (void) close(channel_fd);
272 return (channel_fd);
278 * int channel_fd - channel file descriptor.
283 pcp_close(int channel_fd)
286 if (channel_fd >= 0) {
288 (void) pcp_cleanup(channel_fd);
289 (void) close(channel_fd);
335 * int channel_fd - channel file descriptor.
350 pcp_send_recv(int channel_fd, pcp_msg_t *req_msg, pcp_msg_t *resp_msg,
362 if (channel_fd < 0) {
366 /* copy channel_fd to local fd (chnl_fd) for other functions use */
367 chnl_fd = channel_fd;
533 * int channel_fd - channel file descriptor.
543 pcp_get_prop(int channel_fd, int prop, unsigned int *val)
554 if ((ret = ioctl(channel_fd, GLVC_XPORT_IOCTL_OPT_OP,
1314 pcp_cleanup(int channel_fd)
1344 if ((ret = ioctl(channel_fd, GLVC_XPORT_IOCTL_DATA_PEEK,
1364 if ((ret = read(channel_fd, buf, n)) < 0) {