.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
---|
3 | | - * Licensed under the GPL. |
---|
4 | 4 | */ |
---|
5 | 5 | |
---|
6 | 6 | #include <errno.h> |
---|
.. | .. |
---|
32 | 32 | return 0; |
---|
33 | 33 | } |
---|
34 | 34 | |
---|
35 | | -static int pcap_open(void *data) |
---|
| 35 | +static int pcap_user_open(void *data) |
---|
36 | 36 | { |
---|
37 | 37 | struct pcap_data *pri = data; |
---|
38 | 38 | __u32 netmask; |
---|
.. | .. |
---|
44 | 44 | if (pri->filter != NULL) { |
---|
45 | 45 | err = dev_netmask(pri->dev, &netmask); |
---|
46 | 46 | if (err < 0) { |
---|
47 | | - printk(UM_KERN_ERR "pcap_open : dev_netmask failed\n"); |
---|
| 47 | + printk(UM_KERN_ERR "pcap_user_open : dev_netmask failed\n"); |
---|
48 | 48 | return -EIO; |
---|
49 | 49 | } |
---|
50 | 50 | |
---|
51 | 51 | pri->compiled = uml_kmalloc(sizeof(struct bpf_program), |
---|
52 | 52 | UM_GFP_KERNEL); |
---|
53 | 53 | if (pri->compiled == NULL) { |
---|
54 | | - printk(UM_KERN_ERR "pcap_open : kmalloc failed\n"); |
---|
| 54 | + printk(UM_KERN_ERR "pcap_user_open : kmalloc failed\n"); |
---|
55 | 55 | return -ENOMEM; |
---|
56 | 56 | } |
---|
57 | 57 | |
---|
.. | .. |
---|
59 | 59 | (struct bpf_program *) pri->compiled, |
---|
60 | 60 | pri->filter, pri->optimize, netmask); |
---|
61 | 61 | if (err < 0) { |
---|
62 | | - printk(UM_KERN_ERR "pcap_open : pcap_compile failed - " |
---|
| 62 | + printk(UM_KERN_ERR "pcap_user_open : pcap_compile failed - " |
---|
63 | 63 | "'%s'\n", pcap_geterr(pri->pcap)); |
---|
64 | 64 | goto out; |
---|
65 | 65 | } |
---|
66 | 66 | |
---|
67 | 67 | err = pcap_setfilter(pri->pcap, pri->compiled); |
---|
68 | 68 | if (err < 0) { |
---|
69 | | - printk(UM_KERN_ERR "pcap_open : pcap_setfilter " |
---|
| 69 | + printk(UM_KERN_ERR "pcap_user_open : pcap_setfilter " |
---|
70 | 70 | "failed - '%s'\n", pcap_geterr(pri->pcap)); |
---|
71 | 71 | goto out; |
---|
72 | 72 | } |
---|
.. | .. |
---|
127 | 127 | |
---|
128 | 128 | const struct net_user_info pcap_user_info = { |
---|
129 | 129 | .init = pcap_user_init, |
---|
130 | | - .open = pcap_open, |
---|
| 130 | + .open = pcap_user_open, |
---|
131 | 131 | .close = NULL, |
---|
132 | 132 | .remove = pcap_remove, |
---|
133 | 133 | .add_address = NULL, |
---|