次の方法で共有


2.2.1.2.197 IP_NAT_INTERFACE_INFO

The IP_NAT_INTERFACE_INFO structure is used to configure the NAT on an interface. This structure is used in the following methods:

The configuration information uses the RTR_INFO_BLOCK_HEADER (section 2.2.1.2.3) structure.

 typedef struct _IP_NAT_INTERFACE_INFO {
   ULONG Index;
   ULONG Flags;
   RTR_INFO_BLOCK_HEADER Header;
 } IP_NAT_INTERFACE_INFO, *PIP_NAT_INTERFACE_INFO;

Index: This MUST be set to the interface index that identifies the interface to be configured.

Flags: This specifies the logging level. It MUST be a combination of one or more of the following values.

Value

Meaning

IP_NAT_INTERFACE_FLAGS_BOUNDARY

0x00000001

Set to mark the interface as a boundary-interface.

IP_NAT_INTERFACE_FLAGS_NAPT

0x00000002

Set to enable address-sharing via port-translation.

IP_NAT_INTERFACE_FLAGS_DISABLE_PPTP

0x00000004

The PPTP is disabled.

IP_NAT_INTERFACE_FLAGS_FW

0x00000010

Set to enable the firewall mode on the interface. This works with all other flags. An interface in the firewall mode is much more strict on what inbound packets it will allow to propagate up the stack; in general, it will only allow packets that are part of a locally initiated connection flow (for example, packets for which a mapping or ticket exists).

IP_NAT_INTERFACE_FLAGS_DIALUP

0x00000040

This is a dial-up interface.

IP_NAT_INTERFACE_FLAGS_ALL

0x0000007F

All of the above.

Header: This MUST be RTR_INFO_BLOCK_HEADER. The InfoType field of the header MUST be one of the following and the offset MUST point to a structure specified in the following table.

Value

Meaning

IP_NAT_PORT_MAPPING_TYPE

0xFFFF0003

IP_NAT_PORT_MAPPING (section 2.2.1.2.199).

IP_NAT_ADDRESS_RANGE_TYPE

0xFFFF0002

IP_NAT_ADDRESS_RANGE (section 2.2.1.2.198).

IP_NAT_ADDRESS_MAPPING_TYPE

0xFFFF0004

IP_NAT_ADDRESS_MAPPING (section 2.2.1.2.200).

IP_NAT_ICMP_CONFIG_TYPE

0xFFFF0005

There is no structure for IP_NAT_ICMP_CONFIG; it's just a ULONG. The flags in the following table define the behavior.

The values for IP_NAT_ICMP_CONFIG_TYPE are as follows:

Value

Meaning

IP_NAT_ICMP_ALLOW_OB_DEST_UNREACH

0x00000008

The data sent over the Internet that fails to reach this computer due to an error will be discarded and acknowledged with a destination unreachable message explaining the failure.

IP_NAT_ICMP_ALLOW_OB_SOURCE_QUENCH

0x00000010

When this computer's ability to process incoming data cannot keep up with the rate of a transmission, data will be dropped and the sender will be asked to slow down.

IP_NAT_ICMP_ALLOW_REDIRECT

0x00000020

The data sent from this computer will be rerouted if the default path changes.

IP_NAT_ICMP_ALLOW_IB_ECHO

0x00000100

The messages sent to this computer will be repeated back to the sender. This is commonly used for troubleshooting, for example, to ping a machine.

IP_NAT_ICMP_ALLOW_IB_ROUTER

0x00000200

This computer will respond to requests for information about the routes it recognizes.

IP_NAT_ICMP_ALLOW_OB_TIME_EXCEEDED

0x00000800

When this computer discards an incomplete data transmission because the entire transmission required more time than allowed, it will reply to the sender with a time-expired message.

IP_NAT_ICMP_ALLOW_OB_PARAM_PROBLEM

0x00001000

When this computer discards data it has received due to a problematic header, it will reply to the sender with a bad-header error message.

IP_NAT_ICMP_ALLOW_IB_TIMESTAMP

0x00002000

The data sent to this computer can be acknowledged with a confirmation message indicating the time that the data was received.

IP_NAT_ICMP_ALLOW_IB_MASK

0x00020000

This computer will listen for and respond to requests for more information about the public network to which it is attached.