IFWXNetworkSocket Interface

The IFWXNetworkSocket interface is a Microsoft Firewall service socket interface, and is derived from the IFWXSocket interface. The implementation uses the dynamic packet filtering functionality of Forefront TMG to automatically open a packet filter port when necessary, and to close it when the socket is closed.

Note  Before releasing this interface, you must call the Close or Shutdown method on it.

Syntax

interface IFWXNetworkSocket : IFWXSocket

Methods

The IFWXNetworkSocket interface inherits from IFWXSocket.

In addition, IFWXNetworkSocket defines the following methods.

Method Description

Send

Sends a buffer asynchronously. It performs an overlapped send operation.

SendTo

Sends a buffer asynchronously on UDP sockets to a specific address. It performs an overlapped sendto operation.

Recv

Receives a buffer asynchronously. It performs an overlapped receive (or receive from operation, depending on the socket type).

Shutdown

Starts transport shutdown on the socket.

Close

Closes the socket.

Connect

Establishes a connection to a specified socket. This method is similar to the Winsock connect function.

Bind

Associates a local address with a socket. This method is similar to the Winsock bind function.

GetSockName

Gets the local name of a socket. This method is similar to the Winsock getsockname function.

GetPeerName

Gets the remote name of a socket. This method is similar to the Winsock getpeername function.

Listen

Listens on a TCP socket.

SetSockOpt

Sets a socket option. This method is similar to the Winsock setsockopt function.

GetSockOpt

Gets a socket option. This method is similar to the Winsock getsockopt function.

Accept

Asynchronously permits a connection on a listening socket. This method is similar to the Winsock accept function.

SetIpFilter

Sets the IP filter for the socket. It sets a new IP filter if there was not one, or replaces the current IP filter with a new one.

GetIpFilter

Gets a copy of the IP filter object for the socket. Returns NULL if the connection is not limited to a range of IP addresses.

Remarks

A socket object that implements this interface can be created by calling IFWXFirewall::CreateNetworkSocket, IFWXSession::CreateNetworkSocket, or IFWXFirewall2::CreateSSLNetworkSocket.

The nature of the socket is determined by which of these three methods is used to create the object. A socket created by calling IFWXFirewall::CreateNetworkSocket is not user-specific. An example of a socket that should not be user-specific is a listening socket. To create a user-specific socket object, use IFWXSession::CreateNetworkSocket. Finally, a socket object created by calling IFWXFirewall2::CreateSSLNetworkSocket represents an SSL socket for secured communication.

An SSL socket does not implement the Accept, Connect, and SendTo methods. For more information, see Socket Implementation in Forefront TMG.

Implementation

This interface is implemented in the Firewall service.

Requirements

Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).
Header

Declared in Wspfwext.idl.

See Also

Filter Interfaces


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.