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

x
?
Solved

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

Posted on 2003-03-28
3
Medium Priority
?
259 Views
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?

0
Comment
Question by:haviv512
2 Comments
 

Accepted Solution

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

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_windows_sockets_in_mfc.asp

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:

http://www.sockets.com/

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


0
 

Expert Comment

by:CleanupPing
ID: 9446688
haviv512:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

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.
Progress
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