title: Is there a way to programmatically set an interface MTU using C in Linux?
body: <p>At the moment my program is making a <code>system()</code> call to <em><code>ifconfig</code></em> to do this.</p>
  
  <p>It seems a bit messy - maybe <em><code>ifconfig</code></em> is not on the path, or in some non-standard location. And then I'd need to check for the <em>iproute2</em> equivalent in case of failure.</p>
  
  <p>Is there a way to set this programmatically using C?</p>