| 1745 | } |
| 1746 | |
| 1747 | static inline void |
| 1748 | handle_ioctl_msg(struct ff_msg *msg) |
| 1749 | { |
| 1750 | int fd, ret; |
| 1751 | #ifdef INET6 |
| 1752 | if (msg->msg_type == FF_IOCTL6) { |
| 1753 | fd = ff_socket(AF_INET6, SOCK_DGRAM, 0); |
| 1754 | } else |
| 1755 | #endif |
| 1756 | fd = ff_socket(AF_INET, SOCK_DGRAM, 0); |
| 1757 | |
| 1758 | if (fd < 0) { |
| 1759 | ret = -1; |
| 1760 | goto done; |
| 1761 | } |
| 1762 | |
| 1763 | ret = ff_ioctl_freebsd(fd, msg->ioctl.cmd, msg->ioctl.data); |
| 1764 | |
| 1765 | ff_close(fd); |
| 1766 | |
| 1767 | done: |
| 1768 | if (ret < 0) { |
| 1769 | msg->result = errno; |
| 1770 | } else { |
| 1771 | msg->result = 0; |
| 1772 | } |
| 1773 | } |
| 1774 | |
| 1775 | static inline void |
| 1776 | handle_route_msg(struct ff_msg *msg) |
no test coverage detected