Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Writing a TCP/IP based C++ program to implement higher level protocols

Posted on 2003-03-28
Medium Priority
Last Modified: 2010-04-17
I would like to be able to use the MS TCP/IP stack inside my Windows 200 professional to implement
varios protocols at higher levels.
How can I use an already installled stack to build
1- An IP fram using TCP
2- An IP frame using UDP
3- Using Ethernet and any other 3rd layer which I will program.
I need an answer for LAPTOP as well as desktop?

I have visual Studio 6 from MS. I am looking a solution with and without MFC, say in a console application. Basicall what I am asking is how can I interface with the NIC in my PC?

Then of course another question will be how can I choose which NIC(I have 2) for my application?

Question by:haviv512

Accepted Solution

MHuang earned 300 total points
ID: 8228919
MFC has some classes that support socket programming:


Basically, a stream socket is TCP, while datagram socket is UDP.  The address you open a connection with will determine which NIC is involved.

Without MFC, you'll have to get a bit down and dirty and deal with sockets directly.  The following site may be helpful:


I don't know why NICs on laptops should be different from desktops.


Expert Comment

ID: 9446688
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Make the most of your online learning experience.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Starting up a Project

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question