9.0
Table Of Contents
- VMCI Sockets Programming Guide
- Contents
- About This Book
- About VMCI Sockets
- Porting to VMCI Sockets
- Creating Stream VMCI Sockets
- Creating Datagram VMCI Sockets
- Security of the VMCI Device
- Appendix: Learning More About Sockets
- Index
VMware, Inc. 25
ThisappendixintroducesInternetsocketsandprovidespointerstofurtherinformation.
“A b o u t BerkeleySocketsandWinsock”onpage 25
“ShortIntroductiontoSockets”onpage 26
About Berkeley Sockets and Winsock
Asocketisacommunicationsendpointwithanameandaddressinanetwork.Socketsweremadefamousby
theirimplementationinBerkeleyUNIX,andmadeuniversalbytheirincorporationintoWindows.
Mostsocket‐basedapplicationsemployaclient‐serverapproachtocommunications.Ratherthantryingto
starttwonetworkapplicationssimultaneously,oneappl
icationtriestomakeitselfalwaysavailable(theserver
ortheprovider)whileanotherrequestsservicesasneeded(theclientortheconsumer).
VMCIsocketsaredesignedtousetheclient‐serverapproachbut,unlikeTCPsockets,theydonotsupport
multipleendpointssimultaneouslyinitiatingconnec tionswithoneanother.
Datagoi
ngoverasocketcanbeinanyformat,andtravelineitherdirection.
ManypeopleareconfusedbyAF_INETasopposedtoPF_INET.Linuxdefinesthemasidentical.Thismanual
usesAFonly.AFmeansaddressfamily,whilePFmeansprotocolfamily.Asdesigned,asingleprotocolfamily
couldsupportm
ultipleaddressfamilies.Howeverasimplemented,noprotocolfamilyeversupportedmore
thanoneaddressfamily.ForInternetProtocolversion6(IPv6),AF_INET6issynonymouswithPF_INET6.
WinSockincludesvirtuallyalloftheBerkeleysocketsAPI,aswellasadditionalWSAfunctionstocopewith
cooperativemultitaskingandtheevent‐dr
ivenprogrammingmodelofWindows.
Programmersusestreamsocketsfortheirhighreliability,anddatagramsocketsforspeedandlowoverhead.
Trade Press Books
InternetworkingwithTCP/IP,Volume3:Client‐ServerProgrammingandApplications,Linux/PosixSocketsVersion,by
DouglasE.ComerandDavidL.Stevens,601pages,Prentice‐Hall,2000.
UNIXNetworkProgramming,Volume 1:TheSocketsNetworkingAPI,ThirdEdition,byW.RichardStevens(RIP),
BillFenner,andAndrewM.Rudoff,1024pages,A
ddison‐Wesley,2003.
Berkeley Sockets
WikipediaoffersanexcellentoverviewofthehistoryanddesignofBerkeleysockets.
ForreferenceinformationaboutBerkeleysockets,locateaLinuxsystemwithmanualpagesinstalled,andtype
mansocket.Youshouldbeabletofindbothsocket(2)andsocket(7)referencepages.
Appendix: Learning More About Sockets