Hi!
I recently figured out how to restart internet(en0) interface on OSX and read some interesting details about our connection. Thanks to objc library I was able to access objective-C methods provided by OSX.
Here is CWInterface Class Reference. Check it out because this documentation provide many interesting methods.