<div class="content"><p>The <b>PORT_DATA_2</b> structure specifies level 2 port
configuration data.<a id="Appendix_A_Target_137"></a><a aria-label="Product behavior note 137" href="e81cbc09-ab05-4a32-ae4a-8ec57b436c43#Appendix_A_137" data-linktype="relative-path">&lt;137&gt;</a></p><table>
 <tbody><tr>
  <th><p><br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>1<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>2<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>3<br/>0</p></th>
  <th><p><br/>1</p></th>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">PortName
  (128 bytes)</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Version</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Protocol</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Size</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Reserved</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">HostAddress
  (256 bytes)</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">SNMPCommunity
  (66 bytes)</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
 <tr>
  <td colspan="16">
  <p align="center">...</p>
  </td>
  <td colspan="16">
  <p align="center">PaddingForAlignment</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">DoubleSpool</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">Queue
  (66 bytes)</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
 <tr>
  <td colspan="16">
  <p align="center">...</p>
  </td>
  <td colspan="16">
  <p align="center">DeviceType
  (514 bytes)</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">...</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">PortNumber</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">SNMPEnabled</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">SNMPDevIndex</p>
  </td>
 </tr>
 <tr>
  <td colspan="32">
  <p align="center">PortMonitorMibIndex</p>
  </td>
 </tr>
</tbody></table><p><b>PortName (128 bytes): </b>A null-terminated <a href="831cd729-be7c-451e-b729-bd8d84ce4d24#gt_b069acb4-e364-453e-ac83-42d469bb339e" data-linktype="relative-path">Unicode string</a>, which is
the name of the <a href="831cd729-be7c-451e-b729-bd8d84ce4d24#gt_ac027425-6043-4ad3-be27-56a381b75d38" data-linktype="relative-path">port</a>.</p><p><b>Version (4 bytes): </b>A 32-bit unsigned integer
that specifies the version number of the <b>PORT_DATA_2</b> structure. This
value MUST be 0x00000002.</p><p><b>Protocol (4 bytes): </b>A 32-bit unsigned integer
that specifies the protocol to use for the port. This value MUST be either <b>PROTOCOL_RAWTCP_TYPE</b>
(0x00000001), indicating that the port expects RAW print data, or <b>PROTOCOL_LPR_TYPE</b>
(0x00000002), indicating that the port expects to be driven as an LPR port.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Name/value</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>PROTOCOL_RAWTCP_TYPE</p>
  <p>0x00000001</p>
  </td>
  <td>
  <p>The port expects RAW print data.</p>
  </td>
 </tr><tr>
  <td>
  <p>PROTOCOL_LPR_TYPE</p>
  <p>0x00000002</p>
  </td>
  <td>
  <p>The port expects to be driven as an LPR port.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>Size (4 bytes): </b>A 32-bit unsigned integer that
specifies the size, in bytes, of the <b>PORT_DATA_2</b> structure.</p><p><b>Reserved (4 bytes): </b>A 32-bit unsigned integer
that is set to zero.</p><p><b>HostAddress (256 bytes): </b>A null-terminated
Unicode string, which is the IP address or host name of the printer.</p><p><b>SNMPCommunity (66 bytes): </b>A null-terminated
Unicode string, which is the Simple Network Management Protocol (SNMP) <a href="https://go.microsoft.com/fwlink/?LinkId=121934" data-linktype="external">[RFC1157]</a> community
name of the printer.</p><p><b>PaddingForAlignment (2 bytes): </b>2 bytes of
padding to align the <b>DoubleSpool</b> field on a 4-byte boundary. The
contents of this field MUST be ignored.</p><p><b>DoubleSpool (4 bytes): </b>A 32-bit unsigned
integer that, if nonzero, indicates double spooling is enabled or, if zero,
indicates that double spooling is disabled.</p><p><b>Queue (66 bytes): </b>A null-terminated Unicode
string, which is the LPR queue name.</p><p><b>DeviceType (514 bytes): </b>A null-terminated
Unicode string, which is the generic SNMP system device description OID 1.3.6.1.2.1.1.1
(<a id="_Hlk147244718">for a network device object ID</a>).</p><p><b>PortNumber (4 bytes): </b>A 32-bit unsigned
integer that is the port number of the device.</p><p><b>SNMPEnabled (4 bytes): </b>A 32-bit unsigned
integer that, if nonzero, indicates that the device supports SNMP.</p><p><b>SNMPDevIndex (4 bytes): </b>A 32-bit unsigned
integer that is the SNMP device index.</p><p><b>PortMonitorMibIndex (4 bytes): </b>A 32-bit
unsigned integer that specifies the index in the network devices Printer
Working Group (PWG) <a href="https://go.microsoft.com/fwlink/?linkid=2133506" data-linktype="external">[IEEE-PWG]</a>
<a href="831cd729-be7c-451e-b729-bd8d84ce4d24#gt_1b5f368b-942b-40dd-84ea-fa9082916216" data-linktype="relative-path">port Monitor</a> <a href="831cd729-be7c-451e-b729-bd8d84ce4d24#gt_4a0fe673-f05d-4272-8702-f3f2b448fa82" data-linktype="relative-path">Management Information Base
(MIB)</a> for the current <a href="831cd729-be7c-451e-b729-bd8d84ce4d24#gt_7e4cced1-30e5-4baf-8848-8a050df1be4e" data-linktype="relative-path">TCPMON</a>
port. This index is used to query the IEEE 1284 device ID for the attached
printer. For details, see <a href="https://go.microsoft.com/fwlink/?LinkId=89898" data-linktype="external">[IEEE1284]</a>.</p></div>