Lines Matching +full:opt +full:- +full:in
5 * SPDX-License-Identifier: Apache-2.0
11 * Routines setting up the host system. Those are placed in separate file
48 int fd, opt, ret = -EINVAL; in linux_socketcan_iface_open() local
52 return -errno; in linux_socketcan_iface_open()
58 strncpy(ifr.ifr_name, if_name, IFNAMSIZ - 1); in linux_socketcan_iface_open()
63 return -errno; in linux_socketcan_iface_open()
72 return -errno; in linux_socketcan_iface_open()
75 /* this option must always be enabled in order to receive TX confirmations */ in linux_socketcan_iface_open()
76 opt = 1; in linux_socketcan_iface_open()
77 ret = setsockopt(fd, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS, &opt, sizeof(opt)); in linux_socketcan_iface_open()
80 return -errno; in linux_socketcan_iface_open()
106 return -errno; in linux_socketcan_poll_data()
113 return -EAGAIN; in linux_socketcan_poll_data()
137 * frames. In Linux the flags field is undefined for legacy frames. in linux_socketcan_read_data()
140 frame->flags |= CANFD_FDF; in linux_socketcan_read_data()
142 frame->flags = 0; in linux_socketcan_read_data()
150 int opt = mode_fd ? 1 : 0; in linux_socketcan_set_mode_fd() local
152 return setsockopt(fd, SOL_CAN_RAW, CAN_RAW_FD_FRAMES, &opt, sizeof(opt)); in linux_socketcan_set_mode_fd()