|
Lines 203-209
Link Here
|
| 203 |
#endif |
203 |
#endif |
| 204 |
|
204 |
|
| 205 |
static unsigned int |
205 |
static unsigned int |
|
|
206 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) |
| 206 |
VNetFilterHookFn(unsigned int hooknum, // IN: |
207 |
VNetFilterHookFn(unsigned int hooknum, // IN: |
|
|
208 |
#else |
| 209 |
VNetFilterHookFn(const struct nf_hook_ops *ops, // IN: |
| 210 |
#endif |
| 207 |
#ifdef VMW_NFHOOK_USES_SKB |
211 |
#ifdef VMW_NFHOOK_USES_SKB |
| 208 |
struct sk_buff *skb, // IN: |
212 |
struct sk_buff *skb, // IN: |
| 209 |
#else |
213 |
#else |
|
Lines 252-258
Link Here
|
| 252 |
|
256 |
|
| 253 |
/* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */ |
257 |
/* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */ |
| 254 |
/* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */ |
258 |
/* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */ |
| 255 |
transmit = (hooknum == VMW_NF_INET_POST_ROUTING); |
259 |
|
|
|
260 |
|
| 261 |
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) |
| 262 |
transmit = (hooknum == VMW_NF_INET_POST_ROUTING); |
| 263 |
#else |
| 264 |
transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING); |
| 265 |
#endif |
| 256 |
|
266 |
|
| 257 |
packetHeader = compat_skb_network_header(skb); |
267 |
packetHeader = compat_skb_network_header(skb); |
| 258 |
ip = (struct iphdr*)packetHeader; |
268 |
ip = (struct iphdr*)packetHeader; |