2.2.1.2.183 IP_NAT_ENUMERATE_SESSION_MAPPINGS

The IP_NAT_ENUMERATE_SESSION_MAPPINGS structure is used for enumerating NAT session mappings and is part of the IP_NAT_MIB_QUERY (section 2.2.1.2.182) structure.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Index

EnumerateContext (16 bytes)

...

...

EnumerateCount

EnumerateTotalHint

EnumerateTable (variable)

Index (4 bytes): This MUST be the index of the interface.

EnumerateContext (16 bytes): This is represented by an array of 4 ULONG values. On the first call to RMIBEntryGet (section 3.1.4.30) or RMIBEntryGetFirst (section 3.1.4.31) methods EnumerateContext is zeroed out. It will be filled by the NAT with the information to be passed back down as the enumeration continues. To indicate there are no items remaining, the NAT will set EnumerateContext[0] to 0. In RMIBEntryGetNext (section 3.2.4.32) method, EnumerateContext MUST be returned to the value returned in the previous calls.  

EnumerateCount (4 bytes): Contains the number of enumerations returned and the number of IP_NAT_SESSION_MAPPING (section 2.2.1.2.184) structures being returned.

EnumerateTotalHint (4 bytes): Count of the total number of entries.

EnumerateTable (variable): This MUST be IP_NAT_SESSION_MAPPING structures.

Note The EnumerateTable field is of variable size depending on the value of EnumerateCount. While calculating the structure size, the size of EnumerateTable MUST NOT be added if value of EnumerateCount is zero.