[pso] [tema5 linux] probleme la compilare

Octavian Voicu octavian.voicu at gmail.com
Tue May 5 07:16:31 EEST 2009


Constantele sunt definite in
linux/netfilter_ipv4.h<https://cs.pub.ro/%7Epso/lxrng/linux/include/linux/netfilter_ipv4.h#L48>,
dar intr-un bloc care nu este procesat in cazul compilarii de module:

/* only for userspace compatibility */
#ifndef __KERNEL__
// ...
#endif /* ! __KERNEL__ */

Cred ca ar trebui sa folosesti valorile din enum nf_inet_hooks (definite in
linux/netfilter.h<https://cs.pub.ro/%7Epso/lxrng/linux/include/linux/netfilter.h#L44>)
care au aceleasi valori se pare:

enum nf_inet_hooks {
    NF_INET_PRE_ROUTING,
    NF_INET_LOCAL_IN,
    NF_INET_FORWARD,
    NF_INET_LOCAL_OUT,
    NF_INET_POST_ROUTING,
    NF_INET_NUMHOOKS
};



2009/5/5 roxana vladoiu <garfan85 at yahoo.com>

> Buna
> Am incercat sa compilez tema 5 de anul trecut pe masina virtuala de anul
> acesta si se pare ca nu-mi recunoaste constantele NF_IP_LOCAL_OUT/
> NF_IP_LOCAL_IN...
>
> In program am inclus urmatoarele headere:
> #include <linux/kernel.h>
> #include <linux/init.h>
> #include <linux/module.h>
> #include <asm/uaccess.h>
> #include <asm/ioctl.h>
> #include <linux/fs.h>
> #include <linux/cdev.h>
> #include <asm/atomic.h>
> #include <linux/netfilter.h>
> #include <linux/netfilter_ipv4.h>
> #include <linux/net.h>
> #include <linux/in.h>
> #include <linux/skbuff.h>
> #include <linux/ip.h>
> #include <linux/tcp.h>
> #include <linux/udp.h>
> #include  <linux/sched.h>
>
> Este ceva care imi scapa???
> Roxana
>
>
> _______________________________________________
> pso mailing list
> pso at cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
>
>


-- 
Octavian Voicu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/pso/attachments/20090505/0546fc6d/attachment.htm>


More information about the pso mailing list