Probably too late to answer this, and you may have got some help from the comment above.
There are a few questions you will have to ask yourself, such as what the calling mechanism is, whether the application layer in the protocol stack is running at the same privilege level as your application and so on.
Then you should define your primitive operations, such as connect to remote host. By define I mean what are the values you will pass to the operation, what are the expected returns.
Then you will have to design and implement your operations. My advice would be to develop the skeleton application as you go, because that's your test suite, and you can do test-driven development, which is a lot more fun and much more effective.
I also think some context around the question would be useful - what level of education is this for, what overall architecture are you expected to adhere to, is this a user level program or a system service (sorry, I probably don't know the correct unix terminology).