Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problemas con struct sk_buff y con #include <linux/config.h>
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Spanish
View previous topic :: View next topic  
Author Message
prosperoo_
n00b
n00b


Joined: 15 Nov 2007
Posts: 14

PostPosted: Wed May 07, 2008 9:00 am    Post subject: problemas con struct sk_buff y con #include <linux/config Reply with quote

Hola comunidad, recibi el siguiente modulo y cuando lo compilo con make me da los siguientes errores, acotar que estoy utilizand un kernel 2.6.22


make -C /lib/modules/2.6.22-gentoo-r9/build M=/home/rafa/mod modules
make[1]: Entering directory `/usr/src/linux-2.6.22-gentoo-r9'
CC [M] /home/rafa/mod/barr_netfilter.o
/home/rafa/mod/barr_netfilter.c:3:26: error: linux/config.h: No such file or directory
In file included from /home/rafa/mod/barr_netfilter.c:14:
include/asm-um/checksum.h:4:29: error: sysdep/checksum.h: No such file or directory
/home/rafa/mod/barr_netfilter.c: In function 'DATOS':
/home/rafa/mod/barr_netfilter.c:41: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c: In function 'cumple':
/home/rafa/mod/barr_netfilter.c:80: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:83: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:85: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:89: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:91: error: 'struct sk_buff' has no member named 'h'
/home/rafa/mod/barr_netfilter.c:91: error: 'struct sk_buff' has no member named 'h'
/home/rafa/mod/barr_netfilter.c:93: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:95: error: 'struct sk_buff' has no member named 'h'
/home/rafa/mod/barr_netfilter.c:95: error: 'struct sk_buff' has no member named 'h'
/home/rafa/mod/barr_netfilter.c: In function 'abrir':
/home/rafa/mod/barr_netfilter.c:151: warning: implicit declaration of function 'nf_conntrack_put'
/home/rafa/mod/barr_netfilter.c:151: error: 'struct sk_buff' has no member named 'nfct'
/home/rafa/mod/barr_netfilter.c:152: error: 'struct sk_buff' has no member named 'nfct'
/home/rafa/mod/barr_netfilter.c:158: warning: implicit declaration of function 'skb_ip_make_writable'
/home/rafa/mod/barr_netfilter.c:159: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:160: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:161: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:161: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:161: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:161: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:161: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:165: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:167: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:168: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:168: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:168: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c: In function 'cerrar':
/home/rafa/mod/barr_netfilter.c:181: error: 'struct sk_buff' has no member named 'nfct'
/home/rafa/mod/barr_netfilter.c:182: error: 'struct sk_buff' has no member named 'nfct'
/home/rafa/mod/barr_netfilter.c:187: warning: assignment makes pointer from integer without a cast
/home/rafa/mod/barr_netfilter.c:195: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:196: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:196: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:196: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:196: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:196: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:199: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:200: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:204: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:206: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:207: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:207: error: 'struct sk_buff' has no member named 'nh'
/home/rafa/mod/barr_netfilter.c:207: error: 'struct sk_buff' has no member named 'nh'
make[2]: *** [/home/rafa/mod/barr_netfilter.o] Error 1
make[1]: *** [_module_/home/rafa/mod] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.22-gentoo-r9'
make: *** [all] Error 2

estuve leyento en internet y me dice que linux/config.h ya esta obsoleto y que la struct sk_buff ha cambiando, con respecto a linux/config.h decia que ya no era necesario incluirla ya que esto en las nuevas verciones del kernel se hacia automatico, pero relacionado a struct sk_buff no encontre respuesta, y la utilizacion de esta structura es fundamental para el modulo ya que mediante ella puedo acceder a las cabeceras, a los datos y a la capa de trasporte de los paquetes enviados y recibidos por la pc, no si el codigo de la ha cambiado o exista otra estructura que sustitulla a la misma.


Si alguien me puede ayudar con este tema gracias de ante mano, saludos
Back to top
View user's profile Send private message
Inodoro_Pereyra
Advocate
Advocate


Joined: 03 Nov 2006
Posts: 2631
Location: En la otra punta del cable

PostPosted: Wed May 07, 2008 6:11 pm    Post subject: Reply with quote

Quote:
/home/rafa/mod/barr_netfilter.c:3:26: error: linux/config.h: No such file or directory


Eso te dice todo. No se absolutamente nada de programación en C, pero evidentemente, vas a tener que modificar esa línea en el código fuente. Eliminarla directamente, lo digo después de haber leido esto.

Capa de transporte? Cabecera de paquetes? Que estás tratando de hacer? Suena interesante :D

Salud!
_________________
Mi Blog.

Si no fuera por C, estaríamos escribiendo programas en BASI, PASAL y OBOL.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Wed May 07, 2008 6:14 pm    Post subject: Reply with quote

Ha habido varios cambios importantes en las últimas releases del kernel. En cualquier caso, poco puedo decirte porque has olvidado postear un enlace a la web donde encontraras dicho módulo. Nadie puede arreglar el código que no puede ver :P

Sin embargo, y dado que la versión del kernel que estás intentando usar, yo empezaría buscando parches, porque seguro que los hay. También podrías probar una versión más moderna del kernel (aunque puede que eso sea peor, todo dependel del caso concreto).
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
Stolz
Moderator
Moderator


Joined: 19 Oct 2003
Posts: 3008
Location: Hong Kong

PostPosted: Wed May 07, 2008 6:19 pm    Post subject: Reply with quote

prosperoo_, ¿este mensaje está relacionado en algo con este?
Back to top
View user's profile Send private message
prosperoo_
n00b
n00b


Joined: 15 Nov 2007
Posts: 14

PostPosted: Wed May 07, 2008 7:03 pm    Post subject: Reply with quote

El objetivo que sigue el modulo que estamos desarrolando consiste en cifrar u desifrar todos los pquetes que entre a la pc, con el objetivo de que la informacion viaje por red de forma segura, inodoro el link que diste no me funciona hago clic en el y me dice que no esta disponible, saludos
Back to top
View user's profile Send private message
sefirotsama
l33t
l33t


Joined: 11 Apr 2006
Posts: 791
Location: sefirot@catalunya # cd ~

PostPosted: Wed May 07, 2008 10:27 pm    Post subject: Reply with quote

prospero_ si pones de tu parte tal vez podamos ayudarte.

De todos modos es un tema que se escapa del objetivo original de éste foro, aún así no nos importaría echarte una mano. Podrías poner de tu parte colgando el código, usando las tags del foro, [ code ]; o bien usando pastebin para colgar las salidas y el código.

Además procura no doblar los hilos cuando lo que quieres es tratar un único tema. Comienza diciendo el enlace de donde sacaste el código, explicando un poco de que va todo.
_________________
Linux User #415604

GnuPG Key: 185F CF01 0FEE D196 D076 65E2 E3EE 52E7 7AA5 4FEB
«Dios no juega a los dados, usa /dev/random.»
Back to top
View user's profile Send private message
Inodoro_Pereyra
Advocate
Advocate


Joined: 03 Nov 2006
Posts: 2631
Location: En la otra punta del cable

PostPosted: Thu May 08, 2008 4:31 am    Post subject: Reply with quote

Corroborado por segunda vez, el link que pasé, funciona, si no podés entrar algo le pasa a tus DNS a los de tu proveedor de internet. Como no viene al caso, básicamente lo que dice es que ya no se usa mas #include <config.h>:

Quote:
AFAIK config.h has been deprecated in recent kernels, you should use
something like this if you need back compat.:

#ifndef AUTOCONF_INCLUDED
#include <linux/config.h>
#endif


Se me ocurren doscientas formas distintas de encriptar una conexión que ya existen y funcionan (y no usan modulos en el kernel), por que complicarte con programar una mas?

Salud!
_________________
Mi Blog.

Si no fuera por C, estaríamos escribiendo programas en BASI, PASAL y OBOL.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Spanish All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum