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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

This is about my first experience with programming Arduino.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Simple Linear Regression
Starting up a Project

764 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