dynamic data structure in my owm freeradius module
Hi, I'm trying to write my own module for freeradius. I'd like to use a configuration file where i save some recursive structure. eg: module_name <module_name> { var1 = val1 var2 = val2 subsection1 subsection1_name { var1_1 = val1_1 var1_2 = val1_2 } .... .... subsectionN subsectionN_name { varN_1 = valN_1 varN_2 = valN_2 } } I'm trying to realize a more simple data structure first, with only one subsection. An example: http://pastebin.com/JYfh3BuK but i have a segfault. Someone can help me with this implementation. Should i use PW_TYPE_SUBSECTION in the main module_config[] structure? How can i manage the case where there are N subsection of the same type? Thanks
Marco Marino wrote:
I'm trying to write my own module for freeradius. I'd like to use a configuration file where i save some recursive structure. eg:
That works. See the existing modules for examples.
I'm trying to realize a more simple data structure first, with only one subsection. An example: http://pastebin.com/JYfh3BuK but i have a segfault.
Well.. you've deleted anything useful in the text you pasted there. If you make it hard for us to help you... then we can't help you.
Someone can help me with this implementation. Should i use PW_TYPE_SUBSECTION in the main module_config[] structure?
Yes.
How can i manage the case where there are N subsection of the same type?
Process it manually. See the existing code for examples. And we're not really in the business of debugging closed-source code. If your module is public and useful, we can take a look at adding it to the server. If your module is private, then we can't really help. Alan DeKok.
2014/1/22 Alan DeKok <aland@deployingradius.com>
Marco Marino wrote:
I'm trying to write my own module for freeradius. I'd like to use a configuration file where i save some recursive structure. eg:
That works. See the existing modules for examples.
I'm trying to realize a more simple data structure first, with only one subsection. An example: http://pastebin.com/JYfh3BuK but i have a segfault.
Well.. you've deleted anything useful in the text you pasted there.
If you make it hard for us to help you... then we can't help you.
Sorry.... it wasn't my intention.
Someone can help me with this implementation. Should i use PW_TYPE_SUBSECTION in the main module_config[] structure?
Yes.
How can i manage the case where there are N subsection of the same type?
Process it manually. See the existing code for examples.
You're right, I solved. Thank you.
And we're not really in the business of debugging closed-source code. If your module is public and useful, we can take a look at adding it to the server. If your module is private, then we can't really help.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
participants (2)
-
Alan DeKok -
Marco Marino