The config scripting language is not the same with C programming language to be able to use directly symbols from C libraries/header files. Moreover, the macro (define) tokens are only in the C source code, not in the compiled binary, so practically at runtime there is no IPTOS_PREC_CRITIC_ECP anymore, the compiler replaced it with the associated value.

While the scripting language can be extended to translate from a string token to an integer value via lex/flex and yacc/bisson files from the core, it is not realistic to expect any C token to be just available in the config scripting language.

Moreover, probably there other defines for more possible tos values. If someone wants to extend the scripting language with tokens corresponding to tos values C defines, it is fine, just make pull requests, it is no reason to have a tracker item for it given such a broad purpose.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3368/1427750880@github.com>