ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] plugin.c error !!

From: Pascal Quantin <pascal.quantin@xxxxxxxxx>
Date: Mon, 05 May 2014 23:09:46 +0200
Le 05/05/2014 22:47, khemis haythem a écrit :

 
Khemis Haythem
Adresse : Boite Postale 101  4118, Mednine
GSM : +216 55 69 19 90
Statut : Élève ingénieur 
Spécialité : Génie des Communications et des Réseaux 
Ecole : Ecole National d'Ingénieurs de Gabes
hello,
 yes the packet-my_Plugin.c file in my my_Plugin folder include two proto_register_xxxlabel and proto_register_xxxasdu 
and i added the file to Makefile.common !! 
but i have this problem
Did you follow the convention explained in README.dissector?

    the "register" routine's name must appear in the source file
    either at the beginning of the line, or preceded only by "void "
    at the beginning of the line (that would typically be the
    definition) - other white space shouldn't cause a problem, e.g.:

void proto_register_XXX(void) {

    ...

}

and

void
proto_register_XXX( void )
{

    ...

}

    and so on should work.

The error you get means that the Python regular _expression_ trying to find the proto_register_XXX function failed. Only the files added to the NONGENERATED_REGISTER_C_FILES section of Makefile.common will be scanned.

I strongly recommend you to compare the changes you did with another plugin source code so as to find the error you did (assuming that the Wireshark source code compiles fine without your custom plugin). Unless you agree to share your code, you are more or less on your own to find the error.

 regards,
haythem. 

Le Lundi 5 mai 2014 20h46, Pascal Quantin <pascal.quantin@xxxxxxxxx> a écrit :
Le 05/05/2014 21:28, khemis haythem a écrit :

 
Khemis Haythem
Adresse : Boite Postale 101  4118, Mednine
GSM : +216 55 69 19 90
Statut : Élève ingénieur 
Spécialité : Génie des Communications et des Réseaux 
Ecole : Ecole National d'Ingénieurs de Gabes
hello,
when i run 'make' i get this error message :
make[3]: Entering directory '/home/haythem/wireshark/plugins/my_Plugin
making plugin.c with python
No protocol registration found 
make[3]: *** [plugin.c] Error 1 
what is the problem ? and how can i solve it ? 
haythem.

Does the packet-my_Plugin.c file in your my_Plugin folder include a proto_register_XXX function? It yes, did you add the file to Makefile.common?

Pascal.

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe




___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe