Lines Matching +full:promiscuous +full:- +full:mode
4 * SPDX-License-Identifier: Apache-2.0
16 #include <zephyr/net/promiscuous.h>
21 struct net_buf *buf = pkt->buffer; in net_pkt_hexdump()
24 LOG_HEXDUMP_DBG(buf->data, buf->len, str); in net_pkt_hexdump()
25 buf = buf->frags; in net_pkt_hexdump()
35 LOG_INF("Cannot set promiscuous mode for interface %p (%d)", in iface_cb()
40 LOG_INF("Promiscuous mode enabled for interface %p", iface); in iface_cb()
49 return -EINVAL; in get_ports()
52 *src = ntohs(udp_hdr->src_port); in get_ports()
53 *dst = ntohs(udp_hdr->dst_port); in get_ports()
73 switch (NET_IPV6_HDR(pkt)->vtc & 0xf0) { in print_info()
77 dst = &NET_IPV6_HDR(pkt)->dst; in print_info()
78 src = &NET_IPV6_HDR(pkt)->src; in print_info()
79 next_hdr = NET_IPV6_HDR(pkt)->nexthdr; in print_info()
85 dst = &NET_IPV4_HDR(pkt)->dst; in print_info()
86 src = &NET_IPV4_HDR(pkt)->src; in print_info()
87 next_hdr = NET_IPV4_HDR(pkt)->proto; in print_info()
132 LOG_INF("%s %s (%zd) %s:%u -> %s:%u", in print_info()
137 LOG_INF("%s %s (%zd) %s -> %s", "IPv4", proto, in print_info()
143 LOG_INF("%s %s (%zd) [%s]:%u -> [%s]:%u", in print_info()
148 LOG_INF("%s %s (%zd) %s -> %s", "IPv6", proto, in print_info()
164 return -ENOEXEC; in set_promisc_mode()
174 return -ENOEXEC; in set_promisc_mode()
177 shell_fprintf(sh, SHELL_INFO, "Promiscuous mode %s...\n", in set_promisc_mode()
187 if (ret == -EALREADY) { in set_promisc_mode()
189 "Promiscuous mode already %s\n", in set_promisc_mode()
193 "Cannot %s promiscuous mode for " in set_promisc_mode()
198 return -ENOEXEC; in set_promisc_mode()
218 "Turn promiscuous mode on\n"
220 "Turn on promiscuous mode for the interface\n",
222 SHELL_CMD(off, NULL, "Turn promiscuous mode off\n"
224 "Turn off promiscuous mode for the interface\n",
230 "Promiscuous mode commands", NULL);