共用方式為


2.2.2.14.4 PORT_DATA_2

The PORT_DATA_2 structure specifies level 2 port configuration data.<137>


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

PortName (128 bytes)

...

...

...

Version

Protocol

Size

Reserved

HostAddress (256 bytes)

...

...

...

SNMPCommunity (66 bytes)

...

...

...

PaddingForAlignment

DoubleSpool

Queue (66 bytes)

...

...

...

DeviceType (514 bytes)

...

...

PortNumber

SNMPEnabled

SNMPDevIndex

PortMonitorMibIndex

PortName (128 bytes): A null-terminated Unicode string, which is the name of the port.

Version (4 bytes): A 32-bit unsigned integer that specifies the version number of the PORT_DATA_2 structure. This value MUST be 0x00000002.

Protocol (4 bytes): A 32-bit unsigned integer that specifies the protocol to use for the port. This value MUST be either PROTOCOL_RAWTCP_TYPE (0x00000001), indicating that the port expects RAW print data, or PROTOCOL_LPR_TYPE (0x00000002), indicating that the port expects to be driven as an LPR port.

Name/value

Description

PROTOCOL_RAWTCP_TYPE

0x00000001

The port expects RAW print data.

PROTOCOL_LPR_TYPE

0x00000002

The port expects to be driven as an LPR port.

Size (4 bytes): A 32-bit unsigned integer that specifies the size, in bytes, of the PORT_DATA_2 structure.

Reserved (4 bytes): A 32-bit unsigned integer that is set to zero.

HostAddress (256 bytes): A null-terminated Unicode string, which is the IP address or host name of the printer.

SNMPCommunity (66 bytes): A null-terminated Unicode string, which is the Simple Network Management Protocol (SNMP) [RFC1157] community name of the printer.

PaddingForAlignment (2 bytes): 2 bytes of padding to align the DoubleSpool field on a 4-byte boundary. The contents of this field MUST be ignored.

DoubleSpool (4 bytes): A 32-bit unsigned integer that, if nonzero, indicates double spooling is enabled or, if zero, indicates that double spooling is disabled.

Queue (66 bytes): A null-terminated Unicode string, which is the LPR queue name.

DeviceType (514 bytes): A null-terminated Unicode string, which is the generic SNMP system device description OID 1.3.6.1.2.1.1.1 (for a network device object ID).

PortNumber (4 bytes): A 32-bit unsigned integer that is the port number of the device.

SNMPEnabled (4 bytes): A 32-bit unsigned integer that, if nonzero, indicates that the device supports SNMP.

SNMPDevIndex (4 bytes): A 32-bit unsigned integer that is the SNMP device index.

PortMonitorMibIndex (4 bytes): A 32-bit unsigned integer that specifies the index in the network devices Printer Working Group (PWG) [IEEE-PWG] port Monitor Management Information Base (MIB) for the current TCPMON port. This index is used to query the IEEE 1284 device ID for the attached printer. For details, see [IEEE1284].