Lines Matching refs:np
109 struct netpoll np; member
184 nt->np.name = "netconsole"; in alloc_param_target()
185 strlcpy(nt->np.dev_name, "eth0", IFNAMSIZ); in alloc_param_target()
186 nt->np.local_port = 6665; in alloc_param_target()
187 nt->np.remote_port = 6666; in alloc_param_target()
189 eth_broadcast_addr(nt->np.remote_mac); in alloc_param_target()
192 err = netpoll_parse_options(&nt->np, target_config); in alloc_param_target()
196 err = netpoll_setup(&nt->np); in alloc_param_target()
212 netpoll_cleanup(&nt->np); in free_param_target()
263 return snprintf(buf, PAGE_SIZE, "%s\n", nt->np.dev_name); in show_dev_name()
268 return snprintf(buf, PAGE_SIZE, "%d\n", nt->np.local_port); in show_local_port()
273 return snprintf(buf, PAGE_SIZE, "%d\n", nt->np.remote_port); in show_remote_port()
278 if (nt->np.ipv6) in show_local_ip()
279 return snprintf(buf, PAGE_SIZE, "%pI6c\n", &nt->np.local_ip.in6); in show_local_ip()
281 return snprintf(buf, PAGE_SIZE, "%pI4\n", &nt->np.local_ip); in show_local_ip()
286 if (nt->np.ipv6) in show_remote_ip()
287 return snprintf(buf, PAGE_SIZE, "%pI6c\n", &nt->np.remote_ip.in6); in show_remote_ip()
289 return snprintf(buf, PAGE_SIZE, "%pI4\n", &nt->np.remote_ip); in show_remote_ip()
294 struct net_device *dev = nt->np.dev; in show_local_mac()
302 return snprintf(buf, PAGE_SIZE, "%pM\n", nt->np.remote_mac); in show_remote_mac()
336 netpoll_print_options(&nt->np); in store_enabled()
338 err = netpoll_setup(&nt->np); in store_enabled()
351 netpoll_cleanup(&nt->np); in store_enabled()
371 strlcpy(nt->np.dev_name, buf, IFNAMSIZ); in store_dev_name()
374 len = strnlen(nt->np.dev_name, IFNAMSIZ); in store_dev_name()
375 if (nt->np.dev_name[len - 1] == '\n') in store_dev_name()
376 nt->np.dev_name[len - 1] = '\0'; in store_dev_name()
393 rv = kstrtou16(buf, 10, &nt->np.local_port); in store_local_port()
411 rv = kstrtou16(buf, 10, &nt->np.remote_port); in store_remote_port()
429 if (in6_pton(buf, count, nt->np.local_ip.in6.s6_addr, -1, &end) > 0) { in store_local_ip()
434 nt->np.ipv6 = true; in store_local_ip()
438 if (!nt->np.ipv6) { in store_local_ip()
439 nt->np.local_ip.ip = in_aton(buf); in store_local_ip()
459 if (in6_pton(buf, count, nt->np.remote_ip.in6.s6_addr, -1, &end) > 0) { in store_remote_ip()
464 nt->np.ipv6 = true; in store_remote_ip()
468 if (!nt->np.ipv6) { in store_remote_ip()
469 nt->np.remote_ip.ip = in_aton(buf); in store_remote_ip()
493 memcpy(nt->np.remote_mac, remote_mac, ETH_ALEN); in store_remote_mac()
603 nt->np.name = "netconsole"; in make_netconsole_target()
604 strlcpy(nt->np.dev_name, "eth0", IFNAMSIZ); in make_netconsole_target()
605 nt->np.local_port = 6665; in make_netconsole_target()
606 nt->np.remote_port = 6666; in make_netconsole_target()
608 eth_broadcast_addr(nt->np.remote_mac); in make_netconsole_target()
636 netpoll_cleanup(&nt->np); in drop_netconsole_target()
680 if (nt->np.dev == dev) { in netconsole_netdev_event()
683 strlcpy(nt->np.dev_name, dev->name, IFNAMSIZ); in netconsole_netdev_event()
693 __netpoll_cleanup(&nt->np); in netconsole_netdev_event()
696 dev_put(nt->np.dev); in netconsole_netdev_event()
697 nt->np.dev = NULL; in netconsole_netdev_event()
748 if (nt->enabled && netif_running(nt->np.dev)) { in write_msg()
758 netpoll_send_udp(&nt->np, tmp, frag); in write_msg()