MCPcopy Create free account
hub / github.com/F-Stack/f-stack / handle_ioctl_msg

Function handle_ioctl_msg

lib/ff_dpdk_if.c:1747–1773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1745}
1746
1747static inline void
1748handle_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
1767done:
1768 if (ret < 0) {
1769 msg->result = errno;
1770 } else {
1771 msg->result = 0;
1772 }
1773}
1774
1775static inline void
1776handle_route_msg(struct ff_msg *msg)

Callers 1

handle_msgFunction · 0.85

Calls 3

ff_ioctl_freebsdFunction · 0.85
ff_closeFunction · 0.85
ff_socketFunction · 0.70

Tested by

no test coverage detected