Lines Matching +full:ip +full:- +full:addr
5 * SPDX-License-Identifier: Apache-2.0
21 static void get_address_str(const struct sockaddr *addr, in get_address_str() argument
24 if (IS_ENABLED(CONFIG_NET_IPV6) && addr->sa_family == AF_INET6) { in get_address_str()
26 net_sprint_ipv6_addr(&net_sin6(addr)->sin6_addr), in get_address_str()
27 ntohs(net_sin6(addr)->sin6_port)); in get_address_str()
29 } else if (IS_ENABLED(CONFIG_NET_IPV4) && addr->sa_family == AF_INET) { in get_address_str()
31 net_sprint_ipv4_addr(&net_sin(addr)->sin_addr), in get_address_str()
32 ntohs(net_sin(addr)->sin_port)); in get_address_str()
35 addr->sa_family == AF_PACKET) { in get_address_str()
38 addr->sa_family == AF_CAN) { in get_address_str()
40 } else if (addr->sa_family == AF_UNSPEC) { in get_address_str()
43 snprintk(str, str_len, "AF_UNK(%d)", addr->sa_family); in get_address_str()
50 const struct shell *sh = data->sh; in capture_cb()
51 int *count = data->user_data; in capture_cb()
60 get_address_str(info->local, addr_local, sizeof(addr_local)); in capture_cb()
61 get_address_str(info->peer, addr_peer, sizeof(addr_peer)); in capture_cb()
63 PR("%s\t%c %d %s\t%s\n", info->capture_dev->name, in capture_cb()
64 info->is_enabled ? in capture_cb()
65 (net_if_get_by_iface(info->capture_iface) + '0') : '-', in capture_cb()
66 net_if_get_by_iface(info->tunnel_iface), in capture_cb()
115 PR_WARNING("Remote IP address not specified.\n"); in cmd_net_capture_setup()
116 return -ENOEXEC; in cmd_net_capture_setup()
121 PR_WARNING("Local IP address not specified.\n"); in cmd_net_capture_setup()
122 return -ENOEXEC; in cmd_net_capture_setup()
127 PR_WARNING("Peer IP address not specified.\n"); in cmd_net_capture_setup()
128 return -ENOEXEC; in cmd_net_capture_setup()
140 return -ENOEXEC; in cmd_net_capture_setup()
171 return -ENOEXEC; in cmd_net_capture_cleanup()
199 return -ENOEXEC; in cmd_net_capture_enable()
205 return -ENOEXEC; in cmd_net_capture_enable()
211 return -ENOEXEC; in cmd_net_capture_enable()
217 return -ENOEXEC; in cmd_net_capture_enable()
242 return -ENOEXEC; in cmd_net_capture_disable()
254 "'net capture setup <remote-ip-addr> <local-addr> <peer-addr>'\n"
255 "<remote> is the (outer) endpoint IP address,\n"
256 "<local> is the (inner) local IP address,\n"
257 "<peer> is the (inner) peer IP address\n"