MacTCP used the standard device driver calls (Open, Close, Control, etc) to control a driver. There was an SDK called the MacTCP Developer Kit, which I think might still be available from Apple's ftp server (try http://mirrors.vanadac.com/ftp.apple.com/developer/Development_Kits/). I suggest you start with the article by Steve Falkenburg in issue 6 of Develop magazine. If you don't have the magazine or developer essentials disk 6, you can see a text-only version at:
http://www.mactech.com/articles/develop/issue_06/p46-69_Falkenburg_text_.html
http://www.mactech.com/articles/develop/issue_06/p46-69_Falkenburg_text_.html