| 184 | } |
| 185 | |
| 186 | unsigned int GetPathPortSegmentExtendedPortNumber( |
| 187 | const unsigned char *const cip_path) { |
| 188 | /* OPENER_ASSERT(kPortSegmentExtendedPort == GetPathPortSegmentPortIdentifier(cip_path), |
| 189 | "There is no extended port available!\n") */ |
| 190 | OPENER_ASSERT( kPortSegmentExtendedPort == |
| 191 | GetPathPortSegmentPortIdentifier(cip_path) ) |
| 192 | const unsigned int kExtendedPortSegmentPosition = |
| 193 | GetPathPortSegmentExtendedLinkAddressSizeBit(cip_path) == true ? 2 : 1; |
| 194 | return cip_path[kExtendedPortSegmentPosition] |
| 195 | + (cip_path[kExtendedPortSegmentPosition + 1] << 8); |
| 196 | } |
| 197 | |
| 198 | void SetPathPortSegmentExtendedPortIdentifier( |
| 199 | const unsigned int extended_port_identifier, |