Data Storage Methods used?
-
From what I have gathered pfsense is reading and writing all data to xml files for permanent storage rather than a database …. what I cant seem to find is code linking to the xml files. For example Firewall_rules_edit.php there are no links to a xml file in the source.
-
It uses the CoreGUI framework.
http://devwiki.pfsense.org/CoreGUISteve
-
Follow the trail in config.inc and config.lib.inc, you'll find that it's using either xmlparse.inc or xmlreader.inc (both work, there is a choice to use either one).
It's all done seamlessly, if you put data into a $config['foo'] variable and then write_config() it will get into the config. Certain tag names are considered arrays, so a little care is needed but really most developers don't have to know/care about the data storage backend stuff because we're handling all that for them.
-
Thanks for the info…
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy