- tx_address_.can_family = AF_CAN;
- tx_address_.can_ifindex = ifr.ifr_ifindex;
-
- if(connect((struct sockaddr *)&tx_address_, sizeof(tx_address_)) < 0)
- {
- AFB_ERROR("Connect failed. %s", strerror(errno));
- close();
- }
- // Needed because of using systemD event loop. See sd_event_add_io manual.
- fcntl(socketcan_t::socket_, F_SETFL, O_NONBLOCK);