netpoll.c (03351ff4d897098a590cb247b6eebc470b8ecb5a) | netpoll.c (4940fc889e1e63667a15243028ddcd84d471cd8e) |
---|---|
1/* 2 * Common framework for low-level network console, dump, and debugger code 3 * 4 * Sep 8 2003 Matt Mackall <mpm@selenic.com> 5 * 6 * based on the netconsole code from: 7 * 8 * Copyright (C) 2001 Ingo Molnar <mingo@redhat.com> --- 525 unchanged lines hidden (view full) --- 534 } 535 spin_unlock_irqrestore(&npinfo->rx_lock, flags); 536} 537 538int __netpoll_rx(struct sk_buff *skb) 539{ 540 int proto, len, ulen; 541 int hits = 0; | 1/* 2 * Common framework for low-level network console, dump, and debugger code 3 * 4 * Sep 8 2003 Matt Mackall <mpm@selenic.com> 5 * 6 * based on the netconsole code from: 7 * 8 * Copyright (C) 2001 Ingo Molnar <mingo@redhat.com> --- 525 unchanged lines hidden (view full) --- 534 } 535 spin_unlock_irqrestore(&npinfo->rx_lock, flags); 536} 537 538int __netpoll_rx(struct sk_buff *skb) 539{ 540 int proto, len, ulen; 541 int hits = 0; |
542 struct iphdr *iph; | 542 const struct iphdr *iph; |
543 struct udphdr *uh; 544 struct netpoll_info *npinfo = skb->dev->npinfo; 545 struct netpoll *np, *tmp; 546 547 if (list_empty(&npinfo->rx_np)) 548 goto out; 549 550 if (skb->dev->type != ARPHRD_ETHER) --- 142 unchanged lines hidden (view full) --- 693 if ((delim = strchr(cur, '/')) == NULL) 694 goto parse_failed; 695 *delim = 0; 696 np->remote_ip = in_aton(cur); 697 cur = delim + 1; 698 699 if (*cur != 0) { 700 /* MAC address */ | 543 struct udphdr *uh; 544 struct netpoll_info *npinfo = skb->dev->npinfo; 545 struct netpoll *np, *tmp; 546 547 if (list_empty(&npinfo->rx_np)) 548 goto out; 549 550 if (skb->dev->type != ARPHRD_ETHER) --- 142 unchanged lines hidden (view full) --- 693 if ((delim = strchr(cur, '/')) == NULL) 694 goto parse_failed; 695 *delim = 0; 696 np->remote_ip = in_aton(cur); 697 cur = delim + 1; 698 699 if (*cur != 0) { 700 /* MAC address */ |
701 if ((delim = strchr(cur, ':')) == NULL) | 701 if (!mac_pton(cur, np->remote_mac)) |
702 goto parse_failed; | 702 goto parse_failed; |
703 *delim = 0; 704 np->remote_mac[0] = simple_strtol(cur, NULL, 16); 705 cur = delim + 1; 706 if ((delim = strchr(cur, ':')) == NULL) 707 goto parse_failed; 708 *delim = 0; 709 np->remote_mac[1] = simple_strtol(cur, NULL, 16); 710 cur = delim + 1; 711 if ((delim = strchr(cur, ':')) == NULL) 712 goto parse_failed; 713 *delim = 0; 714 np->remote_mac[2] = simple_strtol(cur, NULL, 16); 715 cur = delim + 1; 716 if ((delim = strchr(cur, ':')) == NULL) 717 goto parse_failed; 718 *delim = 0; 719 np->remote_mac[3] = simple_strtol(cur, NULL, 16); 720 cur = delim + 1; 721 if ((delim = strchr(cur, ':')) == NULL) 722 goto parse_failed; 723 *delim = 0; 724 np->remote_mac[4] = simple_strtol(cur, NULL, 16); 725 cur = delim + 1; 726 np->remote_mac[5] = simple_strtol(cur, NULL, 16); | |
727 } 728 729 netpoll_print_options(np); 730 731 return 0; 732 733 parse_failed: 734 printk(KERN_INFO "%s: couldn't parse config at '%s'!\n", --- 237 unchanged lines hidden --- | 703 } 704 705 netpoll_print_options(np); 706 707 return 0; 708 709 parse_failed: 710 printk(KERN_INFO "%s: couldn't parse config at '%s'!\n", --- 237 unchanged lines hidden --- |