MSDN Community

Windows Network API Reference

Explore the comprehensive set of APIs available for developing network-aware applications and services on Windows.

Sockets

The Winsock (Windows Sockets) API provides a standard interface for network communication. It supports various protocols like TCP and UDP for both connection-oriented and connectionless communication.

socket()

Creates a socket that is bound to a specific transport service provider.

SOCKET socket(
  int af,
  int type,
  int protocol
);

bind()

Associates a local name with a socket.

int bind(
  SOCKET s,
  const struct sockaddr *name,
  int namelen
);

connect()

Establishes a connection to a remote socket.

int connect(
  SOCKET s,
  const struct sockaddr *name,
  int namelen
);

send() / recv()

Sends and receives data on a socket.

int send(
  SOCKET s,
  const char *buf,
  int len,
  int flags
);
int recv(
  SOCKET s,
  char *buf,
  int len,
  int flags
);

Protocol Drivers

APIs for interacting with network protocol drivers, enabling lower-level network operations.

NDIS (Network Driver Interface Specification)

Provides a standardized interface for network adapter drivers to communicate with the transport protocols.

Remote Procedure Call (RPC)

RPC allows a program to cause a procedure (subroutine) to execute in another address space (typically on another machine) without the programmer explicitly coding the details of that remote interaction.

RpcBindingCreateNF()

Creates a binding handle.

Network Management

APIs for managing network configurations and devices.

SNMP (Simple Network Management Protocol) API

Provides functionality to manage network devices.

IP Helper API

A set of functions that provide access to network configuration information and enable modification of this configuration.

GetAdaptersInfo()

Retrieves detailed information about the network adapters installed on the local computer.

DWORD GetAdaptersInfo(
  PIP_ADAPTER_INFO AdapterInfo,
  PULONG             Size
);

GetIpNetTable()

Retrieves the local IP routing table.

Winsock Kernel (WSK)

The Winsock Kernel (WSK) is a kernel-mode programming interface that allows user-mode and kernel-mode applications to access Winsock services.

WskSocket()

Creates a WSK socket.

DNS API

APIs for performing DNS queries and managing DNS settings.

DnsQuery_A()

Queries DNS for a specified record type.

DNS_STATUS DnsQuery_A(
  PCSTR              pszName,
  WORD               wType,
  DWORD              Options,
  PVOID              pServerList,
  PDNS_RECORD        *ppQueryResults,
  PVOID              pSpare
);