内容简介
Chapter1: Getting Around in the Networking Services Library
Part1
How the Networking Services Library Is Structured
How the Networking Services Library Is Designed
Chapter2: What s In This Volume?
Winsock
Quality of Service
Chapter3: Using Microsoft Reference Resources
The Microsoft Developer Network
Comparing MSDN with MSDN Online
MSDN Subscriptions
MSDN Library Subscription
MSDN Universal Subscription
Purchasing an MSDN Subscription
MSDN Professional Subscription
Using MSDN
Navigating MSDN
Quick Tips
Using MSDN Online
Navigating MSDN Online
MSDN Online Features
MSDN Online Registered Users
The Windows Programming Reference Series
Chapter4: Finding the Developer Resources You Need
Developer Support
Online Resources
Internet Standards
Learning Products
Other Resources
Conferences
Chapter5: Writing Great IrDA Applications(with Winsock)
What Is an Ad-Hoc Networking-Enabled Application?
What Is IrDA?
What Is IrDA-C(Previously Known as IrBus)?
What Is Unique about IrDA?
IrDA Core Protocols and Services
Serial IrDA(SIR)Physical Layer(115Kb/s)
Fast IrDA(FIR)Physical Layer(4 Mb/s)
IrLAP Data Link Layer
IrLMP and TinyTP
IrCOMM
IrCOMM Modes
Windows 2000 Support for IrCOMM Through Winsock
No IrCOMM Virtual Serial Ports on Windows 2000
IrDA and the Windows Sockets API
Talking to Non-Windows Devices
Application Addressing
Data Transfer and Connection Close
IrDA and Winsock Reference
WSAStartup
af_irda.h
socket
SOCKADDR_IRDA Structure
bind
listen
accept
getsockopt(,,IRLMP_ENUMDEVICES,,)and connect()
closesocket
send and recv
IAS
IrCOMM Client
Windows 2000 IrDA Architecture
IrDA Hardware Drivers
Windows 2000 Multiple-Adapter Support
Part2
Chapter6: Winsock2 API Overview
Welcome to Windows Sockets 2
Using the Windows Sockets 2 API Document
Overview of Windows Sockets 2
Windows Sockets 2 Features
Socket Handles for Windows Sockets 2
Microsoft Extensions and the Windows Sockets 2 API
Conventions for New Functions
New Concepts, Additions, and Changes for Windows Sockets 2
Windows Sockets 2 Architecture
Simultaneous Access to Multiple Transport Protocols
Backward Compatibility for Windows Sockets 1.1 Applications
Making Transport Protocols Available to Windows Sockets
Layered Protocols and Protocol Chains
Using Multiple Protocols
Multiple Provider Restrictions on Select
Function Extension Mechanism
Debug and Trace Facilities
Name Resolution
Overlapped I/O and Event Objects
Event Objects
Receiving Completion Indications
Asynchronous Notification Using Event Objects
Flow Specification Quality of Service
QOS Templates
Default Values
Socket Groups
Shared Sockets
Enhanced Functionality During Connection Setup and Teardown
Extended Byte-Order Conversion Routines
Support for Scatter/Gather I/O in the API
Protocol-Independent Multicast and Multipoint
Summary of New Socket Options
Summary of New Socket Ioctl Opcodes
Summary of New Functions
Socket Data Type
Deviation from Berkeley Sockets
Windows Sockets Programming Considerations
Select and FD_*
Error Codes—errno, h_errno and WSAGetLastError
Pointers
Renamed Functions
Maximum Number of Sockets Supported
Include Files
Return Values on Function Failure
Service Provided Raw Sockets
Byte Ordering
Windows Sockets Compatibility Issues
Default State for a Socket s Overlapped Attribute
Windows Sockets 1.1 Blocking Routines and EINPROGRESS
Graceful Shutdown, Linger Options, and Socket Closure
Protocol-Independent Out-of-Band Data
Socket Functions
Summary of Windows Sockets 2 Functions
Microsoft Windows-Specific Extension Functions
Registration and Name Resolution
Protocol-Independent Name Resolution
Name Resolution Model
Summary of Name Resolution Functions
Name Resolution Data Structures
Compatible Name Resolution for TCP/IP in the Windows Sockets 1.1 API
Basic Approach for GetXbyY in the API
getprotobyname and getprotobynumber Functions in the API
getservbyname and getservbyport Functions in the API
gethostbyname Function in the API
gethostbyaddr Function in the API
Multipoint Taxonomy
gethostname Function in the API
Multipoint and Multicast Semantics
Windows Sockets 2 Interface Elements for Multipoint and Multicast
Attributes in WSAPROTOCOL_INFO Structure
Flag Bits for WSASocket
SIO_MULTIPOINT_LOOPBACK Command Code for WSAloctl
SIO_MULTICAST_SCOPE Command Code for WSAloctl
Semantics for Joining Multipoint Leaves
Using WSAJoinLeaf
Semantic Differences Between Multipoint Sockets and Regular Sockets
How Existing Multipoint Protocols Support These Extensions
IP Multicast
ATM Point to Multipoint
Socket Option for Windows NT 4.0 Only
Socket Options Specific to Microsoft Service Providers
Additional Windows Socket Information
Windows Sockets 2 API Header File—Winsock2.h
Socket Option for Windows NT 4.0 and Windows 95
Additional Documentation
Chapter7: Error Codes in the Winsock API
Error Codes
Chapter8: Winsock 2 Functions
Windows Sockets 2 Functions
Chapter9: Winsock 2 Structures and Enumerations
Windows Sockets Structures in the API
Windows Sockets Enumeration in the API
Overview of the Windows Sockets 2 SPI
Using the SPI Document
Welcome to Windows Sockets 2 SPI
Chapter10: Winsock 2 SPI Overview
Windows Sockets 2 SPI Features
Microsoft Extensions and the Windows Sockets 2 SPI
Socket Handles for the Windows Sockets 2 SPI
Windows Sockets 2 Architectural Overview
Windows Sockets 2 as a WOSA Component
Windows Sockets 2 DLLs
Function Interface Model
Naming Conventions
Windows Sockets 2 Service Providers
Transport Service Providers
Namespace Service Providers
Data Transport Providers
Transport Division of Responsibilities Between DLL and Service Providers
Windows Sockets 2 Identifiers
Transport Mapping Between API and SPI Functions
Function Extension Mechanism in the SPI
Transport Configuration and Installation
Name Resolution Providers
Name Resolution Model for the SPI
Name Resolution Division of Responsibilities Between DLL and Service Providers
Name Resolution Mapping Between API and SPI Functions
Name Resolution Configuration and Installation
Windows Sockets 2 Transport Provider Requirements
Service Provider Activation
Initialization
Error Reporting and Parameter Validation
Byte Ordering Assumptions
Cleanup
Socket Creation and Descriptor Management
Descriptor Allocation
Socket Attribute Flags and Modes
Closing Sockets
Blocking Operations
Pseudo vs. True Blocking
Blocking Hook
Canceling Blocking Operations
Event Objects in the Windows Sockets 2 SPI
Creating Event Objects
Using Event Objects
Destroying Event Objects
Notification of Network Events
Required Socket Grouping Behavior
Socket Group Operations
Recommended Socket Grouping Behavior
Windows Messages
Event Object Signaling
Selects
Socket Groups in the Windows Sockets 2 SPI
Quality of Service in the Windows Sockets 2 SPI
Socket Connections on Connection-Oriented Protocols
Binding to a Local Address
Protocol Basics: Listen, Connect, Accept
Determining Local and Remote Names
Enhanced Functionality at Connect Time
Connection Shutdown
Reconnecting and Disconnecting
Socket I/O
Using Sendto While Connected
Connecting to a Default Peer
Socket Connections on Connectionless Protocols
Blocking Input/Output
Nonblocking Input/Output
Overlapped Input/Output
Support for Scatter/Gather Input/Output in the SPI
Out-of-Band Data in the SPI
Shared Sockets in the SPI
Multiple Handles to a Single Socket
Reference Counting
Precedence Guidelines
Protocol-Independent Multicast and Multipoint in the SPI
Multipoint Taxonomy and Glossary
Multipoint Socket Attributes
Multipoint Attributes in the WSAPROTOCOL_INFOW Structure
SIO_MULTICAST_SCOPE Ioctl
SPI Semantics for Joining Multipoint Leaves
SIO_MULTIPOINT_LOOPBACK Ioctl
Using WSP JoinLeaf
Semantic Differences Between Multipoint Sockets and Regular Sockets in the SPI
Socket Options and IOCTLs
Summary of Socket Ioctl Opcodes
Summary of SPI Functions
Generic Data Transport Functions
Upcalls Exposed by Windows Sockets 2 DLL
Installation and Configuration Functions
Name Resolution Service Provider Requirements
Summary of Namespace Provider Functions
Service Installation in the Windows Sockets 2 SPI
Namespace Provider Configuration and Installation
Namespace Provider Initialization and Cleanup
Service Query
Helper Functions in the SPI
Name Resolution Data Structures in the SPI
Compatible Name Resolution for TCP/IP in the Windows Sockets 1.1 SPI
Basic Approach for getXbyY in the SPI
getprotobyname and getprotobynumber Functions in the SPI
getservbyname and getservbyport Functions in the SPI
gethostbyname Function in the SPI
gethostbyaddr Function in the SPI
gethostname Function in the SPI
Sample Code for a Service Provider
Service Provider Ordering
Additional Windows Sockets 2 SPI Concerns
Windows Sockets SPI Header File-Ws2spi.h
Chapter11: Winsock 2 SPI Reference
Winsock 2 SPI Reference
Chapter12: Winsock 2 Protocol-Specific Annex
Using the Annex
Overview of Windows Sockets 2
Microsoft Extensions and Windows Sockets 2
Socket Handles for Windows Sockets 2
TCP/IP
TCP/IP Introduction
TCP/IP Overview
TCP/IP Data Structures
TCP/IP Socket Options
UNIX Ioctls
TCP/IP Controls
TCP/IP Function Details
Multicast
TCP/IP Raw Sockets
IPv6 Support
Text Representation of IPv6 Addresses
TCP/IP Header File
IPX/SPX
IPX/SPX Introduction
IPX/SPX Overview
AF_IPX Address Family
IPX Family of Protocol Identifiers
All Routes Broadcast
Directed Broadcast
Broadcast to Local Network
About Media Packet Size
How Packet Size Affects Protocols
IPX/SPX Data Structures
IPX/SPX Controls
NSPROTO_IPX Socket Options
DECnet
DECnet Overview
DNPROTO_NSP Protocol Family
AF_DECnet Address Families
Manifest Constants(Winsock2.h)
Data Structures(Ws2dnet.h)
Manifest Constants(Ws2dnet.h)
DECnet Data Structures
SOCK_SEQPACKET Socket Type
DECnet Function Details
Connections Using Accept/WSAAccept/WSPAccept
Structure Information for Bind/WSPBind
Connections Using Connect/WSAConnect/WSPConnect
Addressing with GetPeerName/WSPGetPeerName
Receiving Local Name With getsockname/WSPGetSockName
Using Getsockopt/WSPGetSockOpt
Using Socket/WSASocket/WSPSocket
DECnet Out-of-Band Data
DECnet-Specific Extended Functions Identifiers
dnet_addr
dnet_eof
dnet_htoa
dnet_getalias
dnet_getacc
dnet_ntoa
getnodeadd
getnodebyaddr
getnodebyname
getnodename
DECnet Header File
Open Systems Interconnection(OSI)
OSI Introduction
International Organization for Standardization(IOS)
ISO Reset
OSI Quality of Service
Option Profiles
ISO Qualified Data
OSI Expedited Data
Address Format
OSI Data Structures
OSI Controls
loctls
Socket Options
OSI Function Specifics
Quality of Service
OSI Header File
ATM-Specific Extensions
ATM Introduction
ATM Overview
ATM Data Structures
Using the ATM_ADDRESS Structure
ATM_BLLI Structure and Associated Manifest Constants
ATM Controls
ATM-BHLI Structure and Associated Manifest Constants
ATM Function Specifics
ATM-Specific Quality of Service Extension
AAL Parameters
ATM Traffic Descriptor
Broadband Bearer Capability
Broadband High Layer Information
Broadband Lower Layer Information
Called Party Number
Called Party Subaddress
Calling Party Number
Transit Network Selection
Quality of Service Parameter
Calling Party Subaddress
Cause
ATM Header File
Other Windows Sockets 2 Considerations
Secure Sockets Layer(SSL)
RSVP
Chapter13: QOS Overview
QOS Documentation Structure
Determining Which Discussion Is for You
Additional Information on QOS
About Quality of Service
Introduction to QOS
Windows 2000 Quality of Service Defined
What QOS Solves
Quality of Service Defined
How Windows 2000 QOS Works
Windows 98 QOS Notes
QOS Header Files
QOS Components
Application-Driven QOS Components
Network-Driven QOS Components
Policy-Driven QOS Components
RSVP and QOS
Chapter14: QOS Programming
Basic QOS Operations
QOS-Enabling Your Application
Opening a QOS-Enabled Socket
Invoking the RSVP SP
Providing the RSVP SP with QOS-specific Parameters
Receiving QOS-Enabled Data
Sending QOS-Enabled Data
Closing the QOS Connection
QOS Templates
Enumerating Available QOS Templates
Applying a QOS Template
Installing a QOS Template
Removing a QOS Template
Built-in QOS Templates
RSVP SP Error Codes
Error Codes
Error Values
Service Types
CONTROLLED LOAD
GUARANTEED
Primary Service Types
BEST EFFORT
QUALITATIVE
Secondary Service Types
SERVICETYPE_NOTRAFFIC
SERVICETYPE_GENERAL_INFORMATION
SERVICETYPE_NOCHANGE
SERVICE_NO_TRAFFIC_CONTROL
SERVICE_NO_QOS_SIGNALING
Using Service Types
Directional Implications of Service Types
Examples of Setting the Service Type
Use of the ProviderSpecific Buffer as a Receiver
Use of the ProviderSpecific Buffer as a Sender
Structure of the ProviderSpecific Buffer
Using the ProviderSpecific Buffer
Understanding Traffic Control
How the RSVP SP Invokes TC
Using SIO-CHK-QOS
Disabling Traffic Control
QOS Events
Listening for FD_QOS Events
Using WSAEventSelect or WSAAsyncSelect
Using Overlapped WSAloctl(SIO_GET_QOS)
QOS Event Codes
RSVP SP and RSVP
Basic RSVP Operations
Invoking RSVP
Confirming RSVP Reservations
Using the RSVP_RESERVE_INFO Object
Disabling RSVP Signaling
RSVP Reservation Styles
Base RSVP Reservation Styles
Default RSVP Filter Style Settings
Overriding Default RSVP Filter Style Settings
Mapping RSVP SP Parameters to RSVP
RSVP PATH and RESV Messages
Tspec, FlowSpec, and Adspec
Mapping QOS Call Sequences to RSVP
Sending Applications
Receiving Applications
Receiver Reservation Semantics
Using WSAConnect to Join Unicast RSVP Sessions
Using WSAJoinLeaf to Join Multicast RSVP Sessions
Using WSAloctl(SIO_SET_QOS)During RSVP Sessions
Use of Sendto and WSASendTo by Multicast Senders
Chapter15: QOS API Reference
QOS Functions
QOS Structures
QOS Objects
Chapter16: Traffic Control API Reference
Traffic Control Functions
Entry Points Exposed by Clients of the Traffic Control Interface
Traffic Control Structures
Traffic Control Objects
Chapter17: Local Policy Module API Reference
LPM Functions
LPM Structures
Part3
Index: Networking Services Programming Elements-Alphabetical Listing