Lines Matching refs:np

115 	struct netpoll		np;  member
191 nt->np.name = "netconsole"; in alloc_param_target()
192 strlcpy(nt->np.dev_name, "eth0", IFNAMSIZ); in alloc_param_target()
193 nt->np.local_port = 6665; in alloc_param_target()
194 nt->np.remote_port = 6666; in alloc_param_target()
195 eth_broadcast_addr(nt->np.remote_mac); in alloc_param_target()
203 err = netpoll_parse_options(&nt->np, target_config); in alloc_param_target()
207 err = netpoll_setup(&nt->np); in alloc_param_target()
223 netpoll_cleanup(&nt->np); in free_param_target()
270 return snprintf(buf, PAGE_SIZE, "%s\n", to_target(item)->np.dev_name); in dev_name_show()
275 return snprintf(buf, PAGE_SIZE, "%d\n", to_target(item)->np.local_port); in local_port_show()
280 return snprintf(buf, PAGE_SIZE, "%d\n", to_target(item)->np.remote_port); in remote_port_show()
287 if (nt->np.ipv6) in local_ip_show()
288 return snprintf(buf, PAGE_SIZE, "%pI6c\n", &nt->np.local_ip.in6); in local_ip_show()
290 return snprintf(buf, PAGE_SIZE, "%pI4\n", &nt->np.local_ip); in local_ip_show()
297 if (nt->np.ipv6) in remote_ip_show()
298 return snprintf(buf, PAGE_SIZE, "%pI6c\n", &nt->np.remote_ip.in6); in remote_ip_show()
300 return snprintf(buf, PAGE_SIZE, "%pI4\n", &nt->np.remote_ip); in remote_ip_show()
305 struct net_device *dev = to_target(item)->np.dev; in local_mac_show()
313 return snprintf(buf, PAGE_SIZE, "%pM\n", to_target(item)->np.remote_mac); in remote_mac_show()
355 netpoll_print_options(&nt->np); in enabled_store()
357 err = netpoll_setup(&nt->np); in enabled_store()
370 netpoll_cleanup(&nt->np); in enabled_store()
428 strlcpy(nt->np.dev_name, buf, IFNAMSIZ); in dev_name_store()
431 len = strnlen(nt->np.dev_name, IFNAMSIZ); in dev_name_store()
432 if (nt->np.dev_name[len - 1] == '\n') in dev_name_store()
433 nt->np.dev_name[len - 1] = '\0'; in dev_name_store()
452 rv = kstrtou16(buf, 10, &nt->np.local_port); in local_port_store()
475 rv = kstrtou16(buf, 10, &nt->np.remote_port); in remote_port_store()
499 if (in6_pton(buf, count, nt->np.local_ip.in6.s6_addr, -1, &end) > 0) { in local_ip_store()
504 nt->np.ipv6 = true; in local_ip_store()
508 if (!nt->np.ipv6) { in local_ip_store()
509 nt->np.local_ip.ip = in_aton(buf); in local_ip_store()
535 if (in6_pton(buf, count, nt->np.remote_ip.in6.s6_addr, -1, &end) > 0) { in remote_ip_store()
540 nt->np.ipv6 = true; in remote_ip_store()
544 if (!nt->np.ipv6) { in remote_ip_store()
545 nt->np.remote_ip.ip = in_aton(buf); in remote_ip_store()
574 memcpy(nt->np.remote_mac, remote_mac, ETH_ALEN); in remote_mac_store()
643 nt->np.name = "netconsole"; in make_netconsole_target()
644 strlcpy(nt->np.dev_name, "eth0", IFNAMSIZ); in make_netconsole_target()
645 nt->np.local_port = 6665; in make_netconsole_target()
646 nt->np.remote_port = 6666; in make_netconsole_target()
647 eth_broadcast_addr(nt->np.remote_mac); in make_netconsole_target()
675 netpoll_cleanup(&nt->np); in drop_netconsole_target()
719 if (nt->np.dev == dev) { in netconsole_netdev_event()
722 strlcpy(nt->np.dev_name, dev->name, IFNAMSIZ); in netconsole_netdev_event()
732 __netpoll_cleanup(&nt->np); in netconsole_netdev_event()
735 dev_put(nt->np.dev); in netconsole_netdev_event()
736 nt->np.dev = NULL; in netconsole_netdev_event()
790 netpoll_send_udp(&nt->np, msg, msg_len); in send_ext_msg_udp()
825 netpoll_send_udp(&nt->np, buf, this_header + this_chunk); in send_ext_msg_udp()
842 if (nt->extended && nt->enabled && netif_running(nt->np.dev)) in write_ext_msg()
862 if (!nt->extended && nt->enabled && netif_running(nt->np.dev)) { in write_msg()
872 netpoll_send_udp(&nt->np, tmp, frag); in write_msg()