title: How do I check /etc/network/interfaces file grammar and test it in C code?
body: <p>I have a file ("interfaces_new" like /etc/network/interfaces) that I have to test.
  Tests concerns File grammar and if I can detect if the settings are correct by testing, it is only better.</p>
  
  <p>I searched and I fell on the ifup command that seems to do everything I want.</p>
  
  <p>The trouble is that I do not want to call system in my C code, so I try to retrieve the sources of ifupdown.</p>
  
  <p>I do not even succeeded, many result indicating to me that a script ifup on most system. On my Debian 7.1.0, it is a EFL binary.</p>
  
  <p>What comes to my questions:
  * Is it a usable tool in C code which allows to parse the grammar of a file / etc / network / interfaces?
  * Is there a doc listing all the valid options? ifup man gives nothing (or I look bad :/ ), the idea being to make my own parser.
  * How to get the source code of the ifup command to Debian 7.1.0?</p>