Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Data Storage Methods used?

    Scheduled Pinned Locked Moved Development
    4 Posts 3 Posters 2.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Clear-Pixel
      last edited by

      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.

      HP EliteBook 2530p Laptop - Core2 Duo SL9600 @ 2.13Ghz - 4 GB Ram -128GB SSD
      Atheros Mini PCI-E as Access Point (AR5BXB63H/AR5007EG/AR2425)
      Single Ethernet Port - VLAN
      Cisco SG300 10-port Gigabit Managed Switch
      Cisco DPC3008 Cable Modem  30/4 Mbps
      Pfsense 2.1-RELEASE (amd64)
      –------------------------------------------------------------
      Total Network Power Consumption - 29 Watts

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        It uses the CoreGUI framework.
        http://devwiki.pfsense.org/CoreGUI

        Steve

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          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.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • C
            Clear-Pixel
            last edited by

            Thanks for the info…

            HP EliteBook 2530p Laptop - Core2 Duo SL9600 @ 2.13Ghz - 4 GB Ram -128GB SSD
            Atheros Mini PCI-E as Access Point (AR5BXB63H/AR5007EG/AR2425)
            Single Ethernet Port - VLAN
            Cisco SG300 10-port Gigabit Managed Switch
            Cisco DPC3008 Cable Modem  30/4 Mbps
            Pfsense 2.1-RELEASE (amd64)
            –------------------------------------------------------------
            Total Network Power Consumption - 29 Watts

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.