Chapter 3:

Winsock 2 and Internet Protocol




C & Winsock: The Kick Start programming tutorials


C & Linux Socket


Program Example Index


C#, VB .NET & C++/CLI Network Programming


Windows Device Driver Development & Program Examples


ReactOS - Windows OS Binary Compatible Open Source Project - C & C++







What do we have in this chapter?

  1. IPv4 - Internet Protocol v4

  2. Addressing




    IPv4 Management Protocols

    Addressing IPv4 from Winsock

    IPv6 - Internet Protocol v6





    Addressing IPv6 from Winsock

    Address and Name Resolution

  3. Name Resolution Routines

  4. The Unicode Version, GetAddrInfoW()

  5. Program Example Using AI_NUMERICHOST

  6. Simple Address Conversion

    WSAAddressToString() and WSAStringToAddress() Program Examples

  7. The InetNtop()/inet_ntop()

  8. The InetPton()/inet_pton()

    Legacy Name Resolution Routines

  9. The getprotobyname() Program Example

  10. The getprotobyport() Program Example

    Writing IP Version–Independent Program Example

    The Client Example

    The Server Example

    Another Day, Another Example: The IPv6 Server Program Example

  11. The IPv6 Client Program Example

  12. Testing the IPv6 Client and Server Programs Example





In this chapter, we've discussed both IPv4 and IPv6. We covered addressing, name resolution, as well as the necessary Winsock data structures for each address family. The new name resolution functions were described followed by the legacy name resolution functions. Finally, we covered how to write applications that work seamlessly over IPv4 and IPv6. In other chapter, we will try to cover the remaining protocols accessible from Winsock, including IPX/SPX, AppleTalk, IrDA, and ATM.







Custom Search



< Chap 2: Protocol Characteristics | Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Chap 4: Other Supported Protocols >


Share and email to your beloved friends and foes: