Wireshark mailing list archives

Re: Errors building 3.7 plugins.


From: Peter McCarthy <peter.mccarthy () comcast net>
Date: Tue, 14 Dec 2021 05:52:52 -0500

João,

Thank you for the reply. My plugins are now working again!

So, to sum up, to get external plugins working again in 3.7 from 3.4:

API change in proto_tree_add_uint_bits_format_value(…)

and

#define ssize_t long int

ahead of the #include in some plugins. 

Thanks,

Peter M. 

Sent from my awesome iPhone

On Dec 13, 2021, at 10:57, João Valverde <j () v6e pt> wrote:

 Hi,

The problem is that ssize_t is not defined in your platform. More specifically because we define it in config.h that 
definition is not available to external plugins.

It's a Wireshark bug but the easiest fix is for you to define ssize_t before including wsutil/regex.h.

Thanks for bringing this to our attention.

On 13/12/21 15:44, Peter McCarthy wrote:
Good day all

I am in the process of moving a set of custom plugins from 3.4 to 3.7. I got the issues related to the 
proto_tree_add_uint_bits_format_value API change figured out. There is one other error that I can’t quite understand 
in one of my plugins. 

I have included the error message from one of the files below. Since the error message indicates that the problem 
was encountered building my code, I suspect the problem is there. But I’m not sure where as I’m not invoking the 
regex.h code directly. 

Any pointers?

Thank you

Peter M. 


C:\ws-3-7\wireshark\wsutil/regex.h(26,66): error C2146: syntax error: missing ')' before identifier 'subj_size' 
[C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
       C:\ws-3-7\wireshark\wsutil/regex.h(26,66): error C2146: ws_regex_matches(const ws_regex_t *re, const char 
*subj, ssize_t subj_size); [C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
       C:\ws-3-7\wireshark\wsutil/regex.h(26,66): error C2146:                                                      
            ^ (compiling source file C:\ws-3-7\wireshark\plugins\epan\6017\k02_1
       4.c) [C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
         C:\ws-3-7\wireshark\wsutil/regex.h(26,66): error C2081: 'ssize_t': name in formal parameter list illegal 
[C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
       C:\ws-3-7\wireshark\wsutil/regex.h(26,66): error C2081: ws_regex_matches(const ws_regex_t *re, const char 
*subj, ssize_t subj_size); [C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
       C:\ws-3-7\wireshark\wsutil/regex.h(26,66): error C2081:                                                      
            ^ (compiling source file C:\ws-3-7\wireshark\plugins\epan\6017\k02_1
       4.c) [C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
         C:\ws-3-7\wireshark\wsutil/regex.h(26,66): error C2061: syntax error: identifier 'subj_size' 
[C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
       C:\ws-3-7\wireshark\wsutil/regex.h(26,66): error C2061: ws_regex_matches(const ws_regex_t *re, const char 
*subj, ssize_t subj_size); [C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
       C:\ws-3-7\wireshark\wsutil/regex.h(26,66): error C2061:                                                      
            ^ (compiling source file C:\ws-3-7\wireshark\plugins\epan\6017\k02_1
       4.c) [C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
         C:\ws-3-7\wireshark\wsutil/regex.h(26,66): error C2059: syntax error: ';' 
[C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
       C:\ws-3-7\wireshark\wsutil/regex.h(26,66): error C2059: ws_regex_matches(const ws_regex_t *re, const char 
*subj, ssize_t subj_size); [C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
       C:\ws-3-7\wireshark\wsutil/regex.h(26,66): error C2059:                                                      
            ^ (compiling source file C:\ws-3-7\wireshark\plugins\epan\6017\k02_1
       4.c) [C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
         C:\ws-3-7\wireshark\wsutil/regex.h(26,75): error C2059: syntax error: ')' 
[C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
       C:\ws-3-7\wireshark\wsutil/regex.h(26,75): error C2059: ws_regex_matches(const ws_regex_t *re, const char 
*subj, ssize_t subj_size); [C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
       C:\ws-3-7\wireshark\wsutil/regex.h(26,75): error C2059:                                                      
                     ^ (compiling source file C:\ws-3-7\wireshark\plugins\epan\6
       017\k02_14.c) [C:\ws-3-7\wsbuild64\plugins\epan\6017\vmf.vcxproj]
                  
 
 


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

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

Current thread: